<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flash Otaku</title>
	<atom:link href="http://flashotaku.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashotaku.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 01 Mar 2011 15:39:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Flash Components update</title>
		<link>http://flashotaku.com/blog/flash-components-update/</link>
		<comments>http://flashotaku.com/blog/flash-components-update/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:36:34 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[flash slideshow]]></category>
		<category><![CDATA[thumbnail grid]]></category>
		<category><![CDATA[thumbnail scroller]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=171</guid>
		<description><![CDATA[Hello everyone, I just want to let you know that we updated our flash components recently. There might be a lot of changes since you&#8217;ve last visited FlashOtaku.com, so take a look at: Carousel, Grid 3D, StackFlow, Thumbnail Grid, Thumbnail Scroller, Slideshow. Some of the recent changes include the possibility to add a gloss effect [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>I just want to let you know that we updated our flash components recently. There might be a lot of changes since you&#8217;ve last visited FlashOtaku.com, so take a look at:<br />
<a href="http://flashotaku.com/components/carousel/">Carousel</a>, <a href=" http://flashotaku.com/components/grid-3d/">Grid 3D</a>, <a href="http://flashotaku.com/components/stackflow/">StackFlow</a>, <a href="http://flashotaku.com/components/thumbnail-grid/">Thumbnail Grid</a>, <a href="http://flashotaku.com/components/thumbnail-scroller/">Thumbnail Scroller</a>, <a href="http://flashotaku.com/components/slideshow/">Slideshow</a>.</p>
<p>Some of the recent changes include the possibility to add a gloss effect or a watermark and the option to create rounded corners for the thumbnails. Also, if you haven&#8217;t visited our website in the last few months, I want to let you know that all our 3D components(Carousel, StackFlow and Grid3D) support zooming and can play video files using progressive download or RTMP streaming, or you can even load YouTube videos.<br />
There are other changes as well, so I invite you to take a look at them. Also, any feedback is greatly appreciated. </p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/flash-components-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashOtaku Components Update: Live Preview Added</title>
		<link>http://flashotaku.com/blog/flashotaku-components-update-live-preview-added/</link>
		<comments>http://flashotaku.com/blog/flashotaku-components-update-live-preview-added/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 22:36:34 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Flash Components]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=156</guid>
		<description><![CDATA[I just want to let you, the users of FlashOtaku components, know that the components were recently updated and Live Preview was added. This feature will enable you to see how the component will be rendered, at design time. This is pretty useful, as you will see. You can just re-download the component and enjoy [...]]]></description>
			<content:encoded><![CDATA[<p>I just want to let you, the users of FlashOtaku components, know that the components were recently updated and Live Preview was added. This feature will enable you to see how the component will be rendered, at design time. This is pretty useful, as you will see. You can just re-download the component and enjoy the new feature.<br />
The feature was added for the commercial components only.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/flashotaku-components-update-live-preview-added/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Components Mashups &#8211; Part 2</title>
		<link>http://flashotaku.com/blog/flash-components-mashups-part-2/</link>
		<comments>http://flashotaku.com/blog/flash-components-mashups-part-2/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 16:29:00 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[stackflow]]></category>
		<category><![CDATA[thumbnail grid]]></category>
		<category><![CDATA[thumbnail scroller]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=131</guid>
		<description><![CDATA[This post is Part 2 of the Flash Components Mashups series. In this tutorial I will make the application a little more interactive.  I&#8217;ll let the &#8220;Auto Slideshow&#8221; feature activated, but this time I want to be able to jump to different slide when I click on a thumbnail. For this example I will use [...]]]></description>
			<content:encoded><![CDATA[<p>This post is Part 2 of the <a href="http://flashotaku.com/blog/flash-components-mashups/">Flash Components Mashups</a> series.</p>
<p>In this tutorial I will make the application a little more interactive.  I&#8217;ll let the &#8220;Auto Slideshow&#8221; feature activated, but this time I want to be able to jump to different slide when I click on a thumbnail. For this example I will use the <a href="http://flashotaku.com/components/stackflow/">StackFlow</a> and the <a href="http://flashotaku.com/components/slideshow/">Slideshow</a> components. Click on the bellow image to see exactly what we&#8217;ll be trying to achieve.</p>
<p><a onclick="window.open('http://flashotaku.com/blog_tutorials/gallery_2a.swf', 'window', 'width=600, height=500');" href="javascript:void(0)"><img class="alignnone" src="http://flashotaku.com/blog_tutorials/gallery_2a.jpg" alt="" width="200" height="171" /></a></p>
<p>Like in the previous tutorial, I want that each time a slide is opened, the StackFlow component to scroll to the corresponding thumbnail. The code for this is the same as in the previous tutorial.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="kw3">events</span>.<span class="me1">SlideshowEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">mySlideshow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_START</span>, transitionStartHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> transitionStartHandler<span class="br0">&#40;</span><span class="kw3">event</span>:SlideshowEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; myStackFlow.<span class="me1">select</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Next I need to add the code which will allow as to open a slide when we click an item from the StackFlow. This is also pretty simple to do.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="kw3">events</span>.<span class="me1">StackFlowEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>StackFlowEvent.<span class="me1">ITEM_CLICK</span>, itemClickHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> itemClickHandler<span class="br0">&#40;</span><span class="kw3">event</span>:StackFlowEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="me1">openSlide</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>That&#8217;s all the code we need for creating this advanced flash gallery.<br />
The same steps need to be followed if you want to use a different component, like Carousel, Thumbnail Grid or Thumbnail Scroller.</p>
<p>More example bellow.</p>
<p><a onclick="window.open('http://flashotaku.com/blog_tutorials/gallery_2a.swf', 'window', 'width=600, height=500');" href="javascript:void(0)"><img class="alignleft" style="margin-left: 10px; margin-right: 10px;" src="http://flashotaku.com/blog_tutorials/gallery_2a.jpg" alt="" width="200" height="171" /></a></p>
<p><a onclick="window.open('http://flashotaku.com/blog_tutorials/gallery_2b.swf', 'window', 'width=600, height=500');" href="javascript:void(0)"><img class="alignleft" style="margin-left: 10px; margin-right: 10px;" src="http://flashotaku.com/blog_tutorials/gallery_2b.jpg" alt="" width="200" height="171" /></a></p>
<p><a onclick="window.open('http://flashotaku.com/blog_tutorials/gallery_2c.swf', 'window', 'width=600, height=500');" href="javascript:void(0)"><img class="alignleft" style="margin-left: 10px; margin-right: 10px;" src="http://flashotaku.com/blog_tutorials/gallery_2c.jpg" alt="" width="200" height="171" /></a></p>
<p><a onclick="window.open('http://flashotaku.com/blog_tutorials/gallery_2d.swf', 'window', 'width=600, height=500');" href="javascript:void(0)"><img class="alignleft" style="margin-left: 10px; margin-right: 10px;" src="http://flashotaku.com/blog_tutorials/gallery_2d.jpg" alt="" width="200" height="171" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/flash-components-mashups-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Components Mashups</title>
		<link>http://flashotaku.com/blog/flash-components-mashups/</link>
		<comments>http://flashotaku.com/blog/flash-components-mashups/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 13:22:15 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[image gallery]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[thumbnail scroller]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=128</guid>
		<description><![CDATA[Today I&#8217;ll begin a series of posts about how you can integrate two or more components together in order to create more complex and interesting flash applications. As you will see, this is very easy to achieve. I&#8217;ll start with a very basic example in which I will create an image gallery (slideshow + thumbnails). [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ll begin a series of posts about how you can integrate two or more components together in order to create more complex and interesting flash applications. As you will see, this is very easy to achieve.</p>
<p>I&#8217;ll start with a very basic example in which I will create an image gallery (slideshow + thumbnails). For this example I need to use the <a href="http://flashotaku.com/components/slideshow/">Slideshow</a> component and the <a href="http://flashotaku.com/components/thumbnail-scroller/">Thumbnail Scroller</a> component. I suppose you already know how to setup each component, so I won&#8217;t talk about that. I will only show how to make them work together.</p>
<p>1. Drag an instance of the Slideshow and the Scroller onto the stage. Set the XML files for each of the components and also customize their properties if you would like. One thing that you have to do is set the &#8220;Auto Slideshow&#8221; property to true (we will use this feature in the tutorial).</p>
<p>2. Now comes the part that makes the 2 components work together. What I want is that each time the slideshow navigates to a new slide, the corresponding thumbnail to be highlighted. We need to use Actionscript code for this. These flash components are AS3 compliant, so we need to use Actionscript 3 code.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="kw3">events</span>.<span class="me1">SlideshowEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">mySlideshow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_START</span>, transitionStartHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> transitionStartHandler<span class="br0">&#40;</span><span class="kw3">event</span>:SlideshowEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; myScroller.<span class="me1">select</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>That is all the code you need for this basic, but nice looking, example.</p>
<p><object width="600" height="500" data="http://flashotaku.com/blog_tutorials/gallery_1.swf" type="application/x-shockwave-flash"><param name="src" value="http://flashotaku.com/blog_tutorials/gallery_1.swf" /></object></p>
<p>More examples to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/flash-components-mashups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using a custom preloader</title>
		<link>http://flashotaku.com/blog/using-a-custom-preloader/</link>
		<comments>http://flashotaku.com/blog/using-a-custom-preloader/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 15:35:28 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[image gallery]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=75</guid>
		<description><![CDATA[Any of the flash components available at FlashOtaku.com gives you the possibility to create a custom preloader or a temporary clip, to be more precise. The temporary clip will act as a re-placer for the content of the item until the content is completely loaded. By default, a simple temporary clip is created for you [...]]]></description>
			<content:encoded><![CDATA[<p>Any of the <a href="http://flashotaku.com/components/">flash components</a> available at FlashOtaku.com gives you the possibility to create a custom preloader or a temporary clip, to be more precise. The temporary clip will act as a re-placer for the content of the item until the content is completely loaded. By default, a simple temporary clip is created for you with a specified color and transparency and there are also 5 built-in preloaders from which you can chose, but there are times when you want something more suited for your project. In those cases you can create a movie clip and simply tell the component to use that movie clip as a temporary clip.</p>
<p>Below you can see an example where I used a simple movie clip with a rotating star(the animation is created with frames). After creating the movie clip you need to associate it a class (Right-click on the library symbol -&gt; Linkage), TempClip for example, and then pass the name of the class to the component&#8217;s temporaryClipReference property (myInstance.temporaryClipReference = TempClip).</p>
<p>Here&#8217;s the example:</p>
<p><object width="900" height="430" data="http://flashotaku.com/blog_tutorials/grid_temp_clip.swf" type="application/x-shockwave-flash"><param name="src" value="http://flashotaku.com/blog_tutorials/grid_temp_clip.swf" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/using-a-custom-preloader/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding a Tooltip to the StackFlow Component</title>
		<link>http://flashotaku.com/blog/adding-a-tooltip-to-the-stackflow-component/</link>
		<comments>http://flashotaku.com/blog/adding-a-tooltip-to-the-stackflow-component/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 15:41:55 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash component]]></category>
		<category><![CDATA[xml tutorial]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=41</guid>
		<description><![CDATA[As promised in the previous tutorial, in this tutorial I will show you how to add a tooltip to one of the FlashOtaku components. I will use the StackFlow component as an example but it is applicable to the other flash components as well. Here&#8217;s how the final result will look like: First we need [...]]]></description>
			<content:encoded><![CDATA[<p>As promised in the previous <a href="http://flashotaku.com/blog/carousel-component-with-url-for-each-item/">tutorial</a>, in this tutorial I will show you how to add a tooltip to one of the <a href="http://flashotaku.com/">FlashOtaku components</a>. I will use the <a href="http://flashotaku.com/components/stackflow/">StackFlow</a> component as an example but it is applicable to the other flash components as well.</p>
<p>Here&#8217;s how the final result will look like:</p>
<p><object width="820" height="270" data="http://flashotaku.com/blog_tutorials/stackflow_tooltip.swf" type="application/x-shockwave-flash"><param name="src" value="http://flashotaku.com/blog_tutorials/stackflow_tooltip.swf" /></object></p>
<p>First we need an XML file that will contain the source and the title of each item. To specify the title, I will use the &#8216;title&#8217; attribute but this is not a keyword. You can use any name for the extra attributes you add. The flash component will store all the attributes and then, the API will give you access to the value of those attributes.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1">&lt;?<span class="kw3">xml</span> <span class="kw3">version</span>=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;utf-8&quot;</span>?&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;images&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image1.jpg&quot;</span>  title=<span class="st0">&quot;Image 1 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image2.jpg&quot;</span>  title=<span class="st0">&quot;Image 2 title&quot;</span>/&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image3.jpg&quot;</span>  title=<span class="st0">&quot;Image 3 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image4.jpg&quot;</span>  title=<span class="st0">&quot;Image 4 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image5.jpg&quot;</span>  title=<span class="st0">&quot;Image 5 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image6.jpg&quot;</span>  title=<span class="st0">&quot;Image 6 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image7.jpg&quot;</span>  title=<span class="st0">&quot;Image 7 title&quot;</span>/&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image8.jpg&quot;</span>  title=<span class="st0">&quot;Image 8 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image9.jpg&quot;</span>  title=<span class="st0">&quot;Image 9 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image10.jpg&quot;</span> title=<span class="st0">&quot;Image 10 title&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/images&gt;</div>
</li>
</ol>
</div>
<p>As I mentioned in the previous tutorial, I can also use Actionscript to specify the data for each item. The Actionscript code should look like this:</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myItems:<span class="kw3">Array</span> = <span class="br0">&#91;</span><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image1.jpg&quot;</span>, title:<span class="st0">&quot;Image 1 title&quot;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image2.jpg&quot;</span>, title:<span class="st0">&quot;Image 2 title&quot;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image3.jpg&quot;</span>, title:<span class="st0">&quot;Image 3 title&quot;</span><span class="br0">&#125;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">myStackFlow.<span class="me1">items</span> = myItems;</div>
</li>
</ol>
</div>
<p>or</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1">myStackFlow.<span class="me1">addItem</span><span class="br0">&#40;</span><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image1.jpg&quot;</span>, title:<span class="st0">&quot;Image 1 title&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="me1">addItem</span><span class="br0">&#40;</span><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image2.jpg&quot;</span>, title:<span class="st0">&quot;Image 2 title&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="me1">addItem</span><span class="br0">&#40;</span><span class="br0">&#123;</span>source:<span class="st0">&quot;images/image3.jpg&quot;</span>, title:<span class="st0">&quot;Image 3 title&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Now, create a new symbol and inside the symbol draw a simple tooltip and add a dynamic text field that will display the title. Give the text field an instance name of tooltipText and move the tooltip so that bottom edge of the tooltip&#8217;s arrow is positioned where the registration point of the symbol is.</p>
<p><img class="size-full wp-image-43 alignnone" title="tooltip" src="http://flashotaku.com/blog/wp-content/uploads/2008/12/tooltip.jpg" alt="tooltip drawing" width="230" height="107" /></p>
<p>When you&#8217;re done creating the tooltip, right click on it in the Library, chose Linkage, select Export for Actionscript and in the Class field write Tooltip. This step is necessary in order to be able to use the tooltip in the actionscript code.</p>
<p>The actionscript part is pretty easy, so I&#8217;m simply going to attach the code.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="kw3">events</span>.<span class="me1">StackFlowEvent</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="kw3">events</span>.<span class="kw3">MouseEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// create an instance of the Tooltip</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">var</span> tooltip:Tooltip = <span class="kw2">new</span> Tooltip<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>StackFlowEvent.<span class="me1">ITEM_MOUSE_OVER</span>, tooltipHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>StackFlowEvent.<span class="me1">ITEM_MOUSE_OUT</span>, tooltipHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">myStackFlow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>StackFlowEvent.<span class="me1">ITEM_CLICK</span>, itemClickHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> itemClickHandler<span class="br0">&#40;</span><span class="kw3">event</span>:StackFlowEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// event.index is the index of the clicked item</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// when an item is clicked, scroll to that item</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;myStackFlow.<span class="me1">select</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> tooltipHandler<span class="br0">&#40;</span><span class="kw3">event</span>:StackFlowEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">type</span> == StackFlowEvent.<span class="me1">ITEM_MOUSE_OVER</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// event.data.title is the value of the title attribute added in the XML file</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addTooltip<span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">data</span>.<span class="me1">title</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">type</span> == StackFlowEvent.<span class="me1">ITEM_MOUSE_OUT</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeTooltip<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> addTooltip<span class="br0">&#40;</span>myText:<span class="kw3">String</span><span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// add the tooltip to the stage</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;addChild<span class="br0">&#40;</span>tooltip<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="co1">// set the text property of the tooltipText TextField to the value of the myText parameter</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;tooltip.<span class="me1">tooltipText</span>.<span class="kw3">text</span> = myText;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// when the mouse moves, move the tooltip</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">stage</span>.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="me1">MOUSE_MOVE</span>, mouseMoveHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> removeTooltip<span class="br0">&#40;</span><span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// remove the listener</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">stage</span>.<span class="me1">removeEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="me1">MOUSE_MOVE</span>, mouseMoveHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="co1">// remove the tooltip instance from stage</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;removeChild<span class="br0">&#40;</span>tooltip<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> mouseMoveHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;tooltip.<span class="me1">x</span> = mouseX;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;tooltip.<span class="me1">y</span> = mouseY;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>As you can see in this tutorial and also in the previous one, it&#8217;s very easy to add extra features using the new <a href="http://flashotaku.com/">flash components</a>. If you have any questions feel free to ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/adding-a-tooltip-to-the-stackflow-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Carousel component with URL for each item</title>
		<link>http://flashotaku.com/blog/carousel-component-with-url-for-each-item/</link>
		<comments>http://flashotaku.com/blog/carousel-component-with-url-for-each-item/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 15:51:41 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[carousel component]]></category>
		<category><![CDATA[flash component]]></category>

		<guid isPermaLink="false">http://flashotaku.com/blog/?p=32</guid>
		<description><![CDATA[In a previous tutorial, I&#8217;ve described how you can open an URL when a thumbnail is clicked. It was not difficult to do but you would need to parse the XML file again and create some Array instances to store the additional data. With the new components, however, this becomes much easier to do. In [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous <a href="http://flashotaku.com/blog/open-url-when-a-thumbnail-is-clicked/">tutorial</a>, I&#8217;ve described how you can open an URL when a thumbnail is clicked. It was not difficult to do but you would need to parse the XML file again and create some Array instances to store the additional data. With the new components, however, this becomes much easier to do.</p>
<p>In this tutorial I will use the <a href="http://flashotaku.com/components/carousel/">Carousel component</a>, but it&#8217;s the same for each of the <a href="http://flashotaku.com/components/thumbnail-scroller/">Thumbnail Scroller</a>, <a href="http://flashotaku.com/components/thumbnail-grid/">Thumbnail Grid</a> or <a href="http://flashotaku.com/components/stackflow/">StackFlow</a> components.</p>
<p>First we need to create an XML file, images.xml, which should look like this:</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1">&lt;?<span class="kw3">xml</span> <span class="kw3">version</span>=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;utf-8&quot;</span>?&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;images&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image1.jpg&quot;</span> link=<span class="st0">&quot;http://www.adobe.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image2.jpg&quot;</span> link=<span class="st0">&quot;http://www.yahoo.com&quot;</span>/&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image3.jpg&quot;</span> link=<span class="st0">&quot;http://www.msn.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image4.jpg&quot;</span> link=<span class="st0">&quot;http://www.google.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image5.jpg&quot;</span> link=<span class="st0">&quot;http://www.yahoo.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image6.jpg&quot;</span> link=<span class="st0">&quot;http://www.msn.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image7.jpg&quot;</span> link=<span class="st0">&quot;http://www.google.com&quot;</span>/&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image8.jpg&quot;</span> link=<span class="st0">&quot;http://www.youtube.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image9.jpg&quot;</span> link=<span class="st0">&quot;http://www.adobe.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;&lt;image source=<span class="st0">&quot;images/image10.jpg&quot;</span> link=<span class="st0">&quot;http://www.yahoo.com&quot;</span>/&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/images&gt;</div>
</li>
</ol>
</div>
<p>The &#8216;source&#8217; attribute is required to specify the location of the images we want to load. The &#8216;link&#8217; attribute is used to specify the URL of the item. &#8216;link&#8217; is not a reserved keyword. I could as well use &#8216;myLink&#8217; or &#8216;url&#8217; or any other word. The component also allows you to specify the source and all the additional data using Actionscript code but I won&#8217;t cover this now. You can read more about this feature in the component&#8217;s documentation.</p>
<p>Next, drag an instance of the Carousel component onto the stage, give it an instance name (myCarousel, for example), open the Component Inspector panel and for the XML Path property specify the path to the images.xml file. If you test the movie now, you will see the Carousel component successfully loading all the images.</p>
<p>Now, what we want is whenever an item is clicked, the Carousel to select the item, which means that the Carousel will rotate in order to bring that item in front, and if the item is already selected and we click again on the same item, to navigate to the URL specified for that item.</p>
<p>The component&#8217;s API makes it very easy to do this.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="kw3">events</span>.<span class="me1">CarouselEvent</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">myCarousel.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>CarouselEvent.<span class="me1">ITEM_CLICK</span>, itemClickHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> itemClickHandler<span class="br0">&#40;</span><span class="kw3">event</span>:CarouselEvent<span class="br0">&#41;</span>:<span class="kw3">void</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="co1">// if the clicked item is not selected, select it</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>myCarousel.<span class="me1">selectedIndex</span> != <span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myCarousel.<span class="me1">select</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">index</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw1">else</span> <span class="co1">// if the clicked item was already selected, go to the URL address</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navigateToURL<span class="br0">&#40;</span><span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">data</span>.<span class="me1">link</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>That&#8217;s all. As you can see it&#8217;s much easier and the new components give you a greater flexibility than the old ones.</p>
<p>I&#8217;ve also added a GreyEffect which is not covered in this tutorial. You can find more info about the available effects at the component&#8217;s page.</p>
<p>Here&#8217;s a preview:</p>
<p><object width="700" height="400" data="http://flashotaku.com/blog_tutorials/carousel.swf" type="application/x-shockwave-flash"><param name="src" value="http://flashotaku.com/blog_tutorials/carousel.swf" /></object></p>
<p>In the next tutorial, I will show show you how to create a simple Tooltip, that will reveal a title or some other data when you roll over one of the items.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/carousel-component-with-url-for-each-item/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yet Another Image Gallery</title>
		<link>http://flashotaku.com/blog/yet-another-image-gallery/</link>
		<comments>http://flashotaku.com/blog/yet-another-image-gallery/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 14:36:06 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://flashotaku.com/yet-another-image-gallery/</guid>
		<description><![CDATA[Lately there were some questions about the possibility of adding new elements to the XML file when working with the Slideshow or Thumbnail Scroller components. The answer is yes, you just need to parse the XML file again. Two weeks ago I made a tutorial on how you can add new elements to the Thumbnail Scroller component. It's pretty easy to do it, once you know how to work with XML in AS3.]]></description>
			<content:encoded><![CDATA[<p>Lately there were some questions about the possibility of adding new elements to the XML file when working with the <a href="http://flashotaku.com/blog/slideshow-component-as3">Slideshow</a> or <a href="http://flashotaku.com/blog/thumbnailscroller-component-as3">Thumbnail Scroller</a> components. The answer is yes, you just need to parse the XML file again. Two weeks ago I made a <a href="http://flashotaku.com/blog/open-url-when-a-thumbnail-is-clicked/">tutorial</a> on how you can add new elements to the Thumbnail Scroller component. It&#8217;s pretty easy to do it, once you know how to work with XML in AS3. <a href="http://theflashblog.com">Lee Brimelow</a> has made a new <a href="http://www.gotoandlearn.com">video tutorial</a> on the basics of working with XML in AS3, so if you&#8217;re a beginner in AS3 you want to see that tutorial.</p>
<p>I&#8217;ve made a new image gallery example in which I add a title and a description for each image. This image gallery has 2 XML files: one contains the path to the thumbnails and the other contains the path to the large images, the title and the description. You just read the title and the description from the XML file and save the data into an Array and every time you load a new image, you use the array element that has the index equal to the image&#8217;s id. It&#8217;s pretty easy. You can download the source files <a href="http://flashotaku.com/files/gallery_ex3.zip" onclick="javascript:pageTracker._trackPageview('/downloads/gallery_ex3');">here</a>.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_gallery_ex3_1050775361"
			class="flashmovie"
			width="510"
			height="400">
	<param name="movie" value="http://flashotaku.com/files/gallery_ex3.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://flashotaku.com/files/gallery_ex3.swf"
			name="fm_gallery_ex3_1050775361"
			width="510"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<h3><span style="color: #ff0000;">Support</span></h3>
<p>As of 11 March 2009, support is no longer provided for the free components. If you need support, please purchase the <a href="http://flashotaku.com/components/">commercial version</a> of the components.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/yet-another-image-gallery/feed/</wfw:commentRss>
		<slash:comments>98</slash:comments>
		</item>
		<item>
		<title>Building an auto slideshow with AS3</title>
		<link>http://flashotaku.com/blog/building-an-auto-slideshow-with-as3/</link>
		<comments>http://flashotaku.com/blog/building-an-auto-slideshow-with-as3/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 14:52:17 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[auto slideshow]]></category>
		<category><![CDATA[free-flash-component]]></category>
		<category><![CDATA[slideshow tutorial]]></category>
		<category><![CDATA[timer class]]></category>

		<guid isPermaLink="false">http://flashotaku.com/building-an-auto-slideshow-with-as3/</guid>
		<description><![CDATA[This time I will show you how you can add an auto slideshow feature to the Slideshow component, using the Timer class. It's pretty easy to do this, if you know how to use the Timer class, so I will just show you the code without explaining each step, but if you have any specific question, fell free to ask. Also make sure to read the documentation for the Slideshow component.]]></description>
			<content:encoded><![CDATA[<p>This time I will show you how you can add an auto slideshow feature to the <a href="http://flashotaku.com/blog/slideshow-component-as3">Slideshow component</a>, using the Timer class.</p>
<p>It&#8217;s pretty easy to do this, if you know how to use the Timer class, so I will just show you the code without explaining each step, but if you have any specific question, fell free to ask. Also make sure to read the <a href="http://flashotaku.com/blog/slideshow-component-as3-documentation">documentation</a> for the Slideshow component.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="me1">slideshow</span>.<span class="kw3">events</span>.<span class="me1">SlideshowEvent</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="kw3">events</span>.<span class="kw3">MouseEvent</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="me1">utils</span>.<span class="kw3">Timer</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="kw3">events</span>.<span class="kw3">TimerEvent</span>; &nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> myTimer:<span class="kw3">Timer</span> = <span class="kw2">new</span> <span class="kw3">Timer</span><span class="br0">&#40;</span><span class="nu0">1500</span><span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">start</span>.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, startHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">pause</span>.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, pauseHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">prev.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, prevHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">next.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, nextHandler<span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> startHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>!myTimer.<span class="me1">hasEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span>, timerHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="kw3">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> timerHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">TimerEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="me1">reset</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="me1">removeEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span>, timerHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="me1">nextImage</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>!mySlideshow.<span class="me1">hasEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_COMPLETE</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_COMPLETE</span>, completeHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> completeHandler<span class="br0">&#40;</span><span class="kw3">event</span>:SlideshowEvent<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span>, timerHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="kw3">start</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> pauseHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; stopTimer<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> prevHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; stopTimer<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="me1">prevImage</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> nextHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; stopTimer<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="me1">nextImage</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> stopTimer<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>myTimer.<span class="me1">hasEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="me1">reset</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="me1">removeEventListener</span><span class="br0">&#40;</span><span class="kw3">TimerEvent</span>.<span class="kw3">TIMER</span>, timerHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>mySlideshow.<span class="me1">hasEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_COMPLETE</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myTimer.<span class="me1">reset</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mySlideshow.<span class="me1">removeEventListener</span><span class="br0">&#40;</span>SlideshowEvent.<span class="me1">TRANSITION_COMPLETE</span>, completeHandler<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>The result is this:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_auto_slideshow_685709930"
			class="flashmovie"
			width="450"
			height="330">
	<param name="movie" value="http://flashotaku.com/files/auto_slideshow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://flashotaku.com/files/auto_slideshow.swf"
			name="fm_auto_slideshow_685709930"
			width="450"
			height="330">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><a href="http://flashotaku.com/files/auto_slideshow.zip"></a></p>
<p><a href="http://flashotaku.com/files/auto_slideshow.zip" onclick="javascript:pageTracker._trackPageview('/downloads/auto_slideshow');">Download sample files</a></p>
<h3><span style="color: #ff0000;">Support</span></h3>
<p>As of 11 March 2009, support is no longer provided for the free components. If you need support, please purchase the <a href="http://flashotaku.com/components/">commercial version</a> of the components.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/building-an-auto-slideshow-with-as3/feed/</wfw:commentRss>
		<slash:comments>108</slash:comments>
		</item>
		<item>
		<title>Open URL when a thumbnail is clicked</title>
		<link>http://flashotaku.com/blog/open-url-when-a-thumbnail-is-clicked/</link>
		<comments>http://flashotaku.com/blog/open-url-when-a-thumbnail-is-clicked/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 12:20:26 +0000</pubDate>
		<dc:creator>FlashOtaku</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[free-flash-component]]></category>
		<category><![CDATA[thumbnail scroller]]></category>
		<category><![CDATA[xml tutorial]]></category>

		<guid isPermaLink="false">http://flashotaku.com/open-url-when-a-thumbnail-is-clicked/</guid>
		<description><![CDATA[Adding this feature to the Thumbnail Scroller Component is pretty easy but requires some knowledge on working with XML. In this tutorial I will show you how to do this using Actionscript 3.]]></description>
			<content:encoded><![CDATA[<p>Adding this feature to the Thumbnail Scroller Component is pretty easy but requires some knowledge on working with XML. In this tutorial I will show you how to do this using Actionscript 3.</p>
<p>1. First we need to add another attribute to the XML file. I will call this new attribute &#8220;urlPath&#8221; but you can use any name. I only want to add this attribute for the first 3 thumbnails.</p>
<p>My XML file will now look like this:</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;images<span class="re2">&gt;</span></span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image0.jpg&quot;</span> <span class="re0">urlPath</span>=<span class="st0">&quot;http://www.adobe.com&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image1.jpg&quot;</span> <span class="re0">urlPath</span>=<span class="st0">&quot;http://www.google.com&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image2.jpg&quot;</span> <span class="re0">urlPath</span>=<span class="st0">&quot;http://www.yahoo.com&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image3.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image4.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image5.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image6.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image7.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image8.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;image</span> <span class="re0">path</span>=<span class="st0">&quot;thumbnails/image9.jpg&quot;</span> <span class="re2">/&gt;</span></span> </div>
</li>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;/images<span class="re2">&gt;</span></span></span></div>
</li>
</ol>
</div>
<p>2. Add the needed code for the navigation:</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="kw3">events</span>.<span class="kw3">MouseEvent</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">left</span>.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, leftHandler<span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">right</span>.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">MouseEvent</span>.<span class="kw3">CLICK</span>, rightHandler<span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> leftHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;myScroller.<span class="me1">moveLeft</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">function</span> rightHandler<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">MouseEvent</span><span class="br0">&#41;</span><span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;myScroller.<span class="me1">moveRight</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>3. Now, we need to handle the XML file. At first, this might seem a little complicated if you haven&#8217;t worked with XML in AS3 but it&#8217;s really not that difficult. It&#8217;s just that AS3 has a different way of working with external XML files.</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="kw3">events</span>.<span class="kw3">Event</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="me1">net</span>.<span class="me1">URLLoader</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="me1">net</span>.<span class="me1">URLRequest</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw2">var</span> urlRequest:URLRequest = <span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="st0">&quot;thumbnails.xml&quot;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> urlLoader:URLLoader = <span class="kw2">new</span> URLLoader<span class="br0">&#40;</span>urlRequest<span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> urlArray:<span class="kw3">Array</span> = <span class="kw2">new</span> <span class="kw3">Array</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">urlLoader.<span class="kw3">addEventListener</span><span class="br0">&#40;</span><span class="kw3">Event</span>.<span class="me1">COMPLETE</span>, onXmlComplete<span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> onXmlComplete<span class="br0">&#40;</span><span class="kw3">event</span>:<span class="kw3">Event</span><span class="br0">&#41;</span><span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">var</span> xmlList:XMLList; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">var</span> nr:<span class="kw3">int</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw3">xml</span>:<span class="kw3">XML</span> = <span class="kw2">new</span> <span class="kw3">XML</span><span class="br0">&#40;</span><span class="kw3">event</span>.<span class="kw3">target</span>.<span class="kw3">data</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; xmlList = <span class="kw3">xml</span>.<span class="me1">children</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; nr = xmlList.<span class="kw3">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> i:<span class="kw3">int</span> = <span class="nu0">0</span>; i &lt; nr; i++<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlArray<span class="br0">&#91;</span>i<span class="br0">&#93;</span> = xmlList<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">attribute</span><span class="br0">&#40;</span><span class="st0">&quot;urlPath&quot;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> </div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>4. Open an URL when a thumbnail is clicked:</p>
<div class="dean_ch" style="white-space: nowrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">import</span> com.<span class="me1">flashotaku</span>.<span class="me1">thumbnailscroller</span>.<span class="kw3">events</span>.<span class="me1">ThumbnailEvent</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">import</span> flash.<span class="me1">net</span>.<span class="me1">navigateToURL</span>; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">myScroller.<span class="kw3">addEventListener</span><span class="br0">&#40;</span>ThumbnailEvent.<span class="kw3">CLICK</span>, openUrl<span class="br0">&#41;</span>; &nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> openUrl<span class="br0">&#40;</span><span class="kw3">event</span>:ThumbnailEvent<span class="br0">&#41;</span><span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">var</span> nr:<span class="kw3">int</span> = <span class="kw3">event</span>.<span class="me1">item</span>.<span class="me1">id</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw1">if</span><span class="br0">&#40;</span>urlArray<span class="br0">&#91;</span>nr<span class="br0">&#93;</span>!=<span class="kw3">undefined</span><span class="br0">&#41;</span><span class="br0">&#123;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">var</span> urlRequest:URLRequest = <span class="kw2">new</span> URLRequest<span class="br0">&#40;</span>urlArray<span class="br0">&#91;</span>nr<span class="br0">&#93;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;navigateToURL<span class="br0">&#40;</span>urlRequest, <span class="st0">&quot;_blank&quot;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scroller_url_as3_1656766804"
			class="flashmovie"
			width="570"
			height="110">
	<param name="movie" value="http://flashotaku.com/files/scroller_url_as3.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://flashotaku.com/files/scroller_url_as3.swf"
			name="fm_scroller_url_as3_1656766804"
			width="570"
			height="110">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a HREF="http://flashotaku.com/files/scroller_url_as3.zip" onclick="javascript:pageTracker._trackPageview('/downloads/scroller_url_as3');">Download sample files</a></pre>
<p></nr></pre>
<h3><span style="color: #ff0000;">Support</span></h3>
<p>As of 11 March 2009, support is no longer provided for the free components. If you need support, please purchase the <a href="http://flashotaku.com/components/">commercial version</a> of the components.</p>
]]></content:encoded>
			<wfw:commentRss>http://flashotaku.com/blog/open-url-when-a-thumbnail-is-clicked/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>

