It is amusing because I was breaking my head on it a few hours ago .Ok but I found the solution :
let's say your movie material name is mymaterial ,so accsess its movie: var myMovieClip:MovieClip=mymaterial.movie as MovieClip and you have got all the methods of the MovieClip Have fun!!! On Tue, Sep 29, 2009 at 8:28 PM, Crisstyle <[email protected]> wrote: > > I have been unsuccessfully trying to access a MovieMaterial's movie to > control it. > > What I need to do is to create the plane and after it is added to the > screen, tell its material to gotoAndPlay(1). > > Here is the code: > > > > public class CoupleCreator extends SceneCreator > { > private var _coupleArray:Array; > private var _mathUtils:MathUtils; > > public function CoupleCreator(){} > > public function initCouple(ViewPort:View3D, > Couples:Array):void > { > _viewPort3D = ViewPort; > _coupleArray = Couples; > _mathUtils = new MathUtils(); > } > > public function createCouple(xPos:int, zPos:int):void > { > var coupleName:MovieClip = > _coupleArray[_mathUtils.randRange(0, 2)] > as MovieClip; > var material:MovieMaterial = new > MovieMaterial(coupleName); > var couplePlane:Plane = new Plane({material: > material, rotationX: > 90, z: zPos, x: xPos, y: 200}); > _viewPort3D.scene.addChild(couplePlane); > > > // this is where I need help!!! > > material.movie.gotoAndPlay(1); > > } > } > > > Thanks for your help. =)
