function OPTIONbtn(e:MouseEvent):void
{
trace("play");
var ClickSound:click_sound = new click_sound(); //attach sounds
var myChannel:SoundChannel = ClickSound.play();
var optionBOX:MovieClip = new option_box(); //attach movieclip
addChild(optionBOX);
optionBOX.x = 480;
optionBOX.y = 300;
optionBOX.ok_btn.addEventListener(MouseEvent.CLICK, OKbtn);
function OKbtn(e:MouseEvent):void
{
trace("my ok button");
}
}
TypeError: Error #1010: A term is undefined and has no properties. at mygame_fla::MainTimeline/OPTIONbtn()
Or