<?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>Randy Troppmann &#187; Randy</title>
	<atom:link href="http://www.randytroppmann.com/author/randy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.randytroppmann.com</link>
	<description>Flash • Flex • iPhone • Android: software development and visual communication design</description>
	<lastBuildDate>Fri, 23 Jul 2010 15:38:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Leonard Nimoy&#8217;s mom</title>
		<link>http://www.randytroppmann.com/2010/06/03/leonard-nimoys-mom/</link>
		<comments>http://www.randytroppmann.com/2010/06/03/leonard-nimoys-mom/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 16:28:23 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=716</guid>
		<description><![CDATA[An amazing photo from Leonard Nimoy! He tweeted this on Mother&#8217;s Day.]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitpic.com/1mfmfj" title="The lady is my Mom. She was curious. The man walking on is Dad."><img src="http://twitpic.com/show/thumb/1mfmfj.jpg" width="150" height="150" alt="The lady is my Mom. She was curious. The man walking on is Dad."></a><br />
An amazing photo from Leonard Nimoy! He tweeted this on Mother&#8217;s Day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/06/03/leonard-nimoys-mom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trackometer at Google IO 2010</title>
		<link>http://www.randytroppmann.com/2010/05/28/trackometer-at-google-io-2010/</link>
		<comments>http://www.randytroppmann.com/2010/05/28/trackometer-at-google-io-2010/#comments</comments>
		<pubDate>Fri, 28 May 2010 21:02:16 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=689</guid>
		<description><![CDATA[At the recent Google IO conference Adobe announced the public beta of Flash Player 10.1 for Android and the public prerelease program for AIR on Android. I&#8217;ve been working with the AIR for Android SDK for a bunch of weeks now and Adobe loved my prototype of Trackometer (info on the iphone version) so much [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_695" class="wp-caption alignright" style="width: 188px"><a href="http://www.randytroppmann.com/wp-content/uploads/2010/05/Trackometer_htc_evo_4g.jpg"><img src="http://www.randytroppmann.com/wp-content/uploads/2010/05/Trackometer_htc_evo_4g.jpg" alt="Trackometer on Android" title="Trackometer running on htc evo 4g phone (178x267)" width="178" height="267" class="size-full wp-image-695" /></a><p class="wp-caption-text">HTC EVO 4g phone running Trackometer in the Adobe Booth at Google IO 2010.</p></div>At the recent Google IO conference Adobe announced the <a href="http://labs.adobe.com/technologies/flashplayer10/">public beta of Flash Player 10.1 for Android</a> and the public prerelease program for AIR on Android. </p>
<p>I&#8217;ve been working with the AIR for Android SDK for a bunch of weeks now and Adobe loved my prototype of Trackometer (<a href="http://www.runningmap.com/news/iphone/">info on the iphone version</a>) so much they were going to include it in the Day 2 keynote demos at Google IO. I guess Google put serious time constraints on things and the demos did not happen on the main stage. However, Trackometer was demonstrated in the Adobe booth and the AIR team <a href="http://blogs.adobe.com/air/2010/05/air_android_prerelease.html">featured it in their blog</a>. Ted Patrick also included it in his demo in the video below (see 2:00). Adobe also used the Trackometer source code with Flash Builder to do a live demonstration of compiling and moving the application to a device. </p>
<p>Work continues on the Trackometer app. It will have more features than the iPhone version currently has.</p>
<p>Adobe&#8217;s recognition is a huge thrill for me and a nod to independent developers. My inclusion in the private prerelease group was a direct result of the <a href="http://www.360flex.com/">360Flex</a> presentation I gave in San Jose this past March. I have to pass on a big <strong>THANK YOU</strong> to <a href="http://www.flexjunk.com/">Andrew Westberg</a> for asking me to co-present a topic and to <a href="http://lordbron.wordpress.com/">Tom Ortega</a>/<a href="http://johnwilker.com/">John Wilker</a> for accepting our presentation proposal. This proves that sometimes you just need to get away from your computer, get on a plane, and go and talk to people in the industry. Face to face.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/0rH4y4_TrxY&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0rH4y4_TrxY&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/05/28/trackometer-at-google-io-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trackometer: made with AIR for ANDROID</title>
		<link>http://www.randytroppmann.com/2010/05/18/trackometer-made-with-air-for-android/</link>
		<comments>http://www.randytroppmann.com/2010/05/18/trackometer-made-with-air-for-android/#comments</comments>
		<pubDate>Wed, 19 May 2010 02:38:45 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=653</guid>
		<description><![CDATA[Adobe loves choice. They believe you should be able to develop once and deploy across multiple screens. Or devices. RunningMap Trackometer is a real example of this happening. To the right is a swf that is a proof of concept for an app that is being developed to run on Android-powered devices using Adobe&#8217;s AIR [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; margin-left:10px">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="240" height="427" id="trackometer-android" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.randytroppmann.com/wp-content/uploads/2010/05/trackometer_android.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://www.randytroppmann.com/wp-content/uploads/2010/05/trackometer_android.swf" quality="high" bgcolor="#ffffff" width="240" height="427" name="trackometer-android" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /><br />
	</object>
</div>
<p>Adobe loves choice. They believe you should be able to develop once and deploy across multiple screens. Or devices. RunningMap Trackometer is a real example of this happening. To the right is a swf that is a proof of concept for an app that is being developed to run on Android-powered devices using Adobe&#8217;s AIR for Android runtime.  To make the point clear, this swf was compiled from the same source (minus some device specific calls) that is used to compile the app that runs on Android mobile phones. </p>
<p>I have developed apps for the iPhone &#8211; one of them award nominated. RunningMap Trackometer for the iPhone was accepted for sale October 2009. I think it is a great platform to develop for and has tons of potential. But, learning Objective-c and Cocoa was and is tough for me. It&#8217;s pretty foreign and it still sometimes takes a long time to solve simple things. I have no doubt that will get easier over time and I love to learn new things. Once you get into it Objective-c has an oop-elegance about it. The real barrier in my mind to creating apps for the iPhone is the torturous process you need to go through to test, provision and submit your app so that you have maximized your chances at Apple blessing it and allowing it to be sold on the App Store. Anyone who has been there knows what I am talking about so I will stop there.</p>
<p>Trackometer for Android is not so much a port of the iPhone app as it is a port of the RunningMap.com application itself, with far fewer features. I&#8217;ve been developing for the Flash platform for 10 years and, unlike when I program in Objective-c, problems are solved very quickly. The workflow is like butter. And this is full blown Flash. While developing using the AIR for Android SDK, I did not need to change my well-honed workflow in any way, shape or form. RobotLegs is there. GTween is there. Flash Builder goodness. The API is only limited by the new paradigm; MOUSE_OVER, for example, is not possible with a touch interface. In fact there are a host of new APIs. Geolocation for example. And Trackometer uses that. Try to take your laptop for a run and see how fun that is. </p>
<p>So far I am amazed by how well AIR for Android performs on my Motorola Droid.</p>
<p>Getting the app on your phone is SO MUCH EASIER than with iPhone apps. No provisioning etc. Android phones could install Trackometer directly from this blog post if I placed the package here. But I can&#8217;t be cause a) Trackometer is not finished and b) the AIR for Android runtime is not released yet. I&#8217;m not sure when but I hope to know soon. I can&#8217;t wait.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/05/18/trackometer-made-with-air-for-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RobotLegs, mediators and memory leaks</title>
		<link>http://www.randytroppmann.com/2010/05/05/robotlegs-mediators-and-memory-leaks/</link>
		<comments>http://www.randytroppmann.com/2010/05/05/robotlegs-mediators-and-memory-leaks/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:33:35 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=650</guid>
		<description><![CDATA[An important lesson I learned today: the onRegister() method of a Mediator in the RobotLegs framework get&#8217;s fired when it&#8217;s view is added to the stage. This means that the event mappings and event listeners that you place in the onRegister() method will get invoked each time and (assuming you are adding and removing the [...]]]></description>
			<content:encoded><![CDATA[<p>An important lesson I learned today: the onRegister() method of a Mediator in the RobotLegs framework get&#8217;s fired when it&#8217;s view is added to the stage. This means that the event mappings and event listeners that you place in the onRegister() method will get invoked each time and (assuming you are adding and removing the view multiple times) unless you use the onRemove() method to un-map and remove the event listeners, you will most certainly get a memory leak. Good to know!</p>
<p>This is a little inconvenient because I was hoping that I could use the mediator event handlers to update a view while it is not on the display list. As it turns out, the mediator will not respond to event mappings when it&#8217;s view is removed from the stage. Also good to know.</p>
<p>Any input on this appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/05/05/robotlegs-mediators-and-memory-leaks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The first 360&#124;Flex</title>
		<link>http://www.randytroppmann.com/2010/01/27/the-first-360flex/</link>
		<comments>http://www.randytroppmann.com/2010/01/27/the-first-360flex/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 05:40:38 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=598</guid>
		<description><![CDATA[It was Ted Patrick&#8216;s fault. He dared to come to Edmonton in January and I was so impressed with his presentation at EFUG that I registered for the first 360Flex conference which was being held at EBay HQ in SJ. Never been there before. Didn&#8217;t know anyone there. Friend and fellow Edmontonian Grant Skinner was [...]]]></description>
			<content:encoded><![CDATA[<p>It was <a href="http://www.onflash.org/">Ted Patrick</a>&#8216;s fault. He dared to come to Edmonton in January and I was so impressed with his presentation at EFUG that I registered for the first 360Flex conference which was being held at EBay HQ in SJ. Never been there before. Didn&#8217;t know anyone there. Friend and fellow Edmontonian <a href="http://www.google.com/search?rls=en&#038;q=definition:+incomplete&#038;ie=UTF-8&#038;oe=UTF-8">Grant Skinner</a> was going (and presenting) and that gave me confidence that at least I would know someone there (as it turned out, he was quite busy with the Adobe peeps and I didn&#8217;t see him much). </p>
<p>Leading up to the conference the buzz on the 360Flex website was to sign up on Twitter. I signed up under the name of &#8220;brando&#8221;. Remember, this is February 2007. NO ONE knew what Twitter was. Seemed like a useless service to me but it gave me a bunch of new Flex-knowing friends and maybe it would help me connect with some people when I got there. Through twitter I met PolyGeek and told him I was going to hunt him down and say hi.</p>
<p>On the flight to San Jose I met another Edmontonian who was going to the conference: <a href="http://crazedcoders.com/">Victor Rubba</a>. Great guy. Now I have another friend to hang out with at the conference. </p>
<p>The morning of the first day I walked from my hotel to EBay and in the main entrance and I couldn&#8217;t believe my eyes. Thousands of miles from home, feeling like I was not in Kansas anymore, a guy was standing there with an <a href="http://lastplace.com/">Edmonton Oilers</a> jersey on. (turns out he was from <a href="http://en.wikipedia.org/wiki/File:Donkey_1_arp_750px.jpg">Calgary</a>, which is ironic to the extreme). I met <a href="http://lordbron.wordpress.com/">Tom</a> and <a href="http://johnwilker.com/">John</a> for the first time and they offered me Chocolate cake that Tom&#8217;s wife made (nice!). They asked me what my Twitter sig was. They said in unison &#8220;Ah, Brando&#8221;. While waiting for the keynote I was chatting with some guy who looked really familiar to me. I asked him where he was from and he said San Diego. I shrugged and walked away. Sorry, <a href="http://bowlerhatgames.com/">Josh Tynjala</a>, I was out of touch. </p>
<p> After the first session I was getting Danny Patterson to sign <a href="http://www.amazon.com/gp/product/0321426568?ie=UTF8&#038;tag=runningmap-20&#038;linkCode=xm2&#038;camp=1789&#038;creativeASIN=0321426568">his book on Design Patterns</a> for me when I looked up and saw two smiling faces in front of me. <a href="http://zachgraves.com/">Zach Graves</a> and Aaron King were developers on the Y! Maps team. Because <a href="http://www.runningmap.com/">RunningMap.com</a> makes good use of Yahoo! Maps, I was pretty active in the maps online group. I had told them I was coming to the event. They found me first. Now I knew I had someone to hang with. GREAT GUYS. Aaron even gave me his staff issued Y! backpack (at Max 2008 <a href="http://www.flickr.com/photos/randytroppmann/3053474586/in/set-72157609627771667/">Allen Rabinovich</a> asked me where I got it because they are exclusive to Y! employees). </p>
<p>The food was amazing considering what I paid for the event ($150). I phoned my wife while sitting on the green grass by the ponds of coy and she was extremely jealous. Back home it was -15C˚ with snow up your waist. While chatting with Grant and some other guys I did a double take. &#8220;<a href="http://www.youtube.com/user/phillipk#p/u/71/kqUprxcatp8">Phillip Kerman</a>?&#8221; His was the first <a href="http://www.amazon.com/gp/product/0672329379?ie=UTF8&#038;tag=runningmap-20&#038;linkCode=xm2&#038;camp=1789&#038;creativeASIN=0672329379">Actionscript book</a> I have ever read. Chris Cantrell. Can&#8217;t miss Mike Chambers. Victor introduced me to Peter McKiernan who showed up on day two with the same shirt as me. LOL. I did in fact find <a href="http://polygeek.com/">Dan &#8220;PolyGeek&#8221; Florio</a> and introduce myself. I didn&#8217;t chat with him long because I had to run and pee. Er. <a href="http://runpee.com/">RunPee.com</a>. </p>
<p>The presentations were amazing. <a href="http://www.quietlyscheming.com/blog/">Ely Greenfield&#8217;s</a> was my favourite. <a href="http://www.amazon.com/gp/product/0470277920?ie=UTF8&#038;tag=runningmap-20&#038;linkCode=xm2&#038;camp=1789&#038;creativeASIN=0470277920">Deepa Subramaniam</a>. <a href="http://www.locogringostudios.com/Firefighter-Oil-Painting-2.html">Mike Chambers</a>. They were all great. I went to a presentation on ANT and the speaker, Joe Berkovitz, asked the audience if they were not using version control. I raised my hand then looked behind me. I was the only one with my hand up. Heh. Still don&#8217;t. Just kidding. Maybe not.</p>
<p>Ok, this post has gone on too long already and I think you got the point. Sign up for 360|Flex, San Jose, you will meet a ton of people and have your head filled up until it explodes. It&#8217;s the best Flex conference out there so <a href="http://360flex-RandyT.eventbrite.com/">sign up</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/01/27/the-first-360flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>This OSMF has RobotLegs</title>
		<link>http://www.randytroppmann.com/2010/01/17/this-osmf-has-robotlegs/</link>
		<comments>http://www.randytroppmann.com/2010/01/17/this-osmf-has-robotlegs/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 22:06:49 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=511</guid>
		<description><![CDATA[For ActionScript 3 development I have just begun exploring the Open Source Media Framework (OSMF) and the MVC based framework called RobotLegs. What better way than to use them together? The best way to learn this stuff is to dive in and apply it to real solutions. PLEASE leave a comment if I have gone [...]]]></description>
			<content:encoded><![CDATA[<p>For ActionScript 3 development I have just begun exploring the <a href="http://www.opensourcemediaframework.com/">Open Source Media Framework (OSMF)</a> and the MVC based framework called <a href="http://www.robotlegs.org/">RobotLegs</a>. What better way than to use them together? The best way to learn this stuff is to dive in and apply it to real solutions. PLEASE leave a comment if I have gone astray.</p>
<p>You can download the source code <a href="http://www.randytroppmann.com/wp-content/uploads/2010/01/OSMF-can-haz-RobotLegs.zip">here</a> (based on OSMF sprint 8 and RobotLegs 1.0.2).</p>
<p>Here is the working proof of concept with video served by <a href="http://www.castfire.com/">Castfire.com</a>:</p>
<p><script type="text/javascript">swfobject.embedSWF("http://www.randytroppmann.com/wp-content/uploads/2010/01/OMSFwithRobotlegs.swf", "OSMF", 320, 320, "9.0.124", "http://www.runningmap.com/widgets/expressInstall.swf", {},{},{bgcolor:"#eeeeee"});
</script></p>
<div id="OSMF">video swf did not load</div>
<p><br/></p>
<h4>Project goals:</h4>
<ol>
<li>Build a production ready video player</li>
<li>Learn OSMF</li>
<li>AS3 only compiled with mxmlc</li>
<li>Keep things organized</li>
</ol>
<h4>1. Build a video player</h4>
<p>This is a longer term goal. The video player presented here is only a proof of concept. Video on the web continues to evolve and now seems like a good time to re-factor some key video player projects to bring them up to date and address new requirements.</p>
<h4>2. Learn OSMF</h4>
<p><del datetime="2010-01-16T21:05:45+00:00">Strobe</del> <a href="http://www.opensourcemediaframework.com/">Open Source Media Framework</a> is an Adobe initiative to bring some standards to video player development. I have been itching to get my hands dirty with this new framework to decide for myself if it is worth buying into.  </p>
<p>Some may think it is inevitable that OMSF will be over-architechted and therefore full of bloat. I can't really answer that yet. But I can say that I REALLY like the convenience methods that come with the MediaPlayer class. This build is 90k which includes RobotLegs ... acceptable.</p>
<p>Sure, you can build a video player that comes in at 15k. However, as soon as you start adding modern day requirements (CDN services, advert engines, analytics, chapters, xml lists etc) things quickly get complicated. The promise of OSMF is that all these things can be integrated into your video using a plug-in architecture which will greatly ease the burden of development.</p>
<h4>3. ActionScript 3 only</h4>
<p>Every video player I have worked on to date (other than a few Flex experiments) have been made with Flash Professional which means they need to be compiled from the Flash IDE. Using Flash Builder to compile the application de-couples the workflow from the Flash IDE which makes possible all sorts of interesting ideas.</p>
<p>This does not preclude the use of Flash Professional made libraries that can be used for things like the control bar. After all, the Flash IDE is still really good at some things. </p>
<h4>4. Keep things organized</h4>
<p>I have made probably a dozen or so custom video players to date. When building one from scratch it does not take tong before it gets complicated: video players are the mothers of all things asynchronous. I have my own particular way of using design patterns and structure but have never took the time to think through a solid framework and ultimately my projects get big enough that they no longer feel like they are on solid ground.</p>
<p>Someone else has thought it through and this is where RobotLegs comes in. I have had a pretty good experience with Cairngorm over the last couple years but it requires the Flex framework. Dependency Injection seems to be the hot topic recently and I have read some good things about RobotLegs so I thought I would give it a try. <a href="http://pv3d.org/2009/11/18/robotlegs-hello-world-video-tutorial/"> This video tutorial</a> from John Lindquist helped me to put together this first implementation.</p>
<p>The thought here is that there are other views to manage than just the video player and control bar. RobotLegs will help make these views and OSMF plugins manageable and modular. </p>
<h4>Some code</h4>
<p>Here are a few classes to show how video player events flow through RobotLegs to the <strong>DetailsView</strong> so that bytes loaded and playback time can get updated. <a href="http://www.randytroppmann.com/wp-content/uploads/2010/01/OSMF-can-haz-RobotLegs.zip">Download the source</a> for the full meal deal.</p>
<div class="igBar"><span id="lactionscript-5"><a href="#" onclick="javascript:showCodeTxt('actionscript-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-5">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * author: Randy Troppmann January 17, 2010</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * http://www.randytroppmann.com</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> *</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Permission is hereby granted, free of charge, to any person</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * obtaining a copy of this software (the &quot;Software&quot;),</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * to use the Software without restriction, </span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * including without limitation the rights to use,</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * copies of the Software, and to permit persons to whom the</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * Software is furnished to do so.</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * OTHER DEALINGS IN THE SOFTWARE.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> **/</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">view</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">media</span>.<span style="color: #006600;">URLResource</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">net</span>.<span style="color: #006600;">NetLoader</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">utils</span>.<span style="color: #0066CC;">URL</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #0066CC;">video</span>.<span style="color: #006600;">VideoElement</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">display</span>.<span style="color: #006600;">MediaPlayerSprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">events</span>.*;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">controller</span>.<span style="color: #006600;">MediaPlayerEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MediaPlayerView <span style="color: #0066CC;">extends</span> Sprite<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const TEST_PROGRESSIVE_URL:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">"http://serve.castfire.com/s:pre_post_M9Ow2/video/50082/50082_2009-01-14-235108.flv"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> media:MediaPlayerSprite;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> totalBytes:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span>:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> currentTime:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> playButton:PlayButton;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">var</span> isPlaying:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MediaPlayerView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerSprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">setAvailableSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">320</span>, <span style="color: #cc66cc;color:#800000;">240</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">autoPlay</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>LoadEvent.<span style="color: #006600;">BYTES_LOADED_CHANGE</span>, onBytesLoadedChange, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>LoadEvent.<span style="color: #006600;">BYTES_TOTAL_CHANGE</span>, onBytesTotalChange, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> TimeEvent.<span style="color: #006600;">DURATION_CHANGE</span>, onDurationChange, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimeEvent.<span style="color: #006600;">CURRENT_TIME_CHANGE</span>, onPlayheadChange, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>media<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//// ADD PLAY BUTTON</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playButton = <span style="color: #000000; font-weight: bold;">new</span> PlayButton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>playButton<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playButton.<span style="color: #006600;">x</span> = playButton.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playButton.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, handlePlayClick, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> testProgressive<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">element</span> = <span style="color: #000000; font-weight: bold;">new</span> VideoElement<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> NetLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> URLResource<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">URL</span><span style="color: #66cc66;">&#40;</span>TEST_PROGRESSIVE_URL<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> handlePlayClick<span style="color: #66cc66;">&#40;</span>evt:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; isPlaying = !isPlaying;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isPlaying<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playButton.<span style="color: #006600;">label</span>.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"pause"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; media.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playButton.<span style="color: #006600;">label</span>.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"play"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//// OSMF event methods</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onBytesLoadedChange<span style="color: #66cc66;">&#40;</span>evt:LoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">BYTES_LOADED_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #006600;">bytes</span> = evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchEvent<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onBytesTotalChange<span style="color: #66cc66;">&#40;</span>evt:LoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totalBytes = evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_SIZE_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #006600;">bytes</span> = evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchEvent<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onDurationChange<span style="color: #66cc66;">&#40;</span>evt:TimeEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">duration</span> = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_DURATION_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #0066CC;">time</span> = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchEvent<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onPlayheadChange<span style="color: #66cc66;">&#40;</span>evt:TimeEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; currentTime = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_PLAYHEAD_TIME_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #0066CC;">time</span> = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchEvent<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The <strong>MediaPlayerViewMediator</strong> class captures the events from <strong>MediaPlayerView</strong> which sets a property in the model.</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showCodeTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">view</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">robotlegs</span>.<span style="color: #006600;">mvcs</span>.<span style="color: #006600;">Mediator</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">model</span>.<span style="color: #006600;">PlayerModel</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimeEvent</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">controller</span>.<span style="color: #006600;">MediaPlayerEvent</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MediaPlayerViewMediator <span style="color: #0066CC;">extends</span> Mediator<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Inject<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> mediaPlayerView:MediaPlayerView;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Inject<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> model:PlayerModel;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onRegister<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaPlayerView.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_DURATION_CHANGE</span>, handleDurationChange<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaPlayerView.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_PLAYHEAD_TIME_CHANGE</span>, handlePlayheadTimeChange<span style="color: #66cc66;">&#41;</span>;&nbsp;&nbsp;&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaPlayerView.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYER_SENDS_SIZE_CHANGE</span>, handleTotalBytesChange<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaPlayerView.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">BYTES_LOADED_CHANGE</span>, handleBytesLoaded<span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> handleDurationChange<span style="color: #66cc66;">&#40;</span>p_evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model.<span style="color: #0066CC;">duration</span> = p_evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> handlePlayheadTimeChange<span style="color: #66cc66;">&#40;</span>p_evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model.<span style="color: #006600;">currentTime</span> = p_evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> handleTotalBytesChange<span style="color: #66cc66;">&#40;</span>p_evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model.<span style="color: #006600;">totalBytes</span> = p_evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> handleBytesLoaded<span style="color: #66cc66;">&#40;</span>p_evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model.<span style="color: #0066CC;">bytesLoaded</span> = p_evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The model extends the RobotLegs <strong>Actor</strong> class  can use the RobotLegs dispatch() method so that the event can be listened for from anywhere within the RobotLegs ecosystem.</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showCodeTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">model</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">robotlegs</span>.<span style="color: #006600;">mvcs</span>.<span style="color: #006600;">Actor</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">controller</span>.<span style="color: #006600;">MediaPlayerEvent</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PlayerModel <span style="color: #0066CC;">extends</span> Actor<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _totalBytes:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _bytesLoaded:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _duration:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> _currentTime:<span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PlayerModel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">duration</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _duration;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">duration</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _duration = value;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> durationEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">DURATION_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; durationEvent.<span style="color: #0066CC;">time</span> = <span style="color: #0066CC;">duration</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatch<span style="color: #66cc66;">&#40;</span>durationEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> currentTime<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _currentTime;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> currentTime<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _currentTime = value;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> timeEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">PLAYHEAD_TIME_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeEvent.<span style="color: #0066CC;">time</span> = value;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatch<span style="color: #66cc66;">&#40;</span>timeEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> totalBytes<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _totalBytes;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> totalBytes<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _totalBytes = value;&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">SIZE_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #006600;">bytes</span> = value;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatch<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> _bytesLoaded;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _bytesLoaded = value;&nbsp; &nbsp;&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> mediaEvent:MediaPlayerEvent = <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerEvent<span style="color: #66cc66;">&#40;</span>MediaPlayerEvent.<span style="color: #006600;">BYTES_LOADED_CHANGE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mediaEvent.<span style="color: #006600;">bytes</span> = value;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatch<span style="color: #66cc66;">&#40;</span>mediaEvent<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In this experiment, <strong>DetailsViewMonitor</strong> listens for the events from the model. Since it is injected with the <strong>DetailsView</strong> instance, it can hit its property setters with new data.</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showCodeTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-8">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">view</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">robotlegs</span>.<span style="color: #006600;">mvcs</span>.<span style="color: #006600;">Mediator</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">osmf</span>.<span style="color: #006600;">experiments</span>.<span style="color: #006600;">controller</span>.<span style="color: #006600;">MediaPlayerEvent</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> DetailsViewMediator <span style="color: #0066CC;">extends</span> Mediator&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Inject<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> detailsView:DetailsView;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> onRegister<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventMap.<span style="color: #006600;">mapListener</span><span style="color: #66cc66;">&#40;</span>eventDispatcher, MediaPlayerEvent.<span style="color: #006600;">DURATION_CHANGE</span>, onDurationChange<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventMap.<span style="color: #006600;">mapListener</span><span style="color: #66cc66;">&#40;</span>eventDispatcher, MediaPlayerEvent.<span style="color: #006600;">PLAYHEAD_TIME_CHANGE</span>, onPlayheadTimeChange<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventMap.<span style="color: #006600;">mapListener</span><span style="color: #66cc66;">&#40;</span>eventDispatcher, MediaPlayerEvent.<span style="color: #006600;">SIZE_CHANGE</span>, onTotalBytesChange<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eventMap.<span style="color: #006600;">mapListener</span><span style="color: #66cc66;">&#40;</span>eventDispatcher, MediaPlayerEvent.<span style="color: #006600;">BYTES_LOADED_CHANGE</span>, onBytesLoadedChange<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//// EVENT handlers</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onDurationChange<span style="color: #66cc66;">&#40;</span>evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailsView.<span style="color: #0066CC;">duration</span> = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onPlayheadTimeChange<span style="color: #66cc66;">&#40;</span>evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailsView.<span style="color: #006600;">currentTime</span> = evt.<span style="color: #0066CC;">time</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onTotalBytesChange<span style="color: #66cc66;">&#40;</span>evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailsView.<span style="color: #0066CC;">size</span> = evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> onBytesLoadedChange<span style="color: #66cc66;">&#40;</span>evt:MediaPlayerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailsView.<span style="color: #0066CC;">bytesLoaded</span> = evt.<span style="color: #006600;">bytes</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>Conclusion</h4>
<p>Reading framework documentation makes my eyes bleed. The only way I can really intrinsically understand how they fit into how I build applications is to use them. RobotLegs is a winner. I have not worked with OSMF enough to have an opinion one way or the other ... it has not reached a dot oh release yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2010/01/17/this-osmf-has-robotlegs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://serve.castfire.com/s:pre_post_M9Ow2/video/50082/50082_2009-01-14-235108.flv" length="35968585" type="video/x-flv" />
		</item>
		<item>
		<title>FITC Edmonton discount code</title>
		<link>http://www.randytroppmann.com/2009/09/13/fitc-edmonton-discount-code/</link>
		<comments>http://www.randytroppmann.com/2009/09/13/fitc-edmonton-discount-code/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 00:28:09 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=450</guid>
		<description><![CDATA[FITC Edmonton is rolling into town on October 17-18, 2009. If you live anywhere near Edmonton you would be crazy not to attend. The presenter list is stellar: Grant Skinner, Mike Chambers, Erik Natzke, Charles "Chuck" Freeman, Lee Brimelow, Mario Klingermann just to name a few. Chuck Freeman (Director of Developer Platform at Ribbit) was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fitc.ca/events/about/?event=99">FITC Edmonton</a> is rolling into town on October 17-18, 2009. If you live anywhere near Edmonton you would be crazy not to attend. The presenter list is stellar: Grant Skinner, Mike Chambers, Erik Natzke, Charles "Chuck" Freeman, Lee Brimelow, Mario Klingermann just to name a few. </p>
<p>Chuck Freeman (Director of Developer Platform at <a href="http://www.ribbit.com/">Ribbit</a>)  was the lead developer for Maps at Yahoo! back in 2005 and I am hugely in his debt since Runningmap.com uses this API to this day. Mike "Mesh" Chambers. In the Flash world it doesn't get any bigger than that (I am positive that his Halo toon bleeds movieclips when he is shot). I will be seeing if Stacey Mulcahy deserves her self-assigned moniker "bitchwhocodes". Mario and I will discuss the difficulties we suffer in life over having two n's at the end of our last name.</p>
<p>I am a speaker too. Because of that and since you have gotten this far in the post, I can offer you a discount code. Use the code <strong>randy20</strong> and you will get 20% off! See you there!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/09/13/fitc-edmonton-discount-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 casting String to Number?</title>
		<link>http://www.randytroppmann.com/2009/07/06/as3-casting-string-to-number/</link>
		<comments>http://www.randytroppmann.com/2009/07/06/as3-casting-string-to-number/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 19:10:28 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=394</guid>
		<description><![CDATA[Converting FlashVars parameters to properties is an example where you are forced to deal with strings and sometimes these values need to be numbers. I have been annoyed with with my own inconsistencies with how I test to see if the FlashVar casts correctly or should be rejected (because it had a character other than [...]]]></description>
			<content:encoded><![CDATA[<p>Converting FlashVars parameters to properties is an example where you are forced to deal with strings and sometimes these values need to be numbers. I have been annoyed with with my own inconsistencies with how I test to see if the FlashVar casts correctly or should be rejected (because it had a character other than a number in the string). I was discovering that some techniques were giving <strong>false negatives</strong>. So I spent some time of trying to establish a best practice.</p>
<p>I considered these four techniques for casting a string to a Number:</p>
<ol>
<li>parseInt("1234");</li>
<li>new Number("1234");</li>
<li>"1234" as Number;</li>
<li>Number("1234");</li>
</ol>
<p>Below is the AS3 code and the trace results which I used to base my conclusions here.</p>
<p><strong>Results:</strong><br />
Using "as Number" to cast a string to a Number looks like bad news to me. All other techniques preformed as expected. Casting a string such as "foo" using "as Number" to cast is to a strongly typed variable results with a false value when isNaN() is applied to it. This is the false negative I mentioned before. Even casting the string "1337" using "as Number" results in the value 0 which not only fails the falsies ternary test but is wrong. </p>
<p><strong>Conclusions</strong></p>
<ul>
<li>don't use "as Number" to cast a string to a Number.</li>
<li>Using a "falsies ternary test" is not a great approach for string to number validation since "0" is a valid number and will correctly fail this test. Maybe that works well for your logic anyhow.</li>
</ul>
<p><strong>Discussion</strong><br />
Casting is perhaps the wrong term since I am converting a primitive to an object which isn't true polymorphism, but perhaps string is being treated as an object.</p>
<p>I talked to Ryan Frishberg at the recent 360|Flex in Indianapolis about this. Ryan works on the Flex SDK team at Adobe. He said that "new Number('foo')" make use of conversion methods that are not available to the technique "'foo' as Number" which will evaluate to null since this casting is not possible. String can't be a Number. Ok, that is the d'oh moment for me. Should know better. </p>
<p>It's problematic though, because it fails to report a run-time or compile-time error.</p>
<div class="igBar"><span id="lactionscript-11"><a href="#" onclick="javascript:showCodeTxt('actionscript-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-11">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n1a:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n2a:<span style="color: #0066CC;">Number</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n3a:<span style="color: #0066CC;">Number</span> = <span style="color: #ff0000;">"foo"</span> as <span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n4a:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n1b = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n2b = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n3b = <span style="color: #ff0000;">"foo"</span> as <span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n4b = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"foo"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n1c:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"1337"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n2c:<span style="color: #0066CC;">Number</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"1337"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n3c:<span style="color: #0066CC;">Number</span> = <span style="color: #ff0000;">"1337"</span> as <span style="color: #0066CC;">Number</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> n4c:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"1337"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. strong typed 'foo'"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1a: "</span> + n1a<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2a: "</span> + n2a<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3a: "</span> + n3a<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4a: "</span> + n4a<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. not strong typed 'foo'"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1b: "</span> + n1b<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2b: "</span> + n2b<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3b: "</span> + n3b<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4b: "</span> + n4b<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. Strong typed '1337'"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1c: "</span> + n1c<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2c: "</span> + n2c<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3c: "</span> + n3c<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4c: "</span> + n4c<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. isNaN n1"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1a: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n1a<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1b: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n1b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1c: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n1c<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. isNaN n2"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2a: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n2a<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2b: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n2b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2c: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n2c<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. isNaN n3"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3a: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n3a<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3b: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n3b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3c: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n3c<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. isNaN n4"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4a: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n4a<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4b: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n4b<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4c: "</span> + <span style="color: #0066CC;">isNaN</span><span style="color: #66cc66;">&#40;</span>n4c<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".............. falsies ternary test"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n1a<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1a: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1a: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n2a<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2a: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2a: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n3a<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3a: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3a: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n4a<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4a: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4a: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n1b<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1b: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1b: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n2b<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2b: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2b: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n3b<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3b: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3b: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n4b<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4b: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4b: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n1c<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1c: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n1c: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n2c<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2c: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n2c: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n3c<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3c: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n3c: false"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span>n4c<span style="color: #66cc66;">&#41;</span>?<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4c: true"</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"n4c: false"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showCodeTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.............. <span style="">strong</span> typed <span style="color:#CC0000;">'foo'</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1a: NaN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2a: NaN</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3a: <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4a: NaN</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.............. <span style="">not</span> strong typed <span style="color:#CC0000;">'foo'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1b: NaN</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2b: NaN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3b: null&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4b: NaN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.............. <span style="">Strong</span> typed <span style="color:#CC0000;">'1337'</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1c: <span style="color:#800000;color:#800000;">1337</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2c: <span style="color:#800000;color:#800000;">1337</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3c: <span style="color:#800000;color:#800000;">0</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4c: <span style="color:#800000;color:#800000;">1337</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.............. <span style="">isNaN</span> test</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1a: true</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2a: true</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3a: false&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4a: true</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1b: true</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2b: true</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3b: false&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4b: true</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1c: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2c: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3c: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4c: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.............. <span style="">falsies</span> ternary test</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1a: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2a: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3a: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4a: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1b: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2b: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3b: false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4b: false</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n1c: true</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n2c: true</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n3c: false&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//unexpected</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">n4c: true </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/07/06/as3-casting-string-to-number/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YouTube as HTML5. The end of Flash dominance of video?</title>
		<link>http://www.randytroppmann.com/2009/05/28/youtube-as-html5-the-end-of-flash-dominance-of-video/</link>
		<comments>http://www.randytroppmann.com/2009/05/28/youtube-as-html5-the-end-of-flash-dominance-of-video/#comments</comments>
		<pubDate>Thu, 28 May 2009 22:45:16 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=322</guid>
		<description><![CDATA[Google has posted a proof of concept showing YouTube using HTML 5. http://www.youtube.com/html5 I was able to view this with Safari. You will note that there is no Flash on this page. Apparently the video tag uses system video resources so if you previously installed a h.264 codec, it should just work. The controls are [...]]]></description>
			<content:encoded><![CDATA[<p>Google has posted a proof of concept showing YouTube using HTML 5.</p>
<p><a href="http://www.youtube.com/html5">http://www.youtube.com/html5</a></p>
<p>I was able to view this with Safari. You will note that there is no Flash on this page. Apparently the video tag uses system video resources so if you previously installed a h.264 codec, it should just work. The controls are all HTML. Does this mean the end to dominance of Flash delivered video on the web?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/05/28/youtube-as-html5-the-end-of-flash-dominance-of-video/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Encryption and licensing with Nitro-LM</title>
		<link>http://www.randytroppmann.com/2009/05/27/encryption-and-licensing-with-nitro-lm/</link>
		<comments>http://www.randytroppmann.com/2009/05/27/encryption-and-licensing-with-nitro-lm/#comments</comments>
		<pubDate>Wed, 27 May 2009 16:00:24 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=315</guid>
		<description><![CDATA[I recently attended a 3-day "entrepreneur bootcamp" where angel investors taught how to pitch an idea to angel investors for investment capital. One of the first things they will want to know is how you protect your intellectual property. In the case of software, protection of algorithms is key and in the case of Flex [...]]]></description>
			<content:encoded><![CDATA[<p>I recently attended a 3-day "entrepreneur bootcamp" where angel investors taught how to pitch an idea to angel investors for investment capital. One of the first things they will want to know is how you protect your intellectual property. In the case of software, protection of algorithms is key and in the case of Flex your software secrets are protected from a right click "view source" since the application is contained within a compiled swf. Tools are available, however, that allow you to easily decompile the swf and look at the goodies inside.</p>
<p><a href="http://www.simplifiedlogic.com/">Simplified Logic Inc</a> has a product that uses a private key encryption method that stops decompilation of the swf. They also have developed a backend system that can manage licenses to your application. I have been developing a Flex application for use in teaching anatomy to students at the technical institute I work at. It has proven to be a powerful tool and there is opportunity to license this application to other institutions, but there is no infrastructure to do this. I have built a proof of concept using <a href="http://nitrolm.com/">Nitro-LM</a> to show that we can deploy this application on the web using a Software as a Service model without creating much of a deployment infrastructure on our end beyond what we already have in place.</p>
<p>The NitroAdmin AIR app is used to set up and manage the encryption and licenses. Videos and examples show how to integrate the system into your Flex app but I think they need to do a bit more work around this ... perhaps a "wizard" or video that shows from start to finish the basic setup. It still took a bit of handholding to get me up and running (thanks Andrew). The proof of concept is doing its job of proving this works in a way that is unobtrusive to users. Now all that is left is the easy part: to build a business model around my application and then go out and sell it. That is someone else's job.</p>
<p>Simplified Logic was a major sponsor of the recent 360 Flex conference in Indianapolis. I want to say thanks to them for supporting this event. It was a good one and I enjoyed the environs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/05/27/encryption-and-licensing-with-nitro-lm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
