Need help creating play, pause, reverse, forward button functionality

New Here ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

My knowledge of Adobe Animate CC and CreateJS is basic (no prior Flash experience) so I need help with this. I am essentially trying to create movie controls on this animation:

http://evolution-dev.berkeley.edu/flashconversion/treeRoom/fieldguide-tree-square-anim-controls.html

 

There's nothing fancy about the animation, just forward movement of the timeline.

 

The play button:

_this.btnSmPlay.on('click', function(){
_this.gotoAndPlay(1);
});

 

The pause button:

_this.btnPause.on('click', function(){
_this.stop();
});

 

I found the script for the forward and reverse buttons on this forum here: https://community.adobe.com/t5/animate/play-in-reverse-in-animate-htlm-canvas-for-a-360/m-p/10828021

 

Problems:

  • How do I get the play button to continue playing from the frame number that it has stopped on and not to go to frame 1 which is what I have it currently doing? 
  • Reverse and forward buttons also don't work once the animation is paused.

 

Thanks for any help!

Views

66

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

"How do I get the play button to continue playing from the frame number that it has stopped on and not to go to frame 1 which is what I have it currently doing?"

 

Is there some reason you can't just use .play()?

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

LOL, thanks! I didn't even think of that. I use the wizard and that option never popped up. Yes, that works, thanks!

 

I'm realizing that the scripts for the forward and reverse buttons conflict with my other scripts (namely the menu buttons) so I commented them out. Would love some help on that. I'm going to edit my original post to reflect that.

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Following up on this post: the scripts for the reverse and forward buttons conflict with my menu scripts so I've removed them (it's the same script I link to above). 

 

I would love assistance with figuring out how to have the timeline move backwards from where it's paused. I think I'll just use .play() to move forward. 

 

Thanks in advance!

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

So you want some way to goto a previous point on the timeline and play it from there?

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 ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

LATEST

No, I want the timeline to move backwards in reverse, from the point where it has stopped. I know there's no .reverse() function (it would be nice to have) but I literally want the timeline to move backwards. (Just like moving the timeline from right to left.)

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