Your first Actionscript is one that executes when the play-back head hits it; it’s a STOP!
You simply add a blank keyframe where you want the stop to occur. (The top layer is best!) Then simply type the code:
The word stop should turn blue. That’s it!
Here’s a video of the stop action…in…action…(?) You know what I mean!