Yeah , it appears to be quite simple at the end (after few hours of fucking up) :)
On Tue, Sep 29, 2009 at 9:17 PM, Crisstyle <[email protected]> wrote: > > Michael.....thank you soooooo much. This finally works after days of > digging and not being able to find anything. > > Here is the revised function: > > 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 materialMC:MovieClip = material.movie as > MovieClip; > var couplePlane:Plane = new Plane({material: > material, rotationX: > 90, z: zPos, width: 175, height: 325, x: xPos, y: 200}); > _viewPort3D.scene.addChild(couplePlane); > materialMC.gotoAndPlay(1); > } > > On Sep 29, 11:39 am, Michael Iv <[email protected]> wrote: > > The thing is that if you dont cast it as MovieClip you can't get to all > > MovieClip methods that is quite strange .... > > > > 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. =) >
