Hi,
I try to use onPress function inside an onLoadInit function but nothing will be traced. I can see my hand cursor over my icons though. I also tried with onLoadComplete, but no change…
Here is my code
//Create objetc for moviecliip loader
var mLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object();
var yPos:Number = 10;
var yPosArray:Array = new Array;
var number:Number = 0;
var textArray:Array = new Array;
//Iterate for each round in game
for (var i = 0; i < game.length; i++) {
//Load the .swf for each iconname
var image:MovieClip = this.createEmptyMovieClip("_MC"+i,i);
mLoader.loadClip("assets/" + game[game.length-i-1].iconname + "IconDrop.swf", image);
}
//When loaded calculate height of .swf, increase yPos
mcListener.onLoadInit = function(mc:MovieClip):Void
{
mc._y = yPos;
yPos += mc._height + 10;
yPosArray[number] = yPos;
[COLOR="Red"] mc.onPress = function()
{
trace("Testing");
} [/COLOR]
}
mLoader.addListener(mcListener);