failure13

MP3Loader other formats?

Recommended Posts

No. I'm pretty sure the Flash Player itself can't handle loading and playing those files, so there is no way that MP3Loader is going to be able to deal with them.

Share this post


Link to post
Share on other sites

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();
}
}
}

Share this post


Link to post
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...

Share this post


Link to post
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.

 

 

Share this post


Link to post
Share on other sites

Sure, just want to make it as universal as possible :)

For current projects i don't have urgency, so it would be cool if it will be possible someday in the future!

Thanks for your creations :)

Share this post


Link to post
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.