<?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: Powerfull Dynamic XML Gallery V3</title>
	<atom:link href="http://www.flashenabledblog.com/2008/03/25/powerfull-dynamic-xml-gallery-v3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flashenabledblog.com/2008/03/25/powerfull-dynamic-xml-gallery-v3/</link>
	<description>A Blog covering Air, Flash, Flex, Illustrator and Photoshop</description>
	<lastBuildDate>Sun, 11 Sep 2011 02:17:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jasen Burkett</title>
		<link>http://www.flashenabledblog.com/2008/03/25/powerfull-dynamic-xml-gallery-v3/comment-page-1/#comment-843</link>
		<dc:creator>Jasen Burkett</dc:creator>
		<pubDate>Tue, 05 May 2009 00:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://flashenabled.wordpress.com/?p=824#comment-843</guid>
		<description>I have a serious problem I am trying to work out.

I need to know if you can look at my action script and
see where I could be going wrong.

I need to have my tile list populate all images based on the gallery
that is selected.  I have the xml formatted correctly, but the action
script is not distinguishing which images to load.

here is my action script -
import fl.data.DataProvider;
import flash.display.DisplayObject;
import fl.controls.ScrollBarDirection;

//loads file into flash
var loader:URLLoader = new URLLoader();
var baseURL:String = &quot;http://www.cbchangar.com/uploads/images/&quot;


//add event listener for the list box
lb.addEventListener(Event.CHANGE, itemChange);

function itemChange(e:Event):void
{
	//when ever an item is changed. we want to populate the text area
	//Tile List information that takes the xml file info and
	//uses the reaction to someone clicking in the list component
	//and displays the info from that selection to the tile list.
	var provider:DataProvider;
	provider = new DataProvider();
	provider.addItem({label:lb.selectedItem.data, source:lb.selectedItem.source});
	tl.dataProvider = provider;
}

//tl.addEventListener(Event.CHANGE, itemSelect);
//function itemSelect(e:Event):void
//{
//}

//when finished loading in file notify us
loader.addEventListener(Event.COMPLETE, onLoaded);

//use as3 xml features to parse out xml
//create a new xml object, which will hold all xml data
var xml:XML;



function onLoaded(e:Event):void
{
	//get access to the data in the file
	//gets us to the object this listener was applied to
	xml = new XML(e.target.data);
	//start displaying specific pieces of info from the xml file
	//you no longer have to use the first child and second child crap
	//in the new way, you can just walk down the xml list
	//so check your xml file for what you want to get.
	//start with the first tag, and then just walk down the list
	//trace(xml.galleryInfo.image);

	tl.direction = ScrollBarDirection.VERTICAL;
	tl.rowHeight = 140;
	tl.columnWidth = 200;

	var il:XMLList = xml.item;
	trace(xml.item);
	for(var i:uint=i; i&lt;il.length(); i++)
	{
		//add the title of the specific item to the list box
		//label is the text that gets displayed
		//data is the info th
		//
		lb.addItem({data:il.caption.text()[i], label:il.gid.text()[i], source:baseURL + il.imgName[i]});
	}
}

	//tell the loader object to load the file from a url
	loader.load(new URLRequest(&quot;http://www.cbchangar.com/Scripts/images.php&quot;));


please let me know if you see anything...
thanks</description>
		<content:encoded><![CDATA[<p>I have a serious problem I am trying to work out.</p>
<p>I need to know if you can look at my action script and<br />
see where I could be going wrong.</p>
<p>I need to have my tile list populate all images based on the gallery<br />
that is selected.  I have the xml formatted correctly, but the action<br />
script is not distinguishing which images to load.</p>
<p>here is my action script -<br />
import fl.data.DataProvider;<br />
import flash.display.DisplayObject;<br />
import fl.controls.ScrollBarDirection;</p>
<p>//loads file into flash<br />
var loader:URLLoader = new URLLoader();<br />
var baseURL:String = &#8220;http://www.cbchangar.com/uploads/images/&#8221;</p>
<p>//add event listener for the list box<br />
lb.addEventListener(Event.CHANGE, itemChange);</p>
<p>function itemChange(e:Event):void<br />
{<br />
	//when ever an item is changed. we want to populate the text area<br />
	//Tile List information that takes the xml file info and<br />
	//uses the reaction to someone clicking in the list component<br />
	//and displays the info from that selection to the tile list.<br />
	var provider:DataProvider;<br />
	provider = new DataProvider();<br />
	provider.addItem({label:lb.selectedItem.data, source:lb.selectedItem.source});<br />
	tl.dataProvider = provider;<br />
}</p>
<p>//tl.addEventListener(Event.CHANGE, itemSelect);<br />
//function itemSelect(e:Event):void<br />
//{<br />
//}</p>
<p>//when finished loading in file notify us<br />
loader.addEventListener(Event.COMPLETE, onLoaded);</p>
<p>//use as3 xml features to parse out xml<br />
//create a new xml object, which will hold all xml data<br />
var xml:XML;</p>
<p>function onLoaded(e:Event):void<br />
{<br />
	//get access to the data in the file<br />
	//gets us to the object this listener was applied to<br />
	xml = new XML(e.target.data);<br />
	//start displaying specific pieces of info from the xml file<br />
	//you no longer have to use the first child and second child crap<br />
	//in the new way, you can just walk down the xml list<br />
	//so check your xml file for what you want to get.<br />
	//start with the first tag, and then just walk down the list<br />
	//trace(xml.galleryInfo.image);</p>
<p>	tl.direction = ScrollBarDirection.VERTICAL;<br />
	tl.rowHeight = 140;<br />
	tl.columnWidth = 200;</p>
<p>	var il:XMLList = xml.item;<br />
	trace(xml.item);<br />
	for(var i:uint=i; i&lt;il.length(); i++)<br />
	{<br />
		//add the title of the specific item to the list box<br />
		//label is the text that gets displayed<br />
		//data is the info th<br />
		//<br />
		lb.addItem({data:il.caption.text()[i], label:il.gid.text()[i], source:baseURL + il.imgName[i]});<br />
	}<br />
}</p>
<p>	//tell the loader object to load the file from a url<br />
	loader.load(new URLRequest(&#8220;http://www.cbchangar.com/Scripts/images.php&#8221;));</p>
<p>please let me know if you see anything&#8230;<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake</title>
		<link>http://www.flashenabledblog.com/2008/03/25/powerfull-dynamic-xml-gallery-v3/comment-page-1/#comment-842</link>
		<dc:creator>Jake</dc:creator>
		<pubDate>Sat, 02 May 2009 23:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://flashenabled.wordpress.com/?p=824#comment-842</guid>
		<description>Here is a really cool &lt;a href=&quot;http://www.photo-graffix.com&quot; title=&quot;flash image gallery&quot; rel=&quot;nofollow&quot;&gt; &gt;flash image gallery&lt;/a&gt;,
very user friendly and customizable</description>
		<content:encoded><![CDATA[<p>Here is a really cool <a href="http://www.photo-graffix.com" title="flash image gallery" rel="nofollow"> &gt;flash image gallery</a>,<br />
very user friendly and customizable</p>
]]></content:encoded>
	</item>
</channel>
</rss>

