<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Flash Kit Community Forums</title>
		<link>http://board.flashkit.com/board</link>
		<description>This is a discussion forum for all issues related to macromedia flash and shockwave, fireworks, development</description>
		<language>en</language>
		<lastBuildDate>Wed, 16 May 2012 23:50:38 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://board.flashkit.com/board/images/misc/rss.jpg</url>
			<title>Flash Kit Community Forums</title>
			<link>http://board.flashkit.com/board</link>
		</image>
		<item>
			<title>Motion Sensoring</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827219&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 20:12:49 GMT</pubDate>
			<description>Hello there, 

I was wondering if it is possible to use motion sensoring with flash, or if it is possible on the PC yet?</description>
			<content:encoded><![CDATA[<div>Hello there, <br />
<br />
I was wondering if it is possible to use motion sensoring with flash, or if it is possible on the PC yet?</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=102">Actionscript 3.0 (incl. Flex/AIR)</category>
			<dc:creator>Mushrambo</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827219</guid>
		</item>
		<item>
			<title>Urgent Help Please!</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827218&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 18:50:45 GMT</pubDate>
			<description><![CDATA[Hi! I'm new in this forum because really i need your help please, the problem is this:

On my movie, i have a 3 Buttons on the same frame and a text box i want that when people click on each button the text on the text box change, do you know how can i do this? please i really need this, please!]]></description>
			<content:encoded><![CDATA[<div>Hi! I'm new in this forum because really i need your help please, the problem is this:<br />
<br />
On my movie, i have a 3 Buttons on the same frame and a text box i want that when people click on each button the text on the text box change, do you know how can i do this? please i really need this, please!</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=30">ActionScript 2.0</category>
			<dc:creator>castricop</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827218</guid>
		</item>
		<item>
			<title>AS 2 Duplicate movie based on array data</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827217&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 17:53:31 GMT</pubDate>
			<description><![CDATA[Hello flash enthusiasts,

I am currently building a (mock up) to view subscriber information by duplicating a movie clip based on an array. I'm grabbing the data from an xml and trying to pass the array to duplicated clips. The problem I'm running into is that I can only get data to the first duplicated movie and the original remains blank. 

Here is the xml:

Code:
---------
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<content>	
	<article>
		<last4id>1111</last4id>
		<fnameid>fname1</fnameid>
		<lnameid>lname1</lnameid>
		<expdate>11/11</expdate>
		<addressid>1111 First St</addressid>
		<cityid>Los Angeles</cityid>
		<stateid>CA1</stateid>
		<zipid>11111</zipid>		
	</article>
	<article>
		<last4id>2222</last4id>
		<fnameid>fname2</fnameid>
		<lnameid>lname2</lnameid>
		<expdate>22/22</expdate>
		<addressid>2222 Second St</addressid>
		<cityid>San Francisco</cityid>
		<stateid>CA2</stateid>
		<zipid>22222</zipid>		
	</article>
</content>
---------
Here is how I'm loading the xml:

Code:
---------
function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;
		last4id = [];
		fnameid = [];
		lnameid = [];
		expdate = [];
		addressid = [];
		cityid = [];
		stateid = [];
		zipid = [];
		total = xmlNode.childNodes.length;
		for (i=0; i<total; i++) {
			last4id[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
			fnameid[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
			lnameid[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;			
			expdate[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
			addressid[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
			cityid[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;
			stateid[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
			zipid[i] = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;
		}
		nextFrame();
	} else {
		trace("Can not load edit card xml");
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("edittest.xml");
---------
And on the next frame I'm running a for loop:

Code:
---------
for (i=1; i<total; ++i) {
	item_mc.info_mc.duplicateMovieClip("info_mc"+i, i);
	item_mc["info_mc"+i]._y = item_mc["info_mc"+i]._height+15;
	item_mc["info_mc"+i].fname.text = fnameid[i];
	item_mc["info_mc"+i].lname.text = lnameid[i];
	item_mc["info_mc"+i].cdigits.text = last4id[i];
	item_mc["info_mc"+i].cdate.text = expdate[i];
	item_mc["info_mc"+i].caddress.text = addressid[i];
	item_mc["info_mc"+i].ccity.text = cityid[i];
	item_mc["info_mc"+i].cstate.text = stateid[i];
	item_mc["info_mc"+i].czip.text = zipid[i];
}
---------
I'm wondering if I'm missing an initial load step or that I'm not splitting the array correctly.

Any and all help is greatly appreciated and thank you for taking a moment to look at this post.

Thanks,
Kumba]]></description>
			<content:encoded><![CDATA[<div>Hello flash enthusiasts,<br />
<br />
I am currently building a (mock up) to view subscriber information by duplicating a movie clip based on an array. I'm grabbing the data from an xml and trying to pass the array to duplicated clips. The problem I'm running into is that I can only get data to the first duplicated movie and the original remains blank. <br />
<br />
Here is the xml:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;<br />
&lt;content&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;article&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;last4id&gt;1111&lt;/last4id&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;fnameid&gt;fname1&lt;/fnameid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;lnameid&gt;lname1&lt;/lnameid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;expdate&gt;11/11&lt;/expdate&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;addressid&gt;1111 First St&lt;/addressid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;cityid&gt;Los Angeles&lt;/cityid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;stateid&gt;CA1&lt;/stateid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;zipid&gt;11111&lt;/zipid&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/article&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;article&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;last4id&gt;2222&lt;/last4id&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;fnameid&gt;fname2&lt;/fnameid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;lnameid&gt;lname2&lt;/lnameid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;expdate&gt;22/22&lt;/expdate&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;addressid&gt;2222 Second St&lt;/addressid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;cityid&gt;San Francisco&lt;/cityid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;stateid&gt;CA2&lt;/stateid&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;zipid&gt;22222&lt;/zipid&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/article&gt;<br />
&lt;/content&gt;</code><hr />
</div>Here is how I'm loading the xml:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">function loadXML(loaded) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (loaded) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlNode = this.firstChild;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last4id = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fnameid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lnameid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expdate = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addressid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cityid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stateid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zipid = [];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total = xmlNode.childNodes.length;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;total; i++) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last4id[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fnameid[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lnameid[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expdate[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addressid[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cityid[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stateid[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zipid[i] = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nextFrame();<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace(&quot;Can not load edit card xml&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
xmlData = new XML();<br />
xmlData.ignoreWhite = true;<br />
xmlData.onLoad = loadXML;<br />
xmlData.load(&quot;edittest.xml&quot;);</code><hr />
</div>And on the next frame I'm running a for loop:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">for (i=1; i&lt;total; ++i) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc.info_mc.duplicateMovieClip(&quot;info_mc&quot;+i, i);<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i]._y = item_mc[&quot;info_mc&quot;+i]._height+15;<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].fname.text = fnameid[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].lname.text = lnameid[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].cdigits.text = last4id[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].cdate.text = expdate[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].caddress.text = addressid[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].ccity.text = cityid[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].cstate.text = stateid[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; item_mc[&quot;info_mc&quot;+i].czip.text = zipid[i];<br />
}</code><hr />
</div>I'm wondering if I'm missing an initial load step or that I'm not splitting the array correctly.<br />
<br />
Any and all help is greatly appreciated and thank you for taking a moment to look at this post.<br />
<br />
Thanks,<br />
Kumba</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=30">ActionScript 2.0</category>
			<dc:creator>kumba</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827217</guid>
		</item>
		<item>
			<title>Not loading right value from XML</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827216&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 13:26:17 GMT</pubDate>
			<description><![CDATA[I have a quiz that loads questions, answers and a wrong answer response from an XML file. 

Everything is working fine except when it loads the text for the "wrongresponse" variable it always loads the last item value regardless of the question. It skips right to the last Item element everytime.

Here is my AS2;

Code:
---------
function QuizItem(question)
{
	this.question=question;
	this.wrongresponse=wrongresponse;
	this.answers=new Array();
	this.numOfAnswers=0;
	this.correctAnswer=0;
	
	this.getQuestion=function()
	{return this.question;}
	
	this.getwrongresponse=function()
	{return this.wrongresponse;}
	
	this.addAnswer=function(answer, isCorrectAnswer)
	{this.answers[this.numOfAnswers]=answer;
		if (isCorrectAnswer)
			this.correctAnswer=this.numOfAnswers;
		this.numOfAnswers++;}

	this.getAnswer=function(answerNumberToGet)
	{return this.answers[answerNumberToGet];}
	
	this.getCorrectAnswerNumber=function()
	{return this.correctAnswer;}
	
	this.checkAnswerNumber=function(userAnswerNumber)
	{if (userAnswerNumber==this.getCorrectAnswerNumber())
			gotoAndPlay("Correct");
		else
			gotoAndPlay("Wrong");}
}

function onQuizData(success)
	{var quizNode=this.firstChild;
	var quizTitleNode=quizNode.firstChild;	
	title=quizTitleNode.firstChild.nodeValue;
	numberOfQuestionsToDisplay=int(quizNode.childNodes[1].firstChild.nodeValue);
	trace("numberOfQuestionsToDisplay="+numberOfQuestionsToDisplay);
	
	var i=0;

	var itemsNode=quizNode.childNodes[2];
	while (itemsNode.childNodes[i])
		
	{
		var itemNode=itemsNode.childNodes[i];
		
		var questionNode=itemNode.childNodes[0];
		quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);
		
		wrongresponse=itemNode.childNodes[5].firstChild.nodeValue;
		
		var a=1;
	
		// <answer> follows <question>
		var answerNode=itemNode.childNodes[a++];
		while (answerNode)
			
			{var isCorrectAnswer=false;
			if (answerNode.attributes.correct=="y")
				isCorrectAnswer=true;
			quizItems[i].addAnswer(answerNode.firstChild.nodeValue, isCorrectAnswer);
			// goto the next <answer>
			answerNode=itemNode.childNodes[a++];}i++;
		
		}
	
	// Randomize questions
	for (i=0; i<quizItems.length; i++)
		{var indexToSwap=int(Math.random()*quizItems.length);
		var temp=quizItems[indexToSwap];
		quizItems[indexToSwap]=quizItems[i];
		quizItems[i]=quizItems[indexToSwap];}
	
	gotoAndPlay(_currentFrame+1);}

var quizItems=new Array();
var myData=new XML();
myData.ignoreWhite=true;
myData.onLoad=onQuizData;
myData.load("quiz051612.xml");
stop();
---------
Here is my XML;

Code:
---------
<?xml version="1.0"?>

<!DOCTYPE quiz [

	<!ELEMENT quiz (title, items)>
	<!ELEMENT title (#PCDATA)>
	<!ELEMENT items (item)+>	
	<!ELEMENT item (question, answer, answer+)>
	<!ELEMENT question (#PCDATA)>
	<!ELEMENT answer (#PCDATA)>
	<!ELEMENT wrongresponse (#PCDATA)>
	<!ATTLIST answer correct (y) #IMPLIED>
	

]>

<quiz>
	<title>The Quiz</title>
	<numberOfQuestionsToDisplay>5</numberOfQuestionsToDisplay>
	<items>
		<item>
			<question>What movie starred Johnny Depp as a boy with mechanical hands?</question>
			<answer correct="y">Edward Scissor Hands</answer>
			<answer>Pirates of the Carribean</answer>
			<answer>Out of Africa</answer>
			<answer>Coming to America</answer>
			<wrongresponse>wrongresponse  Q1</wrongresponse>
		</item>

		<item>
			<question>Which MTV TV show played pranks on celebrities?</question>
			<answer>Candid Camera</answer>
			<answer correct="y">PUNKD</answer>
			<answer>The Gong Show</answer>
			<answer>The Jesey Gang</answer>
			<wrongresponse>wrongresponse  Q2</wrongresponse>
		</item>		

		<item>
			<question>What is the highest grossing movie of all time?</question>
			<answer>Spiderman</answer>
			<answer correct="y">Avatar</answer>
			<answer>The Dark Knight</answer>
			<answer>The Avengers</answer>
			<wrongresponse>wrongresponse  Q3</wrongresponse>
		</item>		

		<item>
			<question>What daily TV show catches Hollywood celebrities in their daily lives</question>
			<answer>Entertainment Live</answer>
			<answer>The Last Time</answer>
			<answer>Community</answer>
			<answer correct="y">TMZ</answer>
			<wrongresponse>wrongresponse  Q4</wrongresponse>
		</item>		

		<item>
			<question>What does "PG" stands for in a movie</question>
			<answer  correct="y">Parental Guidance Suggested</answer>
			<answer>Poor Group</answer>
			<answer>Poor Guidance</answer>
			<answer>Past Genre</answer>
			<wrongresponse>wrongresponse  Q5</wrongresponse>
		</item>		

		<item>
			<question>Which one is incorrect?</question>
			<answer  correct="y">Will Farrell began on SNL</answer>
			<answer>Will Farrell began on The Electric Co</answer>
			<answer>Will Farrell began on Home Improvement</answer>
			<answer>Will Farrell began on The Office</answer>
			<wrongresponse>wrongresponse  Q6</wrongresponse>
		</item>		

		<item>
			<question>Who has the most Oscar nominations?</question>
			<answer>Lindsey Lohan</answer>
			<answer>Sylvester Stallone</answer>
			<answer>Eddie Murphy</answer>
			<answer correct="y">Meryl Streep</answer>
			<wrongresponse>wrongresponse  Q7</wrongresponse>
		</item>		

		<item>
			<question>Which TV show had the highest viewer audience for it's seried finale?</question>
			<answer  correct="y">Seinfeld</answer>
			<answer>MASH</answer>
			<answer>I Love Lucy</answer>
			<answer>Dallas</answer>
			<wrongresponse>wrongresponse  Q8</wrongresponse>
		</item>				

		<item>
			<question>What was Lucille Ball's husbands name?</question>
			<answer>Rock Hudson</answer>
			<answer>Clint Eastwood</answer>
			<answer correct="y">Desi Arnez</answer>
			<answer>Jerry Mathers</answer>
			<wrongresponse>wrongresponse  Q9</wrongresponse>
		</item>				

		<item>
			<question>What Disney star has a famous singer for a father?</question>
			<answer>Demi Lovatto</answer>
			<answer>Ashton Kutcher</answer>
			<answer correct="y">Miley Cyrus</answer>
			<answer>Britney Spears</answer>
			<wrongresponse>wrongresponse  Q10</wrongresponse>
		</item>						

	</items>

</quiz>
---------
]]></description>
			<content:encoded><![CDATA[<div>I have a quiz that loads questions, answers and a wrong answer response from an XML file. <br />
<br />
Everything is working fine except when it loads the text for the &quot;wrongresponse&quot; variable it always loads the last item value regardless of the question. It skips right to the last Item element everytime.<br />
<br />
Here is my AS2;<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">function QuizItem(question)<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.question=question;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.wrongresponse=wrongresponse;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.answers=new Array();<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.numOfAnswers=0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.correctAnswer=0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.getQuestion=function()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {return this.question;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.getwrongresponse=function()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {return this.wrongresponse;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.addAnswer=function(answer, isCorrectAnswer)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {this.answers[this.numOfAnswers]=answer;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (isCorrectAnswer)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.correctAnswer=this.numOfAnswers;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.numOfAnswers++;}<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; this.getAnswer=function(answerNumberToGet)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {return this.answers[answerNumberToGet];}<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.getCorrectAnswerNumber=function()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {return this.correctAnswer;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; this.checkAnswerNumber=function(userAnswerNumber)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {if (userAnswerNumber==this.getCorrectAnswerNumber())<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gotoAndPlay(&quot;Correct&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gotoAndPlay(&quot;Wrong&quot;);}<br />
}<br />
<br />
function onQuizData(success)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {var quizNode=this.firstChild;<br />
&nbsp; &nbsp; &nbsp; &nbsp; var quizTitleNode=quizNode.firstChild;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; title=quizTitleNode.firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; numberOfQuestionsToDisplay=int(quizNode.childNodes[1].firstChild.nodeValue);<br />
&nbsp; &nbsp; &nbsp; &nbsp; trace(&quot;numberOfQuestionsToDisplay=&quot;+numberOfQuestionsToDisplay);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; var i=0;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; var itemsNode=quizNode.childNodes[2];<br />
&nbsp; &nbsp; &nbsp; &nbsp; while (itemsNode.childNodes[i])<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var itemNode=itemsNode.childNodes[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var questionNode=itemNode.childNodes[0];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wrongresponse=itemNode.childNodes[5].firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var a=1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &lt;answer&gt; follows &lt;question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var answerNode=itemNode.childNodes[a++];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (answerNode)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {var isCorrectAnswer=false;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (answerNode.attributes.correct==&quot;y&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isCorrectAnswer=true;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quizItems[i].addAnswer(answerNode.firstChild.nodeValue, isCorrectAnswer);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // goto the next &lt;answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; answerNode=itemNode.childNodes[a++];}i++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; // Randomize questions<br />
&nbsp; &nbsp; &nbsp; &nbsp; for (i=0; i&lt;quizItems.length; i++)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {var indexToSwap=int(Math.random()*quizItems.length);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var temp=quizItems[indexToSwap];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quizItems[indexToSwap]=quizItems[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quizItems[i]=quizItems[indexToSwap];}<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; gotoAndPlay(_currentFrame+1);}<br />
<br />
var quizItems=new Array();<br />
var myData=new XML();<br />
myData.ignoreWhite=true;<br />
myData.onLoad=onQuizData;<br />
myData.load(&quot;quiz051612.xml&quot;);<br />
stop();</code><hr />
</div>Here is my XML;<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;?xml version=&quot;1.0&quot;?&gt;<br />
<br />
&lt;!DOCTYPE quiz [<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT quiz (title, items)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT title (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT items (item)+&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT item (question, answer, answer+)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT question (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT answer (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT wrongresponse (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ATTLIST answer correct (y) #IMPLIED&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
]&gt;<br />
<br />
&lt;quiz&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;title&gt;The Quiz&lt;/title&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;numberOfQuestionsToDisplay&gt;5&lt;/numberOfQuestionsToDisplay&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;items&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What movie starred Johnny Depp as a boy with mechanical hands?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Edward Scissor Hands&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Pirates of the Carribean&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Out of Africa&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Coming to America&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q1&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which MTV TV show played pranks on celebrities?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Candid Camera&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;PUNKD&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Gong Show&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Jesey Gang&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q2&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What is the highest grossing movie of all time?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Spiderman&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Avatar&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Dark Knight&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Avengers&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q3&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What daily TV show catches Hollywood celebrities in their daily lives&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Entertainment Live&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Last Time&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Community&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;TMZ&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q4&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What does &quot;PG&quot; stands for in a movie&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Parental Guidance Suggested&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Poor Group&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Poor Guidance&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Past Genre&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q5&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which one is incorrect?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Will Farrell began on SNL&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on The Electric Co&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on Home Improvement&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on The Office&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q6&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Who has the most Oscar nominations?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Lindsey Lohan&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Sylvester Stallone&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Eddie Murphy&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Meryl Streep&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q7&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which TV show had the highest viewer audience for it's seried finale?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Seinfeld&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;MASH&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;I Love Lucy&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Dallas&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q8&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What was Lucille Ball's husbands name?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Rock Hudson&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Clint Eastwood&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Desi Arnez&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Jerry Mathers&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q9&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What Disney star has a famous singer for a father?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Demi Lovatto&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Ashton Kutcher&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Miley Cyrus&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Britney Spears&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q10&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/items&gt;<br />
<br />
&lt;/quiz&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=48">XML</category>
			<dc:creator>ADVaughn</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827216</guid>
		</item>
		<item>
			<title>on XML load ... goes to last Item</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827215&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 13:06:49 GMT</pubDate>
			<description><![CDATA[I have a quiz that loads questions, answers and a wrong answer response from an XML file. 

Everything is working fine except when it loads the text for the "wrongresponse" variable it always loads the last item value regardless of the question. It skips right to the last Item element everytime.

Here is my AS2;

function QuizItem(question)
{
	this.question=question;
	this.wrongresponse=wrongresponse;
	this.answers=new Array();
	this.numOfAnswers=0;
	this.correctAnswer=0;
	
	this.getQuestion=function()
	{return this.question;}
	
	this.getwrongresponse=function()
	{return this.wrongresponse;}
	
	this.addAnswer=function(answer, isCorrectAnswer)
	{this.answers[this.numOfAnswers]=answer;
		if (isCorrectAnswer)
			this.correctAnswer=this.numOfAnswers;
		this.numOfAnswers++;}

	this.getAnswer=function(answerNumberToGet)
	{return this.answers[answerNumberToGet];}
	
	this.getCorrectAnswerNumber=function()
	{return this.correctAnswer;}
	
	this.checkAnswerNumber=function(userAnswerNumber)
	{if (userAnswerNumber==this.getCorrectAnswerNumber())
			gotoAndPlay("Correct");
		else
			gotoAndPlay("Wrong");}
}

function onQuizData(success)
	{var quizNode=this.firstChild;
	var quizTitleNode=quizNode.firstChild;	
	title=quizTitleNode.firstChild.nodeValue;
	numberOfQuestionsToDisplay=int(quizNode.childNodes[1].firstChild.nodeValue);
	trace("numberOfQuestionsToDisplay="+numberOfQuestionsToDisplay);
	
	var i=0;

	var itemsNode=quizNode.childNodes[2];
	while (itemsNode.childNodes[i])
		
	{
		var itemNode=itemsNode.childNodes[i];
		
		var questionNode=itemNode.childNodes[0];
		quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);
		
		wrongresponse=itemNode.childNodes[5].firstChild.nodeValue;
		
		var a=1;
		
		// <answer> follows <question>
		var answerNode=itemNode.childNodes[a++];
		while (answerNode)
			
			{var isCorrectAnswer=false;
			if (answerNode.attributes.correct=="y")
				isCorrectAnswer=true;
			quizItems[i].addAnswer(answerNode.firstChild.nodeValue, isCorrectAnswer);
			// goto the next <answer>
			answerNode=itemNode.childNodes[a++];}i++;
		
		}
	
	// Randomize questions
	for (i=0; i<quizItems.length; i++)
		{var indexToSwap=int(Math.random()*quizItems.length);
		var temp=quizItems[indexToSwap];
		quizItems[indexToSwap]=quizItems[i];
		quizItems[i]=quizItems[indexToSwap];}
	
	gotoAndPlay(_currentFrame+1);}

var quizItems=new Array();
var myData=new XML();
myData.ignoreWhite=true;
myData.onLoad=onQuizData;
myData.load("quiz051612.xml");
stop();



Here is my XML;


Code:
---------
<?xml version="1.0"?>

<!DOCTYPE quiz [

	<!ELEMENT quiz (title, items)>
	<!ELEMENT title (#PCDATA)>
	<!ELEMENT items (item)+>	
	<!ELEMENT item (question, answer, answer+)>
	<!ELEMENT question (#PCDATA)>
	<!ELEMENT answer (#PCDATA)>
	<!ELEMENT wrongresponse (#PCDATA)>
	<!ATTLIST answer correct (y) #IMPLIED>
	

]>

<quiz>
	<title>The Quiz</title>
	<numberOfQuestionsToDisplay>5</numberOfQuestionsToDisplay>
	<items>
		<item>
			<question>What movie starred Johnny Depp as a boy with mechanical hands?</question>
			<answer correct="y">Edward Scissor Hands</answer>
			<answer>Pirates of the Carribean</answer>
			<answer>Out of Africa</answer>
			<answer>Coming to America</answer>
			<wrongresponse>wrongresponse  Q1</wrongresponse>
		</item>

		<item>
			<question>Which MTV TV show played pranks on celebrities?</question>
			<answer>Candid Camera</answer>
			<answer correct="y">PUNKD</answer>
			<answer>The Gong Show</answer>
			<answer>The Jesey Gang</answer>
			<wrongresponse>wrongresponse  Q2</wrongresponse>
		</item>		

		<item>
			<question>What is the highest grossing movie of all time?</question>
			<answer>Spiderman</answer>
			<answer correct="y">Avatar</answer>
			<answer>The Dark Knight</answer>
			<answer>The Avengers</answer>
			<wrongresponse>wrongresponse  Q3</wrongresponse>
		</item>		

		<item>
			<question>What daily TV show catches Hollywood celebrities in their daily lives</question>
			<answer>Entertainment Live</answer>
			<answer>The Last Time</answer>
			<answer>Community</answer>
			<answer correct="y">TMZ</answer>
			<wrongresponse>wrongresponse  Q4</wrongresponse>
		</item>		

		<item>
			<question>What does "PG" stands for in a movie</question>
			<answer  correct="y">Parental Guidance Suggested</answer>
			<answer>Poor Group</answer>
			<answer>Poor Guidance</answer>
			<answer>Past Genre</answer>
			<wrongresponse>wrongresponse  Q5</wrongresponse>
		</item>		

		<item>
			<question>Which one is incorrect?</question>
			<answer  correct="y">Will Farrell began on SNL</answer>
			<answer>Will Farrell began on The Electric Co</answer>
			<answer>Will Farrell began on Home Improvement</answer>
			<answer>Will Farrell began on The Office</answer>
			<wrongresponse>wrongresponse  Q6</wrongresponse>
		</item>		

		<item>
			<question>Who has the most Oscar nominations?</question>
			<answer>Lindsey Lohan</answer>
			<answer>Sylvester Stallone</answer>
			<answer>Eddie Murphy</answer>
			<answer correct="y">Meryl Streep</answer>
			<wrongresponse>wrongresponse  Q7</wrongresponse>
		</item>		

		<item>
			<question>Which TV show had the highest viewer audience for it's seried finale?</question>
			<answer  correct="y">Seinfeld</answer>
			<answer>MASH</answer>
			<answer>I Love Lucy</answer>
			<answer>Dallas</answer>
			<wrongresponse>wrongresponse  Q8</wrongresponse>
		</item>				

		<item>
			<question>What was Lucille Ball's husbands name?</question>
			<answer>Rock Hudson</answer>
			<answer>Clint Eastwood</answer>
			<answer correct="y">Desi Arnez</answer>
			<answer>Jerry Mathers</answer>
			<wrongresponse>wrongresponse  Q9</wrongresponse>
		</item>				

		<item>
			<question>What Disney star has a famous singer for a father?</question>
			<answer>Demi Lovatto</answer>
			<answer>Ashton Kutcher</answer>
			<answer correct="y">Miley Cyrus</answer>
			<answer>Britney Spears</answer>
			<wrongresponse>wrongresponse  Q10</wrongresponse>
		</item>						

	</items>

</quiz>
---------
]]></description>
			<content:encoded><![CDATA[<div>I have a quiz that loads questions, answers and a wrong answer response from an XML file. <br />
<br />
Everything is working fine except when it loads the text for the &quot;wrongresponse&quot; variable it always loads the last item value regardless of the question. It skips right to the last Item element everytime.<br />
<br />
Here is my AS2;<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Actionscript Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:640px; height:516px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="actionscript"><span style="color: #000000; font-weight: bold;">function</span> QuizItem<span style="color: #66cc66;">&#40;</span>question<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">question</span>=question;<br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">wrongresponse</span>=wrongresponse;<br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">answers</span>=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">numOfAnswers</span>=<span style="color: #cc66cc;">0</span>;<br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">correctAnswer</span>=<span style="color: #cc66cc;">0</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">getQuestion</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">question</span>;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">getwrongresponse</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">wrongresponse</span>;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addAnswer</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>answer, isCorrectAnswer<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">answers</span><span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">numOfAnswers</span><span style="color: #66cc66;">&#93;</span>=answer;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isCorrectAnswer<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">correctAnswer</span>=<span style="color: #0066CC;">this</span>.<span style="color: #006600;">numOfAnswers</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">numOfAnswers</span>++;<span style="color: #66cc66;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">getAnswer</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>answerNumberToGet<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">answers</span><span style="color: #66cc66;">&#91;</span>answerNumberToGet<span style="color: #66cc66;">&#93;</span>;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">getCorrectAnswerNumber</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">correctAnswer</span>;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">checkAnswerNumber</span>=<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>userAnswerNumber<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>userAnswerNumber==<span style="color: #0066CC;">this</span>.<span style="color: #006600;">getCorrectAnswerNumber</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Correct"</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Wrong"</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br /><br /><span style="color: #000000; font-weight: bold;">function</span> onQuizData<span style="color: #66cc66;">&#40;</span>success<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">var</span> quizNode=<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>;<br />&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> quizTitleNode=quizNode.<span style="color: #0066CC;">firstChild</span>;&nbsp; <br />&nbsp; &nbsp; title=quizTitleNode.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span>;<br />&nbsp; &nbsp; numberOfQuestionsToDisplay=<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>quizNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"numberOfQuestionsToDisplay="</span>+numberOfQuestionsToDisplay<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> i=<span style="color: #cc66cc;">0</span>;<br /><br />&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> itemsNode=quizNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>itemsNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> itemNode=itemsNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> questionNode=itemNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; quizItems<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>=<span style="color: #000000; font-weight: bold;">new</span> QuizItem<span style="color: #66cc66;">&#40;</span>questionNode.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; wrongresponse=itemNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> a=<span style="color: #cc66cc;">1</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// &lt;answer&gt; follows &lt;question&gt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> answerNode=itemNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>a++<span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>answerNode<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">var</span> isCorrectAnswer=<span style="color: #000000; font-weight: bold;">false</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>answerNode.<span style="color: #0066CC;">attributes</span>.<span style="color: #006600;">correct</span>==<span style="color: #ff0000;">"y"</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isCorrectAnswer=<span style="color: #000000; font-weight: bold;">true</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quizItems<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addAnswer</span><span style="color: #66cc66;">&#40;</span>answerNode.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span>, isCorrectAnswer<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// goto the next &lt;answer&gt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; answerNode=itemNode.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>a++<span style="color: #66cc66;">&#93;</span>;<span style="color: #66cc66;">&#125;</span>i++;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Randomize questions</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">0</span>; i&lt;quizItems.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">var</span> indexToSwap=<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>*quizItems.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> temp=quizItems<span style="color: #66cc66;">&#91;</span>indexToSwap<span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; quizItems<span style="color: #66cc66;">&#91;</span>indexToSwap<span style="color: #66cc66;">&#93;</span>=quizItems<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; quizItems<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>=quizItems<span style="color: #66cc66;">&#91;</span>indexToSwap<span style="color: #66cc66;">&#93;</span>;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_currentFrame</span>+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span><br /><br /><span style="color: #000000; font-weight: bold;">var</span> quizItems=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #000000; font-weight: bold;">var</span> myData=<span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />myData.<span style="color: #0066CC;">ignoreWhite</span>=<span style="color: #000000; font-weight: bold;">true</span>;<br />myData.<span style="color: #0066CC;">onLoad</span>=onQuizData;<br />myData.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"quiz051612.xml"</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></div></pre>
</div><br />
<br />
Here is my XML;<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;?xml version=&quot;1.0&quot;?&gt;<br />
<br />
&lt;!DOCTYPE quiz [<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT quiz (title, items)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT title (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT items (item)+&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT item (question, answer, answer+)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT question (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT answer (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ELEMENT wrongresponse (#PCDATA)&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;!ATTLIST answer correct (y) #IMPLIED&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
]&gt;<br />
<br />
&lt;quiz&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;title&gt;The Quiz&lt;/title&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;numberOfQuestionsToDisplay&gt;5&lt;/numberOfQuestionsToDisplay&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;items&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What movie starred Johnny Depp as a boy with mechanical hands?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Edward Scissor Hands&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Pirates of the Carribean&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Out of Africa&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Coming to America&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q1&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which MTV TV show played pranks on celebrities?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Candid Camera&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;PUNKD&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Gong Show&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Jesey Gang&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q2&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What is the highest grossing movie of all time?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Spiderman&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Avatar&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Dark Knight&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Avengers&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q3&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What daily TV show catches Hollywood celebrities in their daily lives&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Entertainment Live&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;The Last Time&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Community&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;TMZ&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q4&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What does &quot;PG&quot; stands for in a movie&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Parental Guidance Suggested&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Poor Group&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Poor Guidance&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Past Genre&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q5&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which one is incorrect?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Will Farrell began on SNL&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on The Electric Co&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on Home Improvement&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Will Farrell began on The Office&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q6&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Who has the most Oscar nominations?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Lindsey Lohan&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Sylvester Stallone&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Eddie Murphy&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Meryl Streep&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q7&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;Which TV show had the highest viewer audience for it's seried finale?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&nbsp; correct=&quot;y&quot;&gt;Seinfeld&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;MASH&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;I Love Lucy&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Dallas&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q8&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What was Lucille Ball's husbands name?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Rock Hudson&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Clint Eastwood&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Desi Arnez&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Jerry Mathers&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q9&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;question&gt;What Disney star has a famous singer for a father?&lt;/question&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Demi Lovatto&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Ashton Kutcher&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer correct=&quot;y&quot;&gt;Miley Cyrus&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;answer&gt;Britney Spears&lt;/answer&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;wrongresponse&gt;wrongresponse&nbsp; Q10&lt;/wrongresponse&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/item&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/items&gt;<br />
<br />
&lt;/quiz&gt;</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=30">ActionScript 2.0</category>
			<dc:creator>ADVaughn</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827215</guid>
		</item>
		<item>
			<title>Problem embeding swf in index.php</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827214&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 12:25:01 GMT</pubDate>
			<description><![CDATA[I'm trying to embed an swf file in a .php file.
When both files (php & swf) are in the same directory (mysite.com/), works perfectly.
Here is the code I put in php file (mysite.com/my.php)(some is replaced by 'blah blah' or erased, for short):

Code:
---------
<object classid=blah blah...codebase=blah blah...>
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="*my.swf*" />
<embed src="*my.swf*"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
---------
*But* when I move 'my.swf' in 'mysite.com/mydir' it doesn't work (even though I change the path in the code):

Code:
---------
<object classid=blah blah...codebase=blah blah...>
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="*mydir/my.swf*" />
<embed src="*mydir/my.swf*"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
---------
I also tried:
'/mydir/my.swf'
'./mydir/my.swf'
'mysite.com/mydir/my.swf'.
Nothing. Worked only when in 'mysite.com/'.]]></description>
			<content:encoded><![CDATA[<div>I'm trying to embed an swf file in a .php file.<br />
When both files (php &amp; swf) are in the same directory (mysite.com/), works perfectly.<br />
Here is the code I put in php file (mysite.com/my.php)(some is replaced by 'blah blah' or erased, for short):<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;object classid=blah blah...codebase=blah blah...&gt;<br />
&lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot; /&gt;<br />
&lt;param name=&quot;movie&quot; value=&quot;<b>my.swf</b>&quot; /&gt;<br />
&lt;embed src=&quot;<b>my.swf</b>&quot;&nbsp; type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; /&gt;<br />
&lt;/object&gt;</code><hr />
</div><b>But</b> when I move 'my.swf' in 'mysite.com/mydir' it doesn't work (even though I change the path in the code):<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;object classid=blah blah...codebase=blah blah...&gt;<br />
&lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot; /&gt;<br />
&lt;param name=&quot;movie&quot; value=&quot;<b>mydir/my.swf</b>&quot; /&gt;<br />
&lt;embed src=&quot;<b>mydir/my.swf</b>&quot;&nbsp; type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; /&gt;<br />
&lt;/object&gt;</code><hr />
</div>I also tried:<br />
'/mydir/my.swf'<br />
'./mydir/my.swf'<br />
'mysite.com/mydir/my.swf'.<br />
Nothing. Worked only when in 'mysite.com/'.</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=99">Flash 8 and older</category>
			<dc:creator>panoss</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827214</guid>
		</item>
		<item>
			<title>live audio and video streaming</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827213&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 11:57:12 GMT</pubDate>
			<description><![CDATA[I was just wondering if someone can help me with this problem i'm having. I want to know if flash is capable of live video and audio streaming. I am trying to develop a website that I can have two people streaming video and audio one after another and it is able to be viewed by spectators. If you need more information on this project I will post more on request. Any help would be greatly appreciated.]]></description>
			<content:encoded><![CDATA[<div>I was just wondering if someone can help me with this problem i'm having. I want to know if flash is capable of live video and audio streaming. I am trying to develop a website that I can have two people streaming video and audio one after another and it is able to be viewed by spectators. If you need more information on this project I will post more on request. Any help would be greatly appreciated.</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=29"><![CDATA[Newbies & General flash questions]]></category>
			<dc:creator>aussieboy</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827213</guid>
		</item>
		<item>
			<title>Loading RSS Feed</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827212&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 06:58:22 GMT</pubDate>
			<description><![CDATA[Hey guys,

It's been YEARS since I've messed with Flash. The last time I did was when Flash MX 2004 came out and that was 8 years ago, lol. Then I made a game, was pretty cool.

So, fast forward. I'm coming out of the Army and a few months back I started an Indie Record Label after having 13 years now of being in the music industry as a producer and mixer/master. 

So I have a website www.blackandyellowrecords.com and I'm changing a few things, the main thing is instead of displaying a small single page with important things about each artist, clicking on an artist will now display a flash site that is dedicated to the artist. haha. SO.

On the home page of their flash site will be a little into txt and HOPEFULLY an RSS news from that will be generated from livejournal.com

(EX.: feed://socalm-news.livejournal.com/data/rss)

The problem is I've looked on google and on Flashkit for about 3 to 4 hours now and can't find anything that works.

I'm using AS2.0 that was called for in the Flash Website Tutorial I used.

I just can't seem to figure out of to display a dynamic news feed for the life of me. 

Specs:
Flash CS6
AS2.0
Need feed to be displayed in a controlled area (ie. movie clip or something)

Thank you in advance for any help or solution you may have for this.
Sincerely,
B.D.Smith:)]]></description>
			<content:encoded><![CDATA[<div>Hey guys,<br />
<br />
It's been YEARS since I've messed with Flash. The last time I did was when Flash MX 2004 came out and that was 8 years ago, lol. Then I made a game, was pretty cool.<br />
<br />
So, fast forward. I'm coming out of the Army and a few months back I started an Indie Record Label after having 13 years now of being in the music industry as a producer and mixer/master. <br />
<br />
So I have a website <a rel="nofollow" href="http://www.blackandyellowrecords.com" target="_blank">www.blackandyellowrecords.com</a> and I'm changing a few things, the main thing is instead of displaying a small single page with important things about each artist, clicking on an artist will now display a flash site that is dedicated to the artist. haha. SO.<br />
<br />
On the home page of their flash site will be a little into txt and HOPEFULLY an RSS news from that will be generated from livejournal.com<br />
<br />
(EX.: feed://socalm-news.livejournal.com/data/rss)<br />
<br />
The problem is I've looked on google and on Flashkit for about 3 to 4 hours now and can't find anything that works.<br />
<br />
I'm using AS2.0 that was called for in the Flash Website Tutorial I used.<br />
<br />
I just can't seem to figure out of to display a dynamic news feed for the life of me. <br />
<br />
Specs:<br />
Flash CS6<br />
AS2.0<br />
Need feed to be displayed in a controlled area (ie. movie clip or something)<br />
<br />
Thank you in advance for any help or solution you may have for this.<br />
Sincerely,<br />
B.D.Smith:)</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=29"><![CDATA[Newbies & General flash questions]]></category>
			<dc:creator>BDSmith</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827212</guid>
		</item>
		<item>
			<title>Drawing API Stroke width remains fixed even on scalling</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827211&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 05:44:19 GMT</pubDate>
			<description>Hi,
I am working on a printing app where I am using Drawing API to draw a rectangle. I have provided a functionality to control stroke width of the rectangle 
Code:
---------
graphics.lineStyle(10,0x000000);
---------
For printing purpose I will need to scale the rectangle to higher resolution so I am using scaleX and scaleY to 5 times. But scalling the movieclip is not working with the stroke of the rectangle. The stroke remains the same.

Please let me know how can i increase the stroke width when scaling the movieclip.

Thanks</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am working on a printing app where I am using Drawing API to draw a rectangle. I have provided a functionality to control stroke width of the rectangle <div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">graphics.lineStyle(10,0x000000);</code><hr />
</div>For printing purpose I will need to scale the rectangle to higher resolution so I am using scaleX and scaleY to 5 times. But scalling the movieclip is not working with the stroke of the rectangle. The stroke remains the same.<br />
<br />
Please let me know how can i increase the stroke width when scaling the movieclip.<br />
<br />
Thanks</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=102">Actionscript 3.0 (incl. Flex/AIR)</category>
			<dc:creator>salim_designer</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827211</guid>
		</item>
		<item>
			<title>G12 Macro</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827210&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 05:08:05 GMT</pubDate>
			<description>Penny I found at work today.

Image: https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/310042_587486800993_141200312_31579491_721131724_n.jpg </description>
			<content:encoded><![CDATA[<div>Penny I found at work today.<br />
<br />
<img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/310042_587486800993_141200312_31579491_721131724_n.jpg" border="0" alt="" /></div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=88">Photography</category>
			<dc:creator>WannaBe_80z</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827210</guid>
		</item>
		<item>
			<title>FLV skipping first 2 seconds of video</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827209&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 22:49:19 GMT</pubDate>
			<description>Fixed</description>
			<content:encoded><![CDATA[<div>Fixed</div>


	<br />
	<div style="padding:6px">

	

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Files</legend>
			<table cellpadding="0" cellspacing="3" border="0">
			<tr>
	<td><img class="inlineimg" src="http://board.flashkit.com/board/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://board.flashkit.com/board/attachment.php?attachmentid=73626&amp;d=1337124439">iShowU-Capture3.mov.zip</a> (130.6 KB)</td>
</tr>
			</table>
		</fieldset>
	

	</div>
]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=102">Actionscript 3.0 (incl. Flex/AIR)</category>
			<dc:creator>station agent</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827209</guid>
		</item>
		<item>
			<title>XML / a href / flash</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827208&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 22:13:48 GMT</pubDate>
			<description><![CDATA[Hey, I already read some posts with help on getting A href links in flash, but it won't work for me. Hopefully you can help me.

XML CODE (shortened):

Code:
---------
<RelationViewerData>
<Settings appTitle="Relation browser: Disease Relation Finder" WWWLinkTargetFrame="_blank" startID="Kinase" defaultRadius="150" maxRadius="180">
<RelationTypes>
<UndirectedRelation color="0x85CDE4"/>
</RelationTypes>
<NodeTypes>
<Node/>
</NodeTypes>
</Settings>
<Nodes>
<Node id="cAMP" name="cAMP">
«![CDATA[
<a href='http://www.google.nl' target='_blank'>9574934</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>1322896</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>9427384</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>22356915</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11930017</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>22356915</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; Kinase <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>15563461</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>17142316</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>17167070</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>11930001</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>11930001</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>1322896</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>9427384</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>9574934</a>5pt; Kinase <a href='http://www.google.nl' target='_blank'>10637587</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>10637587</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>11134002</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11134002</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>11334934</a>5pt; Kinase <a href='http://www.google.nl' target='_blank'>11733015</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11930001</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>22356915</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>11334934</a>55pt; PDE <a href='http://www.google.nl' target='_blank'>20693305</a>55pt; PDE <a href='http://www.google.nl' target='_blank'>11930017</a>55pt; PDE
]]»
</Node>
<Node id="inhibitor" name="inhibitor">
«![CDATA[
21275055; 5pt; Disease 22545171; 5pt; Disease 3103442; 5pt; Disease 9427384; 5pt; PDE 9521128; 5pt; Kinase 9574934; 5pt; Kinase 9642090; 5pt; Kinase 9662024; 5pt; Kinase 9675273; 5pt; Kinase 9841878; 5pt; Kinase 10092479; 5pt; Disease 3938090; 5pt; Disease 10376993; 5pt; Kinase 10571254; 5pt; Disease 10608797; 5pt; Kinase 10637587; 5pt; cAMP 10743606; 5pt; Kinase 9228559; 5pt; Disease 8663209; 5pt; Disease 7479764; 5pt; Disease 3108836; 5pt; Disease 3143491; 5pt; Disease 2118325; 5pt; Disease 2290444; 5pt; Kinase 2005184; 5pt; Disease 1857383; 5pt; Kinase 1322896; 5pt; PDE 8347171; 5pt; Disease 8224086; 5pt; Disease 7731973; 5pt; Disease 7608181; 5pt; Kinase 7575676; 5pt; Disease 3830152; 5pt; Kinase 7488235; 5pt; Disease 10956223; 5pt; Disease 10980453; 5pt; Disease 11055585; 5pt; Disease 12615312; 5pt; Disease 12814651; 5pt; Disease 12899835; 5pt; Disease 14506274; 5pt; Kinase 15273104; 5pt; Disease 15465048; 5pt; Disease 15468531; 5pt; Disease 15544466; 5pt; Disease 11733015; 5pt; cAMP 16321980; 5pt; Disease 16392806; 5pt; Disease 16887207; 5pt; Disease 16949574; 5pt; Kinase 17012768; 5pt; Disease 17126803; 5pt; Disease 12106872; 5pt; Disease 11930017; 5pt; cAMP 11063610; 5pt; Kinase 11080591; 5pt; Kinase 11080591; 5pt; Disease 11137702; 5pt; Disease 11134002; 5pt; cAMP 11163436; 5pt; Kinase 11286798; 5pt; Disease 11348531; 5pt; Disease 11353848; 5pt; Disease 11465068; 5pt; Disease 11737216; 5pt; Kinase 11930001; 5pt; cAMP 11930001; 5pt; Disease 11356520; 55pt; Disease 22023548; 55pt; PDE 21886855; 55pt; Kinase 11930017; 55pt; PDE 21859303; 55pt; PDE
]]»
</Node>
<Node id="Kinase" name="Kinase">
«![CDATA[
<a href='http://www.google.nl' target='_blank'>16890941</a>105pt; inhibitor <a href='http://www.google.nl' target='_blank'>20529682</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>11072827</a>30pt; cAMP <a href='http://www.google.nl' target='_blank'>21349219</a>30pt; Disease <a href='http://www.google.nl' target='_blank'>11733015</a>30pt; cAMP <a href='http://www.google.nl' target='_blank'>11733015</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>20819953</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>18005706</a>30pt; Disease <a href='http://www.google.nl' target='_blank'>18387804</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>9041340</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>8631899</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>2693021</a>30pt; cAMP <a href='http://www.google.nl' target='_blank'>15458814</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>21629723</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>1640387</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>8325329</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>8134768</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>7527048</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>17154500</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>18644955</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>19207727</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>19320832</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>16949574</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>19346560</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>19707572</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>22070162</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>21483717</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>21483717</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>21349219</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>21187682</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>21187682</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>20642432</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>22442154</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>20231285</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>20228202</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>19750216</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>9841878</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>9747975</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>9675273</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>9662024</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>9642090</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>9574934</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>9574934</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>9521128</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>7608181</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>1857383</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>2290444</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>10376993</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>10583863</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>10608797</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>14506274</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>12687015</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>12426089</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>11737216</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11334934</a>5pt; PDE <a href='http://www.google.nl' target='_blank'>11334934</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>11163436</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11080591</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11080591</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>11063610</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>10743606</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>3830152</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>21886855</a>55pt; inhibitor
]]»
</Node>
<Node id="PDE" name="PDE">
«![CDATA[
<a href='http://www.google.nl' target='_blank'>22377518</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>11930001</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>21208463</a>30pt; cAMP <a href='http://www.google.nl' target='_blank'>14728691</a>30pt; cAMP <a href='http://www.google.nl' target='_blank'>11134002</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>10637587</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>22356915</a>30pt; Disease <a href='http://www.google.nl' target='_blank'>22356915</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>22291195</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; Kinase <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>15563461</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>17167070</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>22356915</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>22023548</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>21859303</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>15357210</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>1322896</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>1322896</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>11930001</a>5pt; cAMP <a href='http://www.google.nl' target='_blank'>11930001</a>5pt; Disease <a href='http://www.google.nl' target='_blank'>9427384</a>5pt; inhibitor <a href='http://www.google.nl' target='_blank'>11334934</a>5pt; Kinase <a href='http://www.google.nl' target='_blank'>9427384</a>5pt; cAMP
]]»
</Node>
<Node id="Disease" name="Disease">
«![CDATA[
<a href='http://www.google.nl' target='_blank'>21428846</a>25pt; inhibitor <a href='http://www.google.nl' target='_blank'>16303308</a>25pt; inhibitor <a href='http://www.google.nl' target='_blank'>10353643</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>15848765</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>21572521</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>18005706</a>30pt; Kinase <a href='http://www.google.nl' target='_blank'>7932587</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>21349219</a>30pt; inhibitor <a href='http://www.google.nl' target='_blank'>21349219</a>30pt; Kinase
]]»
</Node>
</Nodes>
<Relations>
<UndirectedRelation lineSize="6" labelText="120" letterSymbol="C" fromID="cAMP" toID="inhibitor"/>
<UndirectedRelation lineSize="33" labelText="665" letterSymbol="C" fromID="Kinase" toID="inhibitor"/>
<UndirectedRelation lineSize="16" labelText="325" letterSymbol="C" fromID="PDE" toID="inhibitor"/>
<UndirectedRelation lineSize="13" labelText="270" letterSymbol="C" fromID="PDE" toID="cAMP"/>
<UndirectedRelation lineSize="5" labelText="105" letterSymbol="C" fromID="Kinase" toID="cAMP"/>
<UndirectedRelation lineSize="6" labelText="125" letterSymbol="C" fromID="Disease" toID="Kinase"/>
<UndirectedRelation lineSize="43" labelText="870" letterSymbol="C" fromID="Disease" toID="inhibitor"/>
<UndirectedRelation lineSize="0" labelText="10" letterSymbol="C" fromID="Kinase" toID="PDE"/>
<UndirectedRelation lineSize="1" labelText="20" letterSymbol="C" fromID="Disease" toID="cAMP"/>
<UndirectedRelation lineSize="2" labelText="55" letterSymbol="C" fromID="Disease" toID="PDE"/>
</Relations>
</RelationViewerData>
---------
Flash CODE:

Code:
---------
// XMLtools.as
// collected by me@der-mo.net

trace("XMLtools loaded.");

/*
	byName:
	
	returns the first XML Node with a given name

*/
XML.prototype.__proto__.byName = function(node_name){
	if(this.nodeName != node_name){
		return this.nextSibling.byName(node_name) || this.firstChild.byName(node_name);
	} else {
		return this;
	}	
}
ASSetPropFlags(XML.prototype.__proto__,["byName"],1);

//*************************************************************************


/* 	XML.makeObj  

	author: me@der-mo.net
	
   	converts an XML Object to a corresponding dot-syntax object.
   	NodeName and NodeValue are translated to _type and _text properties.
   	child nodes are stored in a children array of the parent node.
   	deep recursion.
   	
   	example:
   	trace(new XML("<folder name="folder1"><page attName="attVal">text inside tag</page></folder>").makeObj());
   
   	output:--
   	{
	_type: null
	children: 
		[
			{
			name: folder1
			_type: folder
			children: 
				[
					{
					_text: text inside tag
					attName: attVal
					_type: page
					}
				]
			}
		]
	}

  
	
*/

XML.prototype.__proto__.makeObj = function(){
	// create a result object
	var obj ={};
	
	// set _type property to nodeName
	obj._type=this.nodeName;
	
	// adopt all attributes and their values as properties
	for(var i in this.attributes) obj[i]=this.attributes[i];
	
	// add all children objects to children property Array
	
	if(this.firstChild.nodeType==3){
		// textNode, so we won't have any other children
		//(flash does not support mixed-mode)
		obj._text=this.firstChild.nodeValue;
	} else {
		// loop through children and recursively store them as objects
		var tempChildren=[];
		for(var i in this.childNodes){	
			var childObj=this.childNodes[i].makeObj();
			if(childObj._type!=null) tempChildren.unshift(childObj);
		}
		if(tempChildren.length) obj.children=tempChildren;
	}
	//for(var i in obj) trace(i + " : " + obj[i])
	return obj;
};
ASSetPropFlags(XML.prototype.__proto__,["makeObj"],1);
---------
]]></description>
			<content:encoded><![CDATA[<div>Hey, I already read some posts with help on getting A href links in flash, but it won't work for me. Hopefully you can help me.<br />
<br />
XML CODE (shortened):<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">&lt;RelationViewerData&gt;<br />
&lt;Settings appTitle=&quot;Relation browser: Disease Relation Finder&quot; WWWLinkTargetFrame=&quot;_blank&quot; startID=&quot;Kinase&quot; defaultRadius=&quot;150&quot; maxRadius=&quot;180&quot;&gt;<br />
&lt;RelationTypes&gt;<br />
&lt;UndirectedRelation color=&quot;0x85CDE4&quot;/&gt;<br />
&lt;/RelationTypes&gt;<br />
&lt;NodeTypes&gt;<br />
&lt;Node/&gt;<br />
&lt;/NodeTypes&gt;<br />
&lt;/Settings&gt;<br />
&lt;Nodes&gt;<br />
&lt;Node id=&quot;cAMP&quot; name=&quot;cAMP&quot;&gt;<br />
&lt;![CDATA[<br />
&lt;a href='http://www.google.nl' target='_blank'&gt;9574934&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;1322896&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9427384&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11930017&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;15563461&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;17142316&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;17167070&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;1322896&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;9427384&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;9574934&lt;/a&gt;5pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;10637587&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10637587&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;11134002&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11134002&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;11334934&lt;/a&gt;5pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;11733015&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;11334934&lt;/a&gt;55pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;20693305&lt;/a&gt;55pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;11930017&lt;/a&gt;55pt; PDE<br />
]]&gt;<br />
&lt;/Node&gt;<br />
&lt;Node id=&quot;inhibitor&quot; name=&quot;inhibitor&quot;&gt;<br />
&lt;![CDATA[<br />
21275055; 5pt; Disease 22545171; 5pt; Disease 3103442; 5pt; Disease 9427384; 5pt; PDE 9521128; 5pt; Kinase 9574934; 5pt; Kinase 9642090; 5pt; Kinase 9662024; 5pt; Kinase 9675273; 5pt; Kinase 9841878; 5pt; Kinase 10092479; 5pt; Disease 3938090; 5pt; Disease 10376993; 5pt; Kinase 10571254; 5pt; Disease 10608797; 5pt; Kinase 10637587; 5pt; cAMP 10743606; 5pt; Kinase 9228559; 5pt; Disease 8663209; 5pt; Disease 7479764; 5pt; Disease 3108836; 5pt; Disease 3143491; 5pt; Disease 2118325; 5pt; Disease 2290444; 5pt; Kinase 2005184; 5pt; Disease 1857383; 5pt; Kinase 1322896; 5pt; PDE 8347171; 5pt; Disease 8224086; 5pt; Disease 7731973; 5pt; Disease 7608181; 5pt; Kinase 7575676; 5pt; Disease 3830152; 5pt; Kinase 7488235; 5pt; Disease 10956223; 5pt; Disease 10980453; 5pt; Disease 11055585; 5pt; Disease 12615312; 5pt; Disease 12814651; 5pt; Disease 12899835; 5pt; Disease 14506274; 5pt; Kinase 15273104; 5pt; Disease 15465048; 5pt; Disease 15468531; 5pt; Disease 15544466; 5pt; Disease 11733015; 5pt; cAMP 16321980; 5pt; Disease 16392806; 5pt; Disease 16887207; 5pt; Disease 16949574; 5pt; Kinase 17012768; 5pt; Disease 17126803; 5pt; Disease 12106872; 5pt; Disease 11930017; 5pt; cAMP 11063610; 5pt; Kinase 11080591; 5pt; Kinase 11080591; 5pt; Disease 11137702; 5pt; Disease 11134002; 5pt; cAMP 11163436; 5pt; Kinase 11286798; 5pt; Disease 11348531; 5pt; Disease 11353848; 5pt; Disease 11465068; 5pt; Disease 11737216; 5pt; Kinase 11930001; 5pt; cAMP 11930001; 5pt; Disease 11356520; 55pt; Disease 22023548; 55pt; PDE 21886855; 55pt; Kinase 11930017; 55pt; PDE 21859303; 55pt; PDE<br />
]]&gt;<br />
&lt;/Node&gt;<br />
&lt;Node id=&quot;Kinase&quot; name=&quot;Kinase&quot;&gt;<br />
&lt;![CDATA[<br />
&lt;a href='http://www.google.nl' target='_blank'&gt;16890941&lt;/a&gt;105pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;20529682&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11072827&lt;/a&gt;30pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;21349219&lt;/a&gt;30pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;11733015&lt;/a&gt;30pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;11733015&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;20819953&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;18005706&lt;/a&gt;30pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;18387804&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9041340&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;8631899&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;2693021&lt;/a&gt;30pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;15458814&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21629723&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;1640387&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;8325329&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;8134768&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;7527048&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;17154500&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;18644955&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;19207727&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;19320832&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;16949574&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;19346560&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;19707572&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;22070162&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;21483717&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21483717&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;21349219&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21187682&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21187682&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;20642432&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22442154&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;20231285&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;20228202&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;19750216&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;9841878&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9747975&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;9675273&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9662024&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9642090&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9574934&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;9574934&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;9521128&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;7608181&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;1857383&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;2290444&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10376993&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10583863&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;10608797&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;14506274&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;12687015&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;12426089&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;11737216&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11334934&lt;/a&gt;5pt; PDE &lt;a href='http://www.google.nl' target='_blank'&gt;11334934&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;11163436&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11080591&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11080591&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;11063610&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10743606&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;3830152&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21886855&lt;/a&gt;55pt; inhibitor<br />
]]&gt;<br />
&lt;/Node&gt;<br />
&lt;Node id=&quot;PDE&quot; name=&quot;PDE&quot;&gt;<br />
&lt;![CDATA[<br />
&lt;a href='http://www.google.nl' target='_blank'&gt;22377518&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21208463&lt;/a&gt;30pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;14728691&lt;/a&gt;30pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;11134002&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10637587&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;30pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;22291195&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;15563461&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;17167070&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;22356915&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;22023548&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;21859303&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;15357210&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;1322896&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;1322896&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;5pt; cAMP &lt;a href='http://www.google.nl' target='_blank'&gt;11930001&lt;/a&gt;5pt; Disease &lt;a href='http://www.google.nl' target='_blank'&gt;9427384&lt;/a&gt;5pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;11334934&lt;/a&gt;5pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;9427384&lt;/a&gt;5pt; cAMP<br />
]]&gt;<br />
&lt;/Node&gt;<br />
&lt;Node id=&quot;Disease&quot; name=&quot;Disease&quot;&gt;<br />
&lt;![CDATA[<br />
&lt;a href='http://www.google.nl' target='_blank'&gt;21428846&lt;/a&gt;25pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;16303308&lt;/a&gt;25pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;10353643&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;15848765&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21572521&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;18005706&lt;/a&gt;30pt; Kinase &lt;a href='http://www.google.nl' target='_blank'&gt;7932587&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21349219&lt;/a&gt;30pt; inhibitor &lt;a href='http://www.google.nl' target='_blank'&gt;21349219&lt;/a&gt;30pt; Kinase<br />
]]&gt;<br />
&lt;/Node&gt;<br />
&lt;/Nodes&gt;<br />
&lt;Relations&gt;<br />
&lt;UndirectedRelation lineSize=&quot;6&quot; labelText=&quot;120&quot; letterSymbol=&quot;C&quot; fromID=&quot;cAMP&quot; toID=&quot;inhibitor&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;33&quot; labelText=&quot;665&quot; letterSymbol=&quot;C&quot; fromID=&quot;Kinase&quot; toID=&quot;inhibitor&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;16&quot; labelText=&quot;325&quot; letterSymbol=&quot;C&quot; fromID=&quot;PDE&quot; toID=&quot;inhibitor&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;13&quot; labelText=&quot;270&quot; letterSymbol=&quot;C&quot; fromID=&quot;PDE&quot; toID=&quot;cAMP&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;5&quot; labelText=&quot;105&quot; letterSymbol=&quot;C&quot; fromID=&quot;Kinase&quot; toID=&quot;cAMP&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;6&quot; labelText=&quot;125&quot; letterSymbol=&quot;C&quot; fromID=&quot;Disease&quot; toID=&quot;Kinase&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;43&quot; labelText=&quot;870&quot; letterSymbol=&quot;C&quot; fromID=&quot;Disease&quot; toID=&quot;inhibitor&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;0&quot; labelText=&quot;10&quot; letterSymbol=&quot;C&quot; fromID=&quot;Kinase&quot; toID=&quot;PDE&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;1&quot; labelText=&quot;20&quot; letterSymbol=&quot;C&quot; fromID=&quot;Disease&quot; toID=&quot;cAMP&quot;/&gt;<br />
&lt;UndirectedRelation lineSize=&quot;2&quot; labelText=&quot;55&quot; letterSymbol=&quot;C&quot; fromID=&quot;Disease&quot; toID=&quot;PDE&quot;/&gt;<br />
&lt;/Relations&gt;<br />
&lt;/RelationViewerData&gt;</code><hr />
</div>Flash CODE:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">// XMLtools.as<br />
// collected by me@der-mo.net<br />
<br />
trace(&quot;XMLtools loaded.&quot;);<br />
<br />
/*<br />
&nbsp; &nbsp; &nbsp; &nbsp; byName:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; returns the first XML Node with a given name<br />
<br />
*/<br />
XML.prototype.__proto__.byName = function(node_name){<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(this.nodeName != node_name){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return this.nextSibling.byName(node_name) || this.firstChild.byName(node_name);<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return this;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; <br />
}<br />
ASSetPropFlags(XML.prototype.__proto__,[&quot;byName&quot;],1);<br />
<br />
//*************************************************************************<br />
<br />
<br />
/*&nbsp; &nbsp; &nbsp; &nbsp;  XML.makeObj&nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; author: me@der-mo.net<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  converts an XML Object to a corresponding dot-syntax object.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NodeName and NodeValue are translated to _type and _text properties.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  child nodes are stored in a children array of the parent node.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  deep recursion.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  example:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  trace(new XML(&quot;&lt;folder name=&quot;folder1&quot;&gt;&lt;page attName=&quot;attVal&quot;&gt;text inside tag&lt;/page&gt;&lt;/folder&gt;&quot;).makeObj());<br />
&nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  output:--<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {<br />
&nbsp; &nbsp; &nbsp; &nbsp; _type: null<br />
&nbsp; &nbsp; &nbsp; &nbsp; children: <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name: folder1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _type: folder<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; children: <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _text: text inside tag<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; attName: attVal<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _type: page<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
*/<br />
<br />
XML.prototype.__proto__.makeObj = function(){<br />
&nbsp; &nbsp; &nbsp; &nbsp; // create a result object<br />
&nbsp; &nbsp; &nbsp; &nbsp; var obj ={};<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; // set _type property to nodeName<br />
&nbsp; &nbsp; &nbsp; &nbsp; obj._type=this.nodeName;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; // adopt all attributes and their values as properties<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(var i in this.attributes) obj[i]=this.attributes[i];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; // add all children objects to children property Array<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; if(this.firstChild.nodeType==3){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // textNode, so we won't have any other children<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //(flash does not support mixed-mode)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj._text=this.firstChild.nodeValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // loop through children and recursively store them as objects<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var tempChildren=[];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var i in this.childNodes){&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var childObj=this.childNodes[i].makeObj();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(childObj._type!=null) tempChildren.unshift(childObj);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tempChildren.length) obj.children=tempChildren;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; //for(var i in obj) trace(i + &quot; : &quot; + obj[i])<br />
&nbsp; &nbsp; &nbsp; &nbsp; return obj;<br />
};<br />
ASSetPropFlags(XML.prototype.__proto__,[&quot;makeObj&quot;],1);</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=29"><![CDATA[Newbies & General flash questions]]></category>
			<dc:creator>Coryza</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827208</guid>
		</item>
		<item>
			<title>Help with an image gallery.</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827207&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 21:40:32 GMT</pubDate>
			<description><![CDATA[Hello, i need to create an image gallery with external files, it needs to switch between images every 3 seconds,i did that already, but the problem i have is that every time i open the swf, it has to randomize the image. I have no clue on how to do that, this is what i got so far:
var cargador:Loader = new Loader();
var ruta:URLRequest = new URLRequest("imagenes/1.jpg");
cargador.load(ruta);

addChild(cargador);

function segunda(){
var cargador:Loader = new Loader();
var ruta:URLRequest = new URLRequest("imagenes/2.jpg");
cargador.load(ruta);
addChild(cargador);
}

function tercera(){
var cargador:Loader = new Loader();
var ruta:URLRequest = new URLRequest("imagenes/3.jpg");
cargador.load(ruta);
addChild(cargador);
}

function cuarta(){
var cargador:Loader = new Loader();
var ruta:URLRequest = new URLRequest("imagenes/4.jpg");
cargador.load(ruta);
addChild(cargador);

}i added the functions named above every 3 seconds on the timeline as it was stated to do.
Also forgive the spanish, but it has to be like that.]]></description>
			<content:encoded><![CDATA[<div>Hello, i need to create an image gallery with external files, it needs to switch between images every 3 seconds,i did that already, but the problem i have is that every time i open the swf, it has to randomize the image. I have no clue on how to do that, this is what i got so far:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Actionscript Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:640px; height:468px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> cargador:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #000000; font-weight: bold;">var</span> ruta:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"imagenes/1.jpg"</span><span style="color: #66cc66;">&#41;</span>;<br />cargador.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>ruta<span style="color: #66cc66;">&#41;</span>;<br /><br />addChild<span style="color: #66cc66;">&#40;</span>cargador<span style="color: #66cc66;">&#41;</span>;<br /><br /><span style="color: #000000; font-weight: bold;">function</span> segunda<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">var</span> cargador:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #000000; font-weight: bold;">var</span> ruta:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"imagenes/2.jpg"</span><span style="color: #66cc66;">&#41;</span>;<br />cargador.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>ruta<span style="color: #66cc66;">&#41;</span>;<br />addChild<span style="color: #66cc66;">&#40;</span>cargador<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><br /><span style="color: #000000; font-weight: bold;">function</span> tercera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">var</span> cargador:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #000000; font-weight: bold;">var</span> ruta:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"imagenes/3.jpg"</span><span style="color: #66cc66;">&#41;</span>;<br />cargador.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>ruta<span style="color: #66cc66;">&#41;</span>;<br />addChild<span style="color: #66cc66;">&#40;</span>cargador<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><br /><span style="color: #000000; font-weight: bold;">function</span> cuarta<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">var</span> cargador:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #000000; font-weight: bold;">var</span> ruta:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"imagenes/4.jpg"</span><span style="color: #66cc66;">&#41;</span>;<br />cargador.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>ruta<span style="color: #66cc66;">&#41;</span>;<br />addChild<span style="color: #66cc66;">&#40;</span>cargador<span style="color: #66cc66;">&#41;</span>;<br /><br /><span style="color: #66cc66;">&#125;</span></div></div></pre>
</div>i added the functions named above every 3 seconds on the timeline as it was stated to do.<br />
Also forgive the spanish, but it has to be like that.</div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=102">Actionscript 3.0 (incl. Flex/AIR)</category>
			<dc:creator>santyloco</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827207</guid>
		</item>
		<item>
			<title>AS 2 _root.attachMovie HELP!!</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827206&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 20:39:40 GMT</pubDate>
			<description><![CDATA[Hello! I have a problem, I can`t find anything on it anywhere! I have a code to spawn enemies using _root.attachMovie, but whenever it spawns it just disappears shortly after spawning. Here is the code.


onClipEvent (load) {
var a = 100;
}
onClipEvent (enterFrame) {
function goblinspawn() {
a++;
var newname = "goblin" + a;
_root.attachMovie ("goblin", gob, this.getNextHighestDepth())
if (this._xscale == +scale) {
_root[gob]._x = 1400;
_root[gob]._y = 250;
}else{
_root[gob]._x = 1400;
_root[gob]._y = 250;
}
_root[gob].onEnterFrame = function() {
if (_root.knight._x < this._x) {
this._x -= 8
}
if (_root.knight._x > this._x) {
this._x += 8
}
}
}
function goblinspawn1() {
var newname = "goblin" + a;
_root.attachMovie ("goblin", gob, this.getNextHighestDepth())
if (this._xscale == +scale) {
_root[gob]._x = 100;
_root[gob]._y = 250;
}else{
_root[gob]._x = 100;
_root[gob]._y = 250;
}
}
//nonfunction
//nonfunction
if (a == 100) {
goblinspawn();
a++;
}
if (a == 101) {
goblinspawn1();
a++;
}
if (a == 102) {
goblinspawn();
a++;
}
}]]></description>
			<content:encoded><![CDATA[<div>Hello! I have a problem, I can`t find anything on it anywhere! I have a code to spawn enemies using _root.attachMovie, but whenever it spawns it just disappears shortly after spawning. Here is the code.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Actionscript Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:640px; height:516px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="actionscript"><span style="color: #0066CC;">onClipEvent</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">var</span> a = <span style="color: #cc66cc;">100</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #0066CC;">onClipEvent</span> <span style="color: #66cc66;">&#40;</span>enterFrame<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">function</span> goblinspawn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />a++;<br /><span style="color: #000000; font-weight: bold;">var</span> newname = <span style="color: #ff0000;">"goblin"</span> + a;<br /><span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">attachMovie</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"goblin"</span>, gob, <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">getNextHighestDepth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_xscale</span> == +scale<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;">1400</span>;<br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;">250</span>;<br /><span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;">1400</span>;<br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;">250</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">onEnterFrame</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">knight</span>.<span style="color: #0066CC;">_x</span> &lt; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_x</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_x</span> -= <span style="color: #cc66cc;">8</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>.<span style="color: #006600;">knight</span>.<span style="color: #0066CC;">_x</span> &gt; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_x</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_x</span> += <span style="color: #cc66cc;">8</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #000000; font-weight: bold;">function</span> goblinspawn1<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #000000; font-weight: bold;">var</span> newname = <span style="color: #ff0000;">"goblin"</span> + a;<br /><span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">attachMovie</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"goblin"</span>, gob, <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">getNextHighestDepth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_xscale</span> == +scale<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;">100</span>;<br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;">250</span>;<br /><span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;">100</span>;<br /><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span>gob<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;">250</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//nonfunction</span><br /><span style="color: #808080; font-style: italic;">//nonfunction</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a == <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />goblinspawn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />a++;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a == <span style="color: #cc66cc;">101</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />goblinspawn1<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />a++;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>a == <span style="color: #cc66cc;">102</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />goblinspawn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />a++;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span></div></div></pre>
</div></div>

]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=30">ActionScript 2.0</category>
			<dc:creator>Liozamu</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827206</guid>
		</item>
		<item>
			<title>Fade in timer issue</title>
			<link>http://board.flashkit.com/board/showthread.php?t=827205&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 18:54:36 GMT</pubDate>
			<description><![CDATA[I am using Flash CS5.

I am combining script from three different Flash files into a master template and have managed to make everything work except for one detail. 

I have four buttons that have separate fade in time variables and one button doesn't fade in properly. The "CytBtn" button will only take on the fade in variable setting of the "TipBtn"  regardless of what its setting is. 

The instance names for the buttons are correct and I can turn them on and off just fine.

Here's the code.

A png of the swf is attached

Thanks - Ron


[ code ] var resArray:Array = new Array();


/******************  Properties to adjust for TIPS BUTTON begins here  *****************/

// text that should appear in the tip popup. Will accept html codes.

var tipText = "This is where the tip text goes.";
var cytText = "This is where Check your Thinking text goes.";



//This is how many seconds the icon will be invisible until it fades in and is clickable.

var needTechVideoBtn = true;
var secondsDelay_techVideo = 0;

var needTechTextBtn = true;
var secondsDelay_techText = 0;

var needTipBtn = true;
var secondsDelay = 1;
//select a teacher image to use
// teacherOne = African American Woman
// teacherTwo = Caucasian Male
// teacherThree = Asian Woman
tipTextObject.teacherImage.gotoAndPlay("teacherOne");

var needCytBtn = true;
var secondsDelay_cytBtn = 0;
//select a teacher image to use
// teacherOne = African American Woman
// teacherTwo = Caucasian Male
// teacherThree = Asian Woman
cytTextObject.teacherImage.gotoAndPlay("teacherTwo");



/******************  Properties to adjust for TIPS BUTTON ends here  *****************/


/******************  Properties to adjust for RESOURCES/COMPONENT REFERENCES begin here  *****************/

//Enter your resources here, maximum of 16 resources (counting 0, so your array should not have more than resArray[15]).
//Type is the type of resource (pdf, excel, word, audio, video, weblink)
//Name is how you want it to appear in the list
//Filesize is the bytesize of the document
//Link is the actual link to the document

var needResources = false;

resArray[0] = {Type:"pdf", Name:"test pdf", FileSize:"332KB", Link:"../../../resources/filename"};
resArray[1] = {Type:"excel", Name:"test excel", FileSize:"1.1MB", Link:"../../../resources/filename"};
resArray[2] = {Type:"word", Name:"test word", FileSize:"1.18MB", Link:"words.word"};
resArray[3] = {Type:"audio", Name:"test audio", FileSize:"1.18MB", Link:"words.word"};
resArray[4] = {Type:"video", Name:"test video", FileSize:"1.18MB", Link:"words.word"};
resArray[5] = {Type:"weblink", Name:"test web", FileSize:"1.18MB", Link:"words.word"};


/******************  Properties to adjust for RESOURCES/COMPONENT REFERENCES end here  *****************/






/******************  Code that makes the TIPS BUTTON work begins here  ******************/


//basics here
var ArtAPI = _level0.ArtAPI;

var wasPlaying = true;

this.onEnterFrame = function () {
	_level33._xscale = _level22.mcSlideGroup._xscale;
    _level33._yscale =  _level22.mcSlideGroup._yscale;    
    _level33._x = _level22.mcSlideGroup._x;
	_level33._y = _level22.mcSlideGroup._y;
}

this.onUnload = function () {
	delete this.onEnterFrame;
}

//tips particular code here
/*
if (buttonPosition == "left") {
	tipBtn._x = 24;
	tipTextObject._x = 84;
} else {
	tipBtn._x = 604;
	tipTextObject._x = 35;
}*/

tipTitleFormat = new TextFormat();
tipTitleFormat.size = 14;
tipTitleFormat.font = "Gill Sans"
tipTitleFormat.color = 0xFFFFFF;

tipFormat = new TextFormat();
tipFormat.size = 14;
tipFormat.font = "Gill Sans"
tipFormat.color = 0x000000;

stop();


function removeTipBtn (){
	if (needTipBtn == false) {
		delete btnFadeIn_tip;
		delete myInterval_tip;
		delete tipBtn;
	}
}

removeTipBtn();

tipTextObject._visible = false;
tipBtn._visible = false;

tipTextObject.textTarget.setTextFormat(tipFormat);
tipTextObject.textTarget.embedFonts = true;

tipTextObject.textTarget.htmlText = tipText;

function btnFadeIn_tip (){
	tipBtn._visible = true;
	clearInterval(myInterval_tip);
	//tipBtn.play();
}

var myInterval_tip = setInterval(btnFadeIn_tip,(secondsDelay * 1000));

tipBtn.onPress = function() {
	if (ArtAPI.IsPlaying() == false && tipTextObject._visible == false) {
		wasPlaying = false;
	}
	
	if (wasPlaying == true) {
		if (tipTextObject._visible == false) {
			ArtAPI.Pause();
			tipTextObject._visible = true;
		} else {
			ArtAPI.Play();
			tipTextObject._visible = false;
		}
	} else {
		if (tipTextObject._visible == false) {
			tipTextObject._visible = true;
		} else {
			tipTextObject._visible = false;
		}
	}
}

tipTextObject.tipsCloseBut.onRelease = function() {
	if (wasPlaying == true) {
		tipTextObject._visible = false;
		ArtAPI.Play();
	} else {
		tipTextObject._visible = false;
	}
}


/******************  Code that makes the CYT BUTTON work begins here  ******************/


cytTitleFormat = new TextFormat();
cytTitleFormat.size = 14;
cytTitleFormat.font = "Gill Sans"
cytTitleFormat.color = 0xFFFFFF;

cytFormat = new TextFormat();
cytFormat.size = 14;
cytFormat.font = "Gill Sans"
cytFormat.color = 0x000000;

stop();

function removeCytBtn (){
	if (needCytBtn == false) {
		delete btnFadeIn_cyt;
		delete myInterval_cyt;
		delete cytBtn;
	}
}
removeCytBtn();

cytTextObject._visible = false;
cytBtn._visible = false;

cytTextObject.textTarget.setTextFormat(cytFormat);
cytTextObject.textTarget.embedFonts = true;

cytTextObject.textTarget.htmlText = cytText;

function btnFadeIn_cyt (){
	cytBtn._visible = true;
	clearInterval(myInterval_cyt);
	//CytBtn.play();
}

var myInterval_cyt = setInterval(btnFadeIn_cyt,(secondsDelay * 1000));

cytBtn.onPress = function() {
	if (ArtAPI.IsPlaying() == false && cytTextObject._visible == false) {
		wasPlaying = false;
	}
	
	if (wasPlaying == true) {
		if (cytTextObject._visible == false) {
			ArtAPI.Pause();
			cytTextObject._visible = true;
		} else {
			ArtAPI.Play();
			cytTextObject._visible = false;
		}
	} else {
		if (cytTextObject._visible == false) {
			cytTextObject._visible = true;
		} else {
			cytTextObject._visible = false;
		}
	}
}


cytTextObject.cytCloseBut.onRelease = function() {
	if (wasPlaying == true) {
		cytTextObject._visible = false;
		ArtAPI.Play();
	} else {
		cytTextObject._visible = false;
	}
}
/*End CYT Button------------------------------*/


function removeTechVideoBtn (){
	if (needTechVideoBtn == false) {
		delete btnFadeIn_techVideo;
		delete myInterval_techVideo;
		delete techVideoBtn;
	}
}

removeTechVideoBtn();


techVideoBtn._visible = false;

function btnFadeIn_techVideo (){
	techVideoBtn._visible = true;
	clearInterval(myInterval_techVideo);
	//tipBtn.play();
}

var myInterval_techVideo = setInterval(btnFadeIn_techVideo,(secondsDelay_techVideo * 1000));


techVideoBtn.onRelease = function() {
	ArtAPI.Pause();
	getURL ("java_script:NewWindow=window.open('../../../videos/digitalLesson.html','newWin','width=640,height=365,left=0,top=0, toolbar=No,location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);");
}



function removeTechTextBtn (){
	if (needTechTextBtn == false) {
		delete btnFadeIn_techText;
		delete myInterval_techText;
		delete techTextBtn;
	}
}

removeTechTextBtn();


techTextBtn._visible = false;

function btnFadeIn_techText (){
	techTextBtn._visible = true;
	clearInterval(myInterval_techText);
	//tipBtn.play();
}

var myInterval_techText = setInterval(btnFadeIn_techText,(secondsDelay_techText * 1000));


techTextBtn.onRelease = function() {
	ArtAPI.Pause();
		getURL ("java_script:NewWindow=window.open('./demoCap_resize/demoCapture.htm','newWin','width=824,height=542,left=0,top=0, toolbar=No,location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);");
}



// ****************  Code that makes the TIPS BUTTON work ends here  ***************** //


// ****************  Code that makes the RESOURCES/COMPONENT REFERENCES work begins here  **************** //

function removeResources (){
	if (needResources == false) {
		resReminder.gotoAndStop("_init");
		_global.hasResource = false;
	}
}

removeResources();

regTextFormat = new TextFormat();
regTextFormat.size = 14;
regTextFormat.underline = false;
regTextFormat.font = "Gill Sans"
regTextFormat.color = 0x6F6F6F;

overTextFormat = new TextFormat();
overTextFormat.size = 14;
overTextFormat.underline = true;
overTextFormat.font = "Gill Sans"
overTextFormat.color = 0x2B85C5;

var ArtAPI = _level0.ArtAPI;

for (i=0; i<6; i++) {
	resourceMenuSmall.contentHolder["resource" + i]._visible = false;
}

for (i=0; i<16; i++) {
	resourceMenuBig.contentHolder["resource" + i]._visible = false;
}

resourceMenuBig.contentHolder.closeBut.onRelease = function() {
	resourceMenuBig.gotoAndPlay("_close");
	ArtAPI.Play();
}
resourceMenuSmall.contentHolder.closeBut.onRelease = function() {
	resourceMenuSmall.gotoAndPlay("_close");
	ArtAPI.Play();
}

resReminder.onRelease = function() {
	if (resReminder._currentframe > 1 && resReminder._currentframe < 111) {
		resReminder.gotoAndPlay("_close");
	}
	_global.resourcePressed = true;
}

if (resArray.length > 6) {
	buildResPanel(resourceMenuBig);
} else {
	buildResPanel(resourceMenuSmall);
}

function openReminder() {
	resReminder.gotoAndPlay("_open");
}

function closeReminder() {
	resReminder.gotoAndPlay("_close");
}

function buildResPanel(panelSize) {
	resourceMenuSmall.gotoAndStop("_init");
	resourceMenuBig.gotoAndStop("_init");
	
	for (i=0; i<resArray.length; i++) {
		panelSize.contentHolder["resource" + i]._visible = true;
		panelSize.contentHolder["resource" + i].resText.htmlText = resArray[i].Name + " (" + resArray[i].FileSize + ")";
		panelSize.contentHolder["resource" + i].resText.setTextFormat(regTextFormat);
		panelSize.contentHolder["resource" + i].resText.embedFonts = true;
		panelSize.contentHolder["resource" + i].resText.multiline = true;
		panelSize.contentHolder["resource" + i].resText.wordWrap = true;
		panelSize.contentHolder["resource" + i].resText.autoSize = "left";
		panelSize.contentHolder["resource" + i].onRelease = function() {
			getURL(resArray[int(substring(String(this._name), 9 , 1000))].Link,"_blank");
		}
		panelSize.contentHolder["resource" + i].onRollOver = function() {
			this.resText.setTextFormat(overTextFormat);
			this.resText.embedFonts = true;
		}
		panelSize.contentHolder["resource" + i].onRollOut = function() {
			this.resText.setTextFormat(regTextFormat);
			this.resText.embedFonts = true;
		}
		switch (resArray[i].Type) { 
  			case "pdf" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_pdf");
    		break; 
			case "excel" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_excel");
    		break;
			case "word" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_word");
    		break;
			case "audio" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_audio");
    		break;
			case "video" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_video");
    		break;
			case "weblink" : 
    		panelSize.contentHolder["resource" + i].docIcons.gotoAndPlay("_weblink");
    		break;
		}
	}
}



this.onEnterFrame = function () {
	_level33._xscale = _level22.mcSlideGroup._xscale;
    _level33._yscale =  _level22.mcSlideGroup._yscale;    
    _level33._x = _level22.mcSlideGroup._x;
	_level33._y = _level22.mcSlideGroup._y;	
	if (needResources == true) {
		_global.hasResource = true;	
		}
	if (_global.resourcePressed == true) {
		_global.resourcePressed = false;
		ArtAPI.Pause();
		if (resArray.length > 6) {
			resourceMenuBig.gotoAndPlay("_open");
		} else {
			resourceMenuSmall.gotoAndPlay("_open");
		}
		if (resReminder._currentframe > 1 && resReminder._currentframe < 111) {
			resReminder.gotoAndPlay("_close");
		}
	}
}

this.onUnload = function () {
	delete this.onEnterFrame;
}

_global.resourceOnSlide = ArtAPI.GetCurrentSlide();

stop();

// ****************  Code that makes the RESOURCES/COMPONENT REFERENCES work begins here  *************** //[ /code ]]]></description>
			<content:encoded><![CDATA[<div>I am using Flash CS5.<br />
<br />
I am combining script from three different Flash files into a master template and have managed to make everything work except for one detail. <br />
<br />
I have four buttons that have separate fade in time variables and one button doesn't fade in properly. The &quot;CytBtn&quot; button will only take on the fade in variable setting of the &quot;TipBtn&quot;  regardless of what its setting is. <br />
<br />
The instance names for the buttons are correct and I can turn them on and off just fine.<br />
<br />
Here's the code.<br />
<br />
A png of the swf is attached<br />
<br />
Thanks - Ron<br />
<br />
<br />
[ code ] var resArray:Array = new Array();<br />
<br />
<br />
/******************  Properties to adjust for TIPS BUTTON begins here  *****************/<br />
<br />
// text that should appear in the tip popup. Will accept html codes.<br />
<br />
var tipText = &quot;This is where the tip text goes.&quot;;<br />
var cytText = &quot;This is where Check your Thinking text goes.&quot;;<br />
<br />
<br />
<br />
//This is how many seconds the icon will be invisible until it fades in and is clickable.<br />
<br />
var needTechVideoBtn = true;<br />
var secondsDelay_techVideo = 0;<br />
<br />
var needTechTextBtn = true;<br />
var secondsDelay_techText = 0;<br />
<br />
var needTipBtn = true;<br />
var secondsDelay = 1;<br />
//select a teacher image to use<br />
// teacherOne = African American Woman<br />
// teacherTwo = Caucasian Male<br />
// teacherThree = Asian Woman<br />
tipTextObject.teacherImage.gotoAndPlay(&quot;teacherOne  &quot;);<br />
<br />
var needCytBtn = true;<br />
var secondsDelay_cytBtn = 0;<br />
//select a teacher image to use<br />
// teacherOne = African American Woman<br />
// teacherTwo = Caucasian Male<br />
// teacherThree = Asian Woman<br />
cytTextObject.teacherImage.gotoAndPlay(&quot;teacherTwo  &quot;);<br />
<br />
<br />
<br />
/******************  Properties to adjust for TIPS BUTTON ends here  *****************/<br />
<br />
<br />
/******************  Properties to adjust for RESOURCES/COMPONENT REFERENCES begin here  *****************/<br />
<br />
//Enter your resources here, maximum of 16 resources (counting 0, so your array should not have more than resArray[15]).<br />
//Type is the type of resource (pdf, excel, word, audio, video, weblink)<br />
//Name is how you want it to appear in the list<br />
//Filesize is the bytesize of the document<br />
//Link is the actual link to the document<br />
<br />
var needResources = false;<br />
<br />
resArray[0] = {Type:&quot;pdf&quot;, Name:&quot;test pdf&quot;, FileSize:&quot;332KB&quot;, Link:&quot;../../../resources/filename&quot;};<br />
resArray[1] = {Type:&quot;excel&quot;, Name:&quot;test excel&quot;, FileSize:&quot;1.1MB&quot;, Link:&quot;../../../resources/filename&quot;};<br />
resArray[2] = {Type:&quot;word&quot;, Name:&quot;test word&quot;, FileSize:&quot;1.18MB&quot;, Link:&quot;words.word&quot;};<br />
resArray[3] = {Type:&quot;audio&quot;, Name:&quot;test audio&quot;, FileSize:&quot;1.18MB&quot;, Link:&quot;words.word&quot;};<br />
resArray[4] = {Type:&quot;video&quot;, Name:&quot;test video&quot;, FileSize:&quot;1.18MB&quot;, Link:&quot;words.word&quot;};<br />
resArray[5] = {Type:&quot;weblink&quot;, Name:&quot;test web&quot;, FileSize:&quot;1.18MB&quot;, Link:&quot;words.word&quot;};<br />
<br />
<br />
/******************  Properties to adjust for RESOURCES/COMPONENT REFERENCES end here  *****************/<br />
<br />
<br />
<br />
<br />
<br />
<br />
/******************  Code that makes the TIPS BUTTON work begins here  ******************/<br />
<br />
<br />
//basics here<br />
var ArtAPI = _level0.ArtAPI;<br />
<br />
var wasPlaying = true;<br />
<br />
this.onEnterFrame = function () {<br />
	_level33._xscale = _level22.mcSlideGroup._xscale;<br />
    _level33._yscale =  _level22.mcSlideGroup._yscale;    <br />
    _level33._x = _level22.mcSlideGroup._x;<br />
	_level33._y = _level22.mcSlideGroup._y;<br />
}<br />
<br />
this.onUnload = function () {<br />
	delete this.onEnterFrame;<br />
}<br />
<br />
//tips particular code here<br />
/*<br />
if (buttonPosition == &quot;left&quot;) {<br />
	tipBtn._x = 24;<br />
	tipTextObject._x = 84;<br />
} else {<br />
	tipBtn._x = 604;<br />
	tipTextObject._x = 35;<br />
}*/<br />
<br />
tipTitleFormat = new TextFormat();<br />
tipTitleFormat.size = 14;<br />
tipTitleFormat.font = &quot;Gill Sans&quot;<br />
tipTitleFormat.color = 0xFFFFFF;<br />
<br />
tipFormat = new TextFormat();<br />
tipFormat.size = 14;<br />
tipFormat.font = &quot;Gill Sans&quot;<br />
tipFormat.color = 0x000000;<br />
<br />
stop();<br />
<br />
<br />
function removeTipBtn (){<br />
	if (needTipBtn == false) {<br />
		delete btnFadeIn_tip;<br />
		delete myInterval_tip;<br />
		delete tipBtn;<br />
	}<br />
}<br />
<br />
removeTipBtn();<br />
<br />
tipTextObject._visible = false;<br />
tipBtn._visible = false;<br />
<br />
tipTextObject.textTarget.setTextFormat(tipFormat);<br />
tipTextObject.textTarget.embedFonts = true;<br />
<br />
tipTextObject.textTarget.htmlText = tipText;<br />
<br />
function btnFadeIn_tip (){<br />
	tipBtn._visible = true;<br />
	clearInterval(myInterval_tip);<br />
	//tipBtn.play();<br />
}<br />
<br />
var myInterval_tip = setInterval(btnFadeIn_tip,(secondsDelay * 1000));<br />
<br />
tipBtn.onPress = function() {<br />
	if (ArtAPI.IsPlaying() == false &amp;&amp; tipTextObject._visible == false) {<br />
		wasPlaying = false;<br />
	}<br />
	<br />
	if (wasPlaying == true) {<br />
		if (tipTextObject._visible == false) {<br />
			ArtAPI.Pause();<br />
			tipTextObject._visible = true;<br />
		} else {<br />
			ArtAPI.Play();<br />
			tipTextObject._visible = false;<br />
		}<br />
	} else {<br />
		if (tipTextObject._visible == false) {<br />
			tipTextObject._visible = true;<br />
		} else {<br />
			tipTextObject._visible = false;<br />
		}<br />
	}<br />
}<br />
<br />
tipTextObject.tipsCloseBut.onRelease = function() {<br />
	if (wasPlaying == true) {<br />
		tipTextObject._visible = false;<br />
		ArtAPI.Play();<br />
	} else {<br />
		tipTextObject._visible = false;<br />
	}<br />
}<br />
<br />
<br />
/******************  Code that makes the CYT BUTTON work begins here  ******************/<br />
<br />
<br />
cytTitleFormat = new TextFormat();<br />
cytTitleFormat.size = 14;<br />
cytTitleFormat.font = &quot;Gill Sans&quot;<br />
cytTitleFormat.color = 0xFFFFFF;<br />
<br />
cytFormat = new TextFormat();<br />
cytFormat.size = 14;<br />
cytFormat.font = &quot;Gill Sans&quot;<br />
cytFormat.color = 0x000000;<br />
<br />
stop();<br />
<br />
function removeCytBtn (){<br />
	if (needCytBtn == false) {<br />
		delete btnFadeIn_cyt;<br />
		delete myInterval_cyt;<br />
		delete cytBtn;<br />
	}<br />
}<br />
removeCytBtn();<br />
<br />
cytTextObject._visible = false;<br />
cytBtn._visible = false;<br />
<br />
cytTextObject.textTarget.setTextFormat(cytFormat);<br />
cytTextObject.textTarget.embedFonts = true;<br />
<br />
cytTextObject.textTarget.htmlText = cytText;<br />
<br />
function btnFadeIn_cyt (){<br />
	cytBtn._visible = true;<br />
	clearInterval(myInterval_cyt);<br />
	//CytBtn.play();<br />
}<br />
<br />
var myInterval_cyt = setInterval(btnFadeIn_cyt,(secondsDelay * 1000));<br />
<br />
cytBtn.onPress = function() {<br />
	if (ArtAPI.IsPlaying() == false &amp;&amp; cytTextObject._visible == false) {<br />
		wasPlaying = false;<br />
	}<br />
	<br />
	if (wasPlaying == true) {<br />
		if (cytTextObject._visible == false) {<br />
			ArtAPI.Pause();<br />
			cytTextObject._visible = true;<br />
		} else {<br />
			ArtAPI.Play();<br />
			cytTextObject._visible = false;<br />
		}<br />
	} else {<br />
		if (cytTextObject._visible == false) {<br />
			cytTextObject._visible = true;<br />
		} else {<br />
			cytTextObject._visible = false;<br />
		}<br />
	}<br />
}<br />
<br />
<br />
cytTextObject.cytCloseBut.onRelease = function() {<br />
	if (wasPlaying == true) {<br />
		cytTextObject._visible = false;<br />
		ArtAPI.Play();<br />
	} else {<br />
		cytTextObject._visible = false;<br />
	}<br />
}<br />
/*End CYT Button------------------------------*/<br />
<br />
<br />
function removeTechVideoBtn (){<br />
	if (needTechVideoBtn == false) {<br />
		delete btnFadeIn_techVideo;<br />
		delete myInterval_techVideo;<br />
		delete techVideoBtn;<br />
	}<br />
}<br />
<br />
removeTechVideoBtn();<br />
<br />
<br />
techVideoBtn._visible = false;<br />
<br />
function btnFadeIn_techVideo (){<br />
	techVideoBtn._visible = true;<br />
	clearInterval(myInterval_techVideo);<br />
	//tipBtn.play();<br />
}<br />
<br />
var myInterval_techVideo = setInterval(btnFadeIn_techVideo,(secondsDelay_tech  Video * 1000));<br />
<br />
<br />
techVideoBtn.onRelease = function() {<br />
	ArtAPI.Pause();<br />
	getURL (&quot;javascript<b></b>:NewWindow=window.open('../../../videos/digitalLesson.html','newWin','width=640,height=365  ,left=0,top=0, toolbar=No,location=No,scrollbars=Yes,status=No,re  sizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);&quot;);<br />
}<br />
<br />
<br />
<br />
function removeTechTextBtn (){<br />
	if (needTechTextBtn == false) {<br />
		delete btnFadeIn_techText;<br />
		delete myInterval_techText;<br />
		delete techTextBtn;<br />
	}<br />
}<br />
<br />
removeTechTextBtn();<br />
<br />
<br />
techTextBtn._visible = false;<br />
<br />
function btnFadeIn_techText (){<br />
	techTextBtn._visible = true;<br />
	clearInterval(myInterval_techText);<br />
	//tipBtn.play();<br />
}<br />
<br />
var myInterval_techText = setInterval(btnFadeIn_techText,(secondsDelay_techT  ext * 1000));<br />
<br />
<br />
techTextBtn.onRelease = function() {<br />
	ArtAPI.Pause();<br />
		getURL (&quot;javascript<b></b>:NewWindow=window.open('./demoCap_resize/demoCapture.htm','newWin','width=824,height=542,le  ft=0,top=0, toolbar=No,location=No,scrollbars=Yes,status=No,re  sizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);&quot;);<br />
}<br />
<br />
<br />
<br />
// ****************  Code that makes the TIPS BUTTON work ends here  ***************** //<br />
<br />
<br />
// ****************  Code that makes the RESOURCES/COMPONENT REFERENCES work begins here  **************** //<br />
<br />
function removeResources (){<br />
	if (needResources == false) {<br />
		resReminder.gotoAndStop(&quot;_init&quot;);<br />
		_global.hasResource = false;<br />
	}<br />
}<br />
<br />
removeResources();<br />
<br />
regTextFormat = new TextFormat();<br />
regTextFormat.size = 14;<br />
regTextFormat.underline = false;<br />
regTextFormat.font = &quot;Gill Sans&quot;<br />
regTextFormat.color = 0x6F6F6F;<br />
<br />
overTextFormat = new TextFormat();<br />
overTextFormat.size = 14;<br />
overTextFormat.underline = true;<br />
overTextFormat.font = &quot;Gill Sans&quot;<br />
overTextFormat.color = 0x2B85C5;<br />
<br />
var ArtAPI = _level0.ArtAPI;<br />
<br />
for (i=0; i&lt;6; i++) {<br />
	resourceMenuSmall.contentHolder[&quot;resource&quot; + i]._visible = false;<br />
}<br />
<br />
for (i=0; i&lt;16; i++) {<br />
	resourceMenuBig.contentHolder[&quot;resource&quot; + i]._visible = false;<br />
}<br />
<br />
resourceMenuBig.contentHolder.closeBut.onRelease = function() {<br />
	resourceMenuBig.gotoAndPlay(&quot;_close&quot;);<br />
	ArtAPI.Play();<br />
}<br />
resourceMenuSmall.contentHolder.closeBut.onRelease = function() {<br />
	resourceMenuSmall.gotoAndPlay(&quot;_close&quot;);<br />
	ArtAPI.Play();<br />
}<br />
<br />
resReminder.onRelease = function() {<br />
	if (resReminder._currentframe &gt; 1 &amp;&amp; resReminder._currentframe &lt; 111) {<br />
		resReminder.gotoAndPlay(&quot;_close&quot;);<br />
	}<br />
	_global.resourcePressed = true;<br />
}<br />
<br />
if (resArray.length &gt; 6) {<br />
	buildResPanel(resourceMenuBig);<br />
} else {<br />
	buildResPanel(resourceMenuSmall);<br />
}<br />
<br />
function openReminder() {<br />
	resReminder.gotoAndPlay(&quot;_open&quot;);<br />
}<br />
<br />
function closeReminder() {<br />
	resReminder.gotoAndPlay(&quot;_close&quot;);<br />
}<br />
<br />
function buildResPanel(panelSize) {<br />
	resourceMenuSmall.gotoAndStop(&quot;_init&quot;);<br />
	resourceMenuBig.gotoAndStop(&quot;_init&quot;);<br />
	<br />
	for (i=0; i&lt;resArray.length; i++) {<br />
		panelSize.contentHolder[&quot;resource&quot; + i]._visible = true;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.htmlText = resArray[i].Name + &quot; (&quot; + resArray[i].FileSize + &quot;)&quot;;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.setTextFormat(regTextFormat);<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.embedFonts = true;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.multiline = true;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.wordWrap = true;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].resText.autoSize = &quot;left&quot;;<br />
		panelSize.contentHolder[&quot;resource&quot; + i].onRelease = function() {<br />
			getURL(resArray[int(substring(String(this._name), 9 , 1000))].Link,&quot;_blank&quot;);<br />
		}<br />
		panelSize.contentHolder[&quot;resource&quot; + i].onRollOver = function() {<br />
			this.resText.setTextFormat(overTextFormat);<br />
			this.resText.embedFonts = true;<br />
		}<br />
		panelSize.contentHolder[&quot;resource&quot; + i].onRollOut = function() {<br />
			this.resText.setTextFormat(regTextFormat);<br />
			this.resText.embedFonts = true;<br />
		}<br />
		switch (resArray[i].Type) { <br />
  			case &quot;pdf&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_pdf&quot;);<br />
    		break; <br />
			case &quot;excel&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_excel&quot;);<br />
    		break;<br />
			case &quot;word&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_word&quot;);<br />
    		break;<br />
			case &quot;audio&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_audio&quot;);<br />
    		break;<br />
			case &quot;video&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_video&quot;);<br />
    		break;<br />
			case &quot;weblink&quot; : <br />
    		panelSize.contentHolder[&quot;resource&quot; + i].docIcons.gotoAndPlay(&quot;_weblink&quot;);<br />
    		break;<br />
		}<br />
	}<br />
}<br />
<br />
<br />
<br />
this.onEnterFrame = function () {<br />
	_level33._xscale = _level22.mcSlideGroup._xscale;<br />
    _level33._yscale =  _level22.mcSlideGroup._yscale;    <br />
    _level33._x = _level22.mcSlideGroup._x;<br />
	_level33._y = _level22.mcSlideGroup._y;	<br />
	if (needResources == true) {<br />
		_global.hasResource = true;	<br />
		}<br />
	if (_global.resourcePressed == true) {<br />
		_global.resourcePressed = false;<br />
		ArtAPI.Pause();<br />
		if (resArray.length &gt; 6) {<br />
			resourceMenuBig.gotoAndPlay(&quot;_open&quot;);<br />
		} else {<br />
			resourceMenuSmall.gotoAndPlay(&quot;_open&quot;);<br />
		}<br />
		if (resReminder._currentframe &gt; 1 &amp;&amp; resReminder._currentframe &lt; 111) {<br />
			resReminder.gotoAndPlay(&quot;_close&quot;);<br />
		}<br />
	}<br />
}<br />
<br />
this.onUnload = function () {<br />
	delete this.onEnterFrame;<br />
}<br />
<br />
_global.resourceOnSlide = ArtAPI.GetCurrentSlide();<br />
<br />
stop();<br />
<br />
// ****************  Code that makes the RESOURCES/COMPONENT REFERENCES work begins here  *************** //[ /code ]</div>


	<br />
	<div style="padding:6px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<table cellpadding="0" cellspacing="3" border="0">
			<tr>
	<td><img class="inlineimg" src="http://board.flashkit.com/board/images/attach/png.gif" alt="File Type: png" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://board.flashkit.com/board/attachment.php?attachmentid=73625&amp;d=1337108010" target="_blank">Screen shot 2012-05-15 at 1.51.40 PM.png</a> (70.9 KB)</td>
</tr>
			</table>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="http://board.flashkit.com/board/forumdisplay.php?f=29"><![CDATA[Newbies & General flash questions]]></category>
			<dc:creator>rwstudio</dc:creator>
			<guid isPermaLink="true">http://board.flashkit.com/board/showthread.php?t=827205</guid>
		</item>
	</channel>
</rss>

