Click to See Complete Forum and Search --> : loadClip Target Issue


tomyknoker
03-21-2007, 07:32 AM
Hi,

The following code loads 1 0f 6 random image as soon as my movie is played and works fine no probs


var myClip = this.createEmptyMovieClip("mcl", this.getNextHighestDepth());
var myLoader = new MovieClipLoader();
var myListener = new Object();
var myTest = random(6) + ".jpg";
myListener.onLoadInit = function () {
trace("load init");
};

myListener.onLoadInit = function (mcl) {
mcl._alpha=0;
mcl.onEnterFrame=function(){
mcl._alpha +=15;

if(mcl._alpha >=100){
delete mcl.onEnterFrame;
}
}
};

myLoader.addListener(myListener);
myLoader.loadClip(myTest,myClip);


Then iniside a movieclip further along the timeline I have this, as I want a specific image to load into the movieclip


var myTest = 5 + ".jpg";
myLoader.loadClip(myTest,_root.myClip);


But nothing happens no image will load when it gets to that point... I thought because the second part is inside a movieclip it couldn't target it but shouldn't _root... Any ideas?