• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Restart button or reset button

Community Beginner ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

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.

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 01, 2021 Jan 01, 2021

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

 

location.reload();

Votes

Translate

Translate
Community Expert ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

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

 

location.reload();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

Hello kglad,

 

Thanks for your reply.

 

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

It works!!!

Thank a lot kglad.

Have a very happy new year.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines