Using a pause button

i was asked to investigate the possiblity of using a pause button in a project. Basically the way it to work is that the audio will stop and any simulation that is playing will stop. At the moment the audio is read in from an external swf file.
I was wondering is there any conceivable way that I could stop the audio and have it re-start at the beginning of that piece of audio. Also I will need that specific simulation to play again.
Help on this is greatly apppreciated I’m lost.

Pausing an imported movie is a lot easier than fast forward or rewinding to a point other than the beginning. If I’m hearing the question correctly, you just want to be able to pause an external audio .swf as well as a separate external visual .swf.

If I got that right, then buttons with stop(), play(), and gotoAndPlay() actions should do the trick. You would need to target the actions on both external .swfs, but that should be no problem.

Example (pause):

external audio file is imported to blankClip1, on the main timeline
external visual file is imported to blankClip2, on the main timeline
both are playing and the user wants to pause

set up a button with behaviors of your choice. On the button instance, attach:

on(release, releaseOutside) {

It gets trickier if you need the buttons to be “intelligent”, i.e. that they know if a file is actually playing or not. But not impossible, to be sure. An example of a video player done in MX is on my hobby site You can check out the functionality to see if it’s along the lines what you’re looking for.

All the best

Thanks for that you have got me out of a jam=)

Thanks for that you have got me out of a jam=)

Here’s an excerpt from some writing I’m doing on sound objects:

How to Pause a Sound Object

Define the sound object:

myMusic = new Sound(myMusicMc);

The sound object is not literally “paused”. Instead, the sound object is stopped, and at the point it is stopped, its position in milliseconds is recorded as a variable. To continue the sound object from its “paused” location, you use the position variable in the start command for the sound object. For example, the following code would work for a pause and continue button:

For the pause button:

on (press) {

For the continue or play button:

on (press) {

For the stop button:

on (press) {
In the above example, “myMusicPosition” was defined as the current position of the sound object “myMusic” when the pause button was pressed. When the play button was pressed, the starting point for “myMusic” was set to myMusicPosition. When the stop button was pressed, the variable “myMusicPosition” was reset to zero. MyMusicMC is the instance name of an empty movie clip on stage that serves as a virtual container for myMusic. MyMusic01 is the identifier for the sound file in the Flash library (found by right-clicking the sound file and selecting Linkage, then Export for ActionScript).

If you want to use this approach and have questions, let me know.