Flash AS3 movieclips as buttons [EN]
Somewhere i made the choice to use movieclips as buttons. It seems easier somehow. Most important thing you have to do is; use the next actionscript to change the mousecursor on mouseover.
McName.buttonMode=true; McName.mouseChildren=false; |
You can name framelables inside of the movieclip to respond as if it was a button. If you use the following framelabels: _up, _over, en _down the movieclip will work as button.
The following code is needed to make the button work:
McNaam.addEventListener(MouseEvent.CLICK, FunctionNaam); //listener for the MC with instance name: McNaam //the function for the above MC function FunctionNaam(evt:MouseEvent) { gotoAndStop("ruimte1");//go to framelabel ruimte1 and stop over there } |