Hai ,
I am trying to build an mp3 player by following the tutorials from gotoandlearn.com…I completed only the first part of the tutorial and am getting an error Created a sound object, loaded the sound in a playSong function ,loaded the xml Everything i did as same in the tutorial.The code goes like this:–
//set up the sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong();
s.setVolume(75);
//Array of songs
var sa:Array = new Array();
//Currently playing song
var cps:Number = -1;
//load the songs xml
var myxml:XML = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = function(){
var nodes:Array = this.firstChild.childNodes;
for(var i=0; i<nodes.length;i++){
sa.push(nodes.attributes.url);
}
playSong();
}
myxml.load(“songs.xml”);
//play the mp3 file
function playSong(){
if(cps == sa.length-1)
{
cps = 0;
s.loadSound(sa[cps],true);
}
else{
s.loadSound(sa[++cps],true);
}
}
Everything i have put in the folder named “Mp3playerforlatest”…Now iam getting an error :–Error opening URL ‘file:///E|/Mp3playerforlatest/undefined’ I have put all the songs,songs.xml and the flash file in the same folder “Mp3playerforlatest”…Please view the attachment too.
Earlier when i were using flash cs3 i got the same error and when i put a space before the file name that is like
" songs.xml" i was able to overcome the problem.Now iam not able to.
Can you help me please…
<?xml version=“1.0” encoding=“UTF-8”?>
<songs>
<song url=“Alaipayudhey.mp3” />
<song url=“Enenendrumpunnagai.mp3” />
<song url=“Mangalayam.mp3” />
<song url=“Oru_Maalai.mp3” />
<song url=“Sutrum_Vizhi.mp3” />
<song url=“yaminiyamini.mp3” />
</songs>
Is it because of virus or something because iam not able to open any of my directories directly (E or F or D).What i have to do is right click and click explore Will it affect flash too?But when scanned i couldnt find any virus…