I'm trying to make a button that takes you to a different frame when you click on it. It changes image when you hover over it and such, but nothing happens when you click on it. The button instance is called btn_start.
This is my code:
package{ import flash.display.*; import flash.events.*; import flash.utils.*; import flash.system.*; public class main extends MovieClip { public var btn_start:MovieClip = new MovieClip(); public function main():void { stop(); loaderInfo.addEventListener(ProgressEvent.PROGRESS, evLoaded); addChild(btn_start); btn_start.addEventListener(MouseEvent.MOUSE_UP, evStart); } private function evStart(event:MouseEvent):void { gotoAndStop(3); } private function evLoaded(event:ProgressEvent):void { if (event.bytesLoaded == event.bytesTotal) { gotoAndStop(2); } } }}
Does anybody know what I'm doing wrong?