Hi there.
I am just starting using ActionScript/ Flash/ Away3D.
I am trying to create a little app for iOS, which loads in a .obj file, adds its textures and then allows the user to rotate the camera around the object.
I am using Flash Builder CC, with Flex SDK 4.6, Air SDK 3.1.
I have built the app and it runs fine on the Air Simulator for the iphone/ipad.. However when i debug it to an actual device (iPhone 5s) i am getting an error saying “Error: Too many Stage3D instances used!”
Going through all the forum, people have suggested using .dispose() on the view3d object. (http://away3d.com/forum/viewthread/2489/) however when i do that i get an error ‘-1009-Cannot-access-a-property-or-method-of-a-null-object-reference’
I feel like i am going round in circles.
This is where i declare the my view/camera/scene etc in my constructor
“private function initEngine():void{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
scene = new Scene3D();
camera = new Camera3D();
view = new View3D();
view.antiAlias = 4;
view.scene = scene;
view.camera = camera;
view.addSourceURL(“srcview/index.html”);
addChild(view);
................ and so on”
when i add the dispose i am doing so by adding view.dispose() one line above the addChild(view);
I am completely stuck and have no clue what is wrong.
Please help
Many thanks
sam