Jump to content


Controlling Timeline in Flash CC

Go to solution Solved by Carl,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts



First of all i'm really sorry if it's a so much newbie question; i was searching forum and other sources -maybe with wrong keywords - but i couldn't find a proper solution. Thanks in advance for all your help.


I'm using Flash CC to create a html export. I've a mc in canvas and inside of that mc there's a simple timeline animation done with flash. What i want is controlling that timeline with "frame" option like  tl.to(exportRoot.mc, 1, {frame:0}); also with rewind etc.


Thank you very much.

  • Like 1
Link to comment
Share on other sites

  • Solution

Hi and welcome to the forums,


Our ActionScript tools had a FramePlugin which did exactly what you describe.

We do not have a similar tool for Animate CC's HTML5 canvas export.


I'm pretty sure you should be able to tween a number and then apply that value to gotoAndStop() using onUpdate like:


var obj = {num:0};
var tween = TweenMax.to(obj, 2, {num:9, onUpdate:change, ease:Linear.easeNone, onUpdateScope:this});

function change() {
this.mc.gotoAndStop( obj.num );

EaselJS is a little tricky in that frame numbers start with 0.


Try adding that code to your file and change mc to whatever your movieclip is called.


Later you can add tween.play(), tween.reverse() etc.

  • Like 3
Link to comment
Share on other sites

Hi Carl, thank you very much.


With your code; reverse(), play() etc. are working perfectly. There's also another thing i want to do - like frameTo- when i click a button i want my animation to play the frame number i defined.

For example; let's say my key point is at frame 25. If animation at 50th frame and i click that button, animation will play reverse to 25th frame. ,

Same like this, if animation at 10th frame and i click that button, animation will play till 25th frame in 0.5 second and stop -like fast forward and rewind to a defined point. Is it possible?


Thanks again.

Link to comment
Share on other sites

ah sorry, while playing i got the solution; i just duplicated change() function and adjust the frames as i wanted.


thank you very much again for your time and help.

  • Like 1
Link to comment
Share on other sites

cool. glad you got it working!

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.