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
have you tried
Yes. I have that on an Actions layer at the last frame of the Scene 1 timeline. The looping movie clip just continues looping.
You have to give the movieclip a name, like "adblockisgreat". Then put this code on the main timeline:
That will stop the clip playing.
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.
Copy link to clipboard
You're supposed to put the code I gave you on the last frame of the main timeline, not the first.
I double checked, it is only on the last frame.
Yet it's stopping the movieclip before the main timeline reaches the end?
Yes. Doesn't make sense to me either.
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.
Removed the code and it is still stopping.
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:
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.
Please tell us you don't think animated GIFs can run scripts.
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 🙂
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.