<?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>PiXELWiT &#187; Code</title>
	<atom:link href="http://www.pixelwit.com/blog/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelwit.com/blog</link>
	<description>Making Flash Go</description>
	<lastBuildDate>Fri, 02 Dec 2011 14:21:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>FullScreen OnMouseMove Bug</title>
		<link>http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/</link>
		<comments>http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 13:00:46 +0000</pubDate>
		<dc:creator>Pixelwit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=842</guid>
		<description><![CDATA[Going to FullScreen mode causes Flash to temporarily stop executing all onMouseMove events.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.pixelwit.com/blog/wp-content/uploads/2009/03/stinkbug.jpg" alt="stinkbug" title="stinkbug" width="100" height="100" class="alignleft size-full wp-image-848" />Here&#8217;s an interesting fact: Going to FullScreen mode causes Flash to temporarily stop executing all onMouseMove events.</p>
<p>I&#8217;m sure if someone from Adobe was pressed hard enough they might be able to provide some convoluted ~logical~ reasons why going into full-screen mode stops all onMouseMove events but I&#8217;m not buying it.  I wasted a few frustrating hours figuring this out and when I searched the web to confirm my suspicions I found no mention of this &#8220;feature&#8221; so I&#8217;m calling it what it is, a BUG.  </p>
<p>Here, take a look at this ugly SWF (move your mouse around to draw a line whenever the OnMouseMove event is fired and then press the blue square to toggle fullScreen mode)<a href="http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/#more-842" title="Read more">...</a><p><a href="http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/#more-842" title="''FullScreen OnMouseMove Bug'' continues">Continue reading "FullScreen OnMouseMove Bug"</a>.</p><hr />
<p><small>© Pixelwit for <a href="http://www.pixelwit.com/blog">PiXELWiT</a>, 2009. |
<a href="http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/">Permalink</a> |
<a href="http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/#comments">14 comments</a> |
Add to
<a href='http://del.icio.us/post?url=http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/&title=FullScreen OnMouseMove Bug'>del.icio.us</a>
<br/>
Post tags: <a href="http://www.pixelwit.com/blog/tag/actionscript/" rel="tag">ActionScript</a>, <a href="http://www.pixelwit.com/blog/tag/adobe/" rel="tag">Adobe</a>, <a href="http://www.pixelwit.com/blog/tag/bug/" rel="tag">Bug</a>, <a href="http://www.pixelwit.com/blog/tag/code/" rel="tag">Code</a>, <a href="http://www.pixelwit.com/blog/tag/tutorial/" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.pixelwit.com/blog/2009/03/fullscreen-onmousemove-bug/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Flash Scripted Conic Angle Gradient</title>
		<link>http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/</link>
		<comments>http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 14:00:25 +0000</pubDate>
		<dc:creator>Pixelwit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[Draw]]></category>
		<category><![CDATA[SWFs]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=654</guid>
		<description><![CDATA[Flash lacks a ‘conic’ gradient fill which has been a mainstay of drawing apps like CorelDraw and Photoshop (where it’s called an “Angle Gradient”) for ages.  This Flash tutorial explains how to code your own conic angle gradient.]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_conic-gradient_01_1710267876"
			class="flashmovie"
			width="500"
			height="370">
	<param name="movie" value="http://www.pixelwit.com/blog/wp-content/uploads/2008/09/conic-gradient_01.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.pixelwit.com/blog/wp-content/uploads/2008/09/conic-gradient_01.swf"
			name="fm_conic-gradient_01_1710267876"
			width="500"
			height="370">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>One of the quirkier aspects of Flash is its lack of a &#8216;conic&#8217; gradient fill.  The conic gradient has been a mainstay of drawing apps like CorelDraw and Photoshop (where it&#8217;s called an &#8220;Angle Gradient&#8221;) for ages but Flash still hasn&#8217;t implemented this basic feature.  Go ahead and check&#8230; it&#8217;s not there.</p>
<p><em><strong>NOTE:</strong> This tutorial uses some of the code and concepts from my previous <a title="Creating a Gradient with Flash ActionScript" href="http://www.pixelwit.com/blog/2008/05/color-fading-array/">Color Gradient</a> and <a title="Drawing a Circle with Flash ActionScript" href="http://www.pixelwit.com/blog/2007/06/basic-circle-drawing-actionscript/">Circle Drawing</a> tutorials so I highly recommend checking them out for a more in-depth explanation of the following code</em><a href="http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/#more-654" title="Read more">...</a><p><a href="http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/#more-654" title="''Flash Scripted Conic Angle Gradient'' continues">Continue reading "Flash Scripted Conic Angle Gradient"</a>.</p><hr />
<p><small>© Pixelwit for <a href="http://www.pixelwit.com/blog">PiXELWiT</a>, 2008. |
<a href="http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/">Permalink</a> |
<a href="http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/#comments">5 comments</a> |
Add to
<a href='http://del.icio.us/post?url=http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/&title=Flash Scripted Conic Angle Gradient'>del.icio.us</a>
<br/>
Post tags: <a href="http://www.pixelwit.com/blog/tag/actionscript/" rel="tag">ActionScript</a>, <a href="http://www.pixelwit.com/blog/tag/code/" rel="tag">Code</a>, <a href="http://www.pixelwit.com/blog/tag/color/" rel="tag">Color</a>, <a href="http://www.pixelwit.com/blog/tag/draw/" rel="tag">Draw</a>, <a href="http://www.pixelwit.com/blog/tag/swfs/" rel="tag">SWFs</a>, <a href="http://www.pixelwit.com/blog/tag/tutorial/" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.pixelwit.com/blog/2008/09/flash-scripted-conic-angle-gradient/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rotated Oval Tutorial</title>
		<link>http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/</link>
		<comments>http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 20:33:36 +0000</pubDate>
		<dc:creator>Pixelwit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Draw]]></category>
		<category><![CDATA[SWFs]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=403</guid>
		<description><![CDATA[Tutorial explaining the ActionScript code used to plot a series of points around the circumference of a rotated oval.  Based on the <a title="PixelWit's Circle Drawing Tutorial" href="http://www.pixelwit.com/blog/2007/06/basic-circle-drawing-actionscript/">Circle Drawing</a> and <a title="PixelWit's Oval Drawing Tutorial" href="http://www.pixelwit.com/blog/2008/08/oval-tutorial/">Oval Drawing</a> tutorials.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.pixelwit.com/blog/wp-content/uploads/2008/08/rotated-oval.png" alt="rotated oval" title="Rotated Oval" width="264" height="184" class="alignnone size-full wp-image-411" /></p>
<p>Making the transition from <a title="How to Draw a Circle" href="http://www.pixelwit.com/blog/2007/06/basic-circle-drawing-actionscript/">drawing circles</a> to <a title="How to Draw an Oval" href="http://www.pixelwit.com/blog/2008/08/oval-tutorial/">drawing ovals</a> is pretty simple but when you need to go from drawing ovals to drawing <em>rotated</em> ovals, you might run into a few problems.  This article documents some of the pitfalls I encountered and presents them as a learning experience.  If you just want some solid code to draw rotated ovals or twisted ellipses, skip ahead to the end of the article and copy the <a href="http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/#solidcode">last block of code</a>.  If you think you might gain from my experience then by all means&#8230; read on.<a href="http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/#more-403" title="Read more">...</a><p><a href="http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/#more-403" title="''Rotated Oval Tutorial'' continues">Continue reading "Rotated Oval Tutorial"</a>.</p><hr />
<p><small>© Pixelwit for <a href="http://www.pixelwit.com/blog">PiXELWiT</a>, 2008. |
<a href="http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/">Permalink</a> |
<a href="http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/#comments">One comment</a> |
Add to
<a href='http://del.icio.us/post?url=http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/&title=Rotated Oval Tutorial'>del.icio.us</a>
<br/>
Post tags: <a href="http://www.pixelwit.com/blog/tag/actionscript/" rel="tag">ActionScript</a>, <a href="http://www.pixelwit.com/blog/tag/code/" rel="tag">Code</a>, <a href="http://www.pixelwit.com/blog/tag/draw/" rel="tag">Draw</a>, <a href="http://www.pixelwit.com/blog/tag/swfs/" rel="tag">SWFs</a>, <a href="http://www.pixelwit.com/blog/tag/tutorial/" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.pixelwit.com/blog/2008/08/draw-rotated-oval/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hexadecimal Color Fading Array</title>
		<link>http://www.pixelwit.com/blog/2008/05/color-fading-array/</link>
		<comments>http://www.pixelwit.com/blog/2008/05/color-fading-array/#comments</comments>
		<pubDate>Wed, 21 May 2008 09:45:55 +0000</pubDate>
		<dc:creator>Pixelwit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[Draw]]></category>
		<category><![CDATA[SWFs]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=273</guid>
		<description><![CDATA[Detailed Flash ActionScript tutorial explaining how to fade between multiple colors and store each individual color of the gradient in an array.]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_fade-hexes_1806242177"
			class="flashmovie"
			width="500"
			height="400">
	<param name="movie" value="http://www.pixelwit.com/blog/wp-content/uploads/2008/05/fade-hexes.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.pixelwit.com/blog/wp-content/uploads/2008/05/fade-hexes.swf"
			name="fm_fade-hexes_1806242177"
			width="500"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>A while ago I wrote a <a title="How to Fade Between 2 Colors" href="http://www.pixelwit.com/blog/2007/05/hexadecimal-color-fading/">Hexadecimal Color Fading Tutorial</a> explaining how to select a single color at any point on a gradient between two specified colors.  In that tutorial there was a function which efficiently broke each of the 2 specified colors into their Red, Green and Blue components and then calculated a single new color at a specified point between them.</p>
<p>Here&#8217;s what the code looks like:<a href="http://www.pixelwit.com/blog/2008/05/color-fading-array/#more-273" title="Read more">...</a><p><a href="http://www.pixelwit.com/blog/2008/05/color-fading-array/#more-273" title="''Hexadecimal Color Fading Array'' continues">Continue reading "Hexadecimal Color Fading Array"</a>.</p><hr />
<p><small>© Pixelwit for <a href="http://www.pixelwit.com/blog">PiXELWiT</a>, 2008. |
<a href="http://www.pixelwit.com/blog/2008/05/color-fading-array/">Permalink</a> |
<a href="http://www.pixelwit.com/blog/2008/05/color-fading-array/#comments">8 comments</a> |
Add to
<a href='http://del.icio.us/post?url=http://www.pixelwit.com/blog/2008/05/color-fading-array/&title=Hexadecimal Color Fading Array'>del.icio.us</a>
<br/>
Post tags: <a href="http://www.pixelwit.com/blog/tag/actionscript/" rel="tag">ActionScript</a>, <a href="http://www.pixelwit.com/blog/tag/code/" rel="tag">Code</a>, <a href="http://www.pixelwit.com/blog/tag/color/" rel="tag">Color</a>, <a href="http://www.pixelwit.com/blog/tag/draw/" rel="tag">Draw</a>, <a href="http://www.pixelwit.com/blog/tag/swfs/" rel="tag">SWFs</a>, <a href="http://www.pixelwit.com/blog/tag/tutorial/" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.pixelwit.com/blog/2008/05/color-fading-array/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Draw a Logarithmic Spiral</title>
		<link>http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/</link>
		<comments>http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/#comments</comments>
		<pubDate>Thu, 15 May 2008 03:31:56 +0000</pubDate>
		<dc:creator>Pixelwit</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Draw]]></category>
		<category><![CDATA[SWFs]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.pixelwit.com/blog/?p=268</guid>
		<description><![CDATA[Flash ActionScript tutorial explaining how to draw a logarithmic which is a spiral that steps around center at an additive rate while stepping away from center at a multiplicative rate.]]></description>
			<content:encoded><![CDATA[<p>What is a Logarithmic spiral?  A logarithmic spiral steps <em>around</em> center at an additive rate while stepping <em>away</em> from center at a <strong>multiplicative</strong> rate.  Increasing the distance from center at a multiplicative rate causes the arm of a logarithmic spiral to increase in size as it gets further from center.  To illustrate, take a look at this photo of a spiral staircase:</p>
<p><img src="http://farm3.static.flickr.com/2271/2020975929_afb848ce5b_m.jpg" alt="bottom-up view" border="0" /><br /><small>Photo by: <a href="http://www.flickr.com/photos/78771543@N00/2020975929/" title="darijus" target="_blank">darijus</a></small></p>
<p>As you can see in the above photo, the number of steps<a href="http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/#more-268" title="Read more">...</a><p><a href="http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/#more-268" title="''How to Draw a Logarithmic Spiral'' continues">Continue reading "How to Draw a Logarithmic Spiral"</a>.</p><hr />
<p><small>© Pixelwit for <a href="http://www.pixelwit.com/blog">PiXELWiT</a>, 2008. |
<a href="http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/">Permalink</a> |
<a href="http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/#comments">2 comments</a> |
Add to
<a href='http://del.icio.us/post?url=http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/&title=How to Draw a Logarithmic Spiral'>del.icio.us</a>
<br/>
Post tags: <a href="http://www.pixelwit.com/blog/tag/code/" rel="tag">Code</a>, <a href="http://www.pixelwit.com/blog/tag/draw/" rel="tag">Draw</a>, <a href="http://www.pixelwit.com/blog/tag/swfs/" rel="tag">SWFs</a>, <a href="http://www.pixelwit.com/blog/tag/tutorial/" rel="tag">Tutorial</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.pixelwit.com/blog/2008/05/how-to-draw-logarithmic-spiral/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

