Sound: Playing External .WAV file (Flash MX 2004 PRO)

  • Belk Media Group
  • Graphic Monk
  • Professor
  • User avatar
  • Posts: 778
  • Loc: In the heart of California, Fresno.

Post 3+ Months Ago

I know this has been asked many times before but, I am new to Flash MX and somethings are done a lil differently than the old Flash 5 version. Anyway, I am haveing trouble loading a external wav file into my flash site. Can anybody help me with this?
  • R.L.D.
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: Astoria,Queens

Post 3+ Months Ago

are you trying to load a small sound or stream a whole song ?

if you're loading a sound (sfx) this might help:
Code: [ Select ]

sound = new Sound();
sound.loadSound("sound location",true);
sound.start(0,0);
  1. sound = new Sound();
  2. sound.loadSound("sound location",true);
  3. sound.start(0,0);


or this if you're trying to stream a song...
Code: [ Select ]

sound = new Sound();
sound.loadSound("sound location",true);
onEnterFrame = function() {    
total = sound.getBytesTotal();
loaded = sound.getBytesLoaded();            
if (loaded != total) {
if (loaded != undefined && total != undefined) {
Math.round((loaded*100/total))
}else{
delete onenterFrame;
}
}
}
  1. sound = new Sound();
  2. sound.loadSound("sound location",true);
  3. onEnterFrame = function() {    
  4. total = sound.getBytesTotal();
  5. loaded = sound.getBytesLoaded();            
  6. if (loaded != total) {
  7. if (loaded != undefined && total != undefined) {
  8. Math.round((loaded*100/total))
  9. }else{
  10. delete onenterFrame;
  11. }
  12. }
  13. }


im using the streaming technique here:
http://www.myspace.com/index.cfm?fuseac ... 0426140050

hope that helps.[/code]
  • Belk Media Group
  • Graphic Monk
  • Professor
  • User avatar
  • Posts: 778
  • Loc: In the heart of California, Fresno.

Post 3+ Months Ago

Thanks alot RLD, I'll try that. By the way, your "Interactive Media Interface" is f#(&ing dope. BRAVO!

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.