<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Flash ActionScript 3.0 XML Text Array Loader</title>
	<atom:link href="http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html</link>
	<description>Designer, CSS/XHTML Expert, ActionScript 3, Magento Developer</description>
	<lastBuildDate>Tue, 07 Feb 2012 03:39:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Guy</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-32026</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Tue, 18 Jan 2011 18:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-32026</guid>
		<description>I know this shouldn&#039;t be difficult, but I&#039;m trying to figure out how to do this and take it one step further.  Unless I&#039;m missing something, this doesn&#039;t load the images.  I&#039;m trying to develop something similar, that will call an swf file and load it on the stage from an xml file, then when next is clicked load the next swf file from the xml list.  Is there any help you can share with me on how to do this?
Thanks so much for any help. </description>
		<content:encoded><![CDATA[<p>I know this shouldn&#039;t be difficult, but I&#039;m trying to figure out how to do this and take it one step further.  Unless I&#039;m missing something, this doesn&#039;t load the images.  I&#039;m trying to develop something similar, that will call an swf file and load it on the stage from an xml file, then when next is clicked load the next swf file from the xml list.  Is there any help you can share with me on how to do this? </p>
<p>Thanks so much for any help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bnther</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-23076</link>
		<dc:creator>bnther</dc:creator>
		<pubDate>Thu, 29 Oct 2009 22:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-23076</guid>
		<description>Great tutorial.  Very clean, easier to understand :)
I did have one hitch though.  Typically, I don&#039;t lay my XML files out like that.  What I work with, everything is in its own holder verse one long line.
 &lt;imgTitle&gt; blah blah&lt;/imgTitle&gt;
 &lt;imgURL&gt;&quot;images/15.jpg&quot;&lt;/imgURL&gt;
 I figured out the AS3 for the text imageText.text =  xml.image[slideNum].imgTitle;
but I don&#039;t know how to write the call for the actual images.
movieclip. &#039;?&#039; =  xml.image[slideNum].imgURL; </description>
		<content:encoded><![CDATA[<p>Great tutorial.  Very clean, easier to understand :)<br />
I did have one hitch though.  Typically, I don&#039;t lay my XML files out like that.  What I work with, everything is in its own holder verse one long line.<br />
 &lt;imgTitle&gt; blah blah&lt;/imgTitle&gt;<br />
 &lt;imgURL&gt;&quot;images/15.jpg&quot;&lt;/imgURL&gt; </p>
<p> I figured out the AS3 for the text imageText.text =  xml.image[slideNum].imgTitle;<br />
but I don&#039;t know how to write the call for the actual images.<br />
movieclip. &#039;?&#039; =  xml.image[slideNum].imgURL;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: callen</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-16696</link>
		<dc:creator>callen</dc:creator>
		<pubDate>Tue, 21 Apr 2009 17:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-16696</guid>
		<description>thanks for the tutorial, keep up the good work</description>
		<content:encoded><![CDATA[<p>thanks for the tutorial, keep up the good work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-16445</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Tue, 14 Apr 2009 18:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-16445</guid>
		<description>Hello,
I went through and added what Chris had done plus I set it up so you did not have to hard code the number of entities like in the example.  I also added the code to view the images. In my case I was loading them into a UILoader component. I fixed a couple errors i was getting and it seems to run solid now.
The next thing that would be nice is a play and pause.
//variables
var xmlList:XMLList;
var mcLoader:Loader;
//loads xml and assigns the text field the first
//node using the slideNum variable from above
var xml:XML = new XML();
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest(&quot;images.xml&quot;));
loader.addEventListener(Event.COMPLETE,
	function(evt:Event):void {
		xml = XML(evt.target.data);
		xmlList = xml.children();
		trace(xmlList);
		var totalSlides:Number = xmlList.length() -1;
		var slideNum:Number = 0;
		imageFile.source = xml.slide[slideNum].@name.toString();
		slideText.text = xml.slide[slideNum].@title.toString();
	}
);
//stage event listeners for the movieClip buttons
nextBtn.addEventListener(MouseEvent.CLICK, onClickNextSlide);
prevBtn.addEventListener(MouseEvent.CLICK, onClickPrevSlide);
//this function will change the text depending upon
//which number is fed to the var slideNum in the
//onClickNextSlide function
function changeText(slideNum:Number):void {
	imageFile.source =  xml.slide[slideNum].@name.toString();
	slideText.text = xml.slide[slideNum].@title.toString();
}
changeText(0);
//this function adds 1 to the current number,
//if the current number is 4, it starts over
function onClickNextSlide(event:MouseEvent):void {
	//Check var on entering function to keep values within specified range.
	if (slideNum &gt;= totalSlides) {
		slideNum = 0;
		//changeText(0);
	}
	else {//Increment after check.
	slideNum++;
	}
	trace(slideNum);
	trace(totalSlides);
	changeText(slideNum);
}
function onClickPrevSlide(event:MouseEvent):void {
	//Check var on entering function to keep values withen specified range.
	if (slideNum &lt;= 0) {
		slideNum = totalSlides +1;
	}
	//Increment after check.
	slideNum--;
	trace(slideNum);
	trace(totalSlides);
	changeText(slideNum);
}</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I went through and added what Chris had done plus I set it up so you did not have to hard code the number of entities like in the example.  I also added the code to view the images. In my case I was loading them into a UILoader component. I fixed a couple errors i was getting and it seems to run solid now.</p>
<p>The next thing that would be nice is a play and pause.</p>
<p>//variables<br />
var xmlList:XMLList;<br />
var mcLoader:Loader;</p>
<p>//loads xml and assigns the text field the first<br />
//node using the slideNum variable from above<br />
var xml:XML = new XML();<br />
var loader:URLLoader = new URLLoader();<br />
loader.load(new URLRequest(&#8220;images.xml&#8221;));<br />
loader.addEventListener(Event.COMPLETE,<br />
	function(evt:Event):void {<br />
		xml = XML(evt.target.data);<br />
		xmlList = xml.children();<br />
		trace(xmlList);<br />
		var totalSlides:Number = xmlList.length() -1;<br />
		var slideNum:Number = 0;<br />
		imageFile.source = xml.slide[slideNum].@name.toString();<br />
		slideText.text = xml.slide[slideNum].@title.toString();</p>
<p>	}<br />
);</p>
<p>//stage event listeners for the movieClip buttons<br />
nextBtn.addEventListener(MouseEvent.CLICK, onClickNextSlide);<br />
prevBtn.addEventListener(MouseEvent.CLICK, onClickPrevSlide); </p>
<p>//this function will change the text depending upon<br />
//which number is fed to the var slideNum in the<br />
//onClickNextSlide function<br />
function changeText(slideNum:Number):void {</p>
<p>	imageFile.source =  xml.slide[slideNum].@name.toString();<br />
	slideText.text = xml.slide[slideNum].@title.toString();<br />
}<br />
changeText(0);</p>
<p>//this function adds 1 to the current number,<br />
//if the current number is 4, it starts over<br />
function onClickNextSlide(event:MouseEvent):void {<br />
	//Check var on entering function to keep values within specified range.<br />
	if (slideNum &gt;= totalSlides) {<br />
		slideNum = 0;<br />
		//changeText(0);<br />
	}<br />
	else {//Increment after check.<br />
	slideNum++;<br />
	}<br />
	trace(slideNum);<br />
	trace(totalSlides);<br />
	changeText(slideNum);<br />
}</p>
<p>function onClickPrevSlide(event:MouseEvent):void {<br />
	//Check var on entering function to keep values withen specified range.<br />
	if (slideNum &lt;= 0) {<br />
		slideNum = totalSlides +1;<br />
	}<br />
	//Increment after check.<br />
	slideNum&#8211;;<br />
	trace(slideNum);<br />
	trace(totalSlides);<br />
	changeText(slideNum);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cbc</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-15590</link>
		<dc:creator>cbc</dc:creator>
		<pubDate>Mon, 09 Mar 2009 21:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-15590</guid>
		<description>hi guys, this is great, but for some reason i cant load my images.
any idea why?
please let me know.
thanks
cecilia</description>
		<content:encoded><![CDATA[<p>hi guys, this is great, but for some reason i cant load my images.<br />
any idea why?<br />
please let me know.<br />
thanks<br />
cecilia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rbc</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-15400</link>
		<dc:creator>rbc</dc:creator>
		<pubDate>Fri, 27 Feb 2009 19:44:49 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-15400</guid>
		<description>from your example, I can&#039;t seem to get the syntax &quot;xml.image[...&quot; to work, and have had to use &quot;xml.child(&quot;image&quot;)[0]....&quot;
Any ideas why?</description>
		<content:encoded><![CDATA[<p>from your example, I can&#8217;t seem to get the syntax &#8220;xml.image[..." to work, and have had to use "xml.child("image")[0]&#8230;.&#8221;</p>
<p>Any ideas why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Red</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-14269</link>
		<dc:creator>Red</dc:creator>
		<pubDate>Sat, 20 Dec 2008 15:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-14269</guid>
		<description>I just ran this code and it worked great. Perhaps you are putting things in the flash file wrong? And don&#039;t you think its a bit much to jump to such a conclusion as to call Jake an ass clown? What juvenile remarks... Grow up, learn code and then instead of insulting someone because you cannot figure out how to make something work, offer up suggestions or perhaps make a sensible comment.</description>
		<content:encoded><![CDATA[<p>I just ran this code and it worked great. Perhaps you are putting things in the flash file wrong? And don&#8217;t you think its a bit much to jump to such a conclusion as to call Jake an ass clown? What juvenile remarks&#8230; Grow up, learn code and then instead of insulting someone because you cannot figure out how to make something work, offer up suggestions or perhaps make a sensible comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-13107</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 20 Nov 2008 22:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-13107</guid>
		<description>That dosent place the images in the slideshow! How do you pull the images through the xml doc and put them on the stage?</description>
		<content:encoded><![CDATA[<p>That dosent place the images in the slideshow! How do you pull the images through the xml doc and put them on the stage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manoharan</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-13061</link>
		<dc:creator>manoharan</dc:creator>
		<pubDate>Mon, 17 Nov 2008 11:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-13061</guid>
		<description>It was very useful to me. Thanks! :)</description>
		<content:encoded><![CDATA[<p>It was very useful to me. Thanks! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.onerutter.com/flash/flash-actionscript-30-xml-text-array-loader.html/comment-page-1#comment-11901</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 04 Oct 2008 02:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://onerutter.com/web/flash-actionscript-30-xml-text-array-loader.html#comment-11901</guid>
		<description>Hello I have fixed your issue. Without the use of an external plugin.
Im sure you might have thought about this approch already. The problem was in your itteration functions. You need your dynamic textbox to fill the first value on load for this to work. However do not increment the counter on load.
function onClickNextNews(){
//Check var on entering function to keep values withen specified range.
    if (counter &gt;= 4) {
        counter = 0;
    }
//Increment after check. This is why you need to set initial value. However solves problems later.
    counter++;
//Trace when variable is about to be used not when you increment.
    trace(counter);
    changeText(counter);
    }
    // this function does the opposite of the one above, it subtracts 1 to current number, when it reaches 0 it starts back at 4 (really only three values are displayed thats the reason for the ending string being the first string also.)
//Same thing here as the next function.
function onClickPrevNews(){
        if (counter &lt;= 0) {
            counter = 4;
        }
        counter--;
        trace(counter);
        changeText(counter);
        }
//NOTE: Counter is NumSlide.
Hopefully this helps I like your overall approach by the way. It is cleaner than what I had been using.</description>
		<content:encoded><![CDATA[<p>Hello I have fixed your issue. Without the use of an external plugin.</p>
<p>Im sure you might have thought about this approch already. The problem was in your itteration functions. You need your dynamic textbox to fill the first value on load for this to work. However do not increment the counter on load.</p>
<p>function onClickNextNews(){<br />
//Check var on entering function to keep values withen specified range.<br />
    if (counter &gt;= 4) {<br />
        counter = 0;<br />
    }<br />
//Increment after check. This is why you need to set initial value. However solves problems later.<br />
    counter++;<br />
//Trace when variable is about to be used not when you increment.<br />
    trace(counter);<br />
    changeText(counter);<br />
    }<br />
    // this function does the opposite of the one above, it subtracts 1 to current number, when it reaches 0 it starts back at 4 (really only three values are displayed thats the reason for the ending string being the first string also.)<br />
//Same thing here as the next function.<br />
function onClickPrevNews(){<br />
        if (counter &lt;= 0) {<br />
            counter = 4;<br />
        }<br />
        counter&#8211;;<br />
        trace(counter);<br />
        changeText(counter);<br />
        }<br />
//NOTE: Counter is NumSlide.</p>
<p>Hopefully this helps I like your overall approach by the way. It is cleaner than what I had been using.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

