Copy link to clipboard
Copied
Hi, I googled my problem but couldn't find an answer. When a button is clicked I want to go to a MovieClip and play it and repeat it continuously until another button is clicked. How can I do that? I'm quite new to Action Script.
My code until now:
Frida_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_3);
function fl_ClickToGoToScene_3(event:MouseEvent):void
{
MovieClip(this.root).gotoAndPlay(1, "Szene 2");
}
Hi.
Movie Clips play in loop by default.
So all you need to do is to have the Movie Clip instance in the frame targeted by the gotoAndPlay method.
Regards,
JC
Copy link to clipboard
Copied
Hi.
Movie Clips play in loop by default.
So all you need to do is to have the Movie Clip instance in the frame targeted by the gotoAndPlay method.
Regards,
JC
Copy link to clipboard
Copied
Thank you for your reply!
I'm quite new to Adobe Animate and I don't really understand what you suggested me to do. (My English isn't the best as well)
What do you mean by "have the Movie Clip instance in the frame targeted"? What do I have to change in my code?
Copy link to clipboard
Copied
Hi.
Here is a simple sample to help you understand:
animate_cc_as3_play_movie_clip.zip - Google Drive
Also, have a look at this answer to help you understand even better how frames, labels, scenes, navigation, playback, timelines, and so on work when using Animate CC and AS3.
How to progress a scene or continue the current scene with a button?
Regards,
JC
Copy link to clipboard
Copied
Thank you so much for your help! I finally managed to solve my problem.
Copy link to clipboard
Copied
You're welcome!