<?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; Flex development</title>
	<atom:link href="http://www.randytroppmann.com/category/flex-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.randytroppmann.com</link>
	<description>Interactive designer / developer • Web • Mobile • Desktop</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:41:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>StageVideo in Flex mini-gotchya</title>
		<link>http://www.randytroppmann.com/2011/07/11/stagevideo-in-flex-mini-gotchya/</link>
		<comments>http://www.randytroppmann.com/2011/07/11/stagevideo-in-flex-mini-gotchya/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 20:29:49 +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=924</guid>
		<description><![CDATA[I was playing around with the new Flash-based stage video api using Thibault Imbert&#8217;s tutorial. I used Flex to build my proof of concept and tried to stream video from our FMS server via RTMP. It all seemed pretty straight forward but for the life of me I couldn&#8217;t figure out why I could only [...]]]></description>
			<content:encoded><![CDATA[<p>I was playing around with the new Flash-based stage video api using <a href="http://www.adobe.com/devnet/author_bios/thibault_imbert.html">Thibault Imbert&#8217;s</a> <a href="http://www.adobe.com/devnet/flashplayer/articles/stage_video.html">tutorial</a>. I used Flex to build my proof of concept and tried to stream video from our FMS server via RTMP. It all seemed pretty straight forward but for the life of me I couldn&#8217;t figure out why I could only <strong>hear</strong> and not <strong>see</strong> the video. Of course! Stage video sits behind everything on the display list and all I had to do was set my base application to have an background alpha of 0. I love simple solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2011/07/11/stagevideo-in-flex-mini-gotchya/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex Mobile for iOS has arrived</title>
		<link>http://www.randytroppmann.com/2011/06/20/flex-mobile-for-ios-has-arrived/</link>
		<comments>http://www.randytroppmann.com/2011/06/20/flex-mobile-for-ios-has-arrived/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 16:51:56 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>
		<category><![CDATA[iphone development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=911</guid>
		<description><![CDATA[Things are moving so fast. Last fall I released an app for Android using Flash Builder and Adobe AIR. I remember thinking how great it would be if I could package up the same app for iOS. AIR for iOS? Will never happen. (I was wrong. More about that in a bit). After all, it [...]]]></description>
			<content:encoded><![CDATA[<p>Things are moving so fast. Last fall I released an app for Android using Flash Builder and Adobe AIR. I remember thinking how great it would be if I could package up the same app for iOS. AIR for iOS? Will never happen. (I was wrong. More about that in a bit). After all, it had only been a month or so since Apple modified their terms of service once again allowing cross-compiled apps onto the app store. Adobe had pretty much abandoned their iOS efforts and AIR had progressed significantly over the previous 6 months.</p>
<p>In fall 2010 Adobe reintroduced the &#8220;packager&#8221; for iOS on their Labs site which allowed developers to cross compile Flash and AS3 projects to apps that ran on iOS. Spring 2011 Flash Builder 4.5 was released which included a version of ADT that included the iOS packager and enabled the FB build process (no command line mess) to create iOS apps from AS3-only projects. Missing from FB 4.5, however, was the ability to create a Flex-based mobile projects targeted for iOS. It was still possible to use the command line to craft a command to get ADT to build an iOS app out of your Flex Mobile project. But running this app on an iPad showed that Flex Mobile via AIR on iOS was not quite ready for primetime; the performance was not great.</p>
<p>The <a href="http://blogs.adobe.com/flashplayer/2011/06/adobe-air-2-7-now-available-ios-apps-4x-faster.html">recent release of AIR 2.7</a> has changed all that. With this release Flex mobile apps run with &#8220;native&#8221; performance on iOS. The difference is astounding! It&#8217;s just magical. I have no idea how they did it, but kudos to the Adobe engineers.</p>
<p>This has paved the way for Flash Builder 4.5.1 to now support iOS in the Flex Mobile AIR project wizard. You will now see three target platforms: Apple iOS, Blackberry Tablet OS and Google Android. How sweet is that? It&#8217;s only going to get better.</p>
<p>The version of AIR in FB 4.5.1 release is confusing, however. Officially, FB 4.5.1 uses and supports AIR 2.6. However if you build an iOS app it will indeed use AIR 2.7 to build it. This is confusing! You would think that Adobe would sync the release of AIR 2.7 with their FB 4.5.1 release but it looks like that did not happen. I&#8217;m sure that the next update to FB will fix this.</p>
<p>Flash Builder 4.5.1 is available as an <a href="http://www.adobe.com/support/flex/downloads_updaters.html">updater patch</a> for FB 4.5. If you don&#8217;t have FB 4.5 installed you can download a 60 day trial from <a href="http://www.adobe.com/cfusion/tdrc/thankyou_2.0.cfm?product=flash_builder&#038;loc=en_us">here</a>.<br />
<a href="http://www.randytroppmann.com/wp-content/uploads/2011/06/flexmobile-ios.png"><img src="http://www.randytroppmann.com/wp-content/uploads/2011/06/flexmobile-ios.png" alt="" title="Flash Builder wizard for Flex Mobile Projects " width="590" height="677" class="alignnone size-full wp-image-913" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2011/06/20/flex-mobile-for-ios-has-arrived/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Purely mobile AS3 workflow with Flash Builder 4.5</title>
		<link>http://www.randytroppmann.com/2011/04/12/pure-as3-workflow-with-flex-builder-4-5/</link>
		<comments>http://www.randytroppmann.com/2011/04/12/pure-as3-workflow-with-flex-builder-4-5/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 15:36:15 +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=865</guid>
		<description><![CDATA[I like building apps with &#8220;pure as3&#8243; because it makes me feel like I am programming closer to the metal. A pure AS3 project uses only ActionScript and does not use the Flex framework in any way but still uses mxmlc, the Flex compiler, to create the final swf. The result is a very compact [...]]]></description>
			<content:encoded><![CDATA[<p>I like building apps with &#8220;pure as3&#8243; because it makes me feel like I am programming closer to the metal. A pure AS3 project uses only ActionScript and does not use the Flex framework in any way but still uses mxmlc, the Flex compiler, to create the  final swf. The result is a very compact swf that contains just the code it needs to do the job. There is, however, a price to pay. There is no data-binding, layout manager or mxml and it generally takes a lot more effort to make a polished app.</p>
<p>Flash Builder 4.5  provides a new workflow for building mobile applications making it much easier to develop and test apps. A new project wizard called &#8220;ActionScript Mobile Project&#8221; takes a lot of the pain out of setting up your mobile project and points you in the right direction. The dialog guides you through specific decisions up front so that in the end the project will compile a package for the targeted platform with little fuss. (That is if you avoid the iOS platform, which will require a bunch more fuss.)</p>
<div id="attachment_863" class="wp-caption alignnone" style="width: 540px"><img src="http://www.randytroppmann.com/wp-content/uploads/2011/04/fb4dot5_1.png" alt="Mobile Permissions in Flex Builder 4.5 " title="fb4dot5_1" width="480" height="610" class="size-full wp-image-863" /><p class="wp-caption-text">Mobile Permissions in Flash Builder 4.5 &quot;Actionscript Mobile Project&quot; wizard</p></div>
<p>A new &#8220;ActionScript Mobile Project&#8221; has one class that contains two important lines of boilerplate code:</p>
<p><code style="padding-left:10px"><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageAlign.html">stage.align = StageAlign.TOP_LEFT;</a></code><br />
<code style="padding-left:10px"><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html">stage.scaleMode = StageScaleMode.NO_SCALE</a>;</code></p>
<p>The absense of these lines is a gotchya for those new to AS3-only development and needs only to be declared once. If you intend to utilize multi-touch you will need to set the input mode:</p>
<p><code style="padding-left:10px"><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/MultitouchInputMode.html">Multitouch.inputMode =  MultitouchInputMode.TOUCH_POINT;</code></a></p>
<p>Also consider setting the StageDisplayState:</p>
<p><code style="padding-left:10px"><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageDisplayState.html">stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;</a></code></p>
<p>Now you are ready to code up some app magic. </p>
<p>On-device testing is much easier now. Simply connect your Android device via USB and you can run or debug your app directly from Flash Builder. This feature was not available when I developed <a href="https://market.android.com/details?id=air.com.runningmap.Trackometer">RunningMap Trackometer</a> last summer and I find it to be a huge help. If you are running in debug mode, traces show up in the Flash Builder console. </p>
<div id="attachment_864" class="wp-caption alignnone" style="width: 528px"><img src="http://www.randytroppmann.com/wp-content/uploads/2011/04/fb4dot5_2.png" alt="Run Configurations" title="fb4dot5_2" width="518" height="480" class="size-full wp-image-864" /><p class="wp-caption-text">The &quot;Run Configuration&quot; dialog lets you specify where to run the application when testing: on your desktop or on a connected device.</p></div>
<p>Use &#8220;Export Release Build&#8221; to prepare the final binary or package that can be submitted to the appropriate app store. Be forewarned: each app store has it&#8217;s own peculiarities, agreements, requirements and hurdles. FB does it&#8217;s best to get you over the hurdles &#8230; but it can only do so much.</p>
<p>So there you have it: end-to-end creation of platform agnostic apps with ActionScript and Flash Builder. Since mxmlc is used to build the swf, Flash Professional is not required in this workflow. But don&#8217;t count it out out! I still lean on Flash Pro and Adobe Illustrator heavily to create visual assets that get embedded into my AS3-only projects. And &#8230; Flash Pro has it&#8217;s own end-to-end workflow for building apps if that&#8217;s how you roll. The Flash Pro code editor has been improved and is now somewhat tolerable to use. Just feels a little further from the metal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2011/04/12/pure-as3-workflow-with-flex-builder-4-5/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>Displaying elevation with Axiis &#8211; example</title>
		<link>http://www.randytroppmann.com/2009/10/29/displaying-elevation-with-axiis-example/</link>
		<comments>http://www.randytroppmann.com/2009/10/29/displaying-elevation-with-axiis-example/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:47:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=464</guid>
		<description><![CDATA[Axiis is the open source data visualization framework Tom Gonzalez talked about at Adobe Max earlier this month. Watch his presentation here. At this session Tom announced the release of Beta 1.0 of the library which is built upon Flex 3. I recently finished and deployed a complete rewrite of the map mashup RunningMap.com which [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://axiis.org/">Axiis</a> is the open source data visualization framework Tom Gonzalez talked about at Adobe Max earlier this month. Watch his presentation <a href="http://tv.adobe.com/watch/max-2009-develop/advanced-data-visualization-with-flex/">here</a>. At this session Tom announced the release of Beta 1.0 of the library which is built upon Flex 3.</p>
<p>I recently finished and deployed a complete rewrite of the map mashup <a href="http://www.runningmap.com">RunningMap.com</a> which uses Axiis to display elevation data in a line graph. After seeing his presentation 360|Flex last May I decided to give the (then alpha) Axiis framework a try. Upgrading to the Beta 1.0 release was painless and immediately I noticed the drawing performance of the graph went from slow(ish) (which actually was not a bad effect) to instantaneous.</p>
<p>Connecting my data source to the graph was a challenge and I had to use the debugger to get the data wrapped &#8220;just right&#8221;. I put together an example that illustrates:</p>
<ul>
<li>use of Axiis LineSeriesGroup</li>
<li>wrapping an array collection &#8220;just right&#8221; so it can be bound as a data source</li>
<li>overlaying the graph on a map</li>
<li>setting the data tip using a function</li>
</ul>
<p>The live example is <a href="http://www.randytroppmann.com/axiis/elevation/MapAxiisExample.html">here</a> which is source view enabled.</p>
<p><a href="http://www.randytroppmann.com/axiis/elevation/MapAxiisExample.html"><img src="http://www.randytroppmann.com/wp-content/uploads/2009/10/map-axiis-example.png" alt="Axiis line graph example" title="map-axiis-example" width="600" height="480" class="size-full wp-image-463" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/10/29/displaying-elevation-with-axiis-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting dataprovider for Axiis line graph</title>
		<link>http://www.randytroppmann.com/2009/08/28/setting-dataprovider-for-axiis-line-graph/</link>
		<comments>http://www.randytroppmann.com/2009/08/28/setting-dataprovider-for-axiis-line-graph/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 16:42:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex development]]></category>
		<category><![CDATA[Runningmap]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=415</guid>
		<description><![CDATA[I am building a widget to show routes for Runningmap.com and thought I would give Axiis a try for the elevation graph. The examples show a couple techniques for connecting a cvs formatted or xml source file as the data source for the graph. Connecting my ArrayCollection of value objects stumped me however. Tom Gonzalez [...]]]></description>
			<content:encoded><![CDATA[<p>I am building a widget to show routes for <a href="http://www.runningmap.com/">Runningmap.com</a> and thought I would give <a href="http://axiis.org/">Axiis</a> a try for the elevation graph. The examples show a couple techniques for connecting a cvs formatted or xml source file as the data source for the graph. Connecting my ArrayCollection of value objects stumped me however. <a href="http://www.twgonzalez.com/blog/">Tom Gonzalez</a> was kind enough to guide me to the solution which was to wrap the collection in just the right way so that Axiis could get at the data. The rest was, as I expected, magic.</p>
<p>Wrapping the collection looked like this:</p>
<div class="igBar"><span id="lactionscript-3"><a href="#" onclick="javascript:showCodeTxt('actionscript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-3">
<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;">protected <span style="color: #000000; font-weight: bold;">function</span> handleNewMapData<span style="color: #66cc66;">&#40;</span>p_evt:Event<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;"><span style="color: #000000; font-weight: bold;">var</span> wrapper:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><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;">wrapper.<span style="color: #006600;">plots</span> = model.<span style="color: #006600;">routePoints</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> dataCollection:ArrayCollection = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<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;">dataCollection.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>wrapper<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;">dataProvider = dataCollection;</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;">dc.<span style="color: #006600;">invalidateDisplayList</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;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Then set the "plotCollection" and "dataField" properties in the LineSeriesGroup:</p>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showCodeTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-4">
<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;">&lt;axiis:DataCanvas </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;">width</span>=<span style="color: #ff0000;">"90%"</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;">height</span>=<span style="color: #ff0000;">"50"</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; y=<span style="color: #ff0000;">"15"</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; id=<span style="color: #ff0000;">"dc"</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; horizontalCenter=<span style="color: #ff0000;">"0"</span>&gt;</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; &lt;axiis:layouts&gt;</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; &lt;groupings:LineSeriesGroup </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; verticalScale=<span style="color: #ff0000;">"{vScale}"</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; id=<span style="color: #ff0000;">"myLineGroup"</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; x=<span style="color: #ff0000;">"0"</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; y=<span style="color: #ff0000;">"0"</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;">height</span>=<span style="color: #ff0000;">"{dc.height}"</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: #0066CC;">width</span>=<span style="color: #ff0000;">"{dc.width-10}"</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; plotCollection=<span style="color: #ff0000;">"plots"</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; dataProvider = <span style="color: #ff0000;">"{dataProvider}"</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; dataField=<span style="color: #ff0000;">"elevation"</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; /&gt;</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; &lt;/axiis:layouts&gt;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/axiis:DataCanvas&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>And here it is:</p>
<p><script type="text/javascript">
var runningmapFlashVars = {routeID:"116791",zoom:"8",centerLat:"",centerLon:"",mapType:"STREET_MAP_TYPE"};
var runningmapFlashParams = {};
swfobject.embedSWF("http://www.runningmap.com/widgets/runningmapwidget.swf", "runningmap-widget", 600, 450, "9.0.124", "http://www.runningmap.com/widgets/expressInstall.swf", runningmapFlashVars, runningmapFlashParams );
</script></p>
<div id="runningmap-widget">Map did not load</div>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/08/28/setting-dataprovider-for-axiis-line-graph/feed/</wfw:commentRss>
		<slash:comments>1</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-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;"><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-8"><a href="#" onclick="javascript:showCodeTxt('code-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-8">
<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>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>
		<item>
		<title>360 Flex Indy was outstanding</title>
		<link>http://www.randytroppmann.com/2009/05/20/360-flex-indy-was-outstanding/</link>
		<comments>http://www.randytroppmann.com/2009/05/20/360-flex-indy-was-outstanding/#comments</comments>
		<pubDate>Wed, 20 May 2009 21:00:18 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flex development]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=304</guid>
		<description><![CDATA[The conference in Indianapolis was fantastic and the sponge is full. Met so many fellow developers. Was accused of stalking Adobe employees, but I only said hi to Matt Chotin once. So much to experiment with. FlexUnit 4 is important. Degrafa looks compelling. Will definitely look into Axiis data visualization library. I am intrigued by [...]]]></description>
			<content:encoded><![CDATA[<p>The conference in Indianapolis was fantastic and the sponge is full. Met so many fellow developers. Was accused of stalking Adobe employees, but I only said hi to Matt Chotin once. So much to experiment with. FlexUnit 4 is important. Degrafa looks compelling. Will definitely look into Axiis data visualization library. I am intrigued by Maté as a framework. OpenFlux ... Yes!!!! ESRI has a new free mapping API ... BAM. Lazy loading datagrid using cacheing and synchronization (props to Zach Pinter) ... I need that. According to Jeff Tapper's 7 golden rules of how not to code in Flex, I should have been fired 7 times. RSL's! RSLs! RSLs! But my favorite session was by Doug McCune. He talked about stuff that re-inspired him as a developer.</p>
<p>This slide is about how Flex application development became a job, and nothing much more than that.</p>
<p><a href="http://www.flickr.com/photos/randytroppmann/3549854710/" title="Doug McCune at 360flex Indy by randy.troppmann, on Flickr"><img src="http://farm4.static.flickr.com/3581/3549854710_5f535d94d9.jpg" width="500" height="375" alt="Doug McCune at 360flex Indy" /></a></p>
<p>Doug's live demo on head tracking in Flash. He showed an application that can be used for "Safe Sexting". You can do whatever you want on the video and your face will be tracked and blurred. Big laughs on this one.</p>
<p><a href="http://www.flickr.com/photos/randytroppmann/3549046753/" title="IMG_0042 by randy.troppmann, on Flickr"><img src="http://farm4.static.flickr.com/3589/3549046753_a3d96788e2.jpg" width="500" height="375" alt="IMG_0042" /></a></p>
<p>Doug had a unique take on how to push the concept of Augmented Reality. He gave himself boobs in this live demo. </p>
<p><a href="http://www.flickr.com/photos/randytroppmann/3549047001/" title="IMG_0044 by randy.troppmann, on Flickr"><img src="http://farm3.static.flickr.com/2472/3549047001_2c59ab9016.jpg" width="500" height="375" alt="IMG_0044" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/05/20/360-flex-indy-was-outstanding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Watching trace statements when running Flash content in the browser</title>
		<link>http://www.randytroppmann.com/2009/04/02/watching-trace-statements-when-running-flash-content-in-the-browser/</link>
		<comments>http://www.randytroppmann.com/2009/04/02/watching-trace-statements-when-running-flash-content-in-the-browser/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 17:08:26 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Flash development]]></category>
		<category><![CDATA[Flex development]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.randytroppmann.com/?p=273</guid>
		<description><![CDATA[As Flash and Flex applications get more complex the ability to watch trace statements while running the application in a browser is invaluable. This is how I do it (in OSX): 1) find your mm.cfg file. Mine is located here: ~username/mm.cfg (substitute "username" with your real username) 2) open it in a text editor and [...]]]></description>
			<content:encoded><![CDATA[<p>As Flash and Flex applications get more complex the ability to watch trace statements while running the application in a browser is invaluable. This is how I do it (in OSX):</p>
<p>1) find your mm.cfg file. Mine is located here: ~username/mm.cfg (substitute "username" with your real username)</p>
<p>2) open it in a text editor and add these lines:</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showCodeTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<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;">ErrorReportingEnable=<span style="color:#800000;color:#800000;">1</span> </div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">TraceOutputFileEnable=<span style="color:#800000;color:#800000;">1</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;">MaxWarnings=<span style="color:#800000;color:#800000;">0</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>3) open a terminal window and add this to your .profile file.</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;">alias trace=tail\ -f\ <span style="color:#CC0000;">"/Users/username/Library/Preferences/Macromedia/Flash<span style="color:#000099; font-weight:bold;">\ </span>Player/Logs/flashLog.txt"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>To watch your browser throw trace statements, just open a terminal window and type "trace" and they will now appear in the terminal window. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.randytroppmann.com/2009/04/02/watching-trace-statements-when-running-flash-content-in-the-browser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

