Reputation: 323
This is just the beginning of a bigger project, but I can't geet through the first steps... In Actionscript I've downloaded this simple tutorial, almost everything in the code is ok except for 1 line:
this._baseNode.addChild(this.universe);
For some reason, the compiler (Flash Builder) is not recognising _baseNode, but all the other elements are ok. All libraries and the two .as files are in place.
The complete code is the next one:
package {
import flash.events.Event;
import flash.events.MouseEvent;
import org.papervision3d.lights.PointLight3D;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.objects.parsers.DAE;
import org.papervision3d.materials.shadematerials.GouraudMaterial;
import org.papervision3d.lights.PointLight3D;
[SWF(width=640,height=480,frameRate=30,backgroundColor=0x0)]
public class Alpha1 extends PV3DARApp {
private var universe:DisplayObject3D;
private var daeFile:DAE;
private var pointLight:PointLight3D;
public function Alpha1() {
this.init('Data/camera_para.dat', 'Data/marker16.pat');
}
protected override function onInit():void {
super.onInit();
daeFile = new DAE();
daeFile.load("plane.dae");
daeFile.z = 40;
daeFile.scaleY = 1.0;
daeFile.scaleZ = 1.0;
daeFile.rotationX = 90;
daeFile.rotationY = 0;
daeFile.rotationZ = 0;
/*this.pointLight = new PointLight3D(true, false);
this.pointLight.z = -1500;
this.pointLight.y = 1000;
this.pointLight.x = 1000;*/
this.universe = new DisplayObject3D();
this.universe.addChild(daeFile);
this.universe.z = -20;
this._baseNode.addChild(this.universe);
}
}
}
Any ideas of why this could be?...
Upvotes: 0
Views: 41
Reputation: 323
So the solution to this was, the version of some libraries that you can find have _baseNode, others have _markerNode.
This is the only diference between versions, one was directly from an example project and the other directly from the papervision3d webpage.
This definition is found at PV3DARApp, just needed to change it...
Upvotes: 0