<?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>Pete Shand</title>
	<atom:link href="http://peteshand.net/blog/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://peteshand.net/blog</link>
	<description>Flash and New Media</description>
	<lastBuildDate>Thu, 03 May 2012 22:59:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Stage3d plus flash player 10 backwards compatibility</title>
		<link>http://peteshand.net/blog/index.php/stage3d-plus-flash-player-10-backwards-compatibility/</link>
		<comments>http://peteshand.net/blog/index.php/stage3d-plus-flash-player-10-backwards-compatibility/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 02:48:46 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[3D Flash]]></category>
		<category><![CDATA[Actionscript]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=731</guid>
		<description><![CDATA[So while there are hundreds of cutting edge tech demos, sites and games being produced with flash player 11&#8242;s stage3d, it&#8217;s not always practical to develop for a player version before it&#8217;s reached a mature penetration rate. Given that flash player 11 was only released a few months ago it&#8217;ll probably be another few months [...]]]></description>
			<content:encoded><![CDATA[<p>So while there are hundreds of cutting edge tech demos, sites and games being produced with flash player 11&#8242;s stage3d, it&#8217;s not always practical to develop for a player version before it&#8217;s reached a mature penetration rate. Given that flash player 11 was only released a few months ago it&#8217;ll probably be another few months before we see the 90% mark being hit. <a href="http://riastats.com/">http://riastats.com/</a> puts it at about 63% at the time of writing this post. </p>
<p>That aside, it&#8217;s still quite tempting to disregard the above and set the minimum player version to 11, but we all know the client just isn&#8217;t going to let this fly. The obvious option is to create an swf for each target player containing the 3d engine code, then have your main application swf load the appropriate 3d engine swf. It&#8217;s a bit of a drag, as it&#8217;ll increase your work load, but it&#8217;ll get the job done.</p>
<p>a basic example of this can be viewed at:<br />
<a href="http://labs.peteshand.net/stage3d_fp10fallback/">http://labs.peteshand.net/stage3d_fp10fallback/</a></p>
<p>source can be downloaded from:<br />
<a href="http://labs.peteshand.net/stage3d_fp10fallback/stage3d_fp10fallback.zip">http://labs.peteshand.net/stage3d_fp10fallback/stage3d_fp10fallback.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/stage3d-plus-flash-player-10-backwards-compatibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash 11 Platform Game Prototype</title>
		<link>http://peteshand.net/blog/index.php/flash-11-platform-game/</link>
		<comments>http://peteshand.net/blog/index.php/flash-11-platform-game/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:25:39 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[3D Flash]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=690</guid>
		<description><![CDATA[you can view an early prototype for a platform game I&#8217;m building with flash 11, away3d and box2d below. You can view the game in action here (Warming: there is no pre-loader). I&#8217;ve been surprised at the speed in which I&#8217;ve been able to put this together and because everything is xml driven once the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://peteshand.net/blog/wp-content/uploads/2011/10/game.jpg"><img src="http://peteshand.net/blog/wp-content/uploads/2011/10/game.jpg" alt="" title="game" width="600" height="345" class="alignleft size-full wp-image-708" /></a></p>
<p>you can view an early prototype for a platform game I&#8217;m building with flash 11, away3d and box2d below.</p>
<p>You can view the game in action <a href="http://peteshand.net/approvals/game/" target='_blank'>here</a> (Warming: there is no pre-loader).</p>
<p>I&#8217;ve been surprised at the speed in which I&#8217;ve been able to put this together and because everything is xml driven once the initial level, characters and game objects have been implemented content generation is going to be a breeze. You can view the xml <a href="http://peteshand.net/approvals/game/game_assets/data/levels.xml ">here</a>.</p>
<p>As stated above this is an early prototype, so there are plenty of things missing, for example the hero will probably stop walking when he isn&#8217;t moving <img src='http://peteshand.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and I&#8217;m sure most of what you see will change anyway, but just thought I&#8217;d share my progress.</p>
<p><object width="600" height="450"><param name="movie" value="http://www.youtube.com/v/AgeR0k6UyYw?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/AgeR0k6UyYw?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="600" height="450" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/flash-11-platform-game/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>integrate browser scrollbar with flash &#8211; part 2</title>
		<link>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-2/</link>
		<comments>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-2/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 16:15:12 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=663</guid>
		<description><![CDATA[After my last post on integrating the browser scrollbar with flash a friend of mine (Tim Keir) instantly pointed out that there is a small library called swffit which he said achieves a similar result. Don&#8217;t you just hate it when that happens! However while swffit is a great library (and I encourage you to [...]]]></description>
			<content:encoded><![CDATA[<p>After my last post on <a href="http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-template/" target="_blank">integrating the browser scrollbar with flash</a> a friend of mine (<a href="https://plus.google.com/116112561638033905319/posts" target="_blank">Tim Keir</a>) instantly pointed out that there is a small library called <a href="http://swffit.millermedeiros.com/" target="_blank">swffit</a> which he said achieves a similar result. Don&#8217;t you just hate it when that happens!</p>
<p>However while swffit is a great library (and I encourage you to check it out), it achieves a somewhat different result than what I was trying to demonstrate. swffit basically sets the height of the swf to 100% as long as the browser height is greater than x, if the browser height is reduced below x then the flash movie&#8217;s height is set to x and a browser scrollbar appears. This is great for full-page flash movies when viewed on a small screen because the user will always be able to scroll down if there screen isn&#8217;t big enough.</p>
<p>So obviously my explanation and example require a little reworking to clarify why you might want to implement something like this. So that&#8217;s what I&#8217;ve done. This time round I&#8217;ve abandoned the idea of creating an experience similar to an html page and focused on more of a &#8216;flashy&#8217; example. Its still very basic, but it should give you a better impression of the possibilities. The second example can be viewed <a href="http://peteshand.net/blog/media/pages/flash_scroll2/" target="_blank">here</a>.</p>
<p>This time there is also a scrollbar along the bottom of the window, as well as a 3d cube which replaces the checker panel. The side scrollbar controls the cube&#8217;s rotation around its x axis and the bottom scrollbar moves around the cube on its y axis. also in addition to this clicking and dragging anywhere on the flash content (or pressing the arrow keys) will also update the scrollbar locations and in turn feed back into the flash movie. The thing i love about this concept is that the user will see the scrollbar, drag it down and expect the page to scroll, however in this case the cube rotates&#8230; wow, amazing they think to themselves for half a second.</p>
<p>The source files can be downloaded <a href="http://peteshand.net/blog/media/pages/flash_scroll2/flashScroll2.zip">here</a>.</p>
<p>&nbsp;</p>
<p>add me on <a href="https://plus.google.com/113898231528631713436/posts" target="_blank">g+</a> and <a href="https://twitter.com/#!/peteshand" target="_blank">twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrate browser scrollbar with flash &#8211; part 1</title>
		<link>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-1/</link>
		<comments>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-1/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 17:10:50 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=640</guid>
		<description><![CDATA[Just a quick post to demonstrate how to integrate the browsers native scrollbar with a full-page flash movie. Why? Why not&#8230; People always go on about how flash and html/javascript work well together, so thought I&#8217;d try to create something new that&#8217;s flash/javacript related. Click here to view the example in action. Right clicking anywhere [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to demonstrate how to integrate the browsers native scrollbar with a full-page flash movie. Why? Why not&#8230; People always go on about how flash and html/javascript work well together, so thought I&#8217;d try to create something new that&#8217;s flash/javacript related.</p>
<p><a href="http://peteshand.net/blog/media/pages/flash_scroll/" target="_blank">Click here</a> to view the example in action. Right clicking anywhere on the page will bring up the flash player context menu, so obviously this is a full-page flash movie. However where this differs from your traditional full-page flash movie is that it will add a native browser scrollbar if the checker box exceeds the height of the browser window. Once the scrollbar appears the user is able to drag the scrollbar up and down and it will adjust the flash content just as you would expect html content to scroll.</p>
<p>So why is this a nice feature to have? Well the browser scrollbar is something everyone is familiar with. Everyone knows that when you see the scrollbar on the right hand side of the browser you can scroll the page. That&#8217;s not to say you can&#8217;t add additional interaction to the flash movie and update the scrollbar appropriately, I think its always nice to have a few different ways of navigating through a site, whether it be via the keyboard, or various mouse interactions.</p>
<p>Obviously this is just a basic example, but you could really go to town with this. If I had the time I would love to create a Stage3D scene and use the scrollbar to move through it.</p>
<p>You can grab the source <a href="http://peteshand.net/blog/media/pages/flash_scroll/flashScroll.zip">here</a>.</p>
<p>Continue reading <a href="http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-2/">part 2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/integrate-browser-scrollbar-with-flash-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>as3 Text To Speech plus proxy</title>
		<link>http://peteshand.net/blog/index.php/as3-text-to-speech-plus-proxy/</link>
		<comments>http://peteshand.net/blog/index.php/as3-text-to-speech-plus-proxy/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 08:23:54 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Text To Speech]]></category>
		<category><![CDATA[Translation]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=607</guid>
		<description><![CDATA[A while back I wrote a post on a few as3 classes I wrote that would hook into googles text to speech engine (you can view the original post here). Unfortunately there was a few problems with the way it worked, first and foremost not all browsers handled the cross domain sound request the same, [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote a post on a few as3 classes I wrote that would hook into googles text to speech engine (you can view the original post <a href="http://blog.peteshand.net/index.php/actionscript-text-to-speech/">here</a>). Unfortunately there was a few problems with the way it worked, first and foremost not all browsers handled the cross domain sound request the same, as in IE/Chrome bitched about cross domain policy files. secondly there were some issues around using special characters (non english character sets)</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TextToSpeech2_807316221"
			class="flashmovie"
			width="500"
			height="150">
	<param name="movie" value="http://peteshand.net/blog/media/swfs/TextToSpeech2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://peteshand.net/blog/media/swfs/TextToSpeech2.swf"
			name="fm_TextToSpeech2_807316221"
			width="500"
			height="150">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>I wasn&#8217;t using these classes in any commercial projects, so sadly these issues were never investigated, well that is until a chap by the name of Daniel Kazmer needed this type of functionality in one of his projects, I suggested looking into a proxy for the cross domain issues and that&#8217;s just what he did.</p>
<p><a target='_blank' href="http://peteshand.net/blog/media/downloads/TextToSpeech.zip">Click here</a> to download the as3 text to speech classes as well as the proxy file Dan created (Note you&#8217;ll need php and curl installed to take advantage of the proxy).</p>
<p>While this is a step in the right direction it turns out there are still some issues surrounding special characters, but regardless thanks for your input Dan!</p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/as3-text-to-speech-plus-proxy/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Facebook Fanpage PSD Template 2011</title>
		<link>http://peteshand.net/blog/index.php/facebook-fanpage-psd-template-2011/</link>
		<comments>http://peteshand.net/blog/index.php/facebook-fanpage-psd-template-2011/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 10:39:12 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=601</guid>
		<description><![CDATA[Lets face it, designers sometimes need to make a mock-up that doesn’t actually exist which sometimes can be time consuming and extremely irritating. Facebook fanpages have been a very hot topic for clients recently. They are wanting to break into the social media scene. Today I&#8217;m releasing a mockup of the new 2011 Facebook Fanpage [...]]]></description>
			<content:encoded><![CDATA[<p>Lets face it, designers sometimes need to make a mock-up that doesn’t actually exist which sometimes can be time consuming and extremely irritating. Facebook fanpages have been a very hot topic for clients recently. They are wanting to break into the social media scene. </p>
<p>Today I&#8217;m releasing a mockup of the new 2011 Facebook Fanpage with editable text and image positioning, hopefully this will save you some time and help you create and effective facebook mock-up for a potential or current client.</p>
<p><a href="http://blog.peteshand.net/media/downloads/facebook_fanpage_template.psd">Click here</a> to download the PSD.</p>
<p><a href="http://peteshand.net/blog/wp-content/uploads/2011/04/Facebook_fanpage_template.jpg"><img src="http://peteshand.net/blog/wp-content/uploads/2011/04/Facebook_fanpage_template.jpg" alt="facebook fanpage template" title="Facebook_fanpage_template" width="520" height="902" class="alignleft size-full wp-image-602" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/facebook-fanpage-psd-template-2011/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Foodie Fight Facebook Quiz</title>
		<link>http://peteshand.net/blog/index.php/foodie-fight-facebook-quiz/</link>
		<comments>http://peteshand.net/blog/index.php/foodie-fight-facebook-quiz/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 16:11:48 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Recent Work]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=587</guid>
		<description><![CDATA[To celebrate the brands London Restaurant Week campaign, we (Razorfish London) have created ‘Foodie Fight’ a mini-quiz designed to challenge peoples knowledge of all things culinary. Know your artichoke from your asparagus? Know how many Michelin Stars Marco Pierre White has? (Its 3 by the way!) If so then click on the app link below [...]]]></description>
			<content:encoded><![CDATA[<p>To celebrate the brands London Restaurant Week campaign, we (Razorfish London) have created ‘Foodie Fight’ a mini-quiz designed to challenge peoples knowledge of all things culinary.  Know your artichoke from your asparagus? Know how many Michelin Stars Marco Pierre White has? (Its 3 by the way!)  If so then click on the app link below to test your knowledge and share your score with your friends.  If you score highly enough then you will be entered into the competition draw each week for the opportunity to win fantastic VIP prizes including dinner for 10 @ Marco Pierre Whites, wine-tasting with Gary Rhodes and much more.<br />
<a href="http://www.facebook.com/lastminute.com?sk=app_115362125207521">http://www.facebook.com/lastminute.com?sk=app_115362125207521</a></p>
<p><a href="http://www.facebook.com/lastminute.com?sk=app_115362125207521"><img src="http://peteshand.net/blog/wp-content/uploads/2011/03/Picture-4.png" alt="Play Foodie Fight" title="Play Foodie Fight" width="520" height="542" class="alignleft size-full wp-image-591" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/foodie-fight-facebook-quiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MovieClip Loop Control</title>
		<link>http://peteshand.net/blog/index.php/movieclip-loop-control/</link>
		<comments>http://peteshand.net/blog/index.php/movieclip-loop-control/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 12:52:23 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=573</guid>
		<description><![CDATA[?View Code ACTIONSCRIPT1 2 3 4 5 6 import net.peteshand.utils.LoopCtrl; LoopCtrl.setLoops&#40;this,3,40&#41;; // Parameters: // Target MovieClip, // Number of Loops, // Frames of end of timeline to stop at (default = 0) ?View Code ACTIONSCRIPT1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p573code3'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5733"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p573code3"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> net.<span style="color: #006600;">peteshand</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">LoopCtrl</span>;
LoopCtrl.<span style="color: #006600;">setLoops</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #808080; font-style: italic;">// Parameters:</span>
   <span style="color: #808080; font-style: italic;">// Target MovieClip, </span>
   <span style="color: #808080; font-style: italic;">// Number of Loops, </span>
   <span style="color: #808080; font-style: italic;">// Frames of end of timeline to stop at (default = 0)</span></pre></td></tr></table></div>


<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p573code4'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5734"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code" id="p573code4"><pre class="actionscript" style="font-family:monospace;">package net.<span style="color: #006600;">peteshand</span>.<span style="color: #006600;">utils</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> LoopCtrl <span style="color: #0066CC;">extends</span> EventDispatcher
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">/** @private **/</span>
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> ref:<span style="color: #0066CC;">MovieClip</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> loops:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> LoopCtrl <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> setLoops<span style="color: #66cc66;">&#40;</span>_ref:<span style="color: #0066CC;">MovieClip</span>, _loops:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">1</span>, preEndFrame:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			ref = _ref;
			loops = _loops;
			<span style="color: #000000; font-weight: bold;">var</span> count:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
			ref.<span style="color: #006600;">addFrameScript</span><span style="color: #66cc66;">&#40;</span>ref.<span style="color: #006600;">totalFrames</span>-<span style="color: #cc66cc;">1</span>-preEndFrame, LastFrame<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">function</span> LastFrame<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
			<span style="color: #66cc66;">&#123;</span>
				count++;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>count == loops<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
					ref.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
					ref.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Event<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LoopEnd&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/movieclip-loop-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Click and Drag 360 View</title>
		<link>http://peteshand.net/blog/index.php/click-and-drag-360-view/</link>
		<comments>http://peteshand.net/blog/index.php/click-and-drag-360-view/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 15:34:01 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=340</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_360_610835021"
			class="flashmovie"
			width="520"
			height="200">
	<param name="movie" value="http://peteshand.net/_archive/prototypes/view360/360.swf" />
	<param name="flashvars" value="swfAssetURL=http://peteshand.net/_archive/prototypes/view360/tt_coupe.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://peteshand.net/_archive/prototypes/view360/360.swf"
			name="fm_360_610835021"
			width="520"
			height="200">
		<param name="flashvars" value="swfAssetURL=http://peteshand.net/_archive/prototypes/view360/tt_coupe.swf" />
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_360_337864877"
			class="flashmovie"
			width="520"
			height="200">
	<param name="movie" value="http://peteshand.net/_archive/prototypes/view360/360.swf" />
	<param name="flashvars" value="swfAssetURL=http://peteshand.net/_archive/prototypes/view360/tt_coupe.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://peteshand.net/_archive/prototypes/view360/360.swf"
			name="fm_360_337864877"
			width="520"
			height="200">
		<param name="flashvars" value="swfAssetURL=http://peteshand.net/_archive/prototypes/view360/tt_coupe.swf" />
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/click-and-drag-360-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.MPO to Anaglphic or Stereo Pair JPG</title>
		<link>http://peteshand.net/blog/index.php/mpo-to-anaglphic-or-stereo-pair-jpg/</link>
		<comments>http://peteshand.net/blog/index.php/mpo-to-anaglphic-or-stereo-pair-jpg/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 14:19:07 +0000</pubDate>
		<dc:creator>Pete Shand</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://peteshand.net/blog/?p=537</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_mpo2jpg_1069854618"
			class="flashmovie"
			width="520"
			height="333">
	<param name="movie" value="http://peteshand.net/blog/media/swfs/mpo2jpg.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://peteshand.net/blog/media/swfs/mpo2jpg.swf"
			name="fm_mpo2jpg_1069854618"
			width="520"
			height="333">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> I recently bought the new Fujifilm FinePix W3, it a nutshell its a camera with stereoscopic lenses (see below) which means you can shoot 3d photography and hd footage. It doesn&#8217;t stop there though, on the back of the camera you have a 3.5-inch glasses free 3d [...]]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_mpo2jpg_869072792"
			class="flashmovie"
			width="520"
			height="333">
	<param name="movie" value="http://peteshand.net/blog/media/swfs/mpo2jpg.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://peteshand.net/blog/media/swfs/mpo2jpg.swf"
			name="fm_mpo2jpg_869072792"
			width="520"
			height="333">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>I recently bought the new Fujifilm FinePix W3, it a nutshell its a camera with stereoscopic lenses (see below) which means you can shoot 3d photography and hd footage. It doesn&#8217;t stop there though, on the back of the camera you have a 3.5-inch glasses free 3d display. Without a doubt the coolest gadget I&#8217;ve ever bought.</p>
<div class="wp-caption alignleft" style="width: 335px"><img alt="Fujifilm FinePix W3" src="http://peteshand.net/blog/wp-content/uploads/2011/01/Fujifilm-FinePix-W3.jpg" title="Fujifilm FinePix W3" width="325" height="233" /><p class="wp-caption-text">Fujifilm FinePix W3</p></div>
<p>One thing that surprised me was the format in which the W3 saves stereoscopic images, the file extension is called <a href="http://en.wikipedia.org/wiki/Image_file_formats#MPO">.mpo</a> and I can&#8217;t say I&#8217;ve ever heard of it. I was expecting it would save as a stereo pair .jpg or <a href="http://en.wikipedia.org/wiki/Image_file_formats#JPS">.jps</a> which would be easier to view and edit on a regular computer display.</p>
<p>It turns out there are a few programs out there that will convert .mpo to .jpg, but not that many. So i decided to look into the possibility of converting in actionscript. Because the .mpo format is basically multiple jpgs saved within the one file it turned out to be pretty straight forward. Building on Thibault Imbert&#8217;s work on jpg decoding I simply wrote a few classes to parse the .mpo into separate jpg byteArrays and then output the result as a stereo pair or a anaglyphic image.</p>
]]></content:encoded>
			<wfw:commentRss>http://peteshand.net/blog/index.php/mpo-to-anaglphic-or-stereo-pair-jpg/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

