Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-28-2009, 08:23 PM   PM User | #1
maroccano1
New Coder

 
Join Date: Feb 2009
Posts: 22
Thanks: 5
Thanked 0 Times in 0 Posts
maroccano1 is an unknown quantity at this point
using 2 different xml scripts

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.


Code:
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"));
maroccano1 is offline   Reply With Quote
Old 03-03-2009, 02:24 PM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
You could delete the variable before reloading.

Code:
delete lbox;
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:18 PM.


Advertisement
Log in to turn off these ads.