Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Paracelsus1122

How to stop audio from playing - Mp3Loader

Recommended Posts

I have an Mp3Loader, real simple I'm trying to stop the audio from playing right away, loader.pause() does not work, I don't see anything mentioned in the docs about it

Link to comment
Share on other sites

If you want to load it without playing automatically, just set autoPlay:false in the constructor vars object like:

var loader:MP3Loader = new MP3Loader("file.mp3", {autoPlay:false});

And if you want to control playback of the sound after loading, just use the playSound() method or pauseSound() method.

loader.playSound();  //plays
loader.pauseSound(); //pauses
loader.gotoSoundTime(1); //jumps to 1 second

The regular pause() method is for pausing the LOADING of the sound, not the playback :)

 

See the docs: http://api.greensock.com/as/com/greensock/loading/MP3Loader.html

Link to comment
Share on other sites

I want to be able to stop the audio on call, and play again at a later date, the pause feature does not work, I just want something simple like stop

Link to comment
Share on other sites

Are you saying that you call pauseSound() on the MP3Loader and it keeps playing? Can you please post a very simple example FLA that we can publish to see what's happening (include your MP3 too please).

Link to comment
Share on other sites

Thanks Jack, I will put something together soon, right now I'm working around it

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×