First of all remove all the code on Frame 1 and add the name "Main" into the class field on your FLA propery, then
add this code:
//////////////////////////////
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.display.SimpleButton;
public class Main extends MovieClip {
public var first_btn:SimpleButton;
public var second_btn:SimpleButton;
public var third_btn:SimpleButton;
public function Main(){
addEventListener(Event.ADDED_TO_STAGE,addedToStageHandler);
}
private function addedToStageHandler(event:Event):void{
try{
first_btn.addEventListener(MouseEvent.CLICK,startAnimation);
second_btn.addEventListener(MouseEvent.CLICK,middleAnimation);
third_btn.addEventListener(MouseEvent.CLICK,endAnimation);
}catch(event:*){
trace("runtime error!");
}
}
private function startAnimation(event:MouseEvent):void{
gotoAndPlay("start");
}
private function middleAnimation(event:MouseEvent):void{
gotoAndPlay("middle");
}
private function endAnimation(event:MouseEvent):void{
gotoAndPlay("end");
}
}
}
/////////////////////////////////
after copy and paste your 3 buttons of the frame "start"
to the frame 1 and make them invisible. You error come by the fact that
every element of your scene must exist on the first frame if you declare it on the first frame.
that's it