PDA

View Full Version : Sound.onLoad + onError



pocq
December 23rd, 2004, 04:06 AM
hi, i'm new around here and i've got a question.

i'm making somekind of music / video player in flashmx2004. it plays streaming mp3 en flv files.

random people can put a link into the players database.

ofcourse there will be some that insert a dead link, now i want to check with actionscript (1.0) if the link is dead and if so, the player automaticly will skip this track.

this is what i've got allready to load te streaming sound:

_root.playSound = new Sound();
_root.playSound.loadSound(trackurl,true)

trackurl is the link to the file.

link to the player atm: http://www.members.lycos.nl/shreksite/okapitest/okapitest3.html


my english isn't that good so i hope you'll understand what my question is.

thank you :)

pocq
December 23rd, 2004, 05:42 AM
i've got it:

sound = new Sound
sound.onLoad = function(ok){

if (ok == true){
trace("link is nog dead")
} else {
trace("link is dead")
}

}

sound.loadSound("name.mp3",true)

thanx you all anyway ;)