PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
How to mantain a movieclip's color between frames?
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to mantain a movieclip's color between frames?

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2011

    How to mantain a movieclip's color between frames?

    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.
    How can i maintain the MC color when i return to frame 1?
    Actionscript Code:
        import flash.display.*;
        import flash.geom.ColorTransform;

        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 = (;
                newColorTransform.color = Math.random() * 0xFFFFFF;
                ( = newColorTransform;
                goBack_btn.addEventListener(MouseEvent.CLICK, goBack);

            private function goBack(e:MouseEvent):void
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center