• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create simple action script pause function to hold timeline for x seconds

Community Beginner ,
Mar 06, 2017 Mar 06, 2017

Copy link to clipboard

Copied

I am wondering why it seems preferable in Animate CC to add frames rather than use action script to pause a frame for a set time before proceeding.

It would seem simpler to have a variable which can be adjusted very simply to alter the pause time - whereas amending the frames is a longer process.

Does any one use such a script? Or would they suggest there are reasons to not use this approach? I would add that the style of graphics I am thinking about here are simple frame changes, with no audio.

TOPICS
ActionScript , Code , How to

Views

8.7K

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

LEGEND , Mar 06, 2017 Mar 06, 2017

There is setTimeout(). You could have a script like this:

this.stop();

setTimeout(play,3000);

That should stop the animation where it is and then continue to play 3 seconds later.

It may not be a good idea though. If you're fine tuning timing near the end of a long animation you would have to do a Test Movie and sit through all the previous animation. Adding frames in the timeline would allow you to see just the part you're working on, without having to first play everything else.

Votes

Translate

Translate
LEGEND ,
Mar 06, 2017 Mar 06, 2017

Copy link to clipboard

Copied

There is setTimeout(). You could have a script like this:

this.stop();

setTimeout(play,3000);

That should stop the animation where it is and then continue to play 3 seconds later.

It may not be a good idea though. If you're fine tuning timing near the end of a long animation you would have to do a Test Movie and sit through all the previous animation. Adding frames in the timeline would allow you to see just the part you're working on, without having to first play everything else.

Votes

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
Community Beginner ,
Mar 06, 2017 Mar 06, 2017

Copy link to clipboard

Copied

Colin

Thats spot on thank you, and yes fully appreciate your comment re long animations, but the uses I am thinking of are simple and the script you mention answers that task perfectly...

Thanks again

Gary

Votes

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
Community Beginner ,
Jun 16, 2018 Jun 16, 2018

Copy link to clipboard

Copied

LATEST

Hello

I have the same kind of problem.

I used to work with flash and to have frames on the time line with simple action to stop the playing.

It was very helpful for what i do. How can I get these actions back ?

Thank you

Julien

Votes

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