<?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: AS3 XML Thumbnail Photo Gallery</title>
	<atom:link href="http://simplistika.com/as3-xml-thumbnail-photo-gallery/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/</link>
	<description>Think Simple</description>
	<lastBuildDate>Wed, 07 Jul 2010 22:23:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ben Cheah</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-693</link>
		<dc:creator>Ben Cheah</dc:creator>
		<pubDate>Wed, 07 Jul 2010 22:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-693</guid>
		<description>Thanks Jared,  Just what I was looking for.

Simone, I made some changes to your code for the keyboard event.  Your traceEvent function wasn&#039;t quite working for me:

		private function traceEvent( e:KeyboardEvent ):void {
			if (e.keyCode == 37) 
			{
				graphicsArray[currentPhoto - 1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
				if (currentPhoto == 0)
				{ 
					graphicsArray[currentPhoto + 9].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
				}
			}
			if (e.keyCode == 39) 
			{
				graphicsArray[currentPhoto + 1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
				if (currentPhoto == 9)
				{ 
					graphicsArray[currentPhoto - 9].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
				}
			}
		}</description>
		<content:encoded><![CDATA[<p>Thanks Jared,  Just what I was looking for.</p>
<p>Simone, I made some changes to your code for the keyboard event.  Your traceEvent function wasn&#8217;t quite working for me:</p>
<p>		private function traceEvent( e:KeyboardEvent ):void {<br />
			if (e.keyCode == 37)<br />
			{<br />
				graphicsArray[currentPhoto - 1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
				if (currentPhoto == 0)<br />
				{<br />
					graphicsArray[currentPhoto + 9].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
				}<br />
			}<br />
			if (e.keyCode == 39)<br />
			{<br />
				graphicsArray[currentPhoto + 1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
				if (currentPhoto == 9)<br />
				{<br />
					graphicsArray[currentPhoto - 9].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
				}<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-689</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 10 Jun 2010 09:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-689</guid>
		<description>I noticed in the Thumbnail class that we are only inserting one row. Ive had a hard time figuring out how to add a second or even third row of thumbails that can be loaded when clicked on. Any help?

Thanks!</description>
		<content:encoded><![CDATA[<p>I noticed in the Thumbnail class that we are only inserting one row. Ive had a hard time figuring out how to add a second or even third row of thumbails that can be loaded when clicked on. Any help?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jared</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-674</link>
		<dc:creator>jared</dc:creator>
		<pubDate>Sat, 08 May 2010 00:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-674</guid>
		<description>Look in the library, there&#039;s an exported movieclip</description>
		<content:encoded><![CDATA[<p>Look in the library, there&#8217;s an exported movieclip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jared</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-673</link>
		<dc:creator>jared</dc:creator>
		<pubDate>Fri, 07 May 2010 23:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-673</guid>
		<description>try using use the Loader() Class to load the swf</description>
		<content:encoded><![CDATA[<p>try using use the Loader() Class to load the swf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-672</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 07 May 2010 13:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-672</guid>
		<description>How would I implement this so it only runs on a particular frame in my .fla file?

Thanks!</description>
		<content:encoded><![CDATA[<p>How would I implement this so it only runs on a particular frame in my .fla file?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-671</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Thu, 06 May 2010 09:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-671</guid>
		<description>hi. i cant seem to find where to the colour  margin round the thumbnails is set. any ideas?

thanks</description>
		<content:encoded><![CDATA[<p>hi. i cant seem to find where to the colour  margin round the thumbnails is set. any ideas?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nayamoshi</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-644</link>
		<dc:creator>nayamoshi</dc:creator>
		<pubDate>Fri, 29 Jan 2010 04:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-644</guid>
		<description>how can i scroll the thumbnails?</description>
		<content:encoded><![CDATA[<p>how can i scroll the thumbnails?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simone</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-639</link>
		<dc:creator>simone</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-639</guid>
		<description>sorry, the last function has been cut by the box length:


private function traceEvent( e:KeyboardEvent ):void
{
if (e.keyCode==39) {
if (currentPhoto0) {
graphicsArray[currentPhoto-1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
}
}
}</description>
		<content:encoded><![CDATA[<p>sorry, the last function has been cut by the box length:</p>
<p>private function traceEvent( e:KeyboardEvent ):void<br />
{<br />
if (e.keyCode==39) {<br />
if (currentPhoto0) {<br />
graphicsArray[currentPhoto-1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
}<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simone</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-638</link>
		<dc:creator>simone</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:25:30 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-638</guid>
		<description>excellent work, jared...

I added Key navigation (LeftArrow and RightArrow) by simply inserting into Thumbnail class:
---
import flash.events.*;
import flash.display.Sprite;

private var pressedKeys:Object = {};
private var graphicsArray:Array = new Array;

-----

into init() function:
stage.addEventListener( KeyboardEvent.KEY_DOWN, keyDownHandler );
stage.addEventListener( KeyboardEvent.KEY_UP, keyUpHandler );

------

into insertFirstRow() function:

graphicsArray[i] = thumb;

-------


and finally adding these 3 functions:


		private function keyDownHandler( e:KeyboardEvent ):void
		{
			if( pressedKeys[ e.keyCode ] )
			{
				return;
			}
			
			pressedKeys[ e.keyCode ] = 1;
			traceEvent( e );
		}
		 
		private function keyUpHandler( e:KeyboardEvent ):void
		{
			delete pressedKeys[ e.keyCode ];
		}
		 
		private function traceEvent( e:KeyboardEvent ):void
		{
			if (e.keyCode==39) {
				if (currentPhoto0) {
				graphicsArray[currentPhoto-1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));
				}
				}
		}</description>
		<content:encoded><![CDATA[<p>excellent work, jared&#8230;</p>
<p>I added Key navigation (LeftArrow and RightArrow) by simply inserting into Thumbnail class:<br />
&#8212;<br />
import flash.events.*;<br />
import flash.display.Sprite;</p>
<p>private var pressedKeys:Object = {};<br />
private var graphicsArray:Array = new Array;</p>
<p>&#8212;&#8211;</p>
<p>into init() function:<br />
stage.addEventListener( KeyboardEvent.KEY_DOWN, keyDownHandler );<br />
stage.addEventListener( KeyboardEvent.KEY_UP, keyUpHandler );</p>
<p>&#8212;&#8212;</p>
<p>into insertFirstRow() function:</p>
<p>graphicsArray[i] = thumb;</p>
<p>&#8212;&#8212;-</p>
<p>and finally adding these 3 functions:</p>
<p>		private function keyDownHandler( e:KeyboardEvent ):void<br />
		{<br />
			if( pressedKeys[ e.keyCode ] )<br />
			{<br />
				return;<br />
			}</p>
<p>			pressedKeys[ e.keyCode ] = 1;<br />
			traceEvent( e );<br />
		}</p>
<p>		private function keyUpHandler( e:KeyboardEvent ):void<br />
		{<br />
			delete pressedKeys[ e.keyCode ];<br />
		}</p>
<p>		private function traceEvent( e:KeyboardEvent ):void<br />
		{<br />
			if (e.keyCode==39) {<br />
				if (currentPhoto0) {<br />
				graphicsArray[currentPhoto-1].dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false));<br />
				}<br />
				}<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Cavitt</title>
		<link>http://simplistika.com/as3-xml-thumbnail-photo-gallery/comment-page-1/#comment-498</link>
		<dc:creator>Jason Cavitt</dc:creator>
		<pubDate>Sat, 17 Oct 2009 21:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://jared.simplistika.com/?p=150#comment-498</guid>
		<description>how would I add a second row of thumbnails if there were more than 10 images?</description>
		<content:encoded><![CDATA[<p>how would I add a second row of thumbnails if there were more than 10 images?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
