I would like to create a movieclip, load an external JPG into it and then duplicate the movieclip. When that is done I would like to do some masking, but that's for after I get part one done.
Here's what I've got (all in frame 1 actions):
//create an empty movieclip
this.createEmptyMovieClip("container", 1);
//load the JPG
var loader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadInit = function():Void {
duplicateMovieClip(container, "newContainer", 2);
trace(newContainer); //returns undefined
}
loader.addListener(loadListener);
loader.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", "container");
If you throw that into a new flash document, it should return the same thing (I would hope). I've tried doing it several different ways, but the end result is that the 'newContainer' is never created where as everything else works perfect.
If anyone can help I would greatly appreciate it.
