My app has 2 frames; in frame 1 there are 5 MC and on a DOUBLE_CLICK
event the target s color change and go to the next frame 2.
In frame 2 I have a button to return to frame 1.
当我回到第1框架时,怎么能够维持文化、文化、肤色呢?
public class test extends MovieClip
{
public function test()
{
var myMCTable:Array = [myMC1, myMC2, myMC3, myMC4, myMC5];
for (var i:uint = 0; i < myMCTable.length; i++)
{
myMCTable[i].doubleClickEnabled = true;
myMCTable[i].addEventListener(MouseEvent.DOUBLE_CLICK, changeColor);
}
}
private function changeColor(e:MouseEvent) : void
{
var newColorTransform:ColorTransform = (e.target).transform.colorTransform;
newColorTransform.color = Math.random() * 0xFFFFFF;
(e.target).transform.colorTransform = newColorTransform;
nextFrame();
goBack_btn.addEventListener(MouseEvent.CLICK, goBack);
}
private function goBack(e:MouseEvent) : void
{
prevFrame();
}
}