 import flash.utils.Timer;
 import flash.utils.getTimer;
 
+import mx.core.mx_internal;
 import mx.events.EffectEvent;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
 
+import spark.effects.KeyFrame;
 import spark.effects.SimpleMotionPath;
 import spark.effects.easing.IEaser;
 import spark.effects.easing.Linear;

import spark.effects.interpolation.ArrayInterpolator;
import spark.effects.interpolation.IInterpolator;
import spark.effects.interpolation.NumberInterpolator;

[DefaultProperty("motionPaths")]


    {
        // stop an already-playing animation first
        stop();
        
        // Make sure the time values in our motion paths are reasonable
        // SimpleMotionPath objects may be set up with no time values, so
        // we have to fill in those values from the duration when necessary
        var i:int;
        var j:int;
        for (i = 0; i < motionPaths.length; ++i)
        {
            var keyframes:Array = motionPaths[i].keyframes;
            if (isNaN(keyframes[0].time))
                keyframes[0].time = 0;
            // Create an initial (time==0) value if necessary 
            else if (keyframes[0].time > 0)
            {
                keyframes.splice(0, 0, new KeyFrame(0, null));
                keyframes[0].timeFraction = 0;
            }
            for (j = 1; j < keyframes.length; ++j)
            {
                if (isNaN(keyframes[j].time))
                    keyframes[j].time = duration;
            }
        }
        for (i = 0; i < motionPaths.length; ++i)
            motionPaths[i].scaleKeyframes(duration);
        
        if (startDelay > 0)
            addToDelayedAnimations(startDelay);
