Copy link to clipboard
Copied
Hi, everyone. I need to stop animation in the game. I guess, I need to add KeyFrame to the timeline for the specific second, and later on to insert "this.stop()" inside of that action. But it doesn't work. What am I doing wrong? Thanks in advance!
Copy link to clipboard
Copied
to stop a timeline (eg, mc1), use:
this.mc1.stop();
Copy link to clipboard
Copied
mc1, what is this? and how can I get it? Thanks in advance
Copy link to clipboard
Copied
Hi ViktorLavrenenko, it depends on which part of animation you would want to stop - whether it's main timeline animation or MovieClip animation.
If you'd want to stop the main timeline animation, the steps mentioned by you works well - (Add Keyframe -> this.stop() in actions panel). But this will not stop MovieClip - such animations continues to run.
To stop MovieClip animation in main timeline, you will have to add MovieClip instance name in the frame script -'this.<movieclip_InstanceName>.stop()'. To find the MC instance name, just click on the MC in stage and check for the information in 'Object' tab of 'Properties' panel.
Hope this helps. If you still continue to face problems, kindly share the sample file to investigate further.