Skip to main content
Participant
July 22, 2020
Question

stop animation in Adobe Animate(html-canvas)

  • July 22, 2020
  • 1 reply
  • 2809 views

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!

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    July 23, 2020

    to stop a timeline (eg, mc1), use:

     

    this.mc1.stop();

    Participant
    July 26, 2020

    mc1, what is this? and how can I get it? Thanks in advance

    Adobe Employee
    July 27, 2020

    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.