Hei.
Does anybody know a good way to use AS3 to check which movieclips instances a MC placed on the stage contains??
I tried to attach this code to a class extending a movieclip on the stage:
private var bodyParts:Array=new Array("head_mc","body_mc");
for (var i:int=0; i<bodyParts.length; i++) {
if (this.hasOwnProperty(bodyParts*)) {
trace("Contain: ",bodyParts*);
}
}
but it doesn’t work, of course, because I define the properties myself in the array so i get true for: if (this.hasOwnProperty(bodyParts*))
Anybody?