AS3 Question...
AS3 Question...
- Started
- Last post
- 3 Responses
- must_dash
Trying to do the seemingly simplest thing in AS3... how do I make this work...
I have a movieclip 'link1' inside another movieclip 'linkholder'...
How do I get the link1 to be clickable so it calls the function image1Click?
linkHolder.link1.addEventListene... image1Click);
function image1Click(evt:MouseEvent):void {
imageClicked(1);
}
- skelly_b0
try linkHolder.getChildByName("link1...
- funkage0
You can't refer to a nested movieclip like you would in AS2. Reference it in a variable and work from there.
- must_dash0
perfick... yep got to that i a roundabout way eventually... but yours is much neater... thanks...
var mc:MovieClip = MovieClip(linkholder.getChildByN...
mc.addEventListener(MouseEvent.C... yourHandler);