maroccano1
02-28-2009, 08:23 PM
i would like to use 2 different xml scripts, one loads automatically and one loads when a button is pressed. however when i run the application the two xml scripts merge together???? i would like one to replace the other.
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
trace(xml);
ilist = xml.item;
for(var i:uint=0; i<ilist.length(); i++)
{
lbox.addItem({data:ilist.link.text()[i], data:ilist.path.text()[i],
label:ilist.title.text()[i]});
}
}
on_auction.addEventListener(MouseEvent.CLICK, auctionlist);
function auctionlist(e:Event):void
{
loader.load(new URLRequest("http://localhost/playlista_xml.php?u=12345"));
}
//loader.load(new URLRequest("http://localhost/playlist.php?u="+valueStr));
loader.load(new URLRequest("http://localhost/playlist_xml.php?u=maroccano1"));
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
trace(xml);
ilist = xml.item;
for(var i:uint=0; i<ilist.length(); i++)
{
lbox.addItem({data:ilist.link.text()[i], data:ilist.path.text()[i],
label:ilist.title.text()[i]});
}
}
on_auction.addEventListener(MouseEvent.CLICK, auctionlist);
function auctionlist(e:Event):void
{
loader.load(new URLRequest("http://localhost/playlista_xml.php?u=12345"));
}
//loader.load(new URLRequest("http://localhost/playlist.php?u="+valueStr));
loader.load(new URLRequest("http://localhost/playlist_xml.php?u=maroccano1"));