I have a movieclip with class “myClass” and no instance name. I’m trying to change the alpha using this
var i:int = this.numChildren;
while(i--){
if (this.getChildAt(i) is myClass){
this.getChildAt(i).alpha = 0.5;
}
}
I have two problems with this approach:
1- I can’t use the string name of the class. There is no getClass or some method to compare like?
if (this.getChildAt(i) is "myClass"){
2- When I find the movieclip and change the alpha, I break the existing animation. why?
Thanks
getDefinitionByName()(see docs here) is what you need.