PDA

View Full Version : Streaming simple audio file


jakerbug
11-03-2008, 09:27 PM
I'm using this code with a simple on/off switch for music on a website:
my_sound = new Sound();
my_sound.attachSound("bestdays");
my_sound.start(0,1000);
play();
But the MP3 is about 1.5MB and it takes a while for the SWF to load. Is there any SIMPLE way to stream this single audio file rather than load the whole thing before showing the movie?

_Aerospace_Eng_
11-04-2008, 06:23 AM
Use loadSound instead. Set the second value to true to make it "streaming".

http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary662.html

jakerbug
11-05-2008, 02:43 PM
thanks aerospace. looks like i'm on the right track, but now it sounds like chipmunks singing. the track is sped up for some reason... any idea?