Skip to main content
Known Participant
December 19, 2018
Answered

Stop main timeline from symbol

  • December 19, 2018
  • 1 reply
  • 684 views

Hello, I got this simple question - need to add code (HTML5 canvas) inside symbol so when it does pass that frame to stop the main timeline? AS2 code was _root.stop() how about here with JS?

    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    Hi.

    Animate CC automatically creates a reference to the main timeline called exportRoot.

    So all you have to do is to call exportRoot.stop() from anywhere to stop the main timeline.

    I hope this helps.

    Regards,

    JC

    1 reply

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    December 19, 2018

    Hi.

    Animate CC automatically creates a reference to the main timeline called exportRoot.

    So all you have to do is to call exportRoot.stop() from anywhere to stop the main timeline.

    I hope this helps.

    Regards,

    JC

    vatza_aAuthor
    Known Participant
    December 19, 2018

    Hello, I did place it and it does nothing. if I put "this." in console pop up that "exportRoot" is not defined. I quess that the function should be different or I make something wrong?

    JoãoCésar17023019
    Community Expert
    Community Expert
    December 19, 2018

    Hi.

    Don't use this.

    ExportRoot is a global variable so from anywhere just write:

    exportRoot.stop();

    Regards,

    JC