Jump to content
Search Community

MP3Loader other formats?

failure13 test
Moderator Tag

Recommended Posts

You can load binary data with our BinaryDataLoader http://www.greensock.com/as/docs/tween/com/greensock/loading/BinaryDataLoader.html

 

download the files from that tutorial and replace code in Main.as with:

 

 

package 
{
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.utils.ByteArray;
import flash.media.Sound;
import org.as3wavsound.WavSound;
import org.as3wavsound.WavSoundChannel;

import com.greensock.*;
import com.greensock.loading.*;
import com.greensock.events.LoaderEvent


public final class Main extends Sprite
{



public final function Main():void
{
playB.addEventListener(MouseEvent.MOUSE_UP, loadWav);
}

private final function loadWav(e:MouseEvent):void
{
var bd:BinaryDataLoader = new BinaryDataLoader("Phone.wav", {onComplete:playWav});
bd.load();
}

private final function playWav(e:LoaderEvent):void
{
trace("loaded");
var tts:WavSound = new WavSound(e.target.content as ByteArray);
tts.play();
}
}
}

Link to comment
Share on other sites

Works cool, but is there any way of making this file collected with BinaryLoader, get played with all the cool features of MP3Loader?

I mean like .playSound(); .pauseSound();, getting duration, monitoring progress, etc...

It would be extremely cool and flexible!

 

For .flac i suppose it's much more harder, coz you need some sort of decoder like with mp3...

Link to comment
Share on other sites

Sorry, but building a WAVLoader isn't something that could happen quickly, especially in light of all the enhancements that are happening with the animation platform currently. I'm having trouble understanding how to justify the development time in terms of what benefits this could bring as the MP3 format inherently offers many more features like streaming, compression and id3 data.

 

We appreciate you expressing your interest in such a tool and will keep it under consideration when discusssing changes to the LoaderMax. For now I think using mp3s is going to be your best bet for any current projects.

 

 

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...