Load Scene into MovieClip?

Software: Away3D 4.x

Yashin, Newbie
Posted: 05 December 2012 11:53 AM   Total Posts: 11

Hello all,
I am a newbie with Away3d. I am working on a AS3 website where i need to load some 3DS max models to a movieclip, not to the stage. In fact, i am creating a viewer where it’ll be possible to load several models one by one, but i really need to put it inside a movieClip container not the whole flash scene. Is this possible?

   

Avatar
Fabrice Closier, Administrator
Posted: 05 December 2012 01:18 PM   Total Posts: 1265   [ # 1 ]

Please define “put in movieclip”, “not to the stage” and “not whole flash scene”.
Try to define the use case so that there are no confusion between Stage3D, display list. Define what is expected to happends once “put in movieclip” and what happends with the movieclip itself, why you must use display objects etc…

Then we’ll take it from there.

 

   

Yashin, Newbie
Posted: 05 December 2012 02:03 PM   Total Posts: 11   [ # 2 ]

I already have my flash website with its pages and navigation bar etc.
Now, in one of the pages, I have placed a MovieClip into which I have to load my 3D object.
I have tried the following, where _viewerPanel is a MovieClip inside which the 3D object needs to be loaded.

_view = new View3D();
_viewerPanel.addChild(_view);

By following some tutorials, i’ve tried to add a plane to begin with :

  _plane = new Mesh(new PlaneGeometry(700, 700), new TextureMaterial(Cast.bitmapTexture(FloorDiffuse)));
  //_view.x = -500;
  //_view.y = -400;
  _view.scene.addChild(_plane);

The plane is showing up, not inside my “viewerPanel” movieClip, but on the main scene. Furthermore, the index of the Plane is behind all the other objects.

I was thinking of creating another swf file with the 3D model in Away3D, and then loading the swf inside my _viewerPanel movieclip. But this solution will complicate my project.

I am attaching a structure of my website indicating where i want to place my 3D object.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 05 December 2012 02:15 PM   Total Posts: 1265   [ # 3 ]

Well, as you know Stage3D is always behind the displaylist…
This also means that rendering inside displaylist using Stage3D is not possible.

So either you make a ‘hole’ into your display list and set the viewport according to this opening and you can load (heavy) models and you take advantage of Away4.x . Or you run 3.6 or awayLite (cpu only, and in displaylist) and you are limited to 2 to 5k max polys depending on machine.

 

 

   

Yashin, Newbie
Posted: 05 December 2012 02:23 PM   Total Posts: 11   [ # 4 ]

Oh thanks for this precious information.
I’ll stick to my solution, that is to create another swf with the Stage3D and my 3D object, and load that swf into my Movieclip. I’ll then access the public functions of the second swf to have control over it. I hope it’ll work. What do you think?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 05 December 2012 02:35 PM   Total Posts: 1265   [ # 5 ]

No, that will not work. Again, Stage3D is always behind the displaylist.
It not per swf.
In other words, the player itself has 3 layers, (stageVideo, stage3D and displaylist). Even if your external swf holds a stage3D code, it will init it into the second layer, beneath your displaylist. Indeed If it holds ‘classic’ displayobjects, you will be able to addchild them into your movieclip.

To learn more about the way it works
http://www.bytearray.org/?p=2555

http://www.adobe.com/devnet/flashplayer/stage3d.html

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X