Jump to content
Search Community

goToAndStop

Guy Kedar test
Moderator Tag

Recommended Posts

My question is simple.

I'm using timeline at Animate CC
I have Movie Clip at HTML that refer by "ball"
This will run the animation frames by 5 seconds.
All working great! But now I want to start running this animation from from 25 frame and not the first frame... How can I do it?
 

var tl= new TimelineMax() ;
tl.to(this.ball, 5, { gotoAndStop:50});

 

Link to comment
Share on other sites

I'm not familiar with how Animate CC handles it now, but back in the Flash days gotoAndStop() was not a getter - it was only a setter. Is there maybe a "currentFrame" value you could animate? And you could snap: 1 so that it always rounds to the closest whole number. Or you could use a proxy object with an onUpdate to do the gotoAndStop(). I'm a little surprised that you said animating gotoAndStop: 50 worked, but my guess is that it's only because it used a default value of 0 as the start. You could try doing a fromTo() where you define it as 25 as the start, but again, I don't think gotoAndStop will actually function properly as a getter. If you still need help, it would be best to provide a minimal demo that we could see. Perhaps @Carl has some insight to share (he has more experience with the Animate CC world). 

  • Like 1
Link to comment
Share on other sites

Yes, "Frame" instead gotoAndStop(); is the correct way. I agree...

Thanks for your help :)
I think we find the solution


var tl = new TimelineMax();
tl.from(this.box, 3, {easel:{frame:25}})
  .to(this.box, 3, {easel:{frame:10}});

I attached the example..
I add in code .to(this.box, 1, {delay:1, gotoAndStop:20 });
Look how smooth it is working with gotoAndStop();.. it's like he complete the empty frames...

exmple of frame animation not from start.fla

Link to comment
Share on other sites

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.
×
×
  • Create New...