you could also do it this way..
var lo:Object;
var mcLoader:MovieClipLoader;
var childClips:Array;
doNextLoad(-1);
function doNextLoad(index):Void
{
index++;
var mc = createEmptyMovieClip('_cancelButton' + index,
getNextHighestDepth() );
lo['t'] = this;
lo['i'] = index;
lo.onLoadComplete = function(target:MovieClip):Void
{
this['t'].handleLoadComplete( target, this['i'] );
}
mcLoader.addListener(lo);
mcLoader.loadClip( 'gif', mc );
}
function handleLoadComplete( target, index ):Void
{
childClip.push(target);
target._visible = false;
doNextLoad( index );
}
hope that helps
smith
On Mar 28, 2006, at 11:18 AM, David Farrell wrote:
for (var i:Number = 0; i < numberOfButtons; i++) {
this.createEmptyMovieClip("button"+i, getNextHighestDepth());
loader.loadClip("someImage.gif", this["button"+i]);
var currentClip = this["button"+i];
loadListener.onLoadComplete = function
(currentClip:MovieClip ):Void {
currentClip ._visible = false;
}
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com