Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mikaL

useFrames or usesFrames

Recommended Posts

which one is correct

 

http://api.greensock.com/as/com/greensock/TimelineLite.html#usesFrames()

 

or

 

http://www.greensock.com/as/docs/tween/com/greensock/TimelineLite.html#useFrames

 

it's a bit confusing that after downloading new version old code started producing errors.

 

Is the parameter in the constructor still useFrames ?

 

Thanks.

 

Link to comment
Share on other sites

The docs are correct, but sorry if it's confusing. It is always "useFrames" as it has been for years, but we added a "usesFrames()" method that is ONLY for reporting whether or not the animation is frames-based (it is NOT for setting, since the state is always controlled by the parent timeline's state). Does that clear things up?

Link to comment
Share on other sites

Also you're looking at 2 different versions of the documentation there

 

Version 12 docs

api.greensock.com/as/...

 

Version 11 docs

www.greensock.com/as/docs/tween/...

Link to comment
Share on other sites

Yes, that clarifies it.

 

I just had some older code using TimeLineMax (v. 11 maybe?), and now that I downloaded the new versions I found that what used to be useFrames had changed to usesFrames , totalDuration to totalDuration(value: Number = NaN) , etc.

 

I suppose there's a reason to these changes, but now I need to go through everything to check I'm not using the old versions anywhere where the compiler doesn't catch them.

Link to comment
Share on other sites

There is a list of general and API changes between v11 and v12 available at http://www.greensock.com/v12/. It can be a bit of a chore to update legacy code sometimes, but I think you'll find that the many improvements in v12 are completely worth some initial pain. Also, v12 has a consistent API between ActionScript and JavaScript, which is very useful if you ever need to make the jump from Flash.

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.
×