You have to set the path to the timeline of the frame in question. If the frame is on the main timeline then use _root (i.e. _root.gotoAndPlay(framenumber). If the frame in question is located inside a movie clip that sits on the main timeline then set the path to that movie clip (i.e. _root.movieclipname.gotoAndPlay(framenumber). If the frame in question is located inside a movie clip that is inside a move clip that sits on the main timeline then set the path to that movie clip (i.e. _root.movieclip1name.movieclip2name.gotoAndPlay(framenumber).