Skip to main content
Participating Frequently
December 31, 2020
Answered

Restart button or reset button

  • December 31, 2020
  • 1 reply
  • 2107 views

Hello,

I need some help because I made an animation with Animate but I can't create a "restart button".

I give you an example of my project. In my project the intitial light switch position is OFF. When the trainee touches the light switch (button) the light is ON and when he touches it again the light goes OFF. My problem is when I create a restart button with function Gotoframe N°1 instead of going back to its initial postion (OFF), the light switch goes back to the last position that has been selected by the trainee. I came back on Frame N°1 but the light switch is not correct. (OFF position)

I'm a beginner in Animate and HTLM5, I don't know Javascript function. Is there a "clear function", a "restart function"...? something which reset every actions made by the trainee.

Thanks a lot and I wish you a happy new year.

    This topic has been closed for replies.
    Correct answer kglad

    this is less than ideal, but it's easy: you can reload your page:

     

    location.reload();

    1 reply

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    January 1, 2021

    this is less than ideal, but it's easy: you can reload your page:

     

    location.reload();

    Participating Frequently
    January 1, 2021

    Hello kglad,

     

    Thanks for your reply.

     

    Ok, I only need to write this "location.relaod();" on the action frame ?