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. =)

Reply via email to