Go to Scene help

Ok, I am currently trying to make a mini movie/game and I need to make a little button in which once it has been clicked on it would go to another scene and that one would start playing. I thought it would be like onpress and then put in a gotoandplay code for actionscript. But then I don’t understand entirely how actionscript works so I would need to know the code required. I believe this requires actionscript but I am not positive so I wasn’t sure to put this under flash mx or actionscripting. I’m sorry in advance if I posted in the wrong section.
Please help.

gotoAndPlay(“yourscenename”, 1);

I get the following error:

Scene=intro, Layer=1, Frame=31: Line 1: Mouse events are permitted only for button instances

Where am I suppose to put that code?

on a button…

But when I go to put the actions for that button and open the actions pan it says “Current selection cannot have actions applied to it.” while I’ve selected the proper state and everything. What’s wrong. Sorry for this but I’m an extremely large noob when it comes to actionscript.Please help.

I figured it out. Thanks guyz for your help. :slight_smile: