Highlighted

MovieClip Gotoandplay then repeat continuously

Community Beginner ,
Dec 12, 2018

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");

}

Adobe Community Professional
Correct answer by JoãoCésar | Adobe Community Professional

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

TOPICS
Discussions

Views

291

Likes

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

MovieClip Gotoandplay then repeat continuously

Community Beginner ,
Dec 12, 2018

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");

}

Adobe Community Professional
Correct answer by JoãoCésar | Adobe Community Professional

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

TOPICS
Discussions

Views

292

Likes

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
Dec 12, 2018 0
Adobe Community Professional ,
Dec 12, 2018

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

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Dec 12, 2018 1
Community Beginner ,
Dec 19, 2018

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?

Likes

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
Reply
Loading...
Dec 19, 2018 0
Adobe Community Professional ,
Dec 19, 2018

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

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Dec 19, 2018 1
Community Beginner ,
Dec 19, 2018

Copy link to clipboard

Copied

Thank you so much for your help! I finally managed to solve my problem.

Likes

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
Reply
Loading...
Dec 19, 2018 1
Adobe Community Professional ,
Dec 19, 2018

Copy link to clipboard

Copied

You're welcome!

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

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
Reply
Loading...
Dec 19, 2018 0