Once more, lost in translation from AS2 to AS3:
In AS2 i can write a function that will affect the child mc of a parent mc. I can change the name of parent mc’s, and using “this” I can still affect the child:
//I've been using Fuse for stuff...
function changeColor(fillColor){
this.childMC.colorTo(fillColor);
}
parent1.onRollOver=function(){
changeColor("0x000000")
}
parent2.onRollOver=function(){
changeColor("0xFFFFFF")
}
and so on.
Now, I’ve learned some AS3 stuff, about using switch statements to call a function on multiple targets:
//as3,
function showCover(e:Event):void{
var target:DisplayObject=e.currentTarget as DisplayObject;
switch(target){
case btn1:
loadImage("sw_covers/episodeI.jpg");
break;
case btn2:
loadImage("sw_covers/episodeII.jpg");
break;
}
}
but how to access the child mc within? Nothing I’ve tried works.
thanks for helping out an old-time-noob.