(Adobe Flash CS3, Actionscript 3.0)
Hi,
I am a pretty new to AS3 so I'm sorry if this seems like a simple question...
In the process of converting from AS2 to AS3, I am stuck on a problem with buttons that are inside a movieclip. They just don't seem to be 'listening':
I have a movie clip on the stage, and inside the movie clip are some buttons.
The reason I put the buttons inside the movie clip is that I am zoom in and out the movie clip from the main timeline (and this worked fine with as2).
Now, on the main stage, if I had this piece of code, I get the button and it works,
//-------- Testing button -----\\
var testbtn0:testSquareBtn = new testSquareBtn();
addChild(testbtn0);
testbtn0.buttonMode = true;
testbtn0.addEventListener(MouseEvent.CLICK, sayHi);
function sayHi(event:MouseEvent):void{
trace ("HI");
}
But if I copy this to an action layer inside the movieclip on stage, something is wrong because the button doesn't react and the cursor doesn't change...
What am I missing ???
Any help appreciated !
button inside movieclip / actionscript 3.0
Started by
crea
, Apr 23 2009 11:09 PM
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users