<?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>ClickPopMedia &#187; DIY</title>
	<atom:link href="http://www.clickpopmedia.com/category/diy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clickpopmedia.com</link>
	<description>ClickPopMedia is a great little design and illustration firm.</description>
	<lastBuildDate>Thu, 03 Dec 2009 17:28:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To Make A Spraypaint Panel</title>
		<link>http://www.clickpopmedia.com/2008/06/24/how-to-make-a-spraypaint-panel/</link>
		<comments>http://www.clickpopmedia.com/2008/06/24/how-to-make-a-spraypaint-panel/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 20:21:48 +0000</pubDate>
		<dc:creator>Weese</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Just for Fun!]]></category>
		<category><![CDATA[Paintings]]></category>
		<category><![CDATA[Weese]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Graffiti Canvas]]></category>
		<category><![CDATA[Pauls Panel]]></category>
		<category><![CDATA[Spraypaint Panels]]></category>

		<guid isPermaLink="false">http://www.clickpopmedia.com/?p=342</guid>
		<description><![CDATA[
So over the past two months I&#8217;ve been painting these Panels of VQ&#8217;s Vectors.  That got the boys and I over at ClickPop talking about how it was time to teach you how to create them too.  It&#8217;s pretty simple, all you&#8217;ll need is:
-Panel, which can purchased online or at your local arts [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/four_panels1.jpg"><img class="size-medium wp-image-349" title="four_panels1" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/four_panels1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>So over the past two months I&#8217;ve been painting these Panels of VQ&#8217;s <a href="http://www.clickpopmedia.com/this_is_free/" target="_blank">Vectors</a>.  That got the boys and I over at ClickPop talking about how it was time to teach you how to create them too.  It&#8217;s pretty simple, all you&#8217;ll need is:<span id="more-342"></span></p>
<p>-Panel, which can purchased online or at your local arts and craft store (Michaels, A.C. Moore, etc.)</p>
<p>-A can(s) of spray paint</p>
<p>-Black Chisel Tip marker (I prefer Grand &amp; Toy, or Sharpie).</p>
<p>Below is just a shot of my panel.</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step1.jpg"><img class="size-full wp-image-341" title="step1" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step1.jpg" alt="" width="500" height="374" /></a></p>
<p>Next you&#8217;re going to sketch out your drawing with a regular black marker, I used a sharpie for this part.  My inspiration for this panel is from VQ&#8217;s <a href="http://weare.clickpopmedia.com/author/paul/" target="_blank">vector of Paul</a> and his <a href="http://www.clickpopmedia.com/2008/03/20/nuclear-warning-vectors/" target="_blank">Nuclear Warning</a> vector</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step2.jpg"><img class="size-full wp-image-343" title="step2" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step2.jpg" alt="" width="500" height="374" /></a></p>
<p>Next, go over your initial sketch with your Chisel Tipped Marker (Grand &amp; Toy seem to work really well for this).  Make sure your perimeter lines are at least the width of your chisel tip.</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step3.jpg"><img class="size-full wp-image-344" title="step3" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step3.jpg" alt="" width="500" height="374" /></a></p>
<p>Now, grab your can of spray, and work from the outside of the canvas inward.  Your paint is going to start drying before you finish painting the whole canvas, so be looking for any white that might come through.  Be sure to get even lines.  If you spray over your drawing, don&#8217;t worry about it, actually you can get some cool cell-shading effects by going over the lines a little.</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step4.jpg"><img class="size-full wp-image-345" title="step4" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step4.jpg" alt="" width="500" height="374" /></a></p>
<p>Finish spraying the whole canvas.  Let it dry for about 20 minutes (if your location is colder it may take longer).</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step5.jpg"><img class="size-full wp-image-346" title="step5" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/step5.jpg" alt="" width="500" height="374" /></a></p>
<p>Then take your canvas and go over all of your lines again with your Chisel Tipped Marker.</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/100_2178.jpg"><img class="size-full wp-image-348" title="100_2178" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/100_2178.jpg" alt="" width="500" height="375" /></a></p>
<p>And then you&#8217;re done!  Below is all four panels for the ClickPop Office.  If you end up making millions on your panels, be sure to let me know.  Enjoy!  God bless you guys.   -Weese</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/06/four_panels.jpg"><img class="size-full wp-image-347" title="four_panels" src="http://www.clickpopmedia.com/wp-content/uploads/2008/06/four_panels.jpg" alt="" width="500" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickpopmedia.com/2008/06/24/how-to-make-a-spraypaint-panel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating an XML Gallery with ActionScript 3.0</title>
		<link>http://www.clickpopmedia.com/2008/05/14/creating-an-xml-gallery-with-actionscript-30/</link>
		<comments>http://www.clickpopmedia.com/2008/05/14/creating-an-xml-gallery-with-actionscript-30/#comments</comments>
		<pubDate>Thu, 15 May 2008 02:37:28 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Just for Fun!]]></category>
		<category><![CDATA[Paul]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[VQ]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.clickpopmedia.com/?p=309</guid>
		<description><![CDATA[For any dynamic Flash project, XML will be a powerful tool.  One of the most common examples (and one of the simplest) is a picture gallery like the one I have here:

Images came from http://www.stockvault.net/
I will be talking about how to use Flash and XML to make a simple, yet superfly, gallery.

So, let us [...]]]></description>
			<content:encoded><![CDATA[<p>For any dynamic Flash project, XML will be a powerful tool.  One of the most common examples (and one of the simplest) is a picture gallery like the one I have here:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="700" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.clickpopmedia.com/wp-content/uploads/2008/05/xmlgallery.swf" /><embed type="application/x-shockwave-flash" width="600" height="700" src="http://www.clickpopmedia.com/wp-content/uploads/2008/05/xmlgallery.swf"></embed></object><br />
<em>Images came from <a href="http://www.stockvault.net/">http://www.stockvault.net/</a></em></p>
<p>I will be talking about how to use Flash and XML to make a simple, yet superfly, gallery.<br />
<span id="more-309"></span><br />
So, let us  start off by looking at my XML file&#8217;s structure:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="sc3"><span class="re1">&lt;gallery</span> <span class="re0">dir</span>=<span class="st0">&quot;//url/Photos/&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;0&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_7030_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;375&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cute Puppy! &nbsp;Who couldn&#8217;t love that face?<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;1&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_4095_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;375&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Three Friendly Cats.<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;2&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_4281_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;375&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The Terror of the UnderSofa!<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;3&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_6257_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;375&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bored? Let&#8217;s play catch!<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;4&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_6882_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;377&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; It may be natural, but this picture still feels weird to me.<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;5&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_7241_20070301.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;375&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; My cats hate the snow.<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;6&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_7538_20070507.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;622&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;![CDATA[&lt;I&gt;LOOK&lt;/I&gt; IT'S &lt;B&gt;HTML&lt;/B&gt;!!!]]&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;img</span> <span class="re0">id</span>=<span class="st0">&#8216;7&#8242;</span> <span class="re0">file</span>=<span class="st0">&quot;photo_7915_20070609.jpg&quot;</span> <span class="re0">width</span>=<span class="st0">&#8216;500&#8242;</span> <span class="re0">height</span>=<span class="st0">&#8216;371&#8242;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Skinny cats are OK too.<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/img<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/gallery<span class="re2">&gt;</span></span></span></div>
<p>XML is very simple to understand if you know anything about HTML&#8217;s tag structure.  The XML document has a root <strong>tag</strong> &lt;gallery&gt; that has an <strong>attribute</strong> dir=&#8221;//url/Photos/&#8221;.  Every tag has to be closed within it&#8217;s own level of the tree.   Our gallery tag is closed at the bottom of the document with <strong>&lt;/gallery&gt;</strong>.   This means that all the  <strong>&lt;img&gt;</strong> tags are elements inside the gallery element (both open and close tags combined make up an element).</p>
<p>Our <strong>&lt;img&gt;</strong> tags have several attributes, such as the images file name and it&#8217;s pixel demensions.  Inside each <strong>&lt;img&gt;</strong> element we have a short comment about the image that will be displayed in a TextField in our Flash movie.</p>
<blockquote><p>One important thing to notice here is that if you want to have HTML in your TextField then you need to tell the code that something is a string containing HTML and not more elements.  We do this with a special bracket &lt;![CDATA[  <em>HTML GOES HERE</em> ]]&gt;  Isn&#8217;t that GREAT!  That right there probably made this whole tutorial worth while (that was a problem that took me a long time to solve).</p></blockquote>
<p>OK, now that we&#8217;ve looked at the XML we need to make it work with ActionScript 3. In Adobe Flash CS3 I created a new AS3 FLA doc and a new AS doc.  In the FLA I simply created some very basic MovieClips for my left and right arrows and I placed a TextField at the bottom of my stage (which I set to 600 X 700 with a black background).  After naming my instances and setting up the Document Class linkage I was done with the FLA side of thing and the rest is ActionScript.</p>
<p>Our Document Class has to extend MovieClip so we take our first steps thusly:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">public</span> <span class="kw2">class</span> Main <span class="kw3">extends</span> <span class="kw3">MovieClip</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> currentImg:<span class="kw3">Number</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> lastImg:<span class="kw3">Number</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> <span class="kw3">xml</span>:<span class="kw3">XML</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> loader:Loader;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">var</span> xmlLoader:URLLoader;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">public</span> <span class="kw2">function</span> Main<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loader = <span class="kw2">new</span> Loader<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span class="br0">&#40;</span>loader<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlLoader = <span class="kw2">new</span> URLLoader<span class="br0">&#40;</span><span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="st0">&quot;//url/gallery.xml&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlLoader.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">COMPLETE</span>, <span class="kw3">parseXML</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; left_mc.<span class="kw3">stop</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">//Need to stop the arrows from flickering</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; right_mc.<span class="kw3">stop</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p>In our constructor we are initializing our Loader which will contain the loaded images and we are loading our XML document.  When the XML doc is done loading, the function parseXML will handle the content.</p>
<div class="dean_ch" style="white-space: wrap;">protected <span class="kw2">function</span> <span class="kw3">parseXML</span><span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; left_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_UP</span>, nextImg<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; left_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_OUT</span>, arrowOut<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; left_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_OVER</span>, arrowOver<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; right_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_UP</span>, prevImg<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; right_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_OUT</span>, arrowOut<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; right_mc.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">MOUSE_OVER</span>, arrowOver<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">xml</span> = <span class="kw2">new</span> <span class="kw3">XML</span><span class="br0">&#40;</span>event.<span class="me1">currentTarget</span>.<span class="kw3">data</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; lastImg = <span class="kw3">xml</span>.<span class="me1">img</span>.<span class="kw3">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span> &#8211; <span class="nu0">1</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; currentImg = <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loadImg<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
<p>I&#8217;ve recently gotten into the habit of using protected functions rather then private functions.  There is only one difference between the two and that&#8217;s that private <em>anything</em> won&#8217;t be inherited by child classes.<br />
In this function I set the MouseEvents for the arrows because if the XML failed to load, there would be no reason for the arrows to work.</p>
<p>Alright, so I saved my XML tree in the var <strong>xml</strong> for ease of use later.  I also saved the number of images in my XML doc using the <strong>length()</strong> method.  Something to know about the length method is it will only tell you how many elements there are of that tag type at that level.  For example, if I were to have child elements inside my <strong>img</strong> elements that would not affect the return value of <strong>xml.img.length();</strong> It&#8217;s only telling you how many img elements are children of <strong>gallery</strong> (<strong>gallery</strong> is accessed with the var <strong>xml</strong> directly).</p>
<div class="dean_ch" style="white-space: wrap;">protected <span class="kw2">function</span> loadImg<span class="br0">&#40;</span><span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="me1">x</span> = <span class="br0">&#40;</span><span class="kw3">stage</span>.<span class="kw3">width</span> &#8211; <span class="kw3">Number</span><span class="br0">&#40;</span><span class="kw3">xml</span>.<span class="me1">img</span><span class="br0">&#91;</span>currentImg<span class="br0">&#93;</span>.@<span class="kw3">width</span><span class="br0">&#41;</span><span class="br0">&#41;</span>/<span class="nu0">2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="me1">y</span> = <span class="br0">&#40;</span><span class="kw3">stage</span>.<span class="kw3">height</span> &#8211; <span class="nu0">50</span> &#8211; <span class="kw3">Number</span><span class="br0">&#40;</span><span class="kw3">xml</span>.<span class="me1">img</span><span class="br0">&#91;</span>currentImg<span class="br0">&#93;</span>.@<span class="kw3">height</span><span class="br0">&#41;</span><span class="br0">&#41;</span>/<span class="nu0">2</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="kw3">load</span><span class="br0">&#40;</span><span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="kw3">xml</span>.@dir + <span class="kw3">xml</span>.<span class="me1">img</span><span class="br0">&#91;</span>currentImg<span class="br0">&#93;</span>.@file<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="me1">contentLoaderInfo</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">COMPLETE</span>, loadFin<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
protected <span class="kw2">function</span> loadFin<span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; textDisp_TF.<span class="kw3">htmlText</span> = <span class="kw3">xml</span>.<span class="me1">img</span><span class="br0">&#91;</span>currentImg<span class="br0">&#93;</span>;<br />
<span class="br0">&#125;</span></div>
<p>In that first function I&#8217;m just going to focus on the one line with the URLRequest.  In order to traverse an XML tree you need start with the base.  Your XML var (in our case it&#8217;s called <strong>xml</strong>) points to that base (in this case the base is <strong>gallery</strong>).  So when we want to access the attribute <strong>dir</strong> in the tag <strong>gallery</strong>, we need to type <strong>xml.@dir</strong> and this will return <em>&#8220;//url/Photos/&#8221;</em>.  The &#8216;@&#8217; symbol denotes that it&#8217;s an attribute and not an element (tag).</p>
<p>Getting the file name is just one step further.  <strong>currentImg</strong> is a Number variable that stores which image we are on.  Thinking of our XML var as something similar to a bunch of nested arrays we can see how you might access a specific file name with <strong>xml.img[currentImg].@file</strong> This says we want the file attribute in the [currentImg] (first second so forth) img element which is in our base element.  There are quite a few ways of finding what you need in an XML doc and you can learn more about them<a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00000129.html"> here</a>.</p>
<p>In the second function we are displaying the text from within our XML img element.  Here we aren&#8217;t accessing any attributes or anything, this is where we get the content between the open &lt;img&gt; and close &lt;/img&gt; tags.</p>
<p>Finally we have the arrow MouseEvent handlers:</p>
<div class="dean_ch" style="white-space: wrap;">protected <span class="kw2">function</span> arrowOut<span class="br0">&#40;</span>event:MouseEvent<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">MovieClip</span><span class="br0">&#40;</span>event.<span class="me1">currentTarget</span><span class="br0">&#41;</span>.<span class="kw3">gotoAndStop</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p>protected <span class="kw2">function</span> arrowOver<span class="br0">&#40;</span>event:MouseEvent<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">MovieClip</span><span class="br0">&#40;</span>event.<span class="me1">currentTarget</span><span class="br0">&#41;</span>.<span class="kw3">gotoAndStop</span><span class="br0">&#40;</span><span class="nu0">2</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p>protected <span class="kw2">function</span> nextImg<span class="br0">&#40;</span>event:MouseEvent<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="me1">unload</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; currentImg = <span class="br0">&#40;</span>currentImg &lt; lastImg<span class="br0">&#41;</span>? currentImg + <span class="nu0">1</span> : <span class="nu0">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loadImg<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p>protected <span class="kw2">function</span> prevImg<span class="br0">&#40;</span>event:MouseEvent<span class="br0">&#41;</span>:<span class="kw3">void</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; loader.<span class="me1">unload</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; currentImg = <span class="br0">&#40;</span>currentImg &gt; <span class="nu0">0</span><span class="br0">&#41;</span>? currentImg &#8211; <span class="nu0">1</span> : lastImg;<br />
&nbsp; &nbsp; &nbsp; &nbsp; loadImg<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
<p>Once again I&#8217;m using the less obvious form of the if..else statement.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">if</span><span class="br0">&#40;</span>num&gt;<span class="nu0">5</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num = <span class="nu0">5</span>;<br />
<span class="br0">&#125;</span><span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; num = <span class="nu0">0</span>;<br />
<span class="br0">&#125;</span><br />
<span class="co1">//OR, THIS NEXT PART DOES THE SAME THING</span><br />
num = <span class="br0">&#40;</span>num&gt;<span class="nu0">5</span><span class="br0">&#41;</span>? <span class="nu0">5</span> : <span class="nu0">0</span>;</div>
<p>Well that&#8217;s about it for this level of a gallery.  You can make galleries look really nice with fade transitions between images, small loading animations for larger images, scrollable thumbnail selection menu&#8230;  etc.</p>
<p>Here is a downloadable source of my example file (images not included&#8230; get them <a href="http://www.stockvault.net/">here</a>): <a href="http://www.clickpopmedia.com/wp-content/uploads/2008/05/xmlgallery.zip">XMLGallery.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickpopmedia.com/2008/05/14/creating-an-xml-gallery-with-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>DIY Rubber Stamp</title>
		<link>http://www.clickpopmedia.com/2008/04/23/diy-rubber-stamp/</link>
		<comments>http://www.clickpopmedia.com/2008/04/23/diy-rubber-stamp/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 17:35:20 +0000</pubDate>
		<dc:creator>VQ</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.clickpopmedia.com/?p=265</guid>
		<description><![CDATA[
I was ordering something from an online printer the other day and noticed that they offered custom rubber stamps.  This got the old brain moving, and I remembered that I (and by extension you) can make a custom stamp of my own.
Step 1: Get Your Stuff Together


The Materials you&#8217;ll need:

A rubber eraser (I have [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/header1.jpg"><img title="header1" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/header1.jpg" alt="" /></a></p>
<p style="text-align: left;">I was ordering something from an online printer the other day and noticed that they offered custom rubber stamps.  This got the old brain moving, and I remembered that I (and by extension you) can make a custom stamp of my own.</p>
<p style="text-align: left;"><strong>Step 1: Get Your Stuff Together</strong></p>
<p style="text-align: left;"><span id="more-265"></span></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step1.jpg"><img class="alignnone size-medium wp-image-267" title="step1" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;">The Materials you&#8217;ll need:</p>
<ul>
<li>A rubber eraser (I have a bunch of pink Paper-Mate erasers, but Weese just did a stamp with a nicer white eraser, and it looked really nice)</li>
<li>An X-acto knife</li>
<li>A pen or pencil</li>
</ul>
<p style="text-align: left;"><strong>Step 2: Tracing</strong></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step2.jpg"><img class="alignnone size-medium wp-image-268" title="step2" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step2-300x225.jpg" alt="" width="300" height="225" /></a></p>
<blockquote>
<p style="text-align: left;"><strong>VERY IMPORTANT NOTE: Make sure to trace your shape </strong><strong>backwards. Both Weese and I forgot this recently. I promise you, it&#8217;s very frustrating to finish lovingly carving out a miniature work of art, only to find that you&#8217;ve made a stamp that says </strong><strong>&#8220;<em>aideM poP kcilC</em></strong><strong>&#8221; or some such nonsense.</strong></p>
</blockquote>
<p style="text-align: left;">The first thing you want to do is trace your shape onto your eraser.  Keep in mind that tons of curves and tight negative spaces <em>will</em> drive you nuts.</p>
<p style="text-align: left;"><strong>Step 3: Outline</strong></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step3.jpg"><img class="alignnone size-medium wp-image-269" title="step3" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step3-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;">Once you have your shape traced onto the eraser, take your X-acto knife and carefully outline your shape with the tip of your blade, paying attention to clean curves and whatnot (which I did not pay much attention to here).  Once you&#8217;ve done that, run the blade back through the outline you made, making a deeper cut.</p>
<p style="text-align: left;"><strong>Step 4: Carving</strong></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step4.jpg"><img class="alignnone size-medium wp-image-270" title="step4" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step4-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;">Next you will take the blade and put it into the side of the eraser at the depth of your outline, and run it around the edge of the eraser.  Then you will cut in towards your shape, removing pieces of rubber as you go. For tight spaces, use the tip of your blade to cut at an angle and pry up pieces of rubber.</p>
<p style="text-align: left;"><strong>Step 5: Simplify</strong></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step5.jpg"><img class="alignnone size-medium wp-image-271" title="step5" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step5-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;">You&#8217;re almost finished. The last step is cleanup.  Run your blade around the edge of your shape to get rid of any barbs and other irregularities.  I also like to cut off as much of the blank edges of the eraser as possible, so I don&#8217;t get a lot of edge marks when I push down on the stamp.</p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step6.jpg"><img class="alignnone size-medium wp-image-272" title="step6" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step6-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: center;"><a href="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step7.jpg"><img class="alignnone size-medium wp-image-273" title="step7" src="http://www.clickpopmedia.com/wp-content/uploads/2008/04/step7-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: left;"><strong>GodBless:VQ</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickpopmedia.com/2008/04/23/diy-rubber-stamp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

