Thanks for replying.

That's kinda what I'm doing - that would work for the example given as would my currentClip thing (which is similar to what you have done only with a bit of redirection (create a clip, THEN create a reference to that clip)).

But my problem really lies when loading a dynamic clip.

like this:

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;
  }
}


in the above example, it works fine - if numberOf Buttons = 1.

if i'm loading two or more, the second time round the loop, the var currentClip is reassigned to the second button and when the first button's onLoadComplete is triggered, it sets the wrong button's variable.

The same thing would happen with your example would it not?

The second time round the loop, myMC would be reassigned to button1 (from button0)?
_______________________________________________
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

Reply via email to