Tween onMotionFinished not calling function
My problem is my redrawMenu() function is not being called when onMotionFinished() is called. Any ideas on what I am doing wrong??
****************************** MY CLASS ******************************
import fl.transitions.*;
import mx.transitions.Tween;
class skitter.view.MainMenuView extends UIObject {
private var sliderTween
public function MainMenuView(target:MovieClip, depth:Number){
...constructor code...
}
/** Animate Main Menu **/
private function slideMenuItems(dir:Number):Void{
var newLoc:Number;
//To Make Sure Direction Calls Don't Call This Again Until Animation is Complete
failSafe = true;
// Move the Indicated Direction
switch( dir ){
case 1:
// Set New Slide Amount
newLoc = sliderStage._x + (mItemsArray[mItemsArray.length-1].getWidth() + offset);
// Move the Stage
sliderTween = new Tween(sliderStage, "_x", mx.transitions.easing.None.easeInOut, sliderStage._x, newLoc, speed, true);
break;
case 2:
// Set New Slide Amount
newLoc = sliderStage._x - (mItemsArray[0].getWidth() + offset);
// Move the Stage
sliderTween = new Tween(sliderStage, "_x", mx.transitions.easing.None.easeInOut, sliderStage._x, newLoc, speed, true);
break;
default :
break;
}
sliderTween.onMotionFinished = function() {
trace("CALL REDRAW FUNCTION")
Delegate.create(this, redrawMenu( dir ));
//redrawMenu( dir );
}
} // END slideMenuItems()
/** Redraw Items on sliderStage**/
private function redrawMenu( dir:Number ):Void{
trace("\t** REDRAW CALLED");
...code to draw items...
failSafe = false;
}
} // END CLASS