Hi.
I have a problem here. in the onmotionfinished function i can’t get a uniqe identifier.
trace i gives me six, which is the last number in the loop.
trace this and it gives me ’ [tween] ’ . What should I write to get some uniqe ID? :stare:
for (var i:Number = 0; i < String(_startVal).length; i++)
{
if(isNaN(Number(stopVars["stop" + i + "_nbr"])))
{
rollHolder["row" + i].field_mc0.field.text = stopVars["stop" + i + "_nbr"];
}
else
{
var scope2 = this;
stopObj["tween"+i] = new Tween(rollHolder["row"+i], "_y", mx.transitions.easing.Strong.easeOut, rollHolder["row"+i]._y, stopVars["stop" + i + "_nbr"], _time + time*(i*_easing), true);
stopObj["tween"+(String(_startVal).length-1)].onMotionFinished = function()
{
trace("dispatching 'rolled' ");
dispatchEvent({type:"rolled"});
}
stopObj["tween" + i].onMotionChanged = function()
{
trace(i +"wtf, always the last number in the loop " );
trace(this +"this traces as: [tween]");
scope.blur(scope.rollHolder["row" + i],Math.floor(((this.position * -1)-1) *scope._motionblur));
}
}
}