January 6th, 2009 AS Tween problem
I am thinking this should take allBars MC and tween it from its corrent _x position to _x position -55?
but nothing happens?
//Import the classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
var nStartXPos:Number = allBars._x;
trace(nStartXPos);
center_Btn.onRelease = function():Void {
trace(nStartXPos);
var twSlideLeft:Tween = new Tween(allBars, "_x", Regular, nStartXPos, -55, 3, true);
};
No it's not, and even if it was all code written in any scope always references that scope unless you reference a different one.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var nStartXPos:Number = allBars._x;
trace(nStartXPos);
center_Btn.onRelease = function():Void {
//assuming Center_Btn is on the root level
trace(_parent.nStartXPos);
var twSlideLeft:Tween = new Tween(_parent.allBars, "_x", Regular, _parent.nStartXPos, -55, 3, true);
};
var twSlideLeft:Tween = new Tween(allBars, "_x", Regular.easeOut, nStartXPos, -55, 3, true);
Im not sure if it needs that or not.
#If you have any other info about this subject , Please add it free.# |