<?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>Heftel Family &#187; programming</title>
	<atom:link href="http://heftelfamily.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://heftelfamily.com</link>
	<description>Ramblings about technology, music, family, and life</description>
	<lastBuildDate>Tue, 20 Dec 2011 18:40:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>3D MovieClips with Flex and ActionScript 3</title>
		<link>http://heftelfamily.com/666-3d-movieclips-with-flex-and-actionscript-3/</link>
		<comments>http://heftelfamily.com/666-3d-movieclips-with-flex-and-actionscript-3/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 10:24:19 +0000</pubDate>
		<dc:creator>Kawika Heftel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[movieclips]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://heftelfamily.com/?p=666</guid>
		<description><![CDATA[For whatever reason, tonight my brain will not shut up, even after hours of watching Hulu.  So it&#8217;s time to share some of what I learned today.  Attention, non-geeks &#8211; this will be quite a technology-heavy post.  But there will be pretty pictures.
Flash has had the ability to do 3D for quite some time now, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://heftelfamily.com/wp-content/uploads/2010/09/actionscripticon_300x300.png" rel="shadowbox[sbpost-666];player=img;"><img class="alignleft size-thumbnail wp-image-678" title="ActionScript 3" src="http://heftelfamily.com/wp-content/uploads/2010/09/actionscripticon_300x300-150x150.png" alt="ActionScript 3" width="150" height="150" /></a>For whatever reason, tonight my brain will not shut up, even after hours of watching Hulu.  So it&#8217;s time to share some of what I learned today.  Attention, non-geeks &#8211; this will be quite a technology-heavy post.  But there will be pretty pictures.</p>
<p>Flash has had the ability to do 3D for quite some time now, natively, without using any of the fancy libraries out there like <a href="http://www.papervision3d.org/" target="_blank">PaperVision3D</a>.  All you have to do is set the <strong>z</strong> property on a MovieClip.  Seriously, that&#8217;s all it takes.  And you know how you can rotate a MovieClip by setting the <strong>rotation</strong> parameter?  Now there are <strong>rotationX</strong>, <strong>rotationY</strong>, and <strong>rotationZ</strong> parameters.  Changing any of these through code will result in the MovieClip being displayed in three dimensions.  Groovy!<span id="more-666"></span></p>
<p>Here is a small example.  There are two ellipses that move back and forth in the Z axis.  They also rotate in three dimensions, one around the X axis and one around the Y axis.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="450" height="250" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="/static/flash/3d/3dellipses.swf" /><embed type="application/x-shockwave-flash" width="450" height="250" src="/static/flash/3d/3dellipses.swf"></embed></object></p>
<p>Click <a href="http://heftelfamily.com/static/flash/3d/3dellipses.fla" target="_blank">here </a>to download the source FLA for this demo.  It is a Flash CS5 file, so you must have Flash CS5 to open it.</p>
<p>Here is the source code, in case you don&#8217;t have Flash CS5.  All you need to do is add two MovieClips to the stage, one called ellipse1 and the other called ellipse2.</p>
<pre class="brush: as3; title: ;">const BACK:int = 1000;
const FRONT:int = -100;

function frameHandler(e:Event):void
{
	var mc:MovieClip = e.currentTarget as MovieClip;
	if(mc.z &amp;gt; BACK)
    {
        mc.z = BACK;
        mc.dir = -1;
    }
    else if (mc.z &amp;lt; FRONT)
    {
        mc.z = FRONT;
        mc.dir = 1;
    }
    mc.z += mc.dir * mc.moveSpeed;
	mc.rotationX += mc.rotXSpeed;
	mc.rotationY += mc.rotYSpeed;
}

ellipse1.shapeIndex = 0;
ellipse1.dir = 1;
ellipse1.rotXSpeed = 3;
ellipse1.rotYSpeed = 0;
ellipse1.moveSpeed = 10;
ellipse2.shapeIndex = 1;
ellipse2.dir = 1;
ellipse2.rotXSpeed = 0;
ellipse2.rotYSpeed = -5;
ellipse2.moveSpeed = 15;
ellipse1.addEventListener(Event.ENTER_FRAME, frameHandler);
ellipse2.addEventListener(Event.ENTER_FRAME, frameHandler);</pre>
<p>More to come in the future!  3D Flash is an exciting world to explore!</p>
<p><strong>EDIT: </strong>I realize the title of this blog post is slightly misleading.  I mentioned Flex, and the Flex part doesn&#8217;t come until the next post.  My apologies.  This example of 3D in ActionScript 3 is entirely Flash-based.</p>
]]></content:encoded>
			<wfw:commentRss>http://heftelfamily.com/666-3d-movieclips-with-flex-and-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ipod touch musings</title>
		<link>http://heftelfamily.com/190-ipod-touch-musings/</link>
		<comments>http://heftelfamily.com/190-ipod-touch-musings/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 03:11:21 +0000</pubDate>
		<dc:creator>Kawika Heftel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[touch]]></category>

		<guid isPermaLink="false">http://heftelfamily.com/190-ipod-touch-musings/</guid>
		<description><![CDATA[This is my first blog post from my iPod touch. I find that typing on the small keyboard takes longer than a normal keyboard, and the lack of tactile response makes it easier to have all sorts of weird typos. The auto-complete function works fairly well for common words and common typos, but you still [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first blog post from my iPod touch. I find that typing on the small keyboard takes longer than a normal keyboard, and the lack of tactile response makes it easier to have all sorts of weird typos. The auto-complete function works fairly well for common words and common typos, but you still have to verify that the iPod software didn&#8217;t screw you over while trying to be helpful and user-friendly. Still, the thought of posting to my blog from a handheld device is decidedly cool, and makes my inner techno-geek drool. I got bored in church today and wrote a letter to my Latvian buddy Artjom &#8211; in Cyrillic characters, from the iPod. That, I have got to admit, is cool. It even had limited auto-correct in russian! In the iPod/iPhone 3.0 software I would like to see a much better Russian dictionary for auto-complete.</p>
<p>While on the topic of the iPod, I wonder why the included safari browser doesn&#8217;t allow you to download files from the web. I mean, I have an iPod that can surf the web, and I can&#8217;t download music to it from a server I own, nor can I download pictures to it unless I email them to myself. That is quite annoying!! I haven&#8217;t checked to see if I can email myself mp3s and download them to the iPod &#8211; I&#8217;ll have to try that and get back to you.</p>
<p>All in all, though, the iPod touch is an incredible piece of hardware and software. I mean, it beats the computer I first learned to program on at the tender age of 11 in every aspect, from memory to processor to storage. Plus it connects to wi-fi, plays mp3s and video, has a touchscreen, and a better display than what I used to use in my games back then (I started programming games I&#8217;m mode X &#8211; 320 by 240 graphics, 256 colors). And did I mention it fits in the palm of my hand? We do indeed live in a marvelous world.</p>
]]></content:encoded>
			<wfw:commentRss>http://heftelfamily.com/190-ipod-touch-musings/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

