<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title></title>
	<link>http://flexjunk.com</link>
	<description>Blog about Flex, AIR, Security, and other various topics</description>
	<pubDate>Sat, 26 Apr 2008 22:48:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>flexvizgraphlib</title>
		<link>http://flexjunk.com/2008/04/26/flexvizgraphlib/</link>
		<comments>http://flexjunk.com/2008/04/26/flexvizgraphlib/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 22:47:17 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[AIR]]></category>

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

		<guid isPermaLink="false">http://flexjunk.com/2008/04/26/flexvizgraphlib/</guid>
		<description><![CDATA[I was working on enhancements to the NitroLM admin tool for visualizing users in the system and what computers they&#8217;ve used.  When it comes to licensing software, knowledge is power, and the visual links really demonstrate well when someone isn&#8217;t doing what they&#8217;re supposed to be doing.  We called this guy in the [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on enhancements to the <a href="http://nitrolm.com/">NitroLM</a> admin tool for visualizing users in the system and what computers they&#8217;ve used.  When it comes to licensing software, knowledge is power, and the visual links really demonstrate well when someone isn&#8217;t doing what they&#8217;re supposed to be doing.  We called this guy in the UK about how his demo of our software was going.  He thought it was great and really useful software, but he didn&#8217;t want to have his boss actually &#8220;PURCHASE&#8221; it for him.  His solution was to keep re-registering for demos under new gmail accounts.  His machine is going to be blacklisted in the system in short order.</p>
<p>To do the visualization, I used the open-source library <a href="http://code.google.com/p/flexvizgraphlib/">flexvizgraph</a>.  You may remember it from the <a href="http://code.google.com/p/flexvizgraphlib/wiki/BirdEye">BirdEye</a> application.  This new feature in NitroLM really highlights the power of the Flex/AIR visual environment.</p>
<p><a href="http://flexjunk.com/?pp_album=main&amp;pp_cat=default&amp;pp_image=stealing_software.jpg" title="stealing software"><img src="http://flexjunk.com/wp-content/photos/thumb_stealing_software.jpg" class="pp_image" alt="stealing software" width="100" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/04/26/flexvizgraphlib/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Post 360Flex&#124;Milan thoughts</title>
		<link>http://flexjunk.com/2008/04/11/post-360flexmilan-thoughts/</link>
		<comments>http://flexjunk.com/2008/04/11/post-360flexmilan-thoughts/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 15:03:14 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[360 Flex]]></category>

		<guid isPermaLink="false">http://flexjunk.com/2008/04/11/post-360flexmilan-thoughts/</guid>
		<description><![CDATA[Well, another 360Flex has come and gone.  I must say that this one exceeded my expectations.  Going into it, I had the fear that the European event wouldn&#8217;t have the same feel or &#8220;cool&#8221; factor that the US events had going for them.  The SLI party was killer.  They waaay overbought [...]]]></description>
			<content:encoded><![CDATA[<p>Well, another 360Flex has come and gone.  I must say that this one exceeded my expectations.  Going into it, I had the fear that the European event wouldn&#8217;t have the same feel or &#8220;cool&#8221; factor that the US events had going for them.  The SLI party was killer.  They waaay overbought on the food and alcohol, but Michael Labriola, the crazy Brit guy with the red hair (sorry, I forgot names) and their posse didn&#8217;t let it go to waste.</p>
<p>The sessions were good and there was a lot of quality there.  Tom and John were cool as always when they put on a 360Flex conference.  I&#8217;m definitely looking forward to <a href="http://www.360conferences.com/360flex/">San Jose</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/04/11/post-360flexmilan-thoughts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using BOTH Native and Flex DragManager in AIR 1.0</title>
		<link>http://flexjunk.com/2008/04/08/using-both-native-and-flex-dragmanager-in-air-10/</link>
		<comments>http://flexjunk.com/2008/04/08/using-both-native-and-flex-dragmanager-in-air-10/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 21:08:27 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[360 Flex]]></category>

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

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

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

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

		<guid isPermaLink="false">http://flexjunk.com/2008/04/08/using-both-native-and-flex-dragmanager-in-air-10/</guid>
		<description><![CDATA[I was sitting here at 360Flex&#124;Milan and I had a conversation with Michael Labriola about DragManagers in AIR.  We both lamented that in Flexbuilder 3 beta 2, we were able to use both the NativeDragManager and the DragManager at the same time (albeit it was a bit hacky).  In an earlier post, I [...]]]></description>
			<content:encoded><![CDATA[<p>I was sitting here at <a href="http://www.360flex.com/360flex_europe/">360Flex|Milan</a> and I had a conversation with <a href="http://blogs.digitalprimates.net/codeSlinger">Michael Labriola</a> about DragManagers in AIR.  We both lamented that in Flexbuilder 3 beta 2, we were able to use both the NativeDragManager and the DragManager at the same time (albeit it was a bit hacky).  In an <a href="http://flexjunk.com/2008/02/26/monkeypatching-the-dragmanager-in-air-10/">earlier post</a>, I demonstrated a MonkeyPatch that allowed you to use the Flex DragManager inside a WindowedApplication in AIR.  This was great, but you lose the ability to use Native Dragging/Dropping in your AIR app.  This evening, I was finally pissed off enough to rewrite the DragManager how I think Adobe SHOULD have done it in the first place.  You use the DragManager class for both Native and Flex-based drag/drop and it&#8217;ll pretty much figure out which one you wanted to use.  If you&#8217;re doing manual Native dragging OUT of your app, the doDrag() method has an additional boolean value at the end to specify that it&#8217;s supposed to begin a native drag operation.  I&#8217;m not going to go into a ton of detail on how it was done, but the code is posted below with view-source enabled.  DragManager and SystemManager have been MonkeyPatched.  It&#8217;s been liberally commented, so hopefully you can figure it out.  Post a comment if you have trouble with it or it screws up because I missed catching a bug here or there.</p>
<p><a href="http://flexjunk.com/examples/DualDragManagers/DualDragManagers.air">DualDragManagers.air</a></p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/04/08/using-both-native-and-flex-dragmanager-in-air-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Encryption in Flex Applications</title>
		<link>http://flexjunk.com/2008/04/04/encryption-in-flex-applications/</link>
		<comments>http://flexjunk.com/2008/04/04/encryption-in-flex-applications/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 17:25:05 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[AIR]]></category>

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

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

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

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

		<guid isPermaLink="false">http://flexjunk.com/2008/04/04/encryption-in-flex-applications/</guid>
		<description><![CDATA[Here are my 3 articles for InsideRIA on Encryption in Flex applications.
Encryption in Flex Applications 1 - Simulate EncryptedLocalStore
Encryption in Flex Applications 2 - SWC AS3 Library Encryption
Encryption in Flex Applications 3 - NitroLM SWF Encryption
]]></description>
			<content:encoded><![CDATA[<p>Here are my 3 articles for InsideRIA on Encryption in Flex applications.</p>
<p><a href="http://www.insideria.com/2008/03/encryption-in-flex-application.html">Encryption in Flex Applications 1 - Simulate EncryptedLocalStore</a><br/><br />
<a href="http://www.insideria.com/2008/04/encryption-in-flex-application-1.html">Encryption in Flex Applications 2 - SWC AS3 Library Encryption</a><br/><br />
<a href="http://www.insideria.com/2008/04/encryption-in-flex-application-2.html">Encryption in Flex Applications 3 - NitroLM SWF Encryption</a></p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/04/04/encryption-in-flex-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>360 Flex Milan, Italy</title>
		<link>http://flexjunk.com/2008/03/29/360-flex-milan-italy/</link>
		<comments>http://flexjunk.com/2008/03/29/360-flex-milan-italy/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 22:42:03 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[360 Flex]]></category>

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

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

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

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

		<guid isPermaLink="false">http://flexjunk.com/2008/03/29/360-flex-milan-italy/</guid>
		<description><![CDATA[Well, my flight has been booked.  I&#8217;m officially going to 360 Flex in Italy.  It was really cool of the 360 Flex conference guys making the first of 3 days free and open to the public.  Hopefully it&#8217;ll get those people who were on the fence about it to make the trip.
I [...]]]></description>
			<content:encoded><![CDATA[<p>Well, my flight has been booked.  I&#8217;m officially going to <a href="http://www.360flex.com/360flex_europe/">360 Flex in Italy</a>.  It was really cool of the 360 Flex conference guys making the first of 3 days free and open to the public.  Hopefully it&#8217;ll get those people who were on the fence about it to make the trip.</p>
<p>I haven&#8217;t worked much on this blog lately because I&#8217;m finishing up 3 articles for <a href="http://insideria.com" title="InsideRIA.com" target="_blank">InsideRIA.com</a> on Encrypting Flex Applications.  I&#8217;ll post links to them here once they go live.</p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/03/29/360-flex-milan-italy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SuperSexy Scrollbars with Degrafa</title>
		<link>http://flexjunk.com/2008/03/09/supersexy-scrollbars-with-degrafa/</link>
		<comments>http://flexjunk.com/2008/03/09/supersexy-scrollbars-with-degrafa/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 18:07:13 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[360 Flex]]></category>

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

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

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

		<guid isPermaLink="false">http://flexjunk.com/?p=8</guid>
		<description><![CDATA[Since attending 360Flex in Atlanta, I wanted to learn a bit about skinning with Degrafa.  For one of my own personal projects, I needed to create some nice scrollbars that would go with my black and purple color scheme.  Now keep in mind that I am NOT a designer.  Most of my [...]]]></description>
			<content:encoded><![CDATA[<p>Since attending 360Flex in Atlanta, I wanted to learn a bit about skinning with <a href="http://degrafa.com">Degrafa</a>.  For one of my own personal projects, I needed to create some nice scrollbars that would go with my black and purple color scheme.  Now keep in mind that I am NOT a designer.  Most of my coding experience before learning Flex/AIR centered around backend Java Servlets and other hidden technology.  View-Source is enabled if you wanted to see how it&#8217;s done.  I still don&#8217;t know how to get rid of the stupid white box between the two scrollbars.  If someone would like to comment and let me know, that&#8217;d be great.</p>
<p><code>
<object	type="application/x-shockwave-flash"
			data="http://www.flexjunk.com/examples/ScrollbarSkinning/ScrollbarSkinning.swf"
			width="400"
			height="800">
	<param name="movie" value="http://www.flexjunk.com/examples/ScrollbarSkinning/ScrollbarSkinning.swf" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/03/09/supersexy-scrollbars-with-degrafa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Native SQL in hibernate</title>
		<link>http://flexjunk.com/2008/03/07/native-sql-in-hibernate/</link>
		<comments>http://flexjunk.com/2008/03/07/native-sql-in-hibernate/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 01:34:44 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://flexjunk.com/?p=7</guid>
		<description><![CDATA[I'm currently in the process of converting the data layer in a server-side Java service to use hibernate.  It has a lot of weird joins in the SQL, so the simplest solution for those cases in the code is to use the native SQL passthrough feature of hibernate.  Normally when you run
PLAIN TEXT
JAVA:




List [...]]]></description>
			<content:encoded><![CDATA[<p>I'm currently in the process of converting the data layer in a server-side Java service to use hibernate.  It has a lot of weird joins in the SQL, so the simplest solution for those cases in the code is to use the native SQL passthrough feature of hibernate.  Normally when you run</p>
<div class="igBar"><span id="ljava-4"><a href="#" onclick="javascript:showPlainTxt('java-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-4">
<div class="java">
<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;"><a href="http://www.google.com/search?q=allinurl%3AList+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">List</span></a> data = session.<span style="color: #006600;">createSQLQuery</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"select field1, field2 ....."</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: #006600;">list</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You get back a java.util.List populated with Object[]'s.  You have to reference the individual columns by their index value in order to get data out of them. This has the side-effect that if your database tables every change or columns get re-ordered your code is hosed up and difficult to debug.</p>
<p>A better way I've found  is to use</p>
<div class="igBar"><span id="ljava-5"><a href="#" onclick="javascript:showPlainTxt('java-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-5">
<div class="java">
<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;"><a href="http://www.google.com/search?q=allinurl%3AList+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">List</span></a> data = session.<span style="color: #006600;">createSQLQuery</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"select&nbsp; field1, field2....."</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: #006600;">setResultTransformer</span><span style="color: #66cc66;">&#40;</span>Criteria.<span style="color: #006600;">ALIAS_TO_ENTITY_MAP</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;">.<span style="color: #006600;">list</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This has the effect of returning a List containing Map objects for each row. It then becomes a simple matter to retrieve data based on the column name.  If columns ever get added or re-ordered in your table your code will continue working.</p>
<div class="igBar"><span id="ljava-6"><a href="#" onclick="javascript:showPlainTxt('java-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-6">
<div class="java">
<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: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> object : data<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;">&#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;"><a href="http://www.google.com/search?q=allinurl%3AMap+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Map</span></a> row = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AMap+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Map</span></a><span style="color: #66cc66;">&#41;</span>object;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>row.<span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"field1"</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">", "</span> + row.<span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"field2"</span><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:#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>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/03/07/native-sql-in-hibernate/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MonkeyPatching the DragManager in AIR 1.0</title>
		<link>http://flexjunk.com/2008/02/26/monkeypatching-the-dragmanager-in-air-10/</link>
		<comments>http://flexjunk.com/2008/02/26/monkeypatching-the-dragmanager-in-air-10/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 01:27:54 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[AIR]]></category>

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

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

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

		<guid isPermaLink="false">http://flexjunk.com/?p=6</guid>
		<description><![CDATA[I'm not really sure what Adobe has been thinking regarding DragManagers in Flex/AIR.  The code makes a very basic and very WRONG assumption that in an AIR app using WindowedApplication, you will only ever want to use the NativeDragManager class.  DragManager loads up a singleton class to handle drag and drop.  Depending [...]]]></description>
			<content:encoded><![CDATA[<p>I'm not really sure what Adobe has been thinking regarding DragManagers in Flex/AIR.  The code makes a very basic and very <strong>WRONG</strong> assumption that in an AIR app using WindowedApplication, you will only ever want to use the NativeDragManager class.  DragManager loads up a singleton class to handle drag and drop.  Depending on whether your app is AIR or Flex and what your top-level container is you either get DragManagerImpl (the flex drag manager) or NativeDragManagerImpl.  Unfortunately, this class has some really annoying limitations.  You can't specify an alpha level for the drag proxy.  It's hardcoded to 0.5 and there's nothing you can do about it.  Here's what adobe has to say about it...</p>
<blockquote><p> When a Flex application runs in Adobe® AIR™, you can control whether the application uses the Flex drag manager or the AIR drag manager. These drag managers are implemented by the classes mx.managers.DragManager (Flex drag manager) and flash.desktop.NativeDragManager (AIR drag manager).</p>
<p>Internally, the Flex mx.managers.DragManager class uses an implementation class to determine which drag manager to use. It uses either the Flex mx.managers.DragManagerImpl class, or the AIR mx.managers.NativeDragManagerImpl class.</p>
<p>By default, a Flex application defined by the &lt;mx:Application&gt; tag uses the Flex drag-and-drop manager, even when the Flex application runs in AIR. If you run your Flex application in AIR, and you want to take advantage of the AIR drag-and-drop manager to drag and drop items from outside of AIR, then you must configure the Flex mx.managers.DragManager class to use the AIR drag-and-drop manager.</p>
<p>There are three scenarios that determine which drag-and-drop manager your Flex application uses when running in AIR:</p>
<ol>
<li>Your main application file uses the &lt;mx:Application&gt; tag. In this scenario, you use the Flex drag-and-drop manager, and cannot drag and drop items from outside of AIR.</li>
<li>Your main application file uses the &lt;mx:WindowedApplication&gt; tag. In this scenario, you use the AIR drag-and-drop manager, and can drag and drop items from outside of AIR.</li>
<li>Your main application file uses the &lt;mx:Application&gt; tag, but loads the AIR drag-and-drop manager as represented by the mx.managers.NativeDragManagerImpl class. In this scenario, you use the AIR drag-and-drop manager, and can drag and drop items from outside of AIR.</li>
</ol>
</blockquote>
<p>Now what am I to do if I want option 4?  I want all the window dressing goodness that comes with WindowedApplication like maximize, minimize, and a status bar, but I want the fully customizable Flex version of the drag manager implementation.  Time to MONKEYPATCH!</p>
<p>The first thing you'll need is to copy the framework classes mx.managers.SystemManager and mx.core.Version into your AIR app at the right locations.<br />
<a href="http://flexjunk.com/?pp_album=main&amp;pp_cat=default&amp;pp_image=monkeypatch1.png" title="monkeypatch1"><img src="http://flexjunk.com/wp-content/photos/monkeypatch1.png" class="pp_image" alt="monkeypatch1" width="293" height="101" /></a></p>
<p>Next, you edit one line of code in SystemManager.as so that it loads the DragManagerImpl instead of NativeDragManagerImpl.  Find the method docFrameHandler.  You should see a bit of code that looks like this...</p>
<div class="igBar"><span id="lactionscript-9"><a href="#" onclick="javascript:showPlainTxt('actionscript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-9">
<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: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">playerType</span> == <span style="color: #ff0000;">"Desktop"</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; <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; Singleton.<span style="color: #0066CC;">registerClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::IDragManager"</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;">Class</span><span style="color: #66cc66;">&#40;</span>getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::NativeDragManagerImpl"</span><span style="color: #66cc66;">&#41;</span><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:#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; <span style="color: #808080; font-style: italic;">// Make this call to create a new instance of the DragManager singleton.</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; <span style="color: #808080; font-style: italic;">// This will allow the application to receive NativeDragEvents that originate</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; <span style="color: #808080; font-style: italic;">// from the desktop.</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; <span style="color: #808080; font-style: italic;">// if this class is not registered, it's most likely because the NativeDragManager is not</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; <span style="color: #808080; font-style: italic;">// linked in correctly. all back to old DragManager.</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; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Singleton.<span style="color: #006600;">getClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::IDragManager"</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #000000; font-weight: bold;">null</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; Singleton.<span style="color: #0066CC;">registerClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::IDragManager"</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; <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#40;</span>getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::DragManagerImpl"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now change to look like this...</p>
<div class="igBar"><span id="lactionscript-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-10">
<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: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">playerType</span> == <span style="color: #ff0000;">"Desktop"</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; <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; Singleton.<span style="color: #0066CC;">registerClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::IDragManager"</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;">Class</span><span style="color: #66cc66;">&#40;</span>getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"mx.managers::DragManagerImpl"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Enjoy your AIR app with the Flex DragManager goodness.</p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/02/26/monkeypatching-the-dragmanager-in-air-10/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlexBuilder 3 initial impressions</title>
		<link>http://flexjunk.com/2008/02/25/flexbuilder-3-initial-impressions/</link>
		<comments>http://flexjunk.com/2008/02/25/flexbuilder-3-initial-impressions/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 02:29:31 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Flexbuilder]]></category>

		<guid isPermaLink="false">http://flexjunk.com/?p=5</guid>
		<description><![CDATA[I just wanted to blog my initial impressions of FlexBuilder 3 after a day of use.  The IDE seems very much the same as the final beta.  There are some new feature there I know, but I haven't really gotten into them yet.  It was nice that the AIR app descriptor didn't change except for [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to blog my initial impressions of FlexBuilder 3 after a day of use.  The IDE seems very much the same as the final beta.  There are some new feature there I know, but I haven't really gotten into them yet.  It was nice that the AIR app descriptor didn't change except for the version number between beta 3 and 1.0.  I was able to simply re-compile my AIR apps to get them going.  I did have one minor freakout incident when my Loader code wouldn't load a swf file.  It gave me an error saying that Loader couldn't load executable code.  My initial reaction was, "OH NO!  Adobe took away that feature!  #%$&amp;*!!"  After perusing the documentation for awhile, I realized that they had just made the system a bit more secure in that they check to make sure you know what the heck you're doing before allowing you to execute random code in your app.  The change Adobe made was to the LoaderContext class.  They added the property <strong>allowLoadBytesCodeExecution </strong>which defaulted to false.  A quick change to my code and all was well with the world again.  Very nice job Adobe.  I'm impressed.</p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/02/25/flexbuilder-3-initial-impressions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlexBuilder 3 is Live</title>
		<link>http://flexjunk.com/2008/02/25/flexbuilder-3-is-live/</link>
		<comments>http://flexjunk.com/2008/02/25/flexbuilder-3-is-live/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 13:05:12 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
		
		<category><![CDATA[Flexbuilder]]></category>

		<guid isPermaLink="false">http://flexjunk.com/?p=4</guid>
		<description><![CDATA[I just saw on the flexcoders yahoo group that FlexBuilder 3 went live.  I just bought my upgrade and will try to update all my code for the presentation Wednesday.
]]></description>
			<content:encoded><![CDATA[<p>I just saw on the flexcoders yahoo group that FlexBuilder 3 went live.  I just bought my upgrade and will try to update all my code for the presentation Wednesday.</p>
]]></content:encoded>
			<wfw:commentRss>http://flexjunk.com/2008/02/25/flexbuilder-3-is-live/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
