Quote:
Originally posted by websam
class SandBoxDlx extends MovieClip {
...
function importImage (newImage:MovieClip,lvl:Number):MovieClip {
trace( newImage._name );
return newImage.duplicateMovieClip( "mcSwap"+lvl, lvl);
}
}
Well, I just re-read my original post, and accidentally mis-wrote my issue. The problem would be that the newImage parameter traces out correctly with the mc passed in from _level0, however, after I call duplicateMovieClip( "mcSwap", 100 ) on it... mcSwap, this[ "mcSwap" ], or any other derivative identifying the new mc, traces out to 'undefined'. Once I can get the duplicateMovieClip to work, the level will go down to -1, the 100 is only for testing purposes. Although I do agree with you regarding passing in the lvl (or using a rolling counter or whatever), it's not needed as the onEnterFrame function (newImageHandler()) will swap the new image in to the foreground, and set a flag which prevents new images from coming in. This part was left out as the duplicateMovieClip was the problem, and not the layering and such.