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 966 forks source link

Fixes bug in Timeline.prototype.resolve() validation #50

Closed novwhisky closed 10 years ago

novwhisky commented 10 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

gskinner commented 10 years ago

Fair enough. Thanks for the Pull Request. Accepted.