<?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>Tutorial51 &#187; Flash</title>
	<atom:link href="http://tutorial51.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://tutorial51.com</link>
	<description>The Best of Web Tutorials</description>
	<lastBuildDate>Sat, 12 Jun 2010 11:24:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Color Effects with a Custom InterpolateColorTransform AS3 Class</title>
		<link>http://tutorial51.com/2010/06/color-effects-with-a-custom-interpolatecolortransform-as3-class/</link>
		<comments>http://tutorial51.com/2010/06/color-effects-with-a-custom-interpolatecolortransform-as3-class/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:12:37 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[image effects]]></category>
		<category><![CDATA[instances]]></category>
		<category><![CDATA[InterpolateColorTransform]]></category>
		<category><![CDATA[several ways]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/color-effects-with-a-custom-interpolatecolortransform-as3-class/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/color-effects-with-a-custom-interpolatecolortransform-as3-class/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p><a href="http://ideal507.bttb1.hop.clickbank.net"><img src="http://www.bloggingtothebank.com/img/banner5.gif" width="250" height="250"></a> </p><p>We present a custom InterpolateColorTransform class and<br />
         interesting color and image effects accomplished using the methods of the class.<br />
         The methods provide several ways to smoothly transition between two<br />
         instances of ColorTransform. The methods of the custom class are more versatile<br />
         than Color.interpolateTransform method of the built-in Color class<br />
         in the fl.motion package.</p>
<p><a href="http://www.flashandmath.com/intermediate/interp/">Color Effects with a Custom InterpolateColorTransform AS3 Class</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://ideal507.bttb1.hop.clickbank.net"><img src="http://www.bloggingtothebank.com/img/banner5.gif" width="250" height="250"></a> </p><p>We present a custom InterpolateColorTransform class and<br />
         interesting color and image effects accomplished using the methods of the class.<br />
         The methods provide several ways to smoothly transition between two<br />
         instances of ColorTransform. The methods of the custom class are more versatile<br />
         than Color.interpolateTransform method of the built-in Color class<br />
         in the fl.motion package.</p>
<p><a href="http://www.flashandmath.com/intermediate/interp/">Color Effects with a Custom InterpolateColorTransform AS3 Class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/color-effects-with-a-custom-interpolatecolortransform-as3-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Tip: How to Easily Create Outlined Text in ActionScript 3</title>
		<link>http://tutorial51.com/2010/06/as3-tip-how-to-easily-create-outlined-text-in-actionscript-3/</link>
		<comments>http://tutorial51.com/2010/06/as3-tip-how-to-easily-create-outlined-text-in-actionscript-3/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:12:34 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Blur]]></category>
		<category><![CDATA[dynamic text]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[GlowFilter]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[way]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/as3-tip-how-to-easily-create-outlined-text-in-actionscript-3/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/as3-tip-how-to-easily-create-outlined-text-in-actionscript-3/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p><a href="http://ideal507.bttb1.hop.clickbank.net"><img src="http://www.bloggingtothebank.com/img/banner5.gif" width="250" height="250"></a> </p><p>The easiest way to create a dynamic text field in which all individual<br />
            characters are outlined is to apply an instance of the<br />
            GlowFilter to the text field. Simply choose low blur parameters<br />
            and large strength parameter for the GlowFilter and a color you want<br />
            for your outline. In this tip we show how to do it.</p>
<p><a href="http://www.flashandmath.com/howtos/outlinedtext/">AS3 Tip: How to Easily Create Outlined Text in ActionScript 3</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The easiest way to create a dynamic text field in which all individual<br />
            characters are outlined is to apply an instance of the<br />
            GlowFilter to the text field. Simply choose low blur parameters<br />
            and large strength parameter for the GlowFilter and a color you want<br />
            for your outline. In this tip we show how to do it.</p>
<p><a href="http://www.flashandmath.com/howtos/outlinedtext/">AS3 Tip: How to Easily Create Outlined Text in ActionScript 3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/as3-tip-how-to-easily-create-outlined-text-in-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gotoAndSki();</title>
		<link>http://tutorial51.com/2010/06/gotoandski/</link>
		<comments>http://tutorial51.com/2010/06/gotoandski/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:12:29 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[end]]></category>
		<category><![CDATA[flash player 10]]></category>
		<category><![CDATA[flash user]]></category>
		<category><![CDATA[high altitude]]></category>
		<category><![CDATA[highest mountain]]></category>
		<category><![CDATA[northern Europe]]></category>
		<category><![CDATA[season]]></category>
		<category><![CDATA[ski]]></category>
		<category><![CDATA[ski season]]></category>
		<category><![CDATA[Want]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/gotoandski/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/gotoandski/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p>Did the ski season end too early? Want to go hiking on northern Europe&#8217;s highest mountain? Want to learn the latest about Flash Player 10.1 and Android? Flash User Group Norway puts on a FlashCamp offering some serious high altitude Flashing 11-13th June.</p>
<p><a href="http://www.flashmagazine.com/news/detail/gotoandski/">gotoAndSki();</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Did the ski season end too early? Want to go hiking on northern Europe&#8217;s highest mountain? Want to learn the latest about Flash Player 10.1 and Android? Flash User Group Norway puts on a FlashCamp offering some serious high altitude Flashing 11-13th June.</p>
<p><a href="http://www.flashmagazine.com/news/detail/gotoandski/">gotoAndSki();</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/gotoandski/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-Mania 2010 (2M10)</title>
		<link>http://tutorial51.com/2010/06/multi-mania-2010-2m10/</link>
		<comments>http://tutorial51.com/2010/06/multi-mania-2010-2m10/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:12:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Day]]></category>
		<category><![CDATA[Europe]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[flash events]]></category>
		<category><![CDATA[free flash]]></category>
		<category><![CDATA[free workshops]]></category>
		<category><![CDATA[half day]]></category>
		<category><![CDATA[kortrijk belgium]]></category>
		<category><![CDATA[Mania]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/multi-mania-2010-2m10/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/multi-mania-2010-2m10/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p>On May 10th and 11th, Multi-Mania in Kortrijk, Belgium opened it&#8217;s doors for the 10th time. From it&#8217;s start as &#8220;MultiMediaMadness&#8221;, the event has grown from an awards show to a solid conference. Koen De Weggheleire is known to many as a speaker at international Flash conferences, but he is also the organizer of Multi-Mania, one of Europe&#8217;s largest free Flash events. The event has always been free of charge and this year even offered free workshops the day before of the conference. The half day workshops featured Branden Hall on the HYPE Framework and of course a lot of CS5-topics.</p>
<p><a href="http://www.flashmagazine.com/community/detail/multi-mania_2010_2m10/">Multi-Mania 2010 (2M10)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>On May 10th and 11th, Multi-Mania in Kortrijk, Belgium opened it&#8217;s doors for the 10th time. From it&#8217;s start as &#8220;MultiMediaMadness&#8221;, the event has grown from an awards show to a solid conference. Koen De Weggheleire is known to many as a speaker at international Flash conferences, but he is also the organizer of Multi-Mania, one of Europe&#8217;s largest free Flash events. The event has always been free of charge and this year even offered free workshops the day before of the conference. The half day workshops featured Branden Hall on the HYPE Framework and of course a lot of CS5-topics.</p>
<p><a href="http://www.flashmagazine.com/community/detail/multi-mania_2010_2m10/">Multi-Mania 2010 (2M10)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/multi-mania-2010-2m10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy a Tank on a Mission in an Isometric War Zone</title>
		<link>http://tutorial51.com/2010/06/deploy-a-tank-on-a-mission-in-an-isometric-war-zone/</link>
		<comments>http://tutorial51.com/2010/06/deploy-a-tank-on-a-mission-in-an-isometric-war-zone/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:12:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[angle]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[game class]]></category>
		<category><![CDATA[little tank]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[need tank]]></category>
		<category><![CDATA[parallel projection]]></category>
		<category><![CDATA[tank]]></category>
		<category><![CDATA[tank body]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/deploy-a-tank-on-a-mission-in-an-isometric-war-zone/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/deploy-a-tank-on-a-mission-in-an-isometric-war-zone/"><img align="left" hspace="5" width="150" src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/fc169_icon_smile.gif" class="alignleft wp-post-image tfe" alt=":)" title="" /></a><p>In this lesson we&#8217;re going to create a little tank moving application. The core of this particular tutorial is to make a tank aim at the the mouse pointer and drive towards a mouse click.</p>
<p><span></span></p>

<h2>Final Result Preview</h2>
<p>Let&#8217;s take a look at the final result we will be working towards:</p>
<div>
<p>Move the mouse to make the turret aim at it, and click anywhere to get the tank to drive to that point.</p>
</div>
<h2><span>Step 1:</span> Graphics Intro</h2>
<p>Well, let&#8217;s get started.. For this tutorial we&#8217;ll need tank and turret graphics. I used <a href="http://sketchup.google.com/product/gsu.html" target="_blank">Google SketchUp 7</a> to make mine.</p>
<p>First I created a tank as a whole. Then I turned the program&#8217;s view mode to &#8220;parallel projection&#8221;, positioning my camera at a 45&#176; angle to the tank to make an illusion of isometrics in the game.</p>
<p>Please, don&#8217;t judge me for horrible graphics, I really can do much better but this is just for the sake of explanation <img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/fc169_icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4e753_1.jpg" alt="" /></div>
<p>Then I hid the turret leaving only the tank body visible and rotated the body by 45&#176; eight times, rendering each position separately. So I achieved 8 different views of the body. I did the same thing to the turret while the tank was hidden. I saved all 16 pics as PNG 24 with alpha channel. You can see the final result below. (This is not actually enough for this kind of movement, it would be better to have twice as many views of the tank but it&#8217;s enough for the purposes of this tutorial.)</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4e753_2.jpg" alt="" /></div>
<p>.  </p>
<p>You don&#8217;t necessarily need to use Google SketchUp of course, you may wanna use 3ds max or Maya or whatever you like, you may also use my graphics to practice if you don&#8217;t want to or cannot create your own graphics.  </p>
<h2><span>Step 2:</span> New Flash Project</h2>
<p>Now open up Flash (I use Adobe Flash CS4) and choose Create New Flash File (Actionscript 3.0). We will only need it to make a tank MovieClip and to connect the Game class to it later.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_3.jpg" alt="" /></div>
<p>.  </p>
<h2><span>Step 3:</span> Set the Document Properties</h2>
<p> Right-click the stage and go to the Document Properties item. Make it 600 x 400 (or whatever you like) and 21 frames per second (this frame rate seems to be optimal to me so I almost always use it. It doesn&#8217;t really matter, though). </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_4.jpg" alt="" /></div>
<p>Click OK. Go to <em>File > Save as</em> and save this file as tank.fla in some folder on your computer (I recommend you create a Tank folder and put the file&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>In this lesson we&#8217;re going to create a little tank moving application. The core of this particular tutorial is to make a tank aim at the the mouse pointer and drive towards a mouse click.</p>
<p><span></span></p>
<hr/>
<h2>Final Result Preview</h2>
<p>Let&#8217;s take a look at the final result we will be working towards:</p>
<div>
<p>Move the mouse to make the turret aim at it, and click anywhere to get the tank to drive to that point.</p>
</div>
<h2><span>Step 1:</span> Graphics Intro</h2>
<p>Well, let&#8217;s get started.. For this tutorial we&#8217;ll need tank and turret graphics. I used <a href="http://sketchup.google.com/product/gsu.html" target="_blank">Google SketchUp 7</a> to make mine.</p>
<p>First I created a tank as a whole. Then I turned the program&#8217;s view mode to &#8220;parallel projection&#8221;, positioning my camera at a 45&deg; angle to the tank to make an illusion of isometrics in the game.</p>
<p>Please, don&#8217;t judge me for horrible graphics, I really can do much better but this is just for the sake of explanation <img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/fc169_icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4e753_1.jpg" alt="" /></div>
<p>Then I hid the turret leaving only the tank body visible and rotated the body by 45&deg; eight times, rendering each position separately. So I achieved 8 different views of the body. I did the same thing to the turret while the tank was hidden. I saved all 16 pics as PNG 24 with alpha channel. You can see the final result below. (This is not actually enough for this kind of movement, it would be better to have twice as many views of the tank but it&#8217;s enough for the purposes of this tutorial.)</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4e753_2.jpg" alt="" /></div>
<p>.  </p>
<p>You don&#8217;t necessarily need to use Google SketchUp of course, you may wanna use 3ds max or Maya or whatever you like, you may also use my graphics to practice if you don&#8217;t want to or cannot create your own graphics.  </p>
<h2><span>Step 2:</span> New Flash Project</h2>
<p>Now open up Flash (I use Adobe Flash CS4) and choose Create New Flash File (Actionscript 3.0). We will only need it to make a tank MovieClip and to connect the Game class to it later.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_3.jpg" alt="" /></div>
<p>.  </p>
<h2><span>Step 3:</span> Set the Document Properties</h2>
<p> Right-click the stage and go to the Document Properties item. Make it 600 x 400 (or whatever you like) and 21 frames per second (this frame rate seems to be optimal to me so I almost always use it. It doesn&#8217;t really matter, though). </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_4.jpg" alt="" /></div>
<p>Click OK. Go to <em>File > Save as</em> and save this file as tank.fla in some folder on your computer (I recommend you create a Tank folder and put the file inside). </p>
<h2><span>Step 4:</span> Import Your Tank Images to Library</h2>
<p>Now go to <em>File > Import > Import to library</em>. Find the folder where you saved your eight tank images, select them all and import to library.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_5.jpg" alt="" /></div>
<p>.  </p>
<h2><span>Step 5:</span> New Symbol</h2>
<p>Create a new empty symbol by clicking this little icon in the library:</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/0f160_6.jpg" alt="" /></div>
<p>Choose MovieClip type and call the symbol &#8220;tank&#8221;. Put the registration point in the center (the registration point is that tiny black square in that grid of white squares, for those who don&#8217;t know).</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4523d_7.jpg" alt="" /></div>
<h2><span>Step 6:</span> Edit the Symbol</h2>
<p>After the symbol is created it appears in the library (its name &#8220;tank&#8221; is just a cosmetic name which is used solely in the library so it doesn&#8217;t matter what you call it). Open it by double-clicking its icon. Then take 1.png from the library and drag it onto the symbol&#8217;s stage. Align the image to the symbol&#8217;s registration point like in this screenshot:</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4523d_8.jpg" alt="" /></div>
<p>You want the registration point to be in the center of the tank&#8217;s turning circle.</p>
<h2><span>Step 7:</span> Create Seven Blank Key Frames</h2>
<p>Go to the symbol&#8217;s timeline. Rename the &#8220;Layer 1&#8243; to &#8220;Tank&#8221;. Your tank&#8217;s body image (1.png) should be on the first frame of this layer. Click the second frame and without releasing your mouse button drag the cursor to the 8th frame selecting frames 2 through 8. Then right-click this selected area and choose &#8220;Convert to blank keyframes&#8221;.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/4523d_9.jpg" alt="" /></div>
<h2><span>Step 8:</span> Drag All Images Onto the Stage</h2>
<p>
When 7 blank key frames are created, select the second frame and drag 2.png to it aligning the image with the registration point (just like you did with 1.png); imagining that the registration point is an axis that the tank will use to spin around when it&#8217;s turning. Do the same to the rest of the frames. You don&#8217;t have to align it very precisely, but the more precisely you align it the better the movement will look when the tank tries to follow the cursor as the game runs.
</p>
<h2><span>Step 9:</span> Prevent the Timeline from Playing</h2>
<p>
After you dragged every image to the symbol&#8217;s stage and aligned them select the first frame and push F9 to open the actions panel. Type a single method &#8220;stop();&#8221; in it and close the panel. This is an important step because we don&#8217;t want our tank to automatically start spinning around as soon as it&#8217;s added to the stage. </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/890ee_10.jpg" alt="" /></div>
<h2><span>Step 10:</span> Create a Turret MovieClip</h2>
<p> Go to the library and create a new MovieClip symbol. Call it <em>turret</em>. Double-click the symbol&#8217;s icon and do the same you did with the tank MovieClip (Steps 4. through 8.) to the turret but using turret images. Align it to the registration point this way, at the point around which the turret would naturally turn:</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/890ee_11.jpg" alt="" /></div>
<p><em>Notice that I&#8217;ve named the turret images like this: 1-.png, 2-.png and so on, so that they wouldn&#8217;t replace the tank images when imported to library. You may want to use folders to put your images into. In this case your turret and tank images may have the same names.</em></p>
<h2><span>Step 11:</span> Assembling the Tank</h2>
<p>After we&#8217;ve finished with turret symbol, open up the tank symbol again, create a new layer above the &#8220;Tank&#8221; layer and drag the turret movie clip from the library onto this layer. Align the turret with the tank body. The result should look like this: </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/890ee_12.jpg" alt="" /></div>
<h2><span>Step 12:</span> Give the Turret an Instance Name</h2>
<p>Click once on the turret to select it (blue rectangle around it will indicate that it&#8217;s selected):</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/2f500_13.jpg" alt="" /></div>
<p>&#8230;then go to properties and give it and instance name mTurret (for MovieClip turret):</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/2f500_14.jpg" alt="" /></div>
<p>Click &#8220;Scene 1&#8243; link to exit symbol editing mode.</p>
<h2><span>Step 13:</span> Export Your Tank for ActionScript</h2>
<p>Right-click the tank symbol in the library, choose Properties (or Linkage if you&#8217;re using Flash CS3) from the dropdown menu (make sure you&#8217;re in an Advanced mode), check &#8220;Export for Actionscript&#8221;, and for the class&#8217; name type in &#8220;Tank&#8221; (with capital T). This step will allow us to connect our Tank MovieClip to the instances created using our Tank class in future.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/2f500_15.jpg" alt="" /></div>
<p>The graphics part is over for now; you may delete the tank from the stage. We&#8217;ll add it programmatically later.</p>
<h2><span>Step 14:</span> Create a New ActionScript File</h2>
<p>In your Flash Authoring tool go to <em>File > New</em> and create a new ActionScript file. </p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/2f500_16.jpg" alt="" /></div>
<h2><span>Step 15:</span> Save Your File</h2>
<p>Go to the folder where you saved your tank.fla file and create a new folder called &#8220;main&#8221; inside. Save your ActionScript file in this folder as <em>TankMaker.as</em>. The location of this file should therefore be: tank/main/TankMaker.as </p>
<h2><span>Step 16:</span> Let&#8217;s Write Some Code</h2>
<p>First of all, create a package and import the necessary classes into it:</p>
<pre>

package main {	

	import flash.display.*;
	import flash.events.*;

}
</pre>
<p>The word &#8220;main&#8221; here means the location of this file relative to our tank.fla</p>
<p>We will need &#8220;display&#8221; classes to show our assets on the screen and &#8220;events&#8221; to keep track of the mouse events.</p>
</p>
<h2><span>Step 17:</span> Public Class and Variables</h2>
<p>Now we have to declare a public class TankMaker (according to the Actionscript file&#8217;s name) and the necessary variables:</p>
<pre>
package main {

	import flash.display.*;
	import flash.events.*;

	public class TankMaker extends Sprite {

		// the instance of our Tank class (which we exported for actionscript before)
		private var tank:Tank;

		// the vars to keep the coordinates of the point where we want our tank to move
		private var moveTankToX:Number;
		private var moveTankToY:Number;

		// coordinates of the point at which the tank aims its turret
		private var turnTurretToX:Number;
		private var turnTurretToY:Number;

		// current position of the tank
		private var currentTankPositionX:Number;
		private var currentTankPositionY:Number;

		private var tankSpeed:Number = 2;

		// the point at which the tank moves after a mouse click
		private var clickPoint:Object;

		// the angle of tank and turret rotation in radians
		private var Atan2:Number;
		private var turretAtan2:Number;
	}
}
</pre>
<p>I declared all of the variables as &#8220;private&#8221; because I don&#8217;t want them to be accessible from anywhere outside this class.</p>
<h2><span>Step 18:</span> Create a Constructor Method</h2>
<p>Directly below the last variable create a public function and call it TankMaker. It&#8217;s going to be the constructor of the class. Then add an event listener for Event.ADDED_TO_STAGE to it so that we can create our tank object only after the stage is. Then pass this event to the method called addStage.</p>
<pre>
public function TankMaker() {

	addEventListener(Event.ADDED_TO_STAGE, addStage);

}
</pre>
<h2><span>Step 19:</span> Create a Tank Instance</h2>
<p>After the stage is created and the ADDED_TO_STAGE event has triggered the addStage() method it&#8217;s about time to create a tank instance.</p>
<p>Declare a private function and call it addStage. The data type of the function will be: Event. And the return type will be &#8220;void&#8221; because we&#8217;re not going to return anything from it.</p>
<pre>
private function addStage (e:Event):void {

	//create a new tank instance of the movie clip
	// which you had exported for actionscript
	tank = new Tank();

	// now a little trick, I scaled my tank down
	// to the size of about one fourth of its original size
	// so that is wasn't so huge
	tank.scaleX = 0.25;
	tank.scaleY = 0.25;

	// set the initial position of the tank right
	// in the center of the stage
	tank.x = stage.stageWidth / 2;
	tank.y = stage.stageHeight / 2;
	// and add it to the display list
	addChild(tank);

	// now add event listeners for mouse down and mouse move
	// events to the stage
	stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener);
	stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);

}
</pre>
</p>
<h2><span>Step 20:</span> Handling Mouse Movements</h2>
<p>Create a private function mouseMoveListener() with a data type of mouse event to handle mouse movements across the stage. The event listener to trigger this function was created in the last Step.</p>
<pre>
private function mouseMoveListener(e:MouseEvent):void {

	// create a variable to keep the relative angle
	// between mouse's current position in degrees
	// and the tank's current position
	var angle:Number;

	// the next 2 variables are gonna be
	// equal to the the mouse's current position
	turnTurretToX = e.stageX;
	turnTurretToY = e.stageY;

	// calculate the relative angle in radians
	// between the mouse's curent position
	// and the tank's current position

	turretAtan2 = Math.atan2(turnTurretToY - currentTankPositionY, turnTurretToX - currentTankPositionX);

	// calculate the same angle in degrees.
	// to get degrees out of radians we have to
	// multiply radians by 180 and divide the result by PI
	// But here are some specifics of Flash
	// it calculates the angle not from 0 thru 360
	// but from 0 thru 180 and from - 180 thru 0

	// so let's add some conditional to get rid of this problem
	if (Math.round(turretAtan2 * 180 / Math.PI) &lt; 0) {
		// if angle is between 0 and -180 add 360 to it
		angle = Math.round(turretAtan2 * 180 / Math.PI) + 360;
	} else {
		// if not, calculate it as usual
		angle = Math.round(turretAtan2 * 180 / Math.PI);
	}

	// having our angle value stored in a variable
	// let's rotate our turret towards the mouse pointer

	// I've done a lot of calculations trying to
	// figure it all out, so you may try to undestand my logic

	// I'm just picking the right frame of the turret MC depending
	// on the angle of the mouse from the turret

	if (angle &gt; 240 &amp;&amp; angle &lt; 300) {
		// go inside the tank MovieClip then inside mTurret
		// go to the frame 1 and stop
		tank.mTurret.gotoAndStop(1);
	}
	if (angle &gt; 300 &amp;&amp; angle &lt; 340) {
		tank.mTurret.gotoAndStop(2);
	}
	if ((angle &gt;= 0 &amp;&amp; angle &lt; 20) || (angle &gt; 340 &amp;&amp; angle &lt;= 360)) {
		tank.mTurret.gotoAndStop(3);
	}
	if (angle &gt; 20 &amp;&amp; angle &lt; 60) {
		tank.mTurret.gotoAndStop(4);
	}
	if (angle &gt; 60 &amp;&amp; angle &lt; 120) {
		tank.mTurret.gotoAndStop(5);
	}
	if (angle &gt; 120 &amp;&amp; angle &lt; 160) {
		tank.mTurret.gotoAndStop(6);
	}
	if (angle &gt; 160 &amp;&amp; angle &lt; 200) {
		tank.mTurret.gotoAndStop(7);;
	}
	if (angle &gt; 200 &amp;&amp; angle &lt; 240) {
		tank.mTurret.gotoAndStop(8);
	} // end

}
</pre>
</p>
<h2><span>Step 21:</span> Mouse Click Handler</h2>
<p>Below the end of our mouseMoveListener() function create a private function called mouseDownListener() with data type of MouseEvent and pass it to the moveTankOnEnterFrame method:</p>
<pre>
private function mouseDownListener(e:MouseEvent):void {

	// when click occurs assign the next variable
	// the coordinates of the mouse pointer's current position
	moveTankToX = e.stageX;
	moveTankToY = e.stageY;
	// and add event listener to move the tank frame by frame
	addEventListener(Event.ENTER_FRAME, moveTankOnEnterFrame);

}
</pre>
<h2><span>Step 22:</span> Move Tank Frame By Frame</h2>
<p>Create a new private function called moveTankOnEnterFrame() and inside it call a method moveToCoordinates() with 3 parameters:</p>
<pre>
private function moveTankOnEnterFrame(e:Event) {
	moveToCoordinates(tank, moveTankToX, moveTankToY);
}
</pre>
<p>This will, eventually, cause the tank to drive towards the clicked point, every frame.</p>
<h2><span>Step 23:</span> Teach the Tank To Move</h2>
<p>Now we have called moveToCoordinates() method but we haven&#8217;t created it yet. Let&#8217;s do that now.</p>
<p>The tX and tY won&#8217;t be used but we must create as many parameters as we called. This is how it looks:</p>
<pre>
private function moveToCoordinates(tank_mc:Tank, tX:Number, tY:Number) {

	// create a variable to keep the relative angle
	// between mouse's current position in degrees
	// and the tank's current position
	// this variable exists only inside this function so
	// you we can use the same name as we used before
	var angle:Number; 

	// calculate the angle (remember moveMouseListener?
	// we do the same here but with the tank itself)
	if (Math.round(Atan2 * 180 / Math.PI) &lt; 0) {
		angle = Math.round(Atan2 * 180 / Math.PI) + 360;
	} else {
		angle = Math.round(Atan2 * 180 / Math.PI);
	}

	if (angle &gt; 240 &amp;&amp; angle &lt; 300) {
		tank.gotoAndStop(1);
	}
	if (angle &gt; 300 &amp;&amp; angle &lt; 340) {
		tank.gotoAndStop(2);
	}
	if ((angle &gt;= 0 &amp;&amp; angle &lt; 20) || (angle &gt; 340 &amp;&amp; angle &lt;= 360)) {
		tank.gotoAndStop(3);
	}
	if (angle &gt; 20 &amp;&amp; angle &lt; 60) {
		tank.gotoAndStop(4);
	}
	if (angle &gt; 60 &amp;&amp; angle &lt; 120) {
		tank.gotoAndStop(5);
	}
	if (angle &gt; 120 &amp;&amp; angle &lt; 160) {
		tank.gotoAndStop(6);
	}
	if (angle &gt; 160 &amp;&amp; angle &lt; 200) {
		tank.gotoAndStop(7);
	}
	if (angle &gt; 200 &amp;&amp; angle &lt; 240) {
		tank.gotoAndStop(8);
	}

	// give the clickPoint a value of a current mouse position
	// when a click occurs
	clickPoint = {x:moveTankToX, y:moveTankToY};

	// calculate the angle in radians between the pointer's
	// current position and tank
	Atan2 = Math.atan2(clickPoint.y - tank_mc.y, clickPoint.x - tank_mc.x);

	// now add a value of Atan2 cosine to the tank's X position
	// and sine to its Y position every frame
	tank_mc.x += Math.cos(Atan2) * tankSpeed;
	tank_mc.y += Math.sin(Atan2) * tankSpeed;

	// now give the values to currentTankPositionX and
	// currentTankPositionY which we used in our mouseMoveListener
	currentTankPositionX = tank_mc.x;
	currentTankPositionY = tank_mc.y;

	// and finally a little trick. Since we don't want our tank to
	// start chaotically vibrating when it reaches its destination
	// we must calculate the distance between the tank's position and
	// the click point, and if it's less than 15, remove the ENTER_FRAME listener
	if (Math.abs(tank_mc.x - clickPoint.x) &lt; 15 &amp;&amp; Math.abs(tank_mc.y - clickPoint.y) &lt; 15) {
		removeEventListener(Event.ENTER_FRAME,moveTankOnEnterFrame);
	}
}
</pre>
<p>Why use a distance of 15? Well, I found out that it never goes beyond 15 by simply tracing it like this:</p>
<pre>
trace(Math.abs(tank_mc.x - clickPoint.x));
</pre>
<p>&#8230;you can do the same if you want <img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/2f500_icon_wink.gif" alt=";)" class="wp-smiley" /> </p>
<h2><span>Step 24:</span> Overviewing The Whole Class</h2>
<p>As our class is ready, let&#8217;s take a look at it as a whole:</p>
<pre>
package main {

	import flash.display.*;
	import flash.events.*;

	public class TankMaker extends Sprite {

		private var tank:Tank;

		private var moveTankToX:Number;
		private var moveTankToY:Number;

		private var turnTurretToX:Number;
		private var turnTurretToY:Number;
		private var currentTankPositionX:Number;
		private var currentTankPositionY:Number;

		private var tankSpeed:Number = 2;

		private var clickPoint:Object;

		private var Atan2:Number;
		private var turretAtan2:Number;

		public function TankMaker() {

			addEventListener(Event.ADDED_TO_STAGE, addStage);

		}

		private function addStage (e:Event):void {

			tank = new Tank();
			tank.scaleX = 0.25;
			tank.scaleY = 0.25;
			tank.x = stage.stageWidth / 2;
			tank.y = stage.stageHeight / 2;
			addChild(tank);

			stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener);
			stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);

		}

		private function mouseMoveListener(e:MouseEvent):void {

			var angle:Number;

			turnTurretToX = e.stageX;
			turnTurretToY = e.stageY;

			turretAtan2 = Math.atan2(turnTurretToY - currentTankPositionY, turnTurretToX - currentTankPositionX);

			if (Math.round(turretAtan2 * 180 / Math.PI) &lt; 0) {
				angle = Math.round(turretAtan2 * 180 / Math.PI) + 360;
			} else {
				angle = Math.round(turretAtan2 * 180 / Math.PI);
			}

			if (angle &gt; 240 &amp;&amp; angle &lt; 300) {
				tank.mTurret.gotoAndStop(1);
			}
			if (angle &gt; 300 &amp;&amp; angle &lt; 340) {
				tank.mTurret.gotoAndStop(2);
			}
			if ((angle &gt;= 0 &amp;&amp; angle &lt; 20) || (angle &gt; 340 &amp;&amp; angle &lt;= 360)) {
				tank.mTurret.gotoAndStop(3);
			}
			if (angle &gt; 20 &amp;&amp; angle &lt; 60) {
				tank.mTurret.gotoAndStop(4);
			}
			if (angle &gt; 60 &amp;&amp; angle &lt; 120) {
				tank.mTurret.gotoAndStop(5);
			}
			if (angle &gt; 120 &amp;&amp; angle &lt; 160) {
				tank.mTurret.gotoAndStop(6);
			}
			if (angle &gt; 160 &amp;&amp; angle &lt; 200) {
				tank.mTurret.gotoAndStop(7);;
			}
			if (angle &gt; 200 &amp;&amp; angle &lt; 240) {
				tank.mTurret.gotoAndStop(8);
			} 

		}

		private function mouseDownListener(e:MouseEvent):void {

			moveTankToX = e.stageX;
			moveTankToY = e.stageY;
			addEventListener(Event.ENTER_FRAME,moveTankOnEnterFrame);

		}

		private function moveTankOnEnterFrame(e:Event) {

			moveToCoordinates(tank, moveTankToX, moveTankToY);
		}

		private function moveToCoordinates(tank_mc:Tank, tX:Number, tY:Number) {

			var angle:Number; 

			if (Math.round(Atan2 * 180 / Math.PI) &lt; 0) {
				angle = Math.round(Atan2 * 180 / Math.PI) + 360;
			} else {
				angle = Math.round(Atan2 * 180 / Math.PI);
			}

			if (angle &gt; 240 &amp;&amp; angle &lt; 300) {
				tank.gotoAndStop(1);
			}
			if (angle &gt; 300 &amp;&amp; angle &lt; 340) {
				tank.gotoAndStop(2);
			}
			if ((angle &gt;= 0 &amp;&amp; angle &lt; 20) || (angle &gt; 340 &amp;&amp; angle &lt;= 360)) {
				tank.gotoAndStop(3);
			}
			if (angle &gt; 20 &amp;&amp; angle &lt; 60) {
				tank.gotoAndStop(4);
			}
			if (angle &gt; 60 &amp;&amp; angle &lt; 120) {
				tank.gotoAndStop(5);
			}
			if (angle &gt; 120 &amp;&amp; angle &lt; 160) {
				tank.gotoAndStop(6);
			}
			if (angle &gt; 160 &amp;&amp; angle &lt; 200) {
				tank.gotoAndStop(7);
			}
			if (angle &gt; 200 &amp;&amp; angle &lt; 240) {
				tank.gotoAndStop(8);
			}

			clickPoint = {x:moveTankToX, y:moveTankToY};
			Atan2 = Math.atan2(clickPoint.y - tank_mc.y, clickPoint.x - tank_mc.x);

			tank_mc.x += Math.cos(Atan2) * tankSpeed;
			tank_mc.y += Math.sin(Atan2) * tankSpeed;

			currentTankPositionX = tank_mc.x;
			currentTankPositionY = tank_mc.y;

			if (Math.abs(tank_mc.x - clickPoint.x) &lt; 15 &amp;&amp; Math.abs(tank_mc.y - clickPoint.y) &lt; 15) {

				removeEventListener(Event.ENTER_FRAME,moveTankOnEnterFrame);
			}
		}
	}
}
</pre>
<h2><span>Step 25:</span> Final Strokes</h2>
<p>Go to <em>File > New</em>, and create a new ActionScript file. Save it as &#8220;Game.as&#8221; in the same folder as your tank.fla file. This will be our <a href="http://active.tutsplus.com/tutorials/actionscript/quick-tip-how-to-use-a-document-class-in-flash/">document class</a>.</p>
<p>Here&#8217;s the code for Game.as class:</p>
<pre>
package {

	import flash.display.*;
    // import the contents of our main folder
	import main.*;

	public class Game extends MovieClip {

		private var newTank:TankMaker;

		public function Game () {

            // create a new instance of our tank maker class
			newTank = new TankMaker();
            // and add it to the stage of course
			addChild(newTank);
		}
	}
}
</pre>
<p>Save the file. All it does is create a tank and add it to the main stage, ready to control.</p>
<h2><span>Step 26:</span> Attach Game Class to the FLA</h2>
<p>Open up tank.fla and go to the Properties panel. For Class type in &#8220;Game&#8221; and save the file.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_17.jpg" alt="" /></div>
<p>Aha! There we go. You can now press CTRL + ENTER on PC (CMD + RETURN on Mac) and test the Game.</p>
<p>I hope you enjoyed this tutorial, thanks for reading <img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/fc169_icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<div>
<a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:yIl2AUoC8zA"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:D7DqB2pKExk"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?i=OOXZmMXoxfw:lvH05YGZeYw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:gIN9vFwOqvQ"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?i=OOXZmMXoxfw:lvH05YGZeYw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:qj6IDK7rITs"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:V_sGLiPBpWU"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?i=OOXZmMXoxfw:lvH05YGZeYw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=OOXZmMXoxfw:lvH05YGZeYw:F7zBnMyn0Lo"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_Flashtuts?i=OOXZmMXoxfw:lvH05YGZeYw:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/c2e9e_OOXZmMXoxfw" height="1" width="1" /></p>
<p><a href="http://feedproxy.google.com/~r/Flashtuts/~3/OOXZmMXoxfw/">Deploy a Tank on a Mission in an Isometric War Zone</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/deploy-a-tank-on-a-mission-in-an-isometric-war-zone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get User IP Address Using PHP and ActionScript 3</title>
		<link>http://tutorial51.com/2010/06/get-user-ip-address-using-php-and-actionscript-3/</link>
		<comments>http://tutorial51.com/2010/06/get-user-ip-address-using-php-and-actionscript-3/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:11:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[internet protocol address]]></category>
		<category><![CDATA[oval tool]]></category>
		<category><![CDATA[radial gradient]]></category>
		<category><![CDATA[rectangle tool]]></category>
		<category><![CDATA[stage size]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/get-user-ip-address-using-php-and-actionscript-3/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/get-user-ip-address-using-php-and-actionscript-3/"><img align="left" hspace="5" width="150" src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_1.jpg" class="alignleft wp-post-image tfe" alt="" title="" /></a><p>An Internet Protocol Address (IP Address), is a unique number assigned to every device connected to the Internet. For different reasons, it can be useful to get the user IP address, like blocking a spammer user in a chat application for example. In this tutorial, I will show you how to get and display the user&#8217;s IP address using PHP and ActionScript.</p>
<p><span></span></p>

<h2>Final Result Preview</h2>
<p>Let&#8217;s take a look at the final result we will be working towards:</p>
<div>
<p>Note: this SWF is just to show the interface, it won&#8217;t show the actual IP because it isn&#8217;t connected to a PHP server.</p>
</div>
<p>The PHP script and SWF you create in this tutorial can certainly be used together to display the user&#8217;s actual IP address.</p>

<h2><span>Step 1:</span> Brief Overview</h2>
<p>You&#8217;ll learn how to write and use php code to retrieve data generated from the server using ActionScript 3 and then use that data in your application.</p>

<h2><span>Step 2:</span> Set Up Your Flash File</h2>
<p>Launch Flash  and create a new  document. Set the stage size to 540&#215;300px and the frame rate to 24fps.</p>
<div>
<img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_1.jpg" alt="" />
</div>

<h2><span>Step 3:</span> Interface</h2>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_2.jpg" alt="" /></div>
<p>This is the interface we&#8217;ll use: a simple background, a button to call the function that will get the data and some TextFields to display the data obtained from the web server.</p>
<p>Continue to the next steps to see how it&#8217;s made.</p>

<h2><span>Step 4:</span> Background</h2>
<p>Select the Rectangle Tool (R), create a 540px wide, 300px high rectangle and fill it with this radial gradient #424A57, #232730. Center the rectangle to fit the stage.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_3.jpg" alt="" /></div>

<h2><span>Step 5:</span> Action Button</h2>
<p>A button will be used to call the function that will read the PHP file from the web server.</p>
<p>Use the Oval Tool (O) to create a 64&#215;64px #EEEEEE circle, and center it on the stage.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_4.jpg" alt="" /></div>
<p>To create the arrow in the middle we&#8217;ll make use of the PolyStar Tool (click and hold the Rectangle Tool button and a context menu will appear where you can select the tool), with the tool selected, go to the Properties Panel and click the Options button.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_5.jpg" alt="" /></div>
<p>Set the Number of Sides to 3 and click OK.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_6.jpg" alt="" /></div>
<p>Create a 35&#215;19px Triangle and using the Rectangle Tool (R) draw a 19&#215;18px rectangle. Align them to form an arrow.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_7.jpg" alt="" /></div>
<p>Fill the arrow with a different color, place it in the center of the circle and Break them Apart (Cmd+B) this will cut the arrow shape in the circle.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_8.jpg" alt="" /></div>
<p>Convert the shape to a Button and name it <em>getButton</em>.</p>

<h2><span>Step 6:</span> TextFields</h2>
<p>Select the Text Tool (T) and create a dynamic textfield, this is the format&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>An Internet Protocol Address (IP Address), is a unique number assigned to every device connected to the Internet. For different reasons, it can be useful to get the user IP address, like blocking a spammer user in a chat application for example. In this tutorial, I will show you how to get and display the user&#8217;s IP address using PHP and ActionScript.</p>
<p><span></span></p>
<hr/>
<h2>Final Result Preview</h2>
<p>Let&#8217;s take a look at the final result we will be working towards:</p>
<div>
<p>Note: this SWF is just to show the interface, it won&#8217;t show the actual IP because it isn&#8217;t connected to a PHP server.</p>
</div>
<p>The PHP script and SWF you create in this tutorial can certainly be used together to display the user&#8217;s actual IP address.</p>
<hr/>
<h2><span>Step 1:</span> Brief Overview</h2>
<p>You&#8217;ll learn how to write and use php code to retrieve data generated from the server using ActionScript 3 and then use that data in your application.</p>
<hr/>
<h2><span>Step 2:</span> Set Up Your Flash File</h2>
<p>Launch Flash  and create a new  document. Set the stage size to 540&#215;300px and the frame rate to 24fps.</p>
<div>
<img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_1.jpg" alt="" />
</div>
<hr/>
<h2><span>Step 3:</span> Interface</h2>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_2.jpg" alt="" /></div>
<p>This is the interface we&#8217;ll use: a simple background, a button to call the function that will get the data and some TextFields to display the data obtained from the web server.</p>
<p>Continue to the next steps to see how it&#8217;s made.</p>
<hr/>
<h2><span>Step 4:</span> Background</h2>
<p>Select the Rectangle Tool (R), create a 540px wide, 300px high rectangle and fill it with this radial gradient #424A57, #232730. Center the rectangle to fit the stage.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_3.jpg" alt="" /></div>
<hr/>
<h2><span>Step 5:</span> Action Button</h2>
<p>A button will be used to call the function that will read the PHP file from the web server.</p>
<p>Use the Oval Tool (O) to create a 64&#215;64px #EEEEEE circle, and center it on the stage.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_4.jpg" alt="" /></div>
<p>To create the arrow in the middle we&#8217;ll make use of the PolyStar Tool (click and hold the Rectangle Tool button and a context menu will appear where you can select the tool), with the tool selected, go to the Properties Panel and click the Options button.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/13735_5.jpg" alt="" /></div>
<p>Set the Number of Sides to 3 and click OK.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_6.jpg" alt="" /></div>
<p>Create a 35&#215;19px Triangle and using the Rectangle Tool (R) draw a 19&#215;18px rectangle. Align them to form an arrow.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_7.jpg" alt="" /></div>
<p>Fill the arrow with a different color, place it in the center of the circle and Break them Apart (Cmd+B) this will cut the arrow shape in the circle.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/134a3_8.jpg" alt="" /></div>
<p>Convert the shape to a Button and name it <em>getButton</em>.</p>
<hr/>
<h2><span>Step 6:</span> TextFields</h2>
<p>Select the Text Tool (T) and create a dynamic textfield, this is the format used in the example: DIN Bold, 70pt, #EEEEEE. Using the same tool create another field, this time it&#8217;s a static field that will display &quot;Your IP Address:&quot; used as feedback to the user.</p>
<p>Center the textfields as shown in the image:</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/a5164_9.jpg" alt="" /></div>
<p>Name the dynamic textfield <em>ipField</em>.</p>
<hr/>
<h2><span>Step 7:</span> Embed Font</h2>
<p>You&#8217;ll probably like to use a good looking font that not every user will have, so to make sure the user sees what we want him to see, we need to embed our font.</p>
<p>Select your dynamic TextFields and go to the <em>Properties</em> panel, <em>Character </em>section and press the <em>Embed&#8230;</em> button.</p>
<p>A new window will come up, select the characters you want to embed (in this case numerals) and click OK.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/a5164_10.jpg" alt="" /></div>
<hr/>
<h2><span>Step 8:</span> A Little Detail</h2>
<p>You will notice in the Demo that the TextFields and the Button appear to have some bevel, this is a simple letterpress effect.</p>
<p>To give the textfields and button this look, duplicate the shapes already on stage and using the keyboard arrows move it 1px up. Change the  color to #1B1E25 to complete the effect.</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d6568_2.jpg" alt="" /></div>
<hr/>
<h2><span>Step 9:</span> PHP</h2>
<p>PHP is a powerful scripting language that enables your application to run code on the server side, in this case we will obtain the user IP address using a script in a web server.</p>
<p>Open your preferred PHP editor (any text editor will do the job) and write the following lines:</p>
<pre>
&amp;lt; ?php //Opening Tag, tell PHP server to interpret the following lines as php code

$ip = $_SERVER['REMOTE_ADDR']; //Sets the ip variable, its value is a method that will get the user ip
echo $ip; //The echo keyword outputs the assigned string, in this case the ip variable

? &amp;gt; //Close tag</pre>
<p>This code tells the server to get the visitor&#8217;s remote address (IP) and then returns the address obtained, which is stored in the <em>$ip</em> variable.</p>
<hr/>
<h2><span>Step 10:</span> Server</h2>
<p>A PHP compatible web server is required to run the application successfully; nowadays, almost any web server supports and has installed PHP so it would be rare if yours doesn&#8217;t (except for free web hosts).</p>
<div><a href="http://php.net/"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/3a4ac_11.jpg" alt="" /></a></div>
<p>Save the PHP file as <em>script.php</em> and upload it to your web server, remember that we&#8217;ll call this file later using ActionScript so don&#8217;t forget the path where you uploaded it.</p>
<hr/>
<h2><span>Step 11:</span> ActionScript</h2>
<p>Now it&#8217;s time for our favorite language..</p>
<div><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/3a4ac_12.jpg" alt="" /></div>
<p>Create a new ActionScript 3.0 Class and save it as <em>Main.as</em> in your class folder.</p>
<hr/>
<h2><span>Step 12:</span> Package</h2>
<pre>package
{</pre>
<p>The package keyword allows you to organize your code into groups that can be imported by other scripts, its recommended to name them starting with a lowercase letter and use intercaps for subsequent words (for example: <em>myClasses</em>). It&#8217;s also common to name them using your company&#8217;s website url, so http://mycompany.com would use: <em>com.mycompany.classesType.myClass</em>.</p>
<p>In this example, we&#8217;re using a single class, so there isn&#8217;t really a need to create a classes folder, or to set a package.</p>
<hr/>
<h2><span>Step 13:</span> Import Directive</h2>
<p>These are the classes we&#8217;ll need to import for our class to work, the <em>import</em> directive makes externally defined classes and packages available to your code.</p>
<pre>import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;</pre>
<hr/>
<h2><span>Step 14:</span> Declare and Extend the Class</h2>
<p>The <em>extends</em> keyword defines a class that is a subclass of another class. The subclass inherits all the methods, properties and functions, that way we can use them in our class.</p>
<pre>
public class Main extends Sprite
{</pre>
<p>In this example, the <em>Main class</em> inherits all the methods and properties of the <em>Sprite Class</em>.</p>
<hr/>
<h2><span>Step 15:</span> Variables</h2>
<p>We&#8217;ll make use of two variables. Add this below the class declaration:</p>
<pre>var urlLoader:URLLoader = new URLLoader();
var tween:Tween;
</pre>
<p><em>urlLoader</em> creates an instance of the URLLoader class, that will handle the load of the external PHP file, while <em>tween</em> declares an object that will use the Tween class for animation.</p>
<hr/>
<h2><span>Step 16:</span> Constructor</h2>
<p>The constructor is a function that runs when an object is created from a class, this code is the first to execute when you make an instance of an object or runs using the Document Class.</p>
<pre>
public function Main():void
{</pre>
<hr/>
<h2><span>Step 17:</span> Listen for Mouse Event</h2>
<p>The following line adds a listener to the button in stage to react on a MOUSE_UP MouseEvent.</p>
<pre>getButton.addEventListener(MouseEvent.MOUSE_UP, getIP);
</pre>
<hr/>
<h2><span>Step 18:</span> Get IP</h2>
<p>This code executes when the button is pressed, it loads the php page we wrote earlier on the server and calls a function when the load is complete. It also handles the button animation.</p>
<pre>
private function getIP(e:MouseEvent):void
{
	urlLoader.load(new URLRequest(&quot;http://www.mywebsite.com/script.php&quot;));
	urlLoader.addEventListener(Event.COMPLETE, showIP);

	tween = new Tween(getButton, &quot;y&quot;, Strong.easeOut, getButton.y, 340, 1, true);
}</pre>
<hr/>
<h2><span>Step 19:</span> Receive and Display the Data</h2>
<p>The next function is executed when the PHP file is fully loaded. It displays the received data (the IP address that we &#8216;echo&#8217;-ed)  using the TextFields in stage.</p>
<pre>private function showIP(e:Event):void
{
	ipField.text = e.target.data;
	ipFieldPressed.text = e.target.data;
}</pre>
<hr/>
<h2><span>Step 20:</span> Document Class</h2>
<p>Go back to the FLA and in the <em>Properties Panel &gt; Publish section &gt; Class field</em>, add <em>Main</em> as value. This will link this class as the <em>Document Class</em>.</p>
<div><a href="http://php.net/"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/58638_13.jpg" alt="" /></a></div>
<hr/>
<h2>Conclusion</h2>
<p>Now you know how to get and use the user&#8217;s IP address in your Flash movie, experiment and implement this example in your own projects!</p>
<p>I hope you liked this tutorial, thank you for reading!</p>
<div>
<a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:yIl2AUoC8zA"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d05d2_Flashtuts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:D7DqB2pKExk"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/212e0_Flashtuts?i=gLjZWNTIjQ4:-W64m-eVt28:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:gIN9vFwOqvQ"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/1b217_Flashtuts?i=gLjZWNTIjQ4:-W64m-eVt28:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:qj6IDK7rITs"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/1b217_Flashtuts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:V_sGLiPBpWU"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/1b217_Flashtuts?i=gLjZWNTIjQ4:-W64m-eVt28:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Flashtuts?a=gLjZWNTIjQ4:-W64m-eVt28:F7zBnMyn0Lo"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/5fbbf_Flashtuts?i=gLjZWNTIjQ4:-W64m-eVt28:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/5fbbf_gLjZWNTIjQ4" height="1" width="1" /></p>
<p><a href="http://feedproxy.google.com/~r/Flashtuts/~3/gLjZWNTIjQ4/">Get User IP Address Using PHP and ActionScript 3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/get-user-ip-address-using-php-and-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Strobe Media Playback</title>
		<link>http://tutorial51.com/2010/06/introducing-strobe-media-playback/</link>
		<comments>http://tutorial51.com/2010/06/introducing-strobe-media-playback/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:11:19 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[custom video player]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[gotoandlearn]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[media framework]]></category>
		<category><![CDATA[media playback]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video delivery]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/introducing-strobe-media-playback/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/introducing-strobe-media-playback/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p><em><strong>Update:</strong> Just noticed that the player is still in prerelease, so let the team know if you find issues.</em></p>
<p>As part of the <a href="http://www.opensourcemediaframework.com/index.php">Open Source Media Framework</a>, Adobe has released a new video player called the <a href="http://www.opensourcemediaframework.com/strobe_prerelease.html">Strobe Media Playback</a> component. This is a full-featured video player that is ready for easy deployment. It has all of the advanced features of OSMF built right in including things like HTTP streaming, content protection, and progressive, streaming, and live video delivery. Obviously many of you will want to create a custom video player, but for quick video deployment, this player will be the way to go. I have recently switched to using this player on <a href="http://gotoandlearn.com">gotoAndLearn()</a>.</p>
</p>
<p>Deploying the player is very easy and all the instructions are included in the <a href="http://www.opensourcemediaframework.com/strobe_prerelease.html">download files</a>. Here&#8217;s a tip though. Take the height of your source video and add 35 to get the height of the SWF when you embed.</p>
<p>Lee</p>
<p><a href="http://theflashblog.com/?p=2087">Introducing Strobe Media Playback</a></p>
]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> Just noticed that the player is still in prerelease, so let the team know if you find issues.</em></p>
<p>As part of the <a href="http://www.opensourcemediaframework.com/index.php">Open Source Media Framework</a>, Adobe has released a new video player called the <a href="http://www.opensourcemediaframework.com/strobe_prerelease.html">Strobe Media Playback</a> component. This is a full-featured video player that is ready for easy deployment. It has all of the advanced features of OSMF built right in including things like HTTP streaming, content protection, and progressive, streaming, and live video delivery. Obviously many of you will want to create a custom video player, but for quick video deployment, this player will be the way to go. I have recently switched to using this player on <a href="http://gotoandlearn.com">gotoAndLearn()</a>.</p>
</p>
<p>Deploying the player is very easy and all the instructions are included in the <a href="http://www.opensourcemediaframework.com/strobe_prerelease.html">download files</a>. Here&#8217;s a tip though. Take the height of your source video and add 35 to get the height of the SWF when you embed.</p>
<p>Lee</p>
<p><a href="http://theflashblog.com/?p=2087">Introducing Strobe Media Playback</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/introducing-strobe-media-playback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts On Apple’s HTML5 Demos</title>
		<link>http://tutorial51.com/2010/06/thoughts-on-apple%e2%80%99s-html5-demos/</link>
		<comments>http://tutorial51.com/2010/06/thoughts-on-apple%e2%80%99s-html5-demos/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:11:11 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[3gs]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Christopher Blizzard]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[demo page]]></category>
		<category><![CDATA[flash developers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[impressive demos]]></category>
		<category><![CDATA[Lee

Thoughts]]></category>
		<category><![CDATA[photo slideshow]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/thoughts-on-apple%e2%80%99s-html5-demos/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/thoughts-on-apple%e2%80%99s-html5-demos/"><img align="left" hspace="5" width="150" src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d7903_html5test.jpg" class="alignleft wp-post-image tfe" alt="" title="html5test" /></a><p>I had heard through the grapevine that Apple would be <a href="http://www.apple.com/html5/">posting a set of HTML5 demos</a> today. To be honest I was kind of looking forward to seeing some cool stuff. Instead they have presented a set of basic demos that have very little to do with HTML5 or web standards. On top of that they have implemented a browser-detection scheme that is quite deceptive to say the least.</p>
<p>The image below was circulated on Twitter and it shows that on Apple’s demo page you are unable to view the examples using Google Chrome, Opera, Firefox or any other browser and are instead asked to download and install Safari in order to see the demos. That is quite odd seeing as though Chrome has much better support for the <strong>future</strong> HTML5 standard according to the site <a href="http://html5test.com/">html5test.com</a>.</p>
<p><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d7903_html5test.jpg" alt="" title="html5test" class="alignnone size-full wp-image-2080" /></p>
<p>In an ironic and funny side note, the browser sniffing was apparently <a href="http://twitpic.com/1tv9cl">blocking people from viewing the demos on their iPhone</a>, although I can&#8217;t confirm that. The performance of the demos on the iPhone may have something to do with that, as most of the demos crawled on my 3GS.</p>
<p>If you go to the <a href="http://developer.apple.com/safaridemos/">developer section</a> of Apple’s website you can view the demos using Chrome and are not directed to download Safari. So on to the demos themselves. I made a joke on Twitter about how these were equivalent to things created in Flash 8, but to be honest that is being kind.  A photo slideshow and 360° PNG sequence are more like Flash 5. The reality is that HTML5 is capable of much more than that so it is odd that they considered these to be a good showcase of what is possible. Apple should really consider hiring some Flash developers to create some badass HTML5 demos. Many in the community have been dabbling in it and have created much more impressive demos than these.</p>
<p>Other browser manufacturers have rightfully jumped up to dispute Apple’s questionable browser-sniffing policy. Opera’s Haavard Moen <a href="http://my.opera.com/haavard/blog/2010/06/04/apple-html5">blogged</a> that</p>
<blockquote><p>“when the page doesn&#8217;t work in Opera or other browsers it isn&#8217;t because these browsers don&#8217;t support HTML5. It&#8217;s because Apple uses browser sniffing and vendor prefixes, and in addition to that they aren&#8217;t really testing a lot of HTML5 at all. Most of their demos seem to have got nothing to do with HTML5, as a matter of fact.”</p>
</blockquote>
<p> Christopher Blizzard from Firefox was <a href="http://www.0xdeadbeef.com/weblog/2010/06/intellectual-honesty-and-html5/">more direct saying</a></p>
<blockquote><p>“Apple’s messaging is clearly meant to say ‘hey, we love&#8230;</p></blockquote>]]></description>
			<content:encoded><![CDATA[<p>I had heard through the grapevine that Apple would be <a href="http://www.apple.com/html5/">posting a set of HTML5 demos</a> today. To be honest I was kind of looking forward to seeing some cool stuff. Instead they have presented a set of basic demos that have very little to do with HTML5 or web standards. On top of that they have implemented a browser-detection scheme that is quite deceptive to say the least.</p>
<p>The image below was circulated on Twitter and it shows that on Apple’s demo page you are unable to view the examples using Google Chrome, Opera, Firefox or any other browser and are instead asked to download and install Safari in order to see the demos. That is quite odd seeing as though Chrome has much better support for the <strong>future</strong> HTML5 standard according to the site <a href="http://html5test.com/">html5test.com</a>.</p>
<p><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/d7903_html5test.jpg" alt="" title="html5test" class="alignnone size-full wp-image-2080" /></p>
<p>In an ironic and funny side note, the browser sniffing was apparently <a href="http://twitpic.com/1tv9cl">blocking people from viewing the demos on their iPhone</a>, although I can&#8217;t confirm that. The performance of the demos on the iPhone may have something to do with that, as most of the demos crawled on my 3GS.</p>
<p>If you go to the <a href="http://developer.apple.com/safaridemos/">developer section</a> of Apple’s website you can view the demos using Chrome and are not directed to download Safari. So on to the demos themselves. I made a joke on Twitter about how these were equivalent to things created in Flash 8, but to be honest that is being kind.  A photo slideshow and 360° PNG sequence are more like Flash 5. The reality is that HTML5 is capable of much more than that so it is odd that they considered these to be a good showcase of what is possible. Apple should really consider hiring some Flash developers to create some badass HTML5 demos. Many in the community have been dabbling in it and have created much more impressive demos than these.</p>
<p>Other browser manufacturers have rightfully jumped up to dispute Apple’s questionable browser-sniffing policy. Opera’s Haavard Moen <a href="http://my.opera.com/haavard/blog/2010/06/04/apple-html5">blogged</a> that</p>
<blockquote><p>“when the page doesn&#8217;t work in Opera or other browsers it isn&#8217;t because these browsers don&#8217;t support HTML5. It&#8217;s because Apple uses browser sniffing and vendor prefixes, and in addition to that they aren&#8217;t really testing a lot of HTML5 at all. Most of their demos seem to have got nothing to do with HTML5, as a matter of fact.”</p>
</blockquote>
<p> Christopher Blizzard from Firefox was <a href="http://www.0xdeadbeef.com/weblog/2010/06/intellectual-honesty-and-html5/">more direct saying</a></p>
<blockquote><p>“Apple’s messaging is clearly meant to say ‘hey, we love the web’ but the actual demos they have and the fact that actively block other browsers from those demos don’t match their messaging. It’s not intellectually honest at all.”</p>
</blockquote>
<p>A quick review of the source code shows that it is littered with WebKit-specific prefixes and extensions. The messaging surrounding the demos is also iffy at best. In the Light Table demo, which is actually pretty nice, the messaging states that</p>
<blockquote><p> “Using CSS3 transforms and transitions, photos can be easily sorted, shuffled, or displayed in a slideshow with just a few lines of CSS and JavaScript.” </p>
</blockquote>
<p>Of course I was curious as to the contents of those 3 lines as they must be the most powerful 3 lines of code ever written. In actual fact, the<a href="http://developer.apple.com/safaridemos/LightTable/resources/LightTable.js"> JavaScript file</a> that drives the demo is 700 lines long.</p>
<p>Personally I look forward to the day when simple things like video playback and photo galleries can be handed off to browsers to handle. Flash has always been about pushing the envelope. So long as there are standards, there will always be technologies and developers who want to go beyond that. </p>
<p>Lee</p>
<p><a href="http://theflashblog.com/?p=2069">Thoughts On Apple’s HTML5 Demos</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/thoughts-on-apple%e2%80%99s-html5-demos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIF: Russian Dolls</title>
		<link>http://tutorial51.com/2010/06/bif-russian-dolls/</link>
		<comments>http://tutorial51.com/2010/06/bif-russian-dolls/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:11:03 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Alexandre Richardot]]></category>
		<category><![CDATA[Amnesty]]></category>
		<category><![CDATA[Axel Didon]]></category>
		<category><![CDATA[Benjamin Parent]]></category>
		<category><![CDATA[BIF]]></category>
		<category><![CDATA[Emeline Courtecuisse]]></category>
		<category><![CDATA[Executive Producer]]></category>
		<category><![CDATA[Germain]]></category>
		<category><![CDATA[Julie Piganiol]]></category>
		<category><![CDATA[Kevin Colinet]]></category>
		<category><![CDATA[narrative techniques]]></category>
		<category><![CDATA[Nicolas Loir]]></category>
		<category><![CDATA[Olivier Benoist]]></category>
		<category><![CDATA[Paris]]></category>
		<category><![CDATA[Pascal Grégoire]]></category>
		<category><![CDATA[piganiol]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[refined simplicity]]></category>
		<category><![CDATA[Romain Droy]]></category>
		<category><![CDATA[Russian]]></category>
		<category><![CDATA[russian dolls]]></category>
		<category><![CDATA[spot]]></category>
		<category><![CDATA[Vincent]]></category>
		<category><![CDATA[Virginie Louis
SFX]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/bif-russian-dolls/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/bif-russian-dolls/"><img align="left" hspace="5" width="150" height="150" src="http://tutorial51.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a><p>
And yet another spot for Amnesty from a powerhouse French directing-collective brings us <a href="http://vimeo.com/12483091">&#8220;Russian Dolls&#8221;</a> from <a href="http://www.rods.fr/director/4/bif/">BIF</a>, produced by <a href="http://www.rods.fr/">Rods</a>.</p>
<p>Despite the lack of CG on this one, the narrative techniques share major similarities in their refined simplicity and symbolism to Pleix&#8217;s Death Penalty piece. Its audio also turns a table-top into a landscape for drama.</p>
<p>Although this spot is coming via La Chose rather than TBWA, in the case of Pleix&#8217;s piece, Amnesty has always found ways to address large issues in visually universal terms while still delivering the same impact as being completely literal. </p>
<p><span></span></p>
<p>Agency : La Chose, Paris<br />
Creative Director : Pascal Grégoire<br />
Creative Team : Axel Didon, Kevin Colinet, Benjamin Parent</p>
<p>Production Company : Rods Films<br />
Director: BIF<br />
Executive Producer : Alexandre Richardot<br />
Line Producer : Julie Piganiol<br />
Production Manager : Emeline Courtecuisse<br />
1rst AD : Severine Bouvier<br />
Production Assistant : Thibaud Noyer<br />
DOP : Nicolas Loir<br />
Camera Assistant : Vincent Toubel<br />
Electrics : Olivier Benoist, Romain Droy<br />
Grips : Stephane Germain, Gael Leroux<br />
Painter : Virginie Louis<br />
SFX : JC Spadaccini</p>
<p>Post Production : BIF</p>
<p>Sound : Kouz Production </p>
<p><a href="http://motionographer.com" target="_blank">Posted on Motionographer</a></p>
<p><a href="http://motionographer.com/2010/06/11/bif-russian-dolls/">BIF: Russian Dolls</a></p>
]]></description>
			<content:encoded><![CDATA[<p>
And yet another spot for Amnesty from a powerhouse French directing-collective brings us <a href="http://vimeo.com/12483091">&#8220;Russian Dolls&#8221;</a> from <a href="http://www.rods.fr/director/4/bif/">BIF</a>, produced by <a href="http://www.rods.fr/">Rods</a>.</p>
<p>Despite the lack of CG on this one, the narrative techniques share major similarities in their refined simplicity and symbolism to Pleix&#8217;s Death Penalty piece. Its audio also turns a table-top into a landscape for drama.</p>
<p>Although this spot is coming via La Chose rather than TBWA, in the case of Pleix&#8217;s piece, Amnesty has always found ways to address large issues in visually universal terms while still delivering the same impact as being completely literal. </p>
<p><span></span></p>
<p>Agency : La Chose, Paris<br />
Creative Director : Pascal Grégoire<br />
Creative Team : Axel Didon, Kevin Colinet, Benjamin Parent</p>
<p>Production Company : Rods Films<br />
Director: BIF<br />
Executive Producer : Alexandre Richardot<br />
Line Producer : Julie Piganiol<br />
Production Manager : Emeline Courtecuisse<br />
1rst AD : Severine Bouvier<br />
Production Assistant : Thibaud Noyer<br />
DOP : Nicolas Loir<br />
Camera Assistant : Vincent Toubel<br />
Electrics : Olivier Benoist, Romain Droy<br />
Grips : Stephane Germain, Gael Leroux<br />
Painter : Virginie Louis<br />
SFX : JC Spadaccini</p>
<p>Post Production : BIF</p>
<p>Sound : Kouz Production </p>
<p><a href="http://motionographer.com" target="_blank">Posted on Motionographer</a></p>
<p><a href="http://motionographer.com/2010/06/11/bif-russian-dolls/">BIF: Russian Dolls</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/bif-russian-dolls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BNS: 2010 AICP Sponsor Reel</title>
		<link>http://tutorial51.com/2010/06/bns-2010-aicp-sponsor-reel/</link>
		<comments>http://tutorial51.com/2010/06/bns-2010-aicp-sponsor-reel/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 11:10:59 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AICP]]></category>
		<category><![CDATA[BNS]]></category>
		<category><![CDATA[Motionographer]]></category>
		<category><![CDATA[reel]]></category>
		<category><![CDATA[Sponsor]]></category>

		<guid isPermaLink="false">http://tutorial51.com/2010/06/bns-2010-aicp-sponsor-reel/</guid>
		<description><![CDATA[<a href="http://tutorial51.com/2010/06/bns-2010-aicp-sponsor-reel/"><img align="left" hspace="5" width="150" src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/8b0fb_Picture-14-250x139.png" class="alignleft wp-post-image tfe" alt="" title="bnsaicp" /></a><p><a href="http://www.vimeo.com/12377261"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/8b0fb_Picture-14-250x139.png" alt="" title="bnsaicp" width="250" height="139" class="alignnone size-medium wp-image-30439" /></a><br />
<a href="http://www.vimeo.com/12377261">BNS: 2010 AICP Sponsor Reel</a></p>
<p><a href="http://motionographer.com" target="_blank">Posted on Motionographer</a></p>
<p><a href="http://motionographer.com/2010/06/11/bns-2010-aicp-sponsor-reel/">BNS: 2010 AICP Sponsor Reel</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vimeo.com/12377261"><img src="http://tutorial51.com/wp-content/plugins/wp-o-matic/cache/8b0fb_Picture-14-250x139.png" alt="" title="bnsaicp" width="250" height="139" class="alignnone size-medium wp-image-30439" /></a><br />
<a href="http://www.vimeo.com/12377261">BNS: 2010 AICP Sponsor Reel</a></p>
<p><a href="http://motionographer.com" target="_blank">Posted on Motionographer</a></p>
<p><a href="http://motionographer.com/2010/06/11/bns-2010-aicp-sponsor-reel/">BNS: 2010 AICP Sponsor Reel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tutorial51.com/2010/06/bns-2010-aicp-sponsor-reel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
