I have something that was working and now is throwing an index out of
range error. I have a simple canvas with multiple components
(DisplayObjects) in it. I am looping through them and applying a move
effect to roll them off stage one at a time so that they all start at
different intervals. Here is the code snippet:
var moveOut:Move = null;
var scroller:ThumbnailScroller;
var notified:Boolean = false;
for(var i:Number = 0; i < this.numChildren; i++){
scroller = ThumbnailScroller(this.getChildAt(i));
if(scroller.y < this.height && scroller.visible){
moveOut = new Move(scroller);
moveOut.startDelay = i * 500;
moveOut.xTo = (scroller.width+10)*-1;
moveOut.duration = 2000;
moveOut.play();
}else if(scroller.y > this.height){
if(!notified){
moveOut.addEventListener(EffectEvent.EFFECT_END,
notifyCleanUpComplete);
notified = true;
}
}
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/