Ciao,
sono alle prese con questo problema:
ho un player audio che prende i file mp3 da un .xml.
Ho inserito questo player.swf nel mio filmato principale, dapprima richiamandolo con questo script in un clip filmato vuoto con istanza player:

loadMovie("player.swf", player);

ma non me lo caricava...
poi ho provato ad inserire il frame contenente il player direttamente nel filmato principale.
Il problema è che eseguendo la prova del filmato da flash, il player non mi carica il file audio dal .xml.
A questo punto ho pensato che bisognava fare una prova su server locale,altrimenti non avrebbe mai letto il file xml.
Quindi pubblico il filmato principale contenente il player e metto il file html generato nella cartella del server assieme al file .swf e il file .xml.
Eseguo il file html, e neanche in questo caso il player mi carica il file audio.
Non riesco a capire il motivo....

vi allego lo script del player:

nel clip che contiene il player c'e:

onClipEvent (initialize)
{
playListFile = "default";
}

e per il player ho questo codice:

musicPlay = true;
songList = new Array();
playListFile = "default";
track = 1;
newSong = false;
playlistshow.text = playListFile + ".xml";
playList = new XML();
playList.ignoreWhite = true;
playList.onLoad = function (success)
{
if (!success)
{
playlistshow.text = "file not found";
return;
} // end if
n = playList.firstChild.childNodes;
var s = 0;
while (s < n.length)
{
songList[s] = n[s].attributes.file;
++s;
} // end while
playlistshow.text = playListFile + ".xml";
holder.music = new Sound();
holder.music.loadSound(songList[track - 1], true);
holder.music.onSoundComplete = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
newSong = true;
};
slider.onEnterFrame = function ()
{
vol = Math.round((slider._x - slidebar._x) / (slidebar._width / 100));
holder.music.setVolume(vol);
};
slider.btn.onPress = function ()
{
slider.startDrag(false, slidebar._x, slidebar._y, slidebar._x + slidebar._width, slidebar._y);
};
slider.btn.onRelease = function ()
{
slider.stopDrag();
};
};
playList.load(playListFile + ".xml");
holder.onEnterFrame = function ()
{
if (musicPlay)
{
pos = Math.round(holder.music.position);
dur = Math.round(holder.music.duration);
mins_played = Math.floor(pos / 1000 / 60);
secs_played = Math.round(pos / 1000) - mins_played * 60;
mins_tot = Math.floor(dur / 1000 / 60);
secs_tot = Math.round(dur / 1000) - mins_tot * 60;
if (pos != 0 && dur != 0)
{
if (secs_played > 59)
{
mins_played = mins_played + 1;
} // end if
if (secs_tot > 59)
{
mins_tot = mins_tot + 1;
} // end if
if (secs_tot > 59)
{
secs_tot = 0;
} // end if
if (secs_played > 59)
{
secs_played = 0;
} // end if
if (secs_tot < 10)
{
secs_tot = "0" + secs_tot;
} // end if
if (secs_played < 10)
{
secs_played = "0" + secs_played;
} // end if
if (mins_played < 10)
{
mins_played = "0" + mins_played;
} // end if
if (mins_tot < 10)
{
mins_tot = "0" + mins_tot;
} // end if
progress.text = mins_played + ":" + secs_played + " / " + mins_tot + ":" + secs_tot;
}
else if (pos == 0 && dur == 0)
{
progress.text = "00:00 / 00:00";
} // end else if
}
else if (!musicPlay)
{
progress.text = "00:00 / 00:00";
} // end else if
if (newSong)
{
holder.music.stop();
holder.music = new Sound();
holder.music.loadSound(songList[track - 1], true);
holder.music.onSoundComplete = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
newSong = true;
};
newSong = false;
} // end if
title.text = playList.firstChild.childNodes[track - 1].attributes.title;
artist.text = playList.firstChild.childNodes[track - 1].attributes.artist;
album.text = playList.firstChild.childNodes[track - 1].attributes.album;
};
onbtn.onRelease = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
if (musicPlay)
{
newSong = true;
} // end if
};
onbtn.onReleaseOutside = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
if (musicPlay)
{
newSong = true;
} // end if
skipon.gotoAndStop("up");
};
backbtn.onRelease = function ()
{
track = track - 1;
if (track < 1)
{
track = songList.length;
} // end if
if (musicPlay)
{
newSong = true;
} // end if
};
backbtn.onReleaseOutside = function ()
{
track = track - 1;
if (track < 1)
{
track = songList.length;
} // end if
if (musicPlay)
{
newSong = true;
} // end if
skipback.gotoAndStop("up");
};
playbtn.onRelease = function ()
{
if (!musicPlay)
{
holder.music = new Sound();
holder.music.loadSound(songList[track - 1], true);
holder.music.onSoundComplete = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
newSong = true;
};
musicPlay = true;
} // end if
};
playbtn.onReleaseOutside = function ()
{
if (!musicPlay)
{
holder.music = new Sound();
holder.music.loadSound(songList[track - 1], true);
holder.music.onSoundComplete = function ()
{
track = track + 1;
if (track > songList.length)
{
track = 1;
} // end if
newSong = true;
};
musicPlay = true;
} // end if
playclip.gotoAndStop("up");
};
stopbtn.onRelease = function ()
{
if (musicPlay)
{
holder.music.stop();
musicPlay = false;
} // end if
};
stopbtn.onReleaseOutside = function ()
{
if (musicPlay)
{
holder.music.stop();
musicPlay = false;
} // end if
stopclip.gotoAndStop("up");
};
onbtn.onRollOver = function ()
{
skipon.gotoAndStop("down");
};
onbtn.onRollOut = function ()
{
skipon.gotoAndStop("up");
};
backbtn.onRollOver = function ()
{
skipback.gotoAndStop("down");
};
backbtn.onRollOut = function ()
{
skipback.gotoAndStop("up");
};
playbtn.onRollOver = function ()
{
playclip.gotoAndStop("down");
};
playbtn.onRollOut = function ()
{
playclip.gotoAndStop("up");
};
stopbtn.onRollOver = function ()
{
stopclip.gotoAndStop("down");
};
stopbtn.onRollOut = function ()
{
stopclip.gotoAndStop("up");
};