<?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>Piterwilson = Juan Carlos Ospina Gonzalez &#187; code example / ejemplos de codigo</title>
	<atom:link href="http://www.piterwilson.com/personal/category/code-example-ejemplos-de-codigo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piterwilson.com/personal</link>
	<description>Piterwilson is/es Juan Carlos Ospina Gonzalez</description>
	<lastBuildDate>Wed, 21 Jul 2010 15:26:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Iphone friendly alternative to the animated gif (with Javascript and prototype js)</title>
		<link>http://www.piterwilson.com/personal/2009/03/01/iphone-friendly-alternative-to-the-animated-gif-with-javascript-and-prototype-js/</link>
		<comments>http://www.piterwilson.com/personal/2009/03/01/iphone-friendly-alternative-to-the-animated-gif-with-javascript-and-prototype-js/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:48:27 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[code example / ejemplos de codigo]]></category>
		<category><![CDATA[web cam stop motion]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=143</guid>
		<description><![CDATA[UPDATE: This class has been updated, please see more details here. The problem: Mobile Safari only allows animated GIFs up to a certain size (that is a function of the dimensions and number of frames).  If the images are larger than the limit, Safari only renders the first frame. Much to my misfortune while working [...]]]></description>
			<content:encoded><![CDATA[<p><script src="http://www.piterwilson.com/stuff/js/prototype.js"></script><br />
<script src="http://www.piterwilson.com/stuff/js/animationPlayer.js"></script>UPDATE: This class has been updated, <a href="http://www.piterwilson.com/personal/2009/03/23/animationplayer-js-class-updated/">please see more details here</a>.</p>
<p><strong>The problem:</strong></p>
<blockquote><p>Mobile Safari only allows animated GIFs up to a certain size (that is a function of the dimensions and number of frames).  If the images are larger than the limit, Safari only renders the first frame.</p></blockquote>
<p>Much to my misfortune while working with a friend to make an Iphone app for the <a href="http://www.piterwilson-toys.com/wcsmt2/">WCSMT website</a>, we came to the realization that the Iphone has serious limitations to display animated gifs. Coupled with the total inability (or better put : reluctance) to display flash content, it makes the Iphone very unfriendly to displaying short animation formats, like the ones on <a href="http://www.piterwilson-toys.com/wcsmt2/">WCSMT </a> or <a href="http://www.miniclip.com/sketch-star/en/player.php?id=2565885">Miniclip&#8217;s SketchStar</a>.</p>
<p>I realize this is a very small section of the market (people who like short animated gifs) and that the animated gif is an ancient format to begin with and not a lot of people have a practical use for it. Still i set out to find the way to display short-lenght animation formats where proper video pulig-ins are overkill (or too difficult to implement practically with web-based toys that create animations).</p>
<p><strong>Solution:</strong></p>
<p>A javascript class that will take an array of images and display it at a constant speed. This is pretty much a simplified javascript slideshow that goes very fast!</p>
<p>Here&#8217;s an example, making an animated gif of this to display on the Iphone would be impossible:</p>
<div id="animationPlayer" style="width:320px;height:240px;">
</div>
<p><script>
var frames = new Array();
var i;
for(i=1;i<10;i++){
frames.push("http://www.piterwilson.com/stuff/animation/animation00"+i+".jpg");
}
var myPlayer = new AnimationPlayer(frames,$('animationPlayer'));
myPlayer.play();
</script></p>
<p><strong>How does it work?</strong></p>
<p><code>&lt;script src=&quot;http://www.piterwilson.com/stuff/js/prototype.js&quot;&gt;&lt;/script&gt;<br />
&lt;script src=&quot;http://www.piterwilson.com/stuff/js/animationPlayer.js&quot;&gt;&lt;/script&gt;<br />
&lt;div id=&quot;animationPlayer&quot; style=&quot;width:320px;height:240px&quot;&gt;<br />
&lt;/div&gt;<br />
&lt;script&gt;<br />
var frames = new Array();<br />
var i;<br />
for(i=1;i&lt;10;i++){<br />
frames.push(&quot;http://www.piterwilson.com/stuff/animation/animation00&quot;+i+&quot;.jpg&quot;);<br />
}<br />
var myPlayer = new AnimationPlayer(frames,$(&#039;animationPlayer&#039;));<br />
myPlayer.play();<br />
&lt;/script&gt;</code></p>
<p>1. Include prototype.js<br />
2. Include animationPlayer.js<br />
3. Declare and array of paths to the frames of the animation. They can be jpg, gif, png or whatever.<br />
4. Create an instance of the AnimationPlayer class, pass the array as parameter 1 and a div reference as parameter 2.<br />
5. Call the play() function! that's it!</p>
<p>You can also change the frame rate by setting AnimationPlayer.frameRate to any value (in milliseconds)</p>
<p>Get prototype JS at <a href="http://www.prototypejs.org/">http://www.prototypejs.org/</a><br />
Get the AnimationPlayer class here <a href="http://www.piterwilson.com/stuff/js/animationPlayer.js">http://www.piterwilson.com/stuff/js/animationPlayer.js</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2009/03/01/iphone-friendly-alternative-to-the-animated-gif-with-javascript-and-prototype-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pie Chart example in AS3</title>
		<link>http://www.piterwilson.com/personal/2008/09/04/pie-chart-example-in-as3/</link>
		<comments>http://www.piterwilson.com/personal/2008/09/04/pie-chart-example-in-as3/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 11:02:20 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>
		<category><![CDATA[hobby]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=94</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_piecharttest1_1174587194"
			class="flashmovie"
			width="450"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/09/piecharttest1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/09/piecharttest1.swf"
			name="fm_piecharttest1_1174587194"
			width="450"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> Download source A sample class to make a dynamic pie chart in Actionscript 3, it includes a sample Tooltip class.]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_piecharttest1_472543031"
			class="flashmovie"
			width="450"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/09/piecharttest1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/09/piecharttest1.swf"
			name="fm_piecharttest1_472543031"
			width="450"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/09/piechartexample1.zip">Download source<br />
</a></p>
<p>A sample class to make a dynamic pie chart in Actionscript 3, it includes a sample Tooltip class.</p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/09/04/pie-chart-example-in-as3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Spinning a disk, detecting mouse angle in AS3</title>
		<link>http://www.piterwilson.com/personal/2008/08/12/spinning-a-disk-detecting-mouse-angle-in-as3/</link>
		<comments>http://www.piterwilson.com/personal/2008/08/12/spinning-a-disk-detecting-mouse-angle-in-as3/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 19:58:09 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=84</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_spindisk_1624120023"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/08/spindisk.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/08/spindisk.swf"
			name="fm_spindisk_1624120023"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> (This is a follow up on a previous Pivot rotation post i had) Making an object&#8217;s rotation follow the mouse is easy enough, but it got a bit tricky when i wanted this rotation to be set only when i actually dragged the mouse around and not inmediatly on the [...]]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_spindisk_472365945"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/08/spindisk.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/08/spindisk.swf"
			name="fm_spindisk_472365945"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>(This is a follow up on a previous<a href="http://www.piterwilson.com/personal/2008/05/22/make-posable-puppet-in-as3-the-simple-way/"> Pivot rotation</a> post i had)</p>
<p><a href="http://www.19.5degs.com/element/215.php">Making an object&#8217;s rotation follow the mouse is easy enough</a>, but it got a bit tricky when i wanted this rotation to be set only when i actually dragged the mouse around and not inmediatly on the mouse press. It would have saved me some time to have had this example online and i hope it does that for some people.</p>
<p>This class does that when given a MovieClip as a parameter. It broadcasts a couple of nice events to let you know when the rotation starts and ends. See the source file for an example.</p>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/08/spindiskexample.zip">Download the Spin disk example (.zip 660kb)<br />
</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/08/12/spinning-a-disk-detecting-mouse-angle-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reach for the stars!</title>
		<link>http://www.piterwilson.com/personal/2008/07/22/reach-for-the-stars/</link>
		<comments>http://www.piterwilson.com/personal/2008/07/22/reach-for-the-stars/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 20:42:07 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[drawing]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=77</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_test_596777825"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/07/test.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/07/test.swf"
			name="fm_test_596777825"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> Updated this excellent example of how to draw a star to AS3 (original was 6 years old!) Download source and example]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_test_79288936"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/07/test.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/07/test.swf"
			name="fm_test_79288936"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Updated <a href="http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html" target="_blank">this excellent example of how to draw a star</a> to AS3 (original was 6 years old!)</p>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/07/stardrawingexample.zip" target="_blank">Download source and example</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/07/22/reach-for-the-stars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>make posable puppet in as3, the simple way</title>
		<link>http://www.piterwilson.com/personal/2008/05/22/make-posable-puppet-in-as3-the-simple-way/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/22/make-posable-puppet-in-as3-the-simple-way/#comments</comments>
		<pubDate>Thu, 22 May 2008 20:54:43 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=66</guid>
		<description><![CDATA[Even thou Inverse Kinematics are neat and spectacular, they are also very complex unless you are good at trigonometry. A simpler way to achieve a &#8220;posable&#8221; puppet is to make a graphic element that will rotate around a pivot point. Then, attach another graphic element to the first one that has its own pivot point [...]]]></description>
			<content:encoded><![CDATA[<p>Even thou Inverse Kinematics are neat and spectacular, they are also very complex unless you are good at trigonometry. A simpler way to achieve a &#8220;posable&#8221; puppet is to make a graphic element that will rotate around a pivot point. Then, attach another graphic element to the first one that has its own pivot point and repeat as many times as necessary.</p>
<p>Take this example:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_pivottest_470905439"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pivottest.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pivottest.swf"
			name="fm_pivottest_470905439"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pivottest.zip">source for pivottest</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/22/make-posable-puppet-in-as3-the-simple-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic as3 IK puppet skeleton (2)</title>
		<link>http://www.piterwilson.com/personal/2008/05/22/basic-as3-ik-puppet-skeleton-2/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/22/basic-as3-ik-puppet-skeleton-2/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:35:55 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[Something / Algo]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=65</guid>
		<description><![CDATA[Adding some constrains and making some points &#8220;fixed&#8221; is possible to create something close to a posable puppet. It&#8217;s also possible to store pre-set positions for later use. 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_iktestpuppet2_1304889840"
			class="flashmovie"
			width="400"
			height="350">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet2.swf"
			name="fm_iktestpuppet2_1304889840"
			width="400"
			height="350">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> source for iktestpuppet2]]></description>
			<content:encoded><![CDATA[<p>Adding some constrains and making some points &#8220;fixed&#8221; is possible to create something close to a posable puppet. It&#8217;s also possible to store pre-set positions for later use.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_iktestpuppet2_607713011"
			class="flashmovie"
			width="400"
			height="350">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet2.swf"
			name="fm_iktestpuppet2_607713011"
			width="400"
			height="350">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet2.zip">source for iktestpuppet2</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/22/basic-as3-ik-puppet-skeleton-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic as3 IK puppet skeleton</title>
		<link>http://www.piterwilson.com/personal/2008/05/21/basic-as3-ik-puppet-skeleton/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/21/basic-as3-ik-puppet-skeleton/#comments</comments>
		<pubDate>Wed, 21 May 2008 22:06:42 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=60</guid>
		<description><![CDATA[This is a basic &#8220;humanoid&#8221; puppet using the IKMember from this post. Even thou it works more or less for what i want, a lot of limitations are evident: setting different distances betweens different neighbor anchor points or making some of them static 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_iktestpuppet1_1376796207"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet1.swf"
			name="fm_iktestpuppet1_1376796207"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> source here : IKTestPuppet #1]]></description>
			<content:encoded><![CDATA[<p>This is a basic &#8220;humanoid&#8221; puppet using the IKMember <a href="http://www.piterwilson.com/personal/2008/05/20/inverse-kinematics-for-as3/">from this post</a>.</p>
<p>Even thou it works more or less for what i want, a lot of limitations are evident: setting different distances betweens different neighbor anchor points or making some of them static</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_iktestpuppet1_590810808"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet1.swf"
			name="fm_iktestpuppet1_590810808"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestpuppet1.zip">source here : IKTestPuppet #1</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/21/basic-as3-ik-puppet-skeleton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inverse Kinetimatics for as3</title>
		<link>http://www.piterwilson.com/personal/2008/05/20/inverse-kinematics-for-as3/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/20/inverse-kinematics-for-as3/#comments</comments>
		<pubDate>Tue, 20 May 2008 19:05:15 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=57</guid>
		<description><![CDATA[I&#8217;ve trying to create an animated puppet with a skeleton that i can &#8220;pose&#8221; in flash. After some research i found out that to accomplish my goal i had to use something called Inverse Kinematics. I don&#8217;t really understand the math behind it that well, but i used this tutorial made for as2 to create [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve trying to create an animated puppet with a skeleton that i can &#8220;pose&#8221; in flash. After some research i found out that to accomplish my goal i had to use something called Inverse Kinematics.</p>
<p>I don&#8217;t really understand the math behind it that well, but <a href="http://www.gotoandplay.it/_articles/2004/12/inverseKinematics.php" target="_blank">i used this tutorial</a> made for as2 to create my own IKMember class, pretty much just copying it but translated to as3. This is my first attempt at the simplest of skeleton puppets : a Snake</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_iktestsnake_1634905687"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestsnake.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iktestsnake.swf"
			name="fm_iktestsnake_1634905687"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/iksnake.zip">Here&#8217;s the source code (IKSnake.zip)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/20/inverse-kinematics-for-as3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PWButton as3 class</title>
		<link>http://www.piterwilson.com/personal/2008/05/19/pwbutton-as3-class/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/19/pwbutton-as3-class/#comments</comments>
		<pubDate>Tue, 20 May 2008 01:26:16 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=54</guid>
		<description><![CDATA[I often use MovieClips as interface buttons. I&#8217;ve put together a class to save myself some time on this task. The PWButton class takes a MovieClip and turns it into a fully functional button with some time-saving features: you can use the &#8216;data&#8217; property to store and retrieve information, such as a parameter for later [...]]]></description>
			<content:encoded><![CDATA[<p>I often use MovieClips as interface buttons. I&#8217;ve put together a class to save myself some time on this task.</p>
<p>The PWButton class takes a MovieClip and turns it into a fully functional button with some time-saving features:</p>
<ul>
<li> you can use the &#8216;data&#8217; property to store and retrieve information, such as a parameter for later use on a function</li>
<li>enable() and disable() methods, easily turn the PWButton on and off much like the SimpleButton.enabled property.</li>
<li>you can set the roll over, down, and disabled states using frames within the target movieclip.</li>
</ul>
<p>example swf:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_pwbuttonsample_2140298441"
			class="flashmovie"
			width="306"
			height="147">
	<param name="movie" value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pwbuttonsample.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pwbuttonsample.swf"
			name="fm_pwbuttonsample_2140298441"
			width="306"
			height="147">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><a href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/pwbutton.zip">PWButton.zip</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/19/pwbutton-as3-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitmapdata erasing in as3 (with custom brush shape)</title>
		<link>http://www.piterwilson.com/personal/2008/05/07/bitmapdata-erasing-in-as3-with-custom-brush-shape/</link>
		<comments>http://www.piterwilson.com/personal/2008/05/07/bitmapdata-erasing-in-as3-with-custom-brush-shape/#comments</comments>
		<pubDate>Thu, 08 May 2008 00:15:08 +0000</pubDate>
		<dc:creator>Piterwilson</dc:creator>
				<category><![CDATA[Something / Algo]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[code example / ejemplos de codigo]]></category>

		<guid isPermaLink="false">http://www.piterwilson.com/personal/?p=49</guid>
		<description><![CDATA[For a drawing program made in flash, i came across the need to erase a bitmapData object using a custom brush tip. Finally i came across this example which was exactly what i needed, except it was written for actionscript 2. I updated the script to actionscript 3, and added some extra comments that made [...]]]></description>
			<content:encoded><![CDATA[<p>For a drawing program made in flash, i came across the need to erase a bitmapData object using a custom brush tip. <a href="http://www.senocular.com/flash/source.php?id=0.175" target="_blank">Finally i came across this example</a> which was exactly what i needed, except it was written for actionscript 2.</p>
<p>I updated the script to  actionscript 3, and added some extra comments that made me understand how this worked. I hope it saves you some time if you need to do something similar. (Please forgive the roughness of the code, its just a test for learning porpouses)</p>
<p><object width="400" height="400" class="movie" data="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/07/erasetest.swf"<br />
type="application/x-shockwave-flash"><param value="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/07/erasetest.swf" name="movie" /></object></p>
<p><a title="Download fla" href="http://www.piterwilson.com/personal/wp-content/uploads/2008/05/07/erasetest.fla" target="_blank">Download erasetest.fla (552 kb)</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.piterwilson.com/personal/2008/05/07/bitmapdata-erasing-in-as3-with-custom-brush-shape/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
