0

I have a MyGame.fla with some animation "MyAnim"(MovieClip). I want this animation to be hidden and stopped initially. I plan to start and show it when some button is clicked.

Of course, I can just type something like

getChildByName("MyAnim").stop();
getChildByName("MyAnim").visible = false;

in the constructor of MyGame in the source file MyGame.as.

But maybe it's possible to set it hidden and stopped from within Flash?

Nick
  • 3,205
  • 9
  • 57
  • 108
  • 2
    you can add a stop(); and visible = false; in the 1st frame of your **MyAnim** MovieClip, but it might be wiser to leave the code in a class, otherwise when your project gets complex it will be hard to track all the actions in all the symbols in the whole document. – George Profenza May 28 '11 at 10:57
  • 2
    Controlling objects like this via code in the document class or a base class is The Right Way. *Do Not* put said code on the timeline. – Bosworth99 May 28 '11 at 12:07
  • @George In my opinion, this is already the answer to the problem. Therefore you could just post this as an answer. – Matthias May 30 '11 at 07:41

0 Answers0