Skip to main content
pixel peasant
Inspiring
April 12, 2016
Answered

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

  • April 12, 2016
  • 2 replies
  • 19244 views

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

This topic has been closed for replies.
Correct answer pixel peasant

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.


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

2 replies

Legend
April 12, 2016

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

pixel peasant
Inspiring
April 12, 2016

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

Legend
April 12, 2016

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

rezun8
Inspiring
April 12, 2016

have you tried

this.stop();

pixel peasant
Inspiring
April 12, 2016

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.

Legend
April 12, 2016

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.