QUOTE(girasquid @ 29 Apr, 2008 - 07:01 PM)

Just like I told you before, take a look at FlashVars - it will allow you to pass the absolute path(or relative if you prefer) into your SWF, so that it won't need to have the path hard-coded in.
Thanks,
I was trying to over Complicate things. It works now, but the first song when I click on it doesn't load up. But after when I click the next song It will come.
CODE
stop();
// Setup 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 xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
}
playSong();
}
trace(text);
xml.load(text);
function playSong():Void
{
s = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
mute.gotoAndStop("on");
if(cps == sa.length - 1)
{
cps = 0;
s.loadSound(sa[cps].earl, true);
}
else
{
//s.loadSound(sa[++cps].earl, true);
}
trackInfo.text = sa[cps].track;
playPause.gotoAndStop("pause");
textPos = 0;
}
I get these errors when I test it. Mind you that
_level0.text get's the value from JavaScript so that last error really works.
QUOTE
Error opening URL 'file:////Venus5/multimedia/Interactive/MMED%5F0025%20Elvis%20Collectable%20Tins/Xtras/Javascript%5FTalking%5Fto%5Fflash/undefined'
Error opening URL 'file:////Venus5/multimedia/Interactive/MMED%5F0025%20Elvis%20Collectable%20Tins/Xtras/Javascript%5FTalking%5Fto%5Fflash/_level0.text'
You can download it
hereIs there a way to block this first error? or can anyone tell why it comes up?
Thanks,
This post has been edited by bmcc81: 30 Apr, 2008 - 10:30 AM