Playing and stopping a movie with help of buttons

I have made a flash .fla file in which i have few layers. In one layer named movie i have a .swf movie which i had exported to the library. I also have a background screen in another layer in which this movie should paly. Now i want play and pause buttons to control the .swf movie. I am actually new to action Sript and tried to do it but no result. Can anybody please help me. i want the movie to stop when i click the stop button and it should play again when i click the play button.


it is quite easy if u have posted ur fla. but u did not, so i will try to explain it to u and if u still don’t get it, post ur fla and i will fix it up for u.
first you have to have an instance of the swf you want to control. if it is a movie clip and you have it on the main frame or any other frame, then just click on it and then click on modify instance, in flash mx it is the properties bar that you have on the buttom of the interface. when you do this dive it an instance name such as (movie1). now add your buttons on the main time line ( a stop button) and (a play button).
open the actionscript panel for the stop button and type this code


on the actionscript panel of play button, use this code


now this will control the playing and pausing of ur movie. after that make sure that ur movie has a stop command in the beggining of it, if not then on the add a layer called script to ur movie, place it on top of all other layers and click on the firast frameand open its actionscript panel, then use this code


this is the basic of controls in flash, you can do much more if you want to, such as a fast forward, rewind, pause, go to end, start from beginning, and so on. i will post a sample fla on how to do this later on.

good luck, hope i helped.