The example in Flash 8 is a good model:
this.createTextField("status_txt", this.getNextHighestDepth(), 0,0,100,22);
// create a new Sound object
var my_sound:Sound = new Sound();
// if the sound loads, play it; if not, trace failure loading
my_sound.onLoad = function(success:Boolean) {
if (success) {
my_sound.start();
status_txt.text = "Sound loaded";
} else {
status_txt.text = "Sound failed";
}
};
// load the sound
my_sound.loadSound("song1.mp3", true);
The second argument in loadSound creates the streaming functionality.
However this streaming does not mean sync as does the one in the frame
properties window. It means the sound will play as soon as possible.
You can control the sound to make it stop, play and so on if you like and
requirement I like to give college students in my advanced multimedia
courses.
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "shawee" <webforumsuser@macromedia.com> wrote in message
news:dnhrba$23o$1@forums.macromedia.com...
Hi eveybody,
I'm searching for a way to create streaming with the Sound class of
Actionscript.
As in :
http://www.estvideo.com/dew/index/2005/02/16/370-player-flash-mp3-leger-comme-un e-plume
in wich you can see that the MP3 is displayed before it's completely
loaded.
I've tried to launch start() method before the MP3 is totally loaded but
nothing happen.
If someone can help me, even if it's a tiny advice,
Thanks a lot,
Sylvain,
(Sorry for my english).