Question : Getting the instance name of a clicked movie clip

I want to

(i) get the identfier of a movie clip

(ii) then use that identifier to modify the alpha of it the instance. I have tried the code below.

(iii) then change the alpha of the children of that movie clip
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
button1_mc.addEventListener(MouseEvent.MOUSE_DOWN, changeAlpha);
 
function changeAlpha (event:MouseEvent):void {
	
this.alpha = 0.6;
 
 
 
}
Open in New Window Select All

Answer : Getting the instance name of a clicked movie clip

try this :
button1_mc.addEventListener(MouseEvent.MOUSE_DOWN, changeAlpha);
function changeAlpha(event:MouseEvent):void {
      event.target.alpha = 0.6;
      trace(event.target.name)
}

best regards
Random Solutions  
 
programming4us programming4us