CreateJS / TweenJS

A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.
http://createjs.com/
MIT License
3.56k stars 967 forks source link

Timeline.prototype.resolve() validation fails for frame labels beginning with numeric #51

Closed novwhisky closed 9 years ago

novwhisky commented 9 years ago

resolve() isn't handling frame labels with a leading numeric correctly. If I created a label on frame 10 called "99RedBaloons" and then later do gotoAndPlay("99RedBaloons"); this function would return 99 as opposed to 10. Casting the contents of positionOrLabel using Number() as opposed to parseFloat() will produce more consistent results.

For more on parseFloat vs Number, see https://stackoverflow.com/questions/12227594/which-is-better-numberx-or-parsefloatx

novwhisky commented 9 years ago

Pull request here https://github.com/CreateJS/TweenJS/pull/50