Hey Rob,

I use Flash authoring tool CS4 to create 3D Flash.

There is a file Main.fla in my project.
Its document class is Main.as (extends Sprite).

In the beginning, there was three objects in the stage.
Which is (and I take their width for example):
----------------------------
Object Main         width=1368
Object OnScreenBtn1 width=50
Object OnScreenBtn2 width=50
----------------------------

  Furthor analyse object Main:
  ----------------------------
  Object View3D     width=1368
  Object DebugPanel width=137
  ----------------------------

    And components of View3D(I use view.getChildAt(i) to get them):
    ----------------------------
    Object Sprite width=0
    Object Sprite width=1368
    Object Sprite width=0
    Object Sprite width=0
    ----------------------------

After I add a 640 x 480 plane into a ObjectContainer3D which is child
of view.scene.
----------------------------
Object Main         width=10684
Object OnScreenBtn1 width=50
Object OnScreenBtn2 width=50
----------------------------

  Furthor analyse object Main:
  ----------------------------
  Object View3D     width=10684
  Object DebugPanel width=137
  ----------------------------

    And components of View3D(I use view.getChildAt(i) to get them):
    ----------------------------
    Object Sprite width=0
    Object Sprite width=1368
    Object Sprite width=640
    Object Sprite width=0
    ----------------------------


According to foregoing width changes,
I think the huge View3D produces a huge stage.

But analyse the components of View3D,
I still don't know which part make View3D become so huge.


Andy




On May 6, 7:46 am, Rob Bateman <[email protected]> wrote:
> Hey Andy
>
> not sure i understand what you mean by 'the dimensions of the stage are
> huge'. do you mean the viewport? the clipping object? or the relative scale
> of 3d objects in the scene?
>
> Rob
>
> On Tue, May 5, 2009 at 10:17 AM, Andy Fang 方永安 <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi Fabrice,
>
> > Thx for your help.
> > But the dimensions of the stage are still huge after setting lockH,
> > lockW and clipRect.
>
> > Let me brief my 3D environment
>
> > There is a big cube (1366 x 768 x 1366) surround camera in my scene.
> > The camera can only rotate 360 degree, can't move its position.
>
> > There are three ObjectContainer3D objects inside the cube.
> > Each ObjectContainer3D object has a single cube at first.
> > When you click this cube, a Plane will reveal and load swf as its
> > material.
>
> > Andy
>
> > On May 5, 4:47 pm, Fabrice3D <[email protected]> wrote:
> > > Hi Andy,
> > > You can set MovieMaterial size by using lockH and lockW properties.
> > > see this as a sort of embed.
>
> > > more than 10000...
> > > In this case, I presume your plane displayed normally shows a very
> > > small texture, and you probably compensate by making the plane bigger...
> > > To avoid this just set the clipRect of the MovieMaterial as well...
> > > you avoid then to compensate the size of your sprite/mc.
>
> > > Fabrice
>
> > > On May 5, 2009, at 10:28 AM, Andy Fang 方永安 wrote:
>
> > > > I load a .swf file into a loader.
> > > > And then set content of loader as a Sprite.
> > > > Assing this sprite as a MovieMaterial.
>
> > > > Finally, attach this MovieMaterial in a Plane.
>
> > > > But I find the dimensions of stage become very big (more than 10000 x
> > > > 10000).
>
> > > > Here is my source code.
>
> > > > swfLoader=new Loader();
> > > > swfRequest=new URLRequest("sample.swf");
> > > > swfLoader.load(swfRequest);
>
> > > > swfLoader.contentLoaderInfo.addEventListneer(Event.COMPLETE,
> > > > swfLoadedHandler);
>
> > > > function swfLoadedHandler():void{
> > > >    swfInstance=swfLoader.content as Sprite
> > > >    swfMaterial=new MovieMaterial(swfInstance, {interactive:true,
> > > > smooth:true});
>
> > > >    swfPlane=new Plane({material:swfMaterial});
> > > > }- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [email protected] Hide quoted 
> text -
>
> - Show quoted text -

Reply via email to