• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Flash & XML

Matty2d

Weaksauce
Joined
Mar 30, 2003
Messages
83
Good day!, i have a quick question regarding Flash (any version). I'm loading an xml file called flash.xml (generated by some web server @ an address), my issue is what if the file is not available (network issues), i was thinking about loading a temporary local xml file. I'm just learning action scripting, would i use an if statement on XML_var.load("http://IPAddress/flash.xml");?, or is there a better way to do this.


Code:
//create the xml object
XML_var = new XML();
// now load up the url.


XML_var.load("http://IPAddress/flash.xml");
// when xml is loaded call functon displayXML

XML_var.onLoad = displayXML;
// display in txt xml is loading
txt = "Loading XML data...";

function displayXML() 
{
    mainTag = new XML;
    elementTag = new XML;
    articleList = new Array;
    elementList = new Array;
    mainTag = this.firstChild.nextSibling;
    articleList = mainTag.childNodes; 
textarea1 = "";


//loop through xml
for(i=0;i<=articleList.length;i++)
	{//start for
		elementList = articleList[i].childNodes;
		//start for
			for(j=0;j<=elementList.length;j++) 
			{//start for
				elementTag = elementList[j];
				head = elementTag.firstChild.nodeValue;
				
				if(elementTag.nodeName.toLowerCase() == "node1")
				{textarea1 += head;}
				
				if(elementTag.nodeName.toLowerCase() == "node2")
				{textarea2 += head;}
				
				if(elementTag.nodeName.toLowerCase() == "node3")
				{textarea3 += head;}
				
				if(elementTag.nodeName.toLowerCase() == "node4")
				{textarea4 += head;}
				
				if(elementTag.nodeName.toLowerCase() == "node5")
				{textarea5 += head;}
			
				if(elementTag.nodeName.toLowerCase() == "node6")
				{textarea6 += head;}
				
				if(elementTag.nodeName.toLowerCase() == "node7")
				{textarea7 += head;}
			
				if(elementTag.nodeName.toLowerCase() == "node8")
				{textarea8 += head;}
			
			}//end for

		}//end for

}

Thanks
Mattd
 
Back
Top