Volledige versie bekijken : Grote mp3 via getURL of...?
Oddo
%Europe/Berlin %695 %2008, 16:42
Hallo,
Ik heb een grote mp3 (10mb) die ik wil afspelen met een knop. Dat lukt door de mp3 met getURL in een extern venster op te roepen maar ik vind 't geen fraaie oplossing. Bovendien duurt het erg lang voordat de mp3 begint af te spelen.
Is het beter/efficiënter/sneller om de mp3 in de library te laden en in een frame te plaatsen?
Dank,
Oddo.
Jan
%Europe/Berlin %699 %2008, 16:47
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", true);//song1.mp3 is de url
Druk op F1 en lees voor meer uitleg de Sound class:
loadSound (Sound.loadSound method)
public loadSound(url:String, isStreaming:Boolean) : Void
Loads an MP3 file into a Sound object. You can use the isStreaming parameter to indicate whether the sound is an event or a streaming sound.
Event sounds are completely loaded before they play. They are managed by the ActionScript Sound class and respond to all methods and properties of this class.
Streaming sounds play while they are downloading. Playback begins when sufficient data has been received to start the decompressor.
Is het beter/efficiënter/sneller om de mp3 in de library te laden en in een frame te plaatsen?Nee, zeker niet. Daar wordt je swf veel te 'zwaar' van.
Groeten,
Jan
Oddo
%Europe/Berlin %841 %2008, 20:11
adnez, dank voor je heldere antwoord. Het werkt nu helemaal zoals ik wil. :)
Groeten,
Oddo.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.