road0001 / tweensy

Automatically exported from code.google.com/p/tweensy
1 stars 0 forks source link

TweensyZero.stop() don't function #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call TweensyZero.stop(null);

What is the expected output? What do you see instead?
Expected: All Tweens are stopped
Actual Result: null pointer exception

What version of the product are you using? On what operating system?
0.2.2

Please provide any additional information below.

public static function stop(instance : * = null, ...props : Array) : void {
            var items : Array = (instance is Array) ? instance : (instance == null) ? null : [instance];
            var timeline : TweensyTimelineZero;

            for(var i : int = items.length - 1;i >= 0; i--) {

                timeline = list[i];

                if(items == null || items.indexOf(timeline.key) != -1) {

                    if(props.length == 0) {
                        list.splice(i, 1);
                    } else {

                        for(var propName:String in timeline.to) {
                            if(props.indexOf(propName) != -1) {
                                delete timeline.to[propName];
                                delete timeline.from[propName];
                                timeline.properties--;
                            }
                        }

                        if(timeline.properties == 0) list.splice(i, 1);
                    }
                }
            }

            if(list.length == 0) stopUpdate();
        }

Original issue reported on code.google.com by doomer.s...@gmail.com on 16 Oct 2012 at 4:20