Passing varibles
Im designing a swf that will dynamicallyload in pics and tween them. Since the widths of the imges will differ I want to take that make a vaiable based on the images width - the visibale space available and pass it into a tween.
I can get that info in a listener, but I can't seem to pass it out into a tween. Below is the script I'm using just to see results.
Can anyone help?
Pics = new Array("Waterfall.jpg","Pool.jpg","Cottage.jpg")
_global.loc;
TopShelf_mc.swapDepths(4);
this.createEmptyMovieClip("mcHolder", 3);
var ClipListener:Object = new Object();
ClipListener.onLoadInit = function(mcContent:MovieClip)
{
trace(mcContent._name);
trace(mcContent._width);
loc = ((221 - mcContent._width));
trace(loc);
};
var myLoader:MovieClipLoader = new MovieClipLoader();
mcHolder._x=220;
mcHolder._y=3;
myLoader.loadClip(Pics[0], mcHolder);
myLoader.addListener(ClipListener);
import mx.transitions.Tween;
import mx.transitions.easing.*;
var tweenOne = new Tween(mcHolder, "_x", Strong.easeOut,220, loc ,3, true);
tweenOne.onMotionFinished = function (){
trace(loc);
}
