Pandan
08-26-2005, 04:40 PM
I have a problem!
I want to move a movieClip after it been loaded.
But my problem is that I can assign a dynamic value and then get it in the onLoadComplete function. se the red comments
var clip = game.clip;
var mclTempContainer:MovieClipLoader = new MovieClipLoader(); // the loader
var listener:Object = new Object(); // the listener
// The event handler
listener.onLoadComplete = function ( targ:MovieClip ):Void{
trace(targ.nHeight )//<- this trace undefined
targ._y = - (100 + targ.nHeight );
};
var mcTempContainer:MovieClip = clip["t"+i]createEmptyMovieClip("mcTempContainer",1);
mcTempContainer.nHeight = 33; //Here I set the value
mclTempContainer.loadClip(selectedFurniture+".swf",mcTempContainer);
I want to move a movieClip after it been loaded.
But my problem is that I can assign a dynamic value and then get it in the onLoadComplete function. se the red comments
var clip = game.clip;
var mclTempContainer:MovieClipLoader = new MovieClipLoader(); // the loader
var listener:Object = new Object(); // the listener
// The event handler
listener.onLoadComplete = function ( targ:MovieClip ):Void{
trace(targ.nHeight )//<- this trace undefined
targ._y = - (100 + targ.nHeight );
};
var mcTempContainer:MovieClip = clip["t"+i]createEmptyMovieClip("mcTempContainer",1);
mcTempContainer.nHeight = 33; //Here I set the value
mclTempContainer.loadClip(selectedFurniture+".swf",mcTempContainer);