Im using the same 3 MovieMaterials on numerous planes in my scene. The
planes are put on the screen each time a click event happens by the
user and when I put them on screen I want to play an animation just
once. (Its basically a bomb that goes off and then shows a couple on
screen)
The problem I am having is due to using the same MovieMaterial on
numerous planes. The animation plays fine when the plane is put on the
screen, but then plays again if another plane is put on the screen
with the same MovieMaterial. I dont want this to happen more than once
for each plane.
Can someone help? Here is the function that gets called each time a
click event occurs:
public function createCouple():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: 100, x: 100, y: 100, width: 150, height: 275});
_viewPort3D.scene.addChild(couplePlane);
materialMC.gotoAndPlay(1);
}