I’m trying to learn this fancy AS3 jazz and keep getting an error when I do a simple gotoAndStop. Does anyone know what I’m doing wrong?
Code:
skipBtn_mc.buttonMode = true;
skipBtn_mc.addEventListener(MouseEvent.CLICK, skipClick);
skipBtn_mc.addEventListener(MouseEvent.ROLL_OVER, skipOver);
skipBtn_mc.addEventListener(MouseEvent.ROLL_OUT, skipOut);
function skipOver(event:MouseEvent):void
{
skipBtn_mc.gotoAndStop(“over”);
}
function skipOut(event:MouseEvent):void
{
skipBtn_mc.gotoAndStop(“up”);
}
function skipClick(event:MouseEvent):void
{
gotoAndPlay(“small”);
}
Error:
1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:SimpleButton.
1119: Access of possibly undefined property buttonMode through a reference with static type flash.display:SimpleButton.