Add a new layer to your movie.
Name it 'ACTIONS'
Lock the layer by clicking the padlock
Create a keyframe on the last frame of the movie in the 'ACTIONS' layer
(do this by selecting the frame and by simply pressing F6.)
Open up the actionscript panel and add the following code.
As far as finding the actionscript:
If you were to open the actionscript panel and look on the left side. It should show which layers and corresponding frames have actionscript code in them.
Also is it possible to post the .fla file so we can get a peak?