How do I stop a movie clip from looping at end of my main timeline?

Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

I have searched and tried a lot of suggestions and couldn't quite find a solution to my specific challenge.

I am using Adobe Animate CC to produce HTML5 banner ads, so it is set-up as a HTML5 Canvas document.

My main timeline is 15 seconds long and all animation has to stop at 15 seconds. While I have been using Flash for years I never considered myself any good at Actionscript.

On one of the layers of my Main Timeline, I have placed a short Movie Clip (85 frames) which I would like to loop until the end of the Main Timeline (356 frames).

How do I stop the Movie Clip or multiple instances of the MC at the end of the main timeline?

Any help is greatly appreciated. Thanks

TOPICS
How to

Views

11.9K

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
community guidelines

correct answers 1 Correct Answer

Explorer , Apr 12, 2016 Apr 12, 2016
Apparently, some syntax was wrong.So on the final frame of actions layer on main timeline add:this.instance-name-of-movie-clip.stop();this worked

Likes

Translate

Translate
Enthusiast ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

have you tried

this.stop();

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Good question.

Yes. I have that on an Actions layer at the last frame of the Scene 1 timeline. The looping movie clip just continues looping.

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
community guidelines
Adobe Community Professional ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

You have to give the movieclip a name, like "adblockisgreat". Then put this code on the main timeline:

adblockisgreat.stop();

That will stop the clip playing.

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Clay thanks.

I swore I have already tried that.

It does stop the Movie Clip, but at the end of the Movie Clip Timeline not the end of the Main Timeline.

I would prefer the MC animates till the end of the Main Timeline.

Any ideas?

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
community guidelines
Adobe Community Professional ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

You're supposed to put the code I gave you on the last frame of the main timeline, not the first.

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

I double checked, it is only on the last frame.

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
community guidelines
Adobe Community Professional ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Yet it's stopping the movieclip before the main timeline reaches the end?

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Yes. Doesn't make sense to me either.

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
community guidelines
Adobe Community Professional ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Then you've put the code somewhere before the last frame. Try deleting the code that you think should be stopping the movieclip and see if it still stops.

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Removed the code and it is still stopping.

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Well

1. I have deleted the layer my movie clip was on.

2. Added a new layer with new instance name of the Movie Clip

3. added new-instance-name.stop(); to the actions layer, last frame, in the main timeline

And the movie clip is back to looping infinitely.

I've always thought flash was flaky, and I definitely think the HTML5 canvas is flaky. For instance, the file still exports a background image that exists nowhere in the file, but was from a previous banner ad, that I have copied and renamed to update art and copy. So I have been overwriting that background image manually with one save out of Photoshop. That has been happening every since I started using HTML5 canvas setup.

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
community guidelines
Explorer ,
Apr 12, 2016 Apr 12, 2016

Copy link to clipboard

Copied

Apparently, some syntax was wrong.

So on the final frame of actions layer on main timeline add:

this.instance-name-of-movie-clip.stop();

this worked

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
community guidelines
New Here ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

Hello, everybody.

I have the same problem with endless looping. With this.stop() statement in the last frame of the main timeline, the movie STOPS when you test from within Animate CC, but if you export it as Animated GIF and try to play it in Safari (Mac), it'll be looping till my laptop runs out of power.

Today I sent an embarrasingly simple movie clip to Adobe to illustrate the problem. I kinga think they are not going to reply. I created the same movie twice from scratch: same problem.

Thanks

Yuri 🙂

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
community guidelines
Adobe Community Professional ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

Please tell us you don't think animated GIFs can run scripts.

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
community guidelines
New Here ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

Of course animated GIFs should run scripts: we have that option. It’s right there in Window/Action. AND it runs the script / this.stop() / correctly, if you run the movie inside Animate CC. As I said, if you run the GIF file by dragging it & dropping from the Desktop on Safari icon, it loops – never stops (well, may be it will, eventually 🙂

Thanks,
Yuri
 
P.S. Hey, do you want to take a look at that FLA file?

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
community guidelines
Adobe Community Professional ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

The animated GIF standard was finalized in 1989. It can't run scripts any more than a PNG or a JPEG can. The only thing you can specify is the number of times it loops.

 

You seem to be under the impression that every single feature available in the IDE can be applied to every single export format. That would be absurd. Scripting only works for full published Animate documents. Any export formats... sitll images, videos, image sequences, etc... only support what those formats natively support, which does NOT include scripting.

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
community guidelines
New Here ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

LATEST
Thank you very much for the email.

I’d like to make a banner with basic animations and a button that would take a visitor to a website.

I don’t know how to make animated JPGs.

Thanks,

Yuri

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
community guidelines