'this' in as3 doesnt seem to work anymore
hi guys
can anyone tell me why this code isnt working - actually it does work, but clicking on any of the 4 movieclips executes the function on all of the clips rather than just the one clicked
if that makes any sense! used to work fine in as2!!! cheers
var cube:Array = new Array();
cube = ['1','2','3','4'];
for (var i:uint=1; i<5; i++) {
this["cube"+i].addEventListener( MouseEvent.CLICK, mouseclick);
}
function mouseclick( e:MouseEvent):void {
this.scaleX = 2;
this.scaleY = 2;
}