Controlling non-streamed sound within SWFs from HTML

Hi

Sorry to repeat this plea from the ActionScript forum, but I wasn’t sure which forum this question belonged to!

I have a bunch of SWFs. Each plays an MP3. The MP3 sounds are not streamed, they appear as events on the first frame.

I want to be able to control the playback of these SWFs directly from HTML.

I.e., I need to be able to pause, rewind to start, and play.

I have managed to make this work using the standard DreamWeaver behaviours when the sound is streamed within the SWF - see: http://www.harlequinsolutions.com/sandpit/count.htm

However, if the sound file is imported into the movie and played on the first frame as an event, the controls don’t allow pause and resume to work properly. It pauses and resumes the playback of the images etc, but the sound has already started, so can’t be stopped, and more importantly, can’t be resumed from half-way through.

I’m sure this is somthing that has been answered many times before…but I’m fairly new around here and the search results haven’t shown much up.

Any help very much appreciated.

Cheers

John

It’s a bit messy -

If you declare a sound object you can manipulate the offset value
i.e. you can play the file from any specified time - from the start, from 2 secs in, etc.

The syntax is: mySoundObject.start(offset, numberOfLoops)

Using the getTimer() function you can determine how long a soundfile has been playing before you pause it and use this value as your offset when you resume play.

You still have your earlier problem of passing vars to and from ns4 with javaScript and swLiveConnect

  • perhaps it’s easier in MX?