View Full Version : mp3 player with php as an xml file
yami007
09-07-2008, 03:18 AM
well, i want to generate in such singer's page his particular songs with php which is the XML file..
i heard about query string in Flash, but i have no idea about how it works...or
could id do something like this...
in flash..
loader.load(new URLRequest("songs.php?id="));
??
i hope you help
thanks in advance
pulse00
09-07-2008, 10:08 AM
if i understand you right you're trying to load an xml with a tracklist of songs to play.
if so, try this:
loader.load(new URLRequest("songs.php?id="+someIDVariable));
loader.addEventListener(Event.COMPLETE, dataLoaded); // add Listener that will be called when the data is loaded
function dataLoaded(e:Event) {
// create an xml object from the loaded data
var xml = new XML(e.currentTarget.data);
}
of course the song.php script must deliver a valid xml file
hope this helps.
yami007
09-07-2008, 12:22 PM
thanks for help,
I want to do that .
but can flash get the ID from " .index.php?singer=someid ?? or anything can help...
thanks..
pulse00
09-07-2008, 06:14 PM
sorry, please try to rephrase your question, i don't get what you mean.
yami007
09-07-2008, 09:26 PM
well, when i do
loader.load(new URLRequest("songs.php?singer_id=1"));
I get the song which its id = 1, but what i want to do is to get the variable from the url of the page like " www.mysite.com/index.php?singer=3 "
can the query string do that ??
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.