Skip to main content
New Participant
April 26, 2016
Answered

stop(); not working on Adobe Animate timeline

  • April 26, 2016
  • 3 replies
  • 23295 views

I was just testing the program, and I created a simple motion animation, and added a stop on the timeline and it simply does not work. Not with a motion tween, not with a classic tween.

There are no errors on the output. I also checked the browser console, and tested in multiple browsers. I am using an mc (movie clip symbol).

All by the book. I never had these issues with Flash.

This is a simple thing, and I have no idea what is going on.

This topic has been closed for replies.
Correct answer marjantrajkovski

If you are using HTML5 Canvas must add this before stop.

this.stop();

3 replies

Known Participant
November 1, 2018

This is a very old problem from flash and still is in the newest version.

Solution: Besides using this.stop(); in HTML5, never use blank key frames on the layer of the movieclip you want to target. Blank keyframes confuses flash/animate and make the movieclip unreliable...

Brainiac
November 1, 2018

Jaapnauta  wrote

Solution: Besides using this.stop(); in HTML5, never use blank key frames on the layer of the movieclip you want to target. Blank keyframes confuses flash/animate and make the movieclip unreliable...

No, blank keyframes do not confuse Animate. What Animate does (wrong) in Canvas mode is very simple: The first instance of a particular library symbol on a layer will, when published, become the instance name for all instances of that symbol on that layer. This happens because they're literally all the same instance, just getting turned on and off as needed. Whoever wrote the Canvas exporter probably thought they were being tremendously clever.

Known Participant
November 2, 2018

Anyway, to avoid problems with executing scripts on timelines it stays wise not to use blank keyframes, really. Another tip is to not use different instance names on the same movieclip in different frames on the same layer... How flash deals with it by generating the output has never been the strongest reliable part of the software. And I have no idea why the responsible dude thinks he did something clever. This problem is known since the beginning of this millennium...

New Participant
September 7, 2017

this.stop(); function is working for me. Before I tried by stop(); function.

Brainiac
September 7, 2017

Okay... so you bumped a year-old thread to inform everyone that you're not having a problem with a common task?

marjantrajkovskiCorrect answer
Inspiring
April 26, 2016

If you are using HTML5 Canvas must add this before stop.

this.stop();

garybrindley
Known Participant
August 30, 2016

I have found the same issue. I am not using HTML Canvas. Either way, I tried both stop(); and this.stop(); in the Actions layer on the timeline and neither work. When hitting Enter in Animate it ignores it. When Debug it ignores it. When Publish to AIR it ignores it.

I have created various new projects to try different settings, even tried on PC and Mac. Never works.

GrayJHP
Inspiring
September 8, 2017

If you have a movieclip on the stage, a stop(); in the timeline won't stop the animation in the movieclip. You would either need to put a stop(); into the movieclip itself, or give the instance a name, then say, for example: myclip.stop();

Pressing the Enter key when looking at the timeline only makes the playback head move along, it doesn't trigger any of the scripts.

If you do a Debug, or Test Movie, or test AIR in the debug player, look for any errors in the Compiler window or the Output panel.


Hello,

I'm having trouble getting stop(); to work for me. I've got a movie clip with it's own animation placed on an outer timeline, with an instance name mc_lettermark1. Per adobe's tooltips, I make a new layer, open the actions panel, select the movie clip on the artboard, and click on the "Stop a movie clip" snippet in the code snippets panel. It prints out the following:

/* Stop a Movie Clip

Stops the specified movie clip on stage.

Instructions:

1. Use this code for movie clips that are currently playing.

*/

this.mc_lettermark1.stop();

I don't know if it makes a difference, but I have the action in a frame towards the end of the timeline. When I preview in browser, the movie clip keeps on looping like nothing's happened. The Chrome console has the following error message:

300x250%20test.2.js: 470 Uncaught TypeError: Cannot read property 'stop' of undefined

    at lib._300x250test2.frame_60 (300x250%20test.2.js:470)

    at a.b._runActions (createjs-2015.11.26.min.js:17)

    at a.b.setPosition (createjs-2015.11.26.min.js:17)

    at a.b.setPosition (createjs-2015.11.26.min.js:17)

    at lib._300x250test2.c._updateTimeline (createjs-2015.11.26.min.js:14)

    at lib._300x250test2.c.advance (createjs-2015.11.26.min.js:14)

    at lib._300x250test2.c._tick (createjs-2015.11.26.min.js:14)

    at lib.Stage.b._tick (createjs-2015.11.26.min.js:13)

    at lib.Stage.b.tick (createjs-2015.11.26.min.js:13)

    at lib.Stage.b.update (createjs-2015.11.26.min.js:13)

Any advice for how to fix this? I don't really know javascript, but it sounds like it can't find the instance name. This seems pretty basic, am I missing something?

Thanks,

Grayson