MovieMaterial problem.

Software: Away3D 3.x

Tito, Newbie
Posted: 18 September 2011 11:12 AM   Total Posts: 4

in the following piece of code, the Movie material is only playing when the sprite holding the material is also added.. meaning I have two versions of the movie..

Looking at the following code.. the movie only plays when //addChild(spr) is un-commented. Any ideas?

var spr:Sprite = new Sprite();
     
spr.addChild_materials[_defaultAnimation].content);
     var 
mm:MovieMaterial = new MovieMaterial(spr);
     
//addChild(spr);
     
_plane  = new Plane{ material:mmwidth:mm.width _modelScaleheight:mm.height _modelScalesegmentsW:2segmentsH:2ownCanvas:true } );
     
_plane.rotationX = -90;
     
_plane.rotationZ 180;
     
     
_model = new ObjectContainer3D(_plane);
     
//addChild(spr);
     
_currentAnimation _defaultAnimation;

    
_camera = new TargetCamera3D({ z:PatPosition.VIEWERZ target:_model})
    
_view = new View3D(/*x:stage.stageWidth/2, y:stage.stageHeight/2,*/ camera:_camerascene:_scene }) ;
    
_bottomSprite.addChild(_view) ;
    
_view.scene.addChild(_model); 

 

   

Tito, Newbie
Posted: 20 September 2011 02:27 AM   Total Posts: 4   [ # 1 ]

any ideas anyone?

   

Avatar
Alejandro Santander, Administrator
Posted: 20 September 2011 02:53 AM   Total Posts: 414   [ # 2 ]

Tito, this works perfectly for me:

var clip:MovieClip = new RotateClip();
//   addChild(clip);
   
var holder:Sprite = new Sprite();
   
holder.addChild(clip);

   var 
movieMaterial:MovieMaterial = new MovieMaterial(holder);
   var 
plane:Plane = new Plane();
   
plane.ownCanvas true;
   
plane.width plane.height 500;
   
plane.rotationX 90;
   
plane.material movieMaterial;
   
plane.bothsides true;
   
view.scene.addChild(plane); 

Are you using the latest Github source? I cannot reproduce the problem you are reporting…

   

Tito, Newbie
Posted: 20 September 2011 10:47 AM   Total Posts: 4   [ # 3 ]

No, I’m using 3.6 because this has to go out to users shortly without them having to update flash.

   

Avatar
Alejandro Santander, Administrator
Posted: 20 September 2011 07:48 PM   Total Posts: 414   [ # 4 ]

Yes, I mean the FP10 github repository, away3d-core-fp10

   

Tito, Newbie
Posted: 29 September 2011 09:46 AM   Total Posts: 4   [ # 5 ]

I checked out the latest version of 3.6.. but still the same. The movie is definitely there, because the sound plays, but it’s not visible

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X