<?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"
	>

<channel>
	<title>FlashApe</title>
	<atom:link href="http://www.visible-form.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visible-form.com/blog</link>
	<description>Rich Rodecker's blog on flash, flex, actionscript, javascript, and php, with a dash of randomness</description>
	<pubDate>Fri, 03 Jul 2009 20:52:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Flex localization with Resource Bundles</title>
		<link>http://www.visible-form.com/blog/flex-localization-with-resource-bundles/</link>
		<comments>http://www.visible-form.com/blog/flex-localization-with-resource-bundles/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 20:52:47 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=404</guid>
		<description><![CDATA[Working with resource bundles in Flex is (surprise, surprise) relatively easy and pretty cool.  They're a great way to separate content from code and localize your flex apps.  You have the choice to either compile the different locales statically into the app, or load them dynamically using the ResourceManager.  

Adding support for [...]]]></description>
			<content:encoded><![CDATA[<p>Working with resource bundles in Flex is (surprise, surprise) relatively easy and pretty cool.  They're a great way to separate content from code and localize your flex apps.  You have the choice to either compile the different locales statically into the app, or load them dynamically using the ResourceManager.  </p>
<p><strong><br />
<h3>Adding support for different locales</h3>
<p></strong><br />
First thing you need to know is that, Flex techinically doesn't support most locales right "out of the box".  In order to support more, it needs to create a bunch of framework resource SWCs for each locale you want to use.  This is really easy though.  There is a command-line utillity called <code>copylocale</code> that will handle creating those for you...all you need to do is tell it which locale you want to create.  Pop open a terminal and navigate to your flex SDK directory, and run this command, substituting "fr_FR" for the locale you wish to create:</p>
<blockquote><p><code>./bin/copylocale en_US fr_FR</code></p></blockquote>
<p>This will generate all the asset files the framework needs.  You're done with this part.</p>
<p><strong><br />
<h3>Adding resource bundles</h3>
<p></strong><br />
To add resource bundles, there are a few steps you need to follow.  Each step will be discussed further below:</p>
<ul>
<li>Create a source directory in your project for each locale you wish to use.  Normally, it would go something allong the lines of src/locale/en_US, src/locale/en_GB, etc.</li>
<li>Create a properties file that will contain the resources to be localized. This property file is a simple text file containing key/value pairs.  Mostly it's going to contain strings to be localized, but can also contain ClassReferences and Embedded assets, just like a style swf.</li>
<li> If you want to compile all the locales into the app, update the compiler settings to include the locales and source paths into the app.</li>
<li>If you would like to load the additional locales on demand, create a resource swf to be loaded in by calling ResourceMananger.loadResourceModule().</li>
</ul>
<p><strong><br />
<h3>Creating the properties file</h3>
<p></strong><br />
The properties file is what the compiler uses to make the resource bundle.  In fact, the compiler parses that file and creates a subclass of ResourceBundle for use in the app.   It is made up of simple key/value pairs:</p>
<blockquote><p>mytitle=Title<br />
myothervalue=This is some other text we want to localize</p></blockquote>
<p>You don't enclose the strings in quotes, and any whitespace before the value is trimmed (which is great for keeping your properties file nice and neat).  Whatever you name the file will be the name of the resource bundle:  a file named "strings.properties" becomes the "strings" resource bundle in the app. One important note, the text file must be encoded in UTF-8.</p>
<p><strong>Telling the flex compiler which bundles to include in the app</strong><br />
In order for flex to know which resource bundles you plan on using in the app, you need to explicitly tell it using metadata tags.  In mxml it looks like:</p>
<div class="igBar"><span id="lxml-5"><a href="#" onclick="javascript:showPlainTxt('xml-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-5">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Metadata<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;[ResourceBundle(&quot;strings&quot;)]</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/mx</span>:Metadata<span style="font-weight: bold; color: black;">&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and in actionscript it looks like this:</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#91;</span>ResourceBundle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"myResources"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong><br />
<h3>Specifying which locales to compile into the app</h3>
<p></strong><br />
If you are going to statically compile all the locales you want to use in the app, you simple add a couple of compiler options:</p>
<blockquote><p><code>-locale=en_US,fr_FR -source-path=locale/{locale}</code></p></blockquote>
<p>if you get a warning about the source path overlapping after changing those options, you can also add the compiler option <code>-allow-source-path-overlap=true</code>.</p>
<p>Now when you compile your app, flex will create resource bundles for each of the locales.</p>
<p><strong><br />
<h3>Creating resource modules to dynamically load in</h3>
<p></strong><br />
If you would like to load different locale bundles on the fly, you need to comile swfs for each locale.  Unfortunately, you cannot do this within Flex Builder, you must use the command line. Luckily, this is also easy, though it is a two step process.</p>
<p>First, we need to find out exactly which bundles to include into the module swf.  The way we do this is by compiling our app with no locale specified, and including the compiler option <code>-resource-bundle-list</code>: </p>
<blockquote><p><code>mxmlc -locale= -resource-bundle-list=myresources.txt MyApp.mxml</code></p></blockquote>
<p>Note that the above example using the command line, but you can do this part in Flex Builder by adding additional compiler options under the project preferences (Flex Compiler > additional compiler arguments).  Now when you compile the app, a text file will be output that contains a list of bundles to include in the module:</p>
<blockquote><p>bundles = strings collections containers controls core effects skins styles</p></blockquote>
<p>Note the "strings" bundle.  Flex knew to include this because we specified it in the metadata.</p>
<p>What do we do with that list?  That's the second step.  We go back to the command line, and use that list as part of a the <code>-include-resource-bundles</code> compiler argument when we compile the module swf.  Open a terminal window, navigate to your projects directory, and use the following command:</p>
<blockquote><p><code>mxmlc -locale=en_US -source-path=locale/{locale} -include-resource-bundles=strings,collections,containers,controls,core,effects,skins,styles -output en_US_resources.swf</code></p></blockquote>
<p>You can customize the -output file name to your liking, and be sure the -source-path arguments points to the directory which contains the properties file.  Repeat this step for each locale you want to compile, changing the -locale and -output options accordingly.</p>
<p><strong><br />
<h3>Using the resource bundles</h3>
<p></strong><br />
Using the resource bundles is pretty easy.  Wherever you want a string localized, you can do two things:</p>
<p>If you plan on only localizing once when the app starts, you can use the @Resource() compiler directive wherever you want to use the text.  You simply pass the name of the resource bundle, and the key which you wish to use:</p>
<div class="igBar"><span id="lxml-7"><a href="#" onclick="javascript:showPlainTxt('xml-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-7">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Label <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"@Resource(bundle='strings', key='mytitle')"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you plan on dynamically updating the content during the life of the app (for example, allowing the suer to set the locale), you can use bindings and the ResourceManager singleton to specify the strings:</p>
<div class="igBar"><span id="lxml-8"><a href="#" onclick="javascript:showPlainTxt('xml-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-8">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mx</span>:Label <span style="color: #000066;">text</span>=<span style="color: #ff0000;">"{resourceManager.getString('strings', 'mytitle')}"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>When using bindings, the value of the string will be updated once you set the <code>ResourceManager.localeChain</code> property, which is an array containing the locales to use, in cascading order.  For example, if you specify ['fr_FR', 'en_US'], the ResourceManager will first look for the key in the fr_FR bundle.  If that key is not found, it will use the key from the en_US bundle instead.  You can use just a single locale in the array if you wish.</p>
<p><strong><br />
<h3>Loading additional resource bundles</h3>
<p></strong><br />
Again, pretty simple.  you can use <code>ResourceManager.loadResourceBundles()</code> to load the resource module swf containing the new locale.  One that locale is loaded, you can set the <code>ResourceManager.localeChain</code> property to use the new locale.</p>
<p>For some additional info, the <a href="http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization">Runtime Localization article on Labs</a> is a great resource.  Also see:</p>
<p><a href="http://www.herrodius.com/blog/123">http://www.herrodius.com/blog/123</a><br />
<a href="http://soenkerohde.com/2008/07/flex-localization/">http://soenkerohde.com/2008/07/flex-localization/</a><br />
<a href="http://hillelcoren.com/2008/09/12/resource-bundles-in-flex-wo-lots-of-extra-code/">http://hillelcoren.com/2008/09/12/resource-bundles-in-flex-wo-lots-of-extra-code/</a> ( for a nice ResourceManager utility class)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/flex-localization-with-resource-bundles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TransformManager fix for Mac Firefox</title>
		<link>http://www.visible-form.com/blog/transformmanager-fix-for-mac-firefox/</link>
		<comments>http://www.visible-form.com/blog/transformmanager-fix-for-mac-firefox/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 21:14:07 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=398</guid>
		<description><![CDATA[This post is specifically about Jack Doyle's (aka greensock) awesome TransformManager tool, but the overall idea solves the issue of mouse up events when releasing the mouse button outside the stage in Mac Firefox.
In case you didn't know already, in Firefox on the Mac there is a problem with releasing the mouse outside the browser [...]]]></description>
			<content:encoded><![CDATA[<p>This post is specifically about <a href="http://blog.greensock.com/">Jack Doyle's (aka greensock)</a> awesome <a href="http://blog.greensock.com/transformmanageras3/">TransformManager</a> tool, but the overall idea solves the issue of mouse up events when releasing the mouse button outside the stage in Mac Firefox.</p>
<p>In case you didn't know already, in Firefox on the Mac there is a problem with releasing the mouse outside the browser window.  If you click within the swf, then while holding the mouse button down, drag outside the browser window, then release the mouse button, Mac FF doesn't hear the MOUSE_UP event.  Obviously, this is a problem for the TM because if you do that, when you bring the mouse back over the swf, the MOUSE_MOVE handlers are still firing, and the selection is still following the mouse, event though you've released the mouse button.  </p>
<p>The key to the whole fix is that in Mac FF, the MOUSE_LEAVE event will not fire until you release the mouse button, if it was being held down when you drag out of the swf.  </p>
<p>So to solve this I tweaked the TM class as follows:</p>
<p>add a helper method to determine if it is mac ff, and one to dispatch fake mouse up events (you'll see why in a bit)</p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// on Mac Firefox, if you click the mouse button, </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// then drag out of the browser window and release the mouse button,</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// the MOUSE_LEAVE event doesn't fire doesn't fire until the mouse button is released.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Knowing that we can properly handle MOUSE_UP events for moving, resizing, etc.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> isFirefoxMac<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// this is adapted from some flex code</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<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> browserUserAgent:<span style="color: #0066CC;">String</span> = ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"navigator.userAgent.toString"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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> browserPlatform :<span style="color: #0066CC;">String</span> = ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"navigator.platform.toString"</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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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> isFirefoxMac:<span style="color: #0066CC;">Boolean</span> = <span style="color: #66cc66;">&#40;</span>browserUserAgent &amp;&amp; browserPlatform &amp;&amp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; browserUserAgent.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Firefox"</span><span style="color: #66cc66;">&#41;</span>&gt; -<span style="color: #cc66cc;color:#800000;">1</span> &amp;&amp; browserPlatform.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Mac"</span><span style="color: #66cc66;">&#41;</span>&gt; -<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> isFirefoxMac;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> dispatchFakeMouseUpEvent<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:#3A6A8B;">
<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> mevent:MouseEvent = <span style="color: #000000; font-weight: bold;">new</span> MouseEvent<span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_UP</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #000000; font-weight: bold;">false</span>, _stage.<span style="color: #006600;">mouseX</span>, _stage.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span>mevent<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:#3A6A8B;">
<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, I made a slight modification to the onPress* methods, to check if it isFirefoxMac, if so also listen for the MOUSE_LEAVE event.  </p>
<div class="igBar"><span id="lactionscript-15"><a href="#" onclick="javascript:showPlainTxt('actionscript-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-15">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onPressRotate<span style="color: #66cc66;">&#40;</span>$e:MouseEvent<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:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//... whatever pre-existing code ...</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_MOVE</span>, onMouseMoveRotate, <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:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">MOUSE_UP</span>, onReleaseRotate, <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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> isFirefoxMac <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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">MOUSE_LEAVE</span>, onMouseLeaveRotate, <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:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// other stuff...</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<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:#26536A;">
<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>Each type of press gets an associated onMouseLeave* event (onMouseLeaveScale, onMouseLeaveRotate, etc).  </p>
<div class="igBar"><span id="lactionscript-16"><a href="#" onclick="javascript:showPlainTxt('actionscript-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-16">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMouseLeaveRotate<span style="color: #66cc66;">&#40;</span>event: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:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">MOUSE_LEAVE</span>, onMouseLeaveRotate<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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchFakeMouseUpEvent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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>Actually, the onMouseLeaveMove handler is slightly different since onReleaseMove() doesnt need a mouse event:</p>
<div class="igBar"><span id="lactionscript-17"><a href="#" onclick="javascript:showPlainTxt('actionscript-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-17">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMouseLeaveMove<span style="color: #66cc66;">&#40;</span>event: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:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _stage.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">MOUSE_LEAVE</span>, onMouseLeaveMove<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:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onReleaseMove<span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<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>I also added a line to the removeParentListeners() method to remove the onMouseLeaveMove handler:</p>
<div class="igBar"><span id="lactionscript-18"><a href="#" onclick="javascript:showPlainTxt('actionscript-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-18">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_stage.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">MOUSE_LEAVE</span>, onMouseLeaveMove<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That's just about it, just one more small tweak to the TransformItem class.  You need to do the same routine for the TransformItem.onMouseDown() method:  Check for Mac FF, if so add a MOUSE_LEAVE handler, and in the onMouseLeave() method just call the onMouseUp() method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/transformmanager-fix-for-mac-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex 4 stuff up on labs</title>
		<link>http://www.visible-form.com/blog/flex-4-stuff-up-on-labs/</link>
		<comments>http://www.visible-form.com/blog/flex-4-stuff-up-on-labs/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 16:32:26 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=395</guid>
		<description><![CDATA[New releases of Flash Builder and the Flex SDK are up on Adobe Labs.  I'm very excited about the new version of Flex, it seems to work out a lot of the issues I had with Flex 3.  States actually look easy to use now, and skinning and styling looks much, much improved. [...]]]></description>
			<content:encoded><![CDATA[<p>New releases of <a href="http://labs.adobe.com/technologies/flashbuilder4/">Flash Builder</a> and the <a href="http://labs.adobe.com/downloads/flex4sdk.html">Flex SDK</a> are up on Adobe Labs.  I'm very excited about the new version of Flex, it seems to work out a lot of the issues I had with Flex 3.  States actually look easy to use now, and skinning and styling looks much, much improved.  There's a good read <a href="http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html">here at the Flex Developer Center</a> with an overview about the main differences between Flex 3 &#038; 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/flex-4-stuff-up-on-labs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>V!</title>
		<link>http://www.visible-form.com/blog/v/</link>
		<comments>http://www.visible-form.com/blog/v/#comments</comments>
		<pubDate>Fri, 22 May 2009 18:05:45 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=393</guid>
		<description><![CDATA[YEAH!!  Saw this on johnwilker.com, one of my favorite childhood tv shows (actually it was a mini-series), V, is coming back, and it looks pretty sweet! Check out the trailer here.  Hopefully this can replace Sarah Connor as one of my must-watch shows.
]]></description>
			<content:encoded><![CDATA[<p>YEAH!!  Saw this on <a href="http://johnwilker.com/2009/05/ok-v-looks-bad-ass/">johnwilker.com</a>, one of my <a href="http://en.wikipedia.org/wiki/V_(The_Original_Miniseries)">favorite childhood tv shows</a> (actually it was a mini-series), V, is coming back, and it looks pretty sweet! Check out the trailer <a href="http://www.youtube.com/watch?v=ahjPQjQGdbU&#038;feature=player_embedded">here</a>.  Hopefully this can replace Sarah Connor as one of my must-watch shows.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/v/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Error installing AIR app</title>
		<link>http://www.visible-form.com/blog/error-installing-air-app/</link>
		<comments>http://www.visible-form.com/blog/error-installing-air-app/#comments</comments>
		<pubDate>Wed, 20 May 2009 16:08:56 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=390</guid>
		<description><![CDATA[I was trying to install an AIR app I'm working on, and during the install process kept getting hit with this error:
The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the application author.
I tried a few solutions I came across (one involving deleting the /var/folders/zzz [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to install an AIR app I'm working on, and during the install process kept getting hit with this error:</p>
<blockquote><p>The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the application author.</p></blockquote>
<p>I tried a few solutions I came across (one involving deleting the /var/folders/zzz directory and rebooting, and another about building an .airi file and including that), but they didin't work.  What did work for me was to simply un-check the "timestamp option" when exporting a digital certificate during the export release build process.</p>
<p>The solution, along with a few others people were having was found <a href="http://bugs.adobe.com/jira/browse/FB-10582">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/error-installing-air-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Have you checked out Adobe Labs recently?</title>
		<link>http://www.visible-form.com/blog/have-you-checked-out-adobe-labs-recently/</link>
		<comments>http://www.visible-form.com/blog/have-you-checked-out-adobe-labs-recently/#comments</comments>
		<pubDate>Tue, 19 May 2009 15:45:37 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=388</guid>
		<description><![CDATA[I heard about Adobe Story this morning, so I headed over to Adobe Labs to check it out.  While I was there I found a few more interesting projects I haven;t yet heard of:  

Genesis : Genesis is the code-name for a new product initiative at Adobe with the objective of joining business [...]]]></description>
			<content:encoded><![CDATA[<p>I heard about <a href="http://labs.adobe.com/wiki/index.php/Story" title="Adobe Story">Adobe Story</a> this morning, so I headed over to Adobe Labs to check it out.  While I was there I found a few more interesting projects I haven;t yet heard of:  </p>
<ul>
<li><a href="http://labs.adobe.com/wiki/index.php/Genesis" title="Adobe Genesis">Genesis</a> : Genesis is the code-name for a new product initiative at Adobe with the objective of joining business applications, documents and the web on every knowledge workers desktop with integrated collaboration capabilities. Using the very intuitive interface of the Genesis desktop client (built on Adobe AIR) knowledge workers are able to create custom workspaces combining views into business applications, analytics, web sites and documents. </li>
<li><a href="http://labs.adobe.com/wiki/index.php/Adobe_Wave" title="Adobe Wave">Wave</a> : Adobe® Wave™ is an Adobe AIR application and Adobe hosted service that work together to enable desktop notifications. It helps publishers stay connected to your customers and lets users avoid the email clutter of dozens of newsletters and social network update messages. Adobe Wave is a single web service call that lets publishers reach users directly on their desktop: there's no need to make them download a custom application or build it yourself.</li>
<li><a href="http://labs.adobe.com/wiki/index.php/PatchPanel">Patch Panel</a>: Adobe is pleased to offer our third-party developers and the larger Adobe Flex® development community this preview of PatchPanel, a first glimpse at combining the dynamic control of ActionScript™ with the power of Adobe’s Creative Suite®. Similar to Adobe’s ExtendScript environment for the Creative Suite, PatchPanel provides developers deep access into controlling the Creative Suite through independently-created scripts. PatchPanel provides the necessary link between the Flex development environment and the Creative Suite’s internal controls, allowing existing ActionScript developers the ability to apply their skills toward enhancing the creative process, as well as inviting a new generation of creative minds to explore the flexibility and automation possible with ActionScript.
<p>PatchPanel is a Flex library and set of services that make it possible for Shockwave® Flash® (SWF) files to work as Adobe Creative Suite CS3 and CS4 plug-ins. Flex developers can include this Flex library in their projects in order to create Flash plug-ins that access the ExtendScript Document Object Model (DOM) of Creative Suite applications through ActionScript objects.</li>
</ul>
<p>There's a bunch more too....looks like we've got some pretty decently cool stuff on the way from Adobe.  That's not even counting <a href="http://labs.adobe.com/technologies/gumbo/">Flex 4</a>, which looks like it's shaping up to be quite awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/have-you-checked-out-adobe-labs-recently/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash Builder</title>
		<link>http://www.visible-form.com/blog/flash-builder/</link>
		<comments>http://www.visible-form.com/blog/flash-builder/#comments</comments>
		<pubDate>Mon, 18 May 2009 15:46:09 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=384</guid>
		<description><![CDATA[Everybody knows by now that Flex Builder is now Flash Builder, which i think is a great move.  With all the chatter about it, one thought just keeps popping up for me:  how much of a non-impact this is on my daily work and career.  Yeah, I've gone through the whole thing [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody knows by now that Flex Builder is now Flash Builder, which i think is a great move.  With all the chatter about it, one thought just keeps popping up for me:  how much of a non-impact this is on my daily work and career.  Yeah, I've gone through the whole thing about <a href="http://www.visible-form.com/blog/for-those-unfamiliar-an-overview-of-flex-flexbuilder-and-the-flex-sdk/">explaining flex to clients</a>,  but for the most part, I haven't really run into issues where clients/employers are confused over the IDEs.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/flash-builder/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;ve starting tweeting</title>
		<link>http://www.visible-form.com/blog/ive-starting-tweeting/</link>
		<comments>http://www.visible-form.com/blog/ive-starting-tweeting/#comments</comments>
		<pubDate>Mon, 04 May 2009 16:43:40 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=381</guid>
		<description><![CDATA[I've finally had enough of hearing about Twitter and not checking it out, so I went and signed up.  You can follow me as flashape  Any pointers for a twitter newb are appreciated...I'd like to integrate my blog and my tweets actually.  Is there an adobe twitter aggregator or anything?
]]></description>
			<content:encoded><![CDATA[<p>I've finally had enough of hearing about Twitter and not checking it out, so I went and signed up.  <a href="http://twitter.com/flashape">You can follow me as flashape</a>  Any pointers for a twitter newb are appreciated...I'd like to integrate my blog and my tweets actually.  Is there an adobe twitter aggregator or anything?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/ive-starting-tweeting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The &#8220;New RegFly.com&#8221;&#8230;seriously???</title>
		<link>http://www.visible-form.com/blog/the-new-regflycomseriously/</link>
		<comments>http://www.visible-form.com/blog/the-new-regflycomseriously/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 16:51:11 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[news]]></category>

		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=379</guid>
		<description><![CDATA[Got an email today about the "new RegFly.com"....ugh.  That's kind of like hearing about "the new Enron".  If you don't remember RegisterFly read about them here, but long story short they were one of the worst domain name registrar scandals, ultimately losing their ICANN accreditation and causing me and plenty of others A [...]]]></description>
			<content:encoded><![CDATA[<p>Got an email today about the "new RegFly.com"....ugh.  That's kind of like hearing about "the new Enron".  If you don't remember RegisterFly read about them <a href="http://en.wikipedia.org/wiki/RegisterFly">here</a>, but long story short they were one of the worst domain name registrar scandals, ultimately losing their ICANN accreditation and causing me and plenty of others A LOT of grief.  The fact that they are using a different domain name to avoid having to display the court-ordered notice about losing their accreditation speaks volumes to the fact that things haven't changed at all.  Please spare yourself some agony and avoid them like the plague.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/the-new-regflycomseriously/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DockableFlex - Nice!</title>
		<link>http://www.visible-form.com/blog/dockableflex-nice/</link>
		<comments>http://www.visible-form.com/blog/dockableflex-nice/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 18:10:05 +0000</pubDate>
		<dc:creator>rich</dc:creator>
		
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=377</guid>
		<description><![CDATA[Wow, just came across DockableFlex:
DockableFlex is an open source component library based on Adobe Flex 3.
It provides basic dock support for the Panel Component.
Looks pretty slick, if you've ever tried dragging tabbed panels around in photoshop or in the Eclipse IDE, you get the idea.  
]]></description>
			<content:encoded><![CDATA[<p>Wow, just came across <a href="http://www.goozo.net/dockableflex.php">DockableFlex</a>:</p>
<blockquote><p>DockableFlex is an open source component library based on Adobe Flex 3.<br />
It provides basic dock support for the Panel Component.</p></blockquote>
<p>Looks pretty slick, if you've ever tried dragging tabbed panels around in photoshop or in the Eclipse IDE, you get the idea.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.visible-form.com/blog/dockableflex-nice/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
