Jump to content
Search Community

How to stop audio from playing - Mp3Loader

Paracelsus1122 test
Moderator Tag

Recommended Posts

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

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.
×
×
  • Create New...