<?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>Architect, Engineer, Tech Enthusiast - Hasan Otuome &#187; Flex</title>
	<atom:link href="http://technophi.com/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://technophi.com</link>
	<description>personal weblog of a tech addict</description>
	<lastBuildDate>Wed, 23 Nov 2011 18:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Developing Scalable Mobile Video Chat Applications</title>
		<link>http://technophi.com/2011/10/10/developing-scalable-mobile-video-chat-applications/</link>
		<comments>http://technophi.com/2011/10/10/developing-scalable-mobile-video-chat-applications/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 19:08:54 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Flash Platform]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=801</guid>
		<description><![CDATA[I&#8217;m making the assets and workbook from my lab at Adobe MAX available for download. The attached ZIP contains the following: L2709_Presentation.ppt L2709_Workbook.pdf FlashP2PLib.fxpl MAX2011MobileVideoChat.fxp EyeChat.fxp EyeChatDesktop.fxp The last two projects are completed versions that you can use for testing or to skip ahead. I plan to follow up with posts related to the P2P [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m making the assets and workbook from my lab at Adobe MAX available for download. The <a href="http://labs.otuome.com/go/max2011/dsmvca">attached ZIP</a> contains the following:</p>
<ul>
<li>L2709_Presentation.ppt</li>
<li>L2709_Workbook.pdf</li>
<li>FlashP2PLib.fxpl</li>
<li>MAX2011MobileVideoChat.fxp</li>
<li>EyeChat.fxp</li>
<li>EyeChatDesktop.fxp</li>
</ul>
<p>The last two projects are completed versions that you can use for testing or to skip ahead. </p>
<p>I plan to follow up with posts related to the P2P logic used in this sample application. Any questions, let me know. Thanks to all who attended!!</p>
<p><a href="http://labs.otuome.com/go/max2011/dsmvca">L2709_DSMVCA.zip</a></p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Developing Scalable Mobile Video Chat Applications" data-url="http://technophi.com/2011/10/10/developing-scalable-mobile-video-chat-applications/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton801" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2FnYCs51&amp;via=heroizm&amp;text=Developing%20Scalable%20Mobile%20Video%20Chat%20Applications&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2011%2F10%2F10%2Fdeveloping-scalable-mobile-video-chat-applications%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2011/10/10/developing-scalable-mobile-video-chat-applications/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Using Owned Native Window Functionality with Spark Windows</title>
		<link>http://technophi.com/2011/04/06/using-owned-native-window-functionality-with-spark-windows/</link>
		<comments>http://technophi.com/2011/04/06/using-owned-native-window-functionality-with-spark-windows/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 00:23:22 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[FITC]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[LAFO]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=776</guid>
		<description><![CDATA[The release of AIR 2.6 brought about a lot of enhancements and features. One of which was owned native windows. What&#8217;s special about this is it makes it easy to have a main window that owns other windows, which is ultra-useful for applications that make use of multiple windows for things like tool palettes, property [...]]]></description>
			<content:encoded><![CDATA[<p>The release of AIR 2.6 brought about a lot of <strong><a href="http://j.mp/fGhkVJ">enhancements and features</a></strong>. One of which was <strong><a href="http://j.mp/g7BGQF">owned native windows</a></strong>. What&#8217;s special about this is it makes it easy to have a main window that owns other windows, which is ultra-useful for applications that make use of multiple windows for things like tool palettes, property inspectors, etc. </p>
<p>The only problem is this new functionality only works out of the box for NativeWindow instances. A Spark Window, however, manages its NativeWindow internally and does not currently include support for the new owned window logic. Now, you could subclass Window and override <em>commitProperties</em> to add in the functionality but, that&#8217;s neither desired nor maintainable.  </p>
<p>Why does it even matter? Because a Spark Window is skinnable and if you&#8217;ve already taken the time to build an application using skinnable Windows, you don&#8217;t want to labor over the changes necessary just to use this functionality. </p>
<p>So, I chose to take a different approach because I&#8217;m confident that the AIR SDK will eventually include support for ownable Spark Windows. Until then, I&#8217;m using an <strong><em>OwnableWindow</em></strong> interface that all of my Window subclasses I want to be owned are required to implement. This way I can take advantage of the new functionality in the least obtrusive way possible. </p>
<p>Here&#8217;s the code for OwnableWindow:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> labs<span style="color: #000066; font-weight: bold;">.</span>otuome<span style="color: #000066; font-weight: bold;">.</span>air<span style="color: #000066; font-weight: bold;">.</span>myapp<span style="color: #000066; font-weight: bold;">.</span>view<span style="color: #000066; font-weight: bold;">.</span>panel
<span style="color: #000000;">&#123;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindow<span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindowDisplayStateEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">public</span> interface OwnableWindow
   <span style="color: #000000;">&#123;</span>
      <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> windowOwner<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>NativeWindow<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> windowOwner<span style="color: #000000;">&#40;</span> <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span>NativeWindow <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowActivated<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowMinimizedOrRestored<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span>NativeWindowDisplayStateEvent <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowClosing<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Now, in my Spark Window subclass I implement the interface like so:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> labs<span style="color: #000066; font-weight: bold;">.</span>otuome<span style="color: #000066; font-weight: bold;">.</span>air<span style="color: #000066; font-weight: bold;">.</span>myapp<span style="color: #000066; font-weight: bold;">.</span>view<span style="color: #000066; font-weight: bold;">.</span>panel
<span style="color: #000000;">&#123;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindow<span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindowDisplayState<span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindowDisplayStateEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>events<span style="color: #000066; font-weight: bold;">.</span>FlexEvent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>Button<span style="color: #000066; font-weight: bold;">;</span>
   <span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>RichText<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
   <span style="color: #3f5fbf;">/**
    * Spark Window component subclass.
    * @author Hasan Otuome
    */</span>
   <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FloatingPanelView <span style="color: #0033ff; font-weight: bold;">extends</span> FloatingPanelUI implements OwnableWindow
   <span style="color: #000000;">&#123;</span>
      <span style="color: #009900; font-style: italic;">///////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #009900; font-style: italic;">// PRIVATE PROPERTIES</span>
      <span style="color: #009900; font-style: italic;">///////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _panelTitle<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _windowOwner<span style="color: #000066; font-weight: bold;">:</span>NativeWindow<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #009900; font-style: italic;">//////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #009900; font-style: italic;">// PUBLIC PROPERTIES</span>
      <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #000000;">&#91;</span>SkinPart <span style="color: #000000;">&#40;</span>required=<span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> header<span style="color: #000066; font-weight: bold;">:</span>Button<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #000000;">&#91;</span>SkinPart <span style="color: #000000;">&#40;</span>required=<span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> toggle<span style="color: #000066; font-weight: bold;">:</span>Button<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #000000;">&#91;</span>SkinPart <span style="color: #000000;">&#40;</span>required=<span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> contentTitle<span style="color: #000066; font-weight: bold;">:</span>RichText<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #3f5fbf;">/**
      * Sets the panel's title. 
      * @param value
      */</span>		
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> panelTitle<span style="color: #000000;">&#40;</span> <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
           _panelTitle = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
      <span style="color: #3f5fbf;">/**
      * Allows you to specify an owner for this Spark 
      * Window instance. Used only until the Flex SDK 
      * adds support for owned native windows to Spark 
      * Windows.
      */</span>		
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> windowOwner<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>NativeWindow
      <span style="color: #000000;">&#123;</span>
           <span style="color: #0033ff; font-weight: bold;">return</span> _windowOwner<span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> windowOwner<span style="color: #000000;">&#40;</span> <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span>NativeWindow <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
           _windowOwner = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
      <span style="color: #009900; font-style: italic;">///////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #009900; font-style: italic;">// PUBLIC METHODS</span>
      <span style="color: #009900; font-style: italic;">///////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #3f5fbf;">/**
      * Constructor 
      */</span>		
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> FloatingPanelView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
      <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> FlexEvent<span style="color: #000066; font-weight: bold;">.</span>CREATION_COMPLETE<span style="color: #000066; font-weight: bold;">,</span> _onCreationComplete<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
      <span style="color: #009900; font-style: italic;">//---------- OwnableWindow implementations --------------------</span>
      <span style="color: #3f5fbf;">/**
      * Adjust the display ordering of this 
      *	instance as it relates to its owner. 
      */</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowActivated<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>orderInFrontOf<span style="color: #000000;">&#40;</span> _windowOwner <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #3f5fbf;">/**
      * Show/hide this instance based 
      *	on the display state of its owner. 
      */</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowMinimizedOrRestored<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span>NativeWindowDisplayStateEvent <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">switch</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
           <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span>beforeDisplayState == NativeWindowDisplayState<span style="color: #000066; font-weight: bold;">.</span>MINIMIZED<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>
             <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>restore<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
             <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
           <span style="color: #0033ff; font-weight: bold;">case</span> <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span>afterDisplayState == NativeWindowDisplayState<span style="color: #000066; font-weight: bold;">.</span>MINIMIZED<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>
             <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>minimize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
             <span style="color: #0033ff; font-weight: bold;">break</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
      <span style="color: #000000;">&#125;</span>
&nbsp;
      <span style="color: #3f5fbf;">/**
      * Close this instance when its owner is closed. This 
      *	will be handled automatically if the owner is 
      *	the main application window.  
      */</span>
      <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> respondToOwnerWindowClosing<span style="color: #000000;">&#40;</span> event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
      <span style="color: #009900; font-style: italic;">//////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #009900; font-style: italic;">// OVERRIDES</span>
      <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////</span>
&nbsp;
      <span style="color: #009900; font-style: italic;">////////////////////////////////////////////////////////////////////////</span>
      <span style="color: #009900; font-style: italic;">// PRIVATE METHODS</span>
      <span style="color: #009900; font-style: italic;">///////////////////////////////////////////////////////////////////////</span>
      <span style="color: #3f5fbf;">/**
      * CREATION_COMPLETE event handler. 
      * Ensures this instance responds to 
      * display state changes of the 
      * instance's owner. 
      * @param e
      */</span>		
      <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> _onCreationComplete<span style="color: #000000;">&#40;</span> e<span style="color: #000066; font-weight: bold;">:</span>FlexEvent <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
      <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>_windowOwner<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
           _windowOwner<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>ACTIVATE<span style="color: #000066; font-weight: bold;">,</span> respondToOwnerWindowActivated<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
           _windowOwner<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> NativeWindowDisplayStateEvent<span style="color: #000066; font-weight: bold;">.</span>DISPLAY_STATE_CHANGE<span style="color: #000066; font-weight: bold;">,</span> respondToOwnerWindowMinimizedOrRestored<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
           _windowOwner<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span>CLOSING<span style="color: #000066; font-weight: bold;">,</span> respondToOwnerWindowClosing<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span> FlexEvent<span style="color: #000066; font-weight: bold;">.</span>CREATION_COMPLETE<span style="color: #000066; font-weight: bold;">,</span> _onCreationComplete <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      <span style="color: #000000;">&#125;</span>
   <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I set the <em>windowOwner</em> property when I instantiate the class(es) and I have a skinnable Spark Window(s) that can be owned by another NativeWindow. Downside is that the z-ordering produces a noticeable flicker and only works on the 1st click of the owner window. </p>
<p>Did I have to use an interface? Not at all, but it&#8217;s nice to be able to enforce the contract and easily tear it up once it&#8217;s no longer needed. Taking a different approach? Share it&#8230;</p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Using Owned Native Window Functionality with Spark Windows" data-url="http://technophi.com/2011/04/06/using-owned-native-window-functionality-with-spark-windows/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton776" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2Fllns05&amp;via=heroizm&amp;text=Using%20Owned%20Native%20Window%20Functionality%20with%20Spark%20Windows&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2011%2F04%2F06%2Fusing-owned-native-window-functionality-with-spark-windows%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2011/04/06/using-owned-native-window-functionality-with-spark-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex 4 &#8211; Base64 Image Decompression and Decoding</title>
		<link>http://technophi.com/2010/08/18/flex-4-base64-image-decompression-and-decoding/</link>
		<comments>http://technophi.com/2010/08/18/flex-4-base64-image-decompression-and-decoding/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 12:04:11 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=536</guid>
		<description><![CDATA[If you ever run into a situation where you need/want to work with Base64-encoded images using AMF, here&#8217;s an example of the process involved in retrieving the encoded data packed with GZip compression from the backend. Source view is enabled on the SWF and the AMFPHP service used are included as well. To view the [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever run into a situation where you need/want to work with Base64-encoded images using AMF, here&#8217;s an example of the process involved in retrieving the encoded data packed with GZip compression from the backend. Source view is enabled on the SWF and the AMFPHP service used are included as well. </p>
<p>To view the demo in its own window, click <a href="http://technophi.com/examples/base64/Base64Decompressor.html">here</a>.<br />
<br/></p>

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

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Flex 4 &#8211; Base64 Image Decompression and Decoding" data-url="http://technophi.com/2010/08/18/flex-4-base64-image-decompression-and-decoding/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton536" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2Fm554lR&amp;via=heroizm&amp;text=Flex%204%20%26%238211%3B%20Base64%20Image%20Decompression%20and%20Decoding&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F08%2F18%2Fflex-4-base64-image-decompression-and-decoding%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/08/18/flex-4-base64-image-decompression-and-decoding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Builder 4 &#8211; Java Heap Space Issues</title>
		<link>http://technophi.com/2010/08/12/flash-builder-4-java-heap-space-issues/</link>
		<comments>http://technophi.com/2010/08/12/flash-builder-4-java-heap-space-issues/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 01:10:51 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=528</guid>
		<description><![CDATA[If you ever experience a message like &#8220;Error: Java Heap Space&#8221; when building, cleaning or generating a bin-release for a project in Flash Builder 4, try the following as a remedy: 1. Open the following files: a) /install_dir/sdks/3.5.0/bin/jvm.config b) /install_dir/sdks/4.0.0/bin/jvm.config 2. Locate the following line found under # Arguments to VM: java.args=-Xmx384m -Dsun.io.useCanonCaches=false 3. Increase [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever experience a message like &#8220;Error: Java Heap Space&#8221; when building, cleaning or generating a bin-release for a project in Flash Builder 4, try the following as a remedy:</p>
<p>1. Open the following files:<br />
	a) /install_dir/sdks/3.5.0/bin/jvm.config<br />
	b) /install_dir/sdks/4.0.0/bin/jvm.config</p>
<p>2. Locate the following line found under # Arguments to VM:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">java.args=-Xmx384m -Dsun.io.useCanonCaches=<span style="color: #c20cb9; font-weight: bold;">false</span></pre></div></div>

<p>3. Increase the memory size to a larger value like the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">java.args=-Xmx512m -Dsun.io.useCanonCaches=<span style="color: #c20cb9; font-weight: bold;">false</span></pre></div></div>

<p>The max you set this value to is determined by your available memory along with some workflow considerations but this should alleviate your heap issues and smooth out Flash Builder compilations considerably&#8230;</p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Flash Builder 4 &#8211; Java Heap Space Issues" data-url="http://technophi.com/2010/08/12/flash-builder-4-java-heap-space-issues/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton528" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2FiGWSE1&amp;via=heroizm&amp;text=Flash%20Builder%204%20%26%238211%3B%20Java%20Heap%20Space%20Issues&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F08%2F12%2Fflash-builder-4-java-heap-space-issues%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/08/12/flash-builder-4-java-heap-space-issues/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Apple vs. Adobe &#8211; Hero&#8217;s Perspective</title>
		<link>http://technophi.com/2010/05/06/apple-vs-adobe-heros-perspective/</link>
		<comments>http://technophi.com/2010/05/06/apple-vs-adobe-heros-perspective/#comments</comments>
		<pubDate>Thu, 06 May 2010 18:59:11 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[FITC]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[LAFO]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=576</guid>
		<description><![CDATA[After reading Steve Job&#8217;s dismissive stance on Adobe&#8217;s Flash technology, I felt compelled to add my two cents on the subject by penning my own letter to Steve. Dear Steve, After reviewing your recent comments regarding Flash and the recent amendments to the Apple Developer TOS, I decided to share with you my response to [...]]]></description>
			<content:encoded><![CDATA[<p>After reading Steve Job&#8217;s <a href="http://www.apple.com/hotnews/thoughts-on-flash/">dismissive stance on Adobe&#8217;s Flash technology</a>, I felt compelled to add my two cents on the subject by penning my own letter to Steve.</p>
<blockquote><p>Dear Steve, </p>
<p>After reviewing your recent comments regarding Flash and the recent amendments to the Apple Developer TOS, I decided to share with you my response to a few of your positions. First, with regards to 3.3.1, Apple should only do QA based on app quality and NOT on app origin. Are we to seriously believe that an iPhone app built with Unity, Flash, etc. pails in comparison technologically to one built via Xcode? Are we to further believe that there are ABSOLUTELY NO poorly written Obj-C apps in the app store? If so, where are the benchmarks and metrics to support these claims? </p>
<p>Logical decisions are typically made based on data collection in some form or fashion. In the absence of such information, those “logical” decisions are eventually revealed to be more subjective in nature vs. being purely objective. Again, if there is data to support the claims against iPhone apps developed in Flash and compiled to *.ipa, please point us to that data.</p>
<p>Now, as to your assertion that Flash is the #1 reason Macs crash, again, we&#8217;d like to see empirical data that supports this claim. Having used apple desktop and laptop computers for more than a decade, I&#8217;d have to respectfully disagree with you. I&#8217;ve personally experienced kernel panics resulting from locked up processes with non-Flash applications (eg, iTunes, Safari, etc). To my knowledge, iTunes makes no use of Flash but yet it has caused my system to enter into a kernel panic on several occasions. Are we still to believe that Flash is the only big bad wolf lurking in the OSX forest? I seriously hope that&#8217;s not your intention. Will your position change when Adobe produces a Flash Player version that takes full advantage of hardware acceleration? I certainly hope so because then we&#8217;ll know that you&#8217;re truly the visionary tech leader that we all hope you to be.</p>
<p>Does this absolve the Flash development community from doing our part to improve the situation? NO!!! Unfortunately, many Flash apps are created by would-be developers that have no clue about memory management, garbage collection and the like. It is far too easy to create Flash apps that consume all of a browser&#8217;s memory, don&#8217;t close properly and eventually obstruct a user. But, I submit that this same fact holds true regardless of the language or platform used to create said applications. In other words, sloppy coding is the problem not the technology. This is from the perspective of a developer fluent in several languages including Obj-C and ActionScript.</p>
<p>I understand you have your business goals and a board of directors to please, but I implore you to work with Adobe rather than against them. Work with Google, Facebook and the like to make the future of technology truly open which benefits us all. Ultimately, we MUST support a free market economy in order to achieve this technological utopia, the results of which will be exponential growth that lasts for a millennium. Yes, it truly can be that explosive. The only thing standing in the way is our present day greed for money and power.</p>
<p>I sincerely hope that you soften your stance and work with the other technology leaders to usher us into that state of tech bliss&#8230; <img src='http://technophi.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>P E A C E</p>
<p>Hasan</p></blockquote>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Apple vs. Adobe &#8211; Hero&#8217;s Perspective" data-url="http://technophi.com/2010/05/06/apple-vs-adobe-heros-perspective/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton576" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2Fm39300&amp;via=heroizm&amp;text=Apple%20vs.%20Adobe%20%26%238211%3B%20Hero%26%238217%3Bs%20Perspective&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F05%2F06%2Fapple-vs-adobe-heros-perspective%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/05/06/apple-vs-adobe-heros-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Flash Builder</title>
		<link>http://technophi.com/2010/03/01/upgrading-flash-builder/</link>
		<comments>http://technophi.com/2010/03/01/upgrading-flash-builder/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 04:46:56 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=438</guid>
		<description><![CDATA[Whether you&#8217;re upgrading because you&#8217;re using BETA versions that change rather frequently or upgrading to the next major release, you don&#8217;t want to lose all your hard work invested in configuring your setup. Here&#8217;s how I handle it and hopefully it&#8217;s useful to you. If you have other cool ways to persist workflows between upgrades, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://technophi.com/wp-content/uploads/ol_upgrade_flashbuilder.png"><img src="http://technophi.com/wp-content/uploads/ol_upgrade_flashbuilder.png" alt="" title="upgrading flashbuilder" width="603" height="351" class="aligncenter size-full wp-image-440" /></a></p>
<p>Whether you&#8217;re upgrading because you&#8217;re using BETA versions that change rather frequently or upgrading to the next major release, you don&#8217;t want to lose all your hard work invested in configuring your setup. Here&#8217;s how I handle it and hopefully it&#8217;s useful to you. If you have other cool ways to persist workflows between upgrades, please share them.</p>
<h4>Workspaces</h4>
<p>I&#8217;ve created a <strong>workspaces</strong> folder in a custom directory on my HD where I store all the workspaces I like to use with Eclipse-based IDEs. I separate them by IDE and then by purpose. So for Flash Builder, my workspace hierarchy is like this:</p>
<pre>
/workspaces
  /_fb4
    /air
    /as
    /flash
    /flex
</pre>
<p>This is where all of my IDE preferences and workbench layout settings are stored. Centralizing them here allows me greater flexibility when upgrading since I never have to worry about any changes to installation procedures overwriting my custom settings. Nevertheless, I backup my workspaces prior to upgrading and since their small text files it only takes a second to archive.</p>
<h4>Documents Directory</h4>
<p>On OSX, the Flash Builder installer creates an <strong>Adobe Flash Builder 4</strong> directory in your Documents directory. The installation instructions advise you to uninstall any previous versions of Flash Builder before installing the new version. Following this advice will delete this folder if it already exists. So, be sure to back this up prior to uninstalling your current version. That way you can cherry pick anything you need after installing the new version.</p>
<h4>Applications Directory</h4>
<p>You should also backup up your program installation in your Applications directory for the same reasons as with the folder in your Documents directory. If you&#8217;ve heavily modified your install with additional plugins, etc., this is vital!</p>
<h4>Plugin Restoration</h4>
<p>Where are all my cool plugins? They got wiped during the upgrade process but if you followed my advice and backed everything up, you&#8217;ll be back up and running in a minute or two. There are generally (2) locations where plugin info is stored for Flash Builder. If you pull the data from your backups and place them in the following locations, you should have full access to all your plugins post-upgrade (provided they still work with the latest release) </p>
<p>#1 &#8211; /Documents/Adobe Flash Builder 4/.metadata/.plugins<br />
#2 &#8211; /Applications/Adobe Flash Builder 4/plugins</p>
<p>Although this post is slanted more towards upgrading on OSX, it should be similar for other operating systems. Any issues, let me know&#8230;</p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Upgrading Flash Builder" data-url="http://technophi.com/2010/03/01/upgrading-flash-builder/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton438" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2FlJQBCH&amp;via=heroizm&amp;text=Upgrading%20Flash%20Builder&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F03%2F01%2Fupgrading-flash-builder%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/03/01/upgrading-flash-builder/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using a Custom AdvancedDataGridHeaderRenderer to Display a Custom Image</title>
		<link>http://technophi.com/2010/02/09/using-a-custom-advanceddatagridheaderrenderer-to-display-a-custom-image/</link>
		<comments>http://technophi.com/2010/02/09/using-a-custom-advanceddatagridheaderrenderer-to-display-a-custom-image/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:38:07 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flash Platform]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=385</guid>
		<description><![CDATA[You decide to use an AdvancedDataGrid to display your data and for one of the columns you would prefer to use an icon instead of a text label to indicate the kind of data this column represents. First step is building the renderer. You can use either MXML or ActionScript but for this example we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>You decide to use an AdvancedDataGrid to display your data and for one of the columns you would prefer to use an icon instead of a text label to indicate the kind of data this column represents. </p>
<p>First step is building the renderer. You can use either MXML or ActionScript but for this example we&#8217;ll use ActionScript.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> labs<span style="color: #000066; font-weight: bold;">.</span>otuome<span style="color: #000066; font-weight: bold;">.</span>ui<span style="color: #000066; font-weight: bold;">.</span>renderers
<span style="color: #000000;">&#123;</span>
  <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>Button<span style="color: #000066; font-weight: bold;">;</span>
  <span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>controls<span style="color: #000066; font-weight: bold;">.</span>advancedDataGridClasses<span style="color: #000066; font-weight: bold;">.</span>AdvancedDataGridHeaderRenderer<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
  <span style="color: #3f5fbf;">/**
   * Custom header renderer for displaying 
   * a graphical image in the column header.
   * @author Hasan Otuome
   */</span>
  <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> StatusHeaderRenderer <span style="color: #0033ff; font-weight: bold;">extends</span> AdvancedDataGridHeaderRenderer
  <span style="color: #000000;">&#123;</span>                                                                                          
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #009900; font-style: italic;">// PRIVATE PROPERTIES                                                                    </span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _btn<span style="color: #000066; font-weight: bold;">:</span>Button<span style="color: #000066; font-weight: bold;">;</span>                                                                 
    <span style="color: #0033ff; font-weight: bold;">private</span> const LEFT_PADDING<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">12</span><span style="color: #000066; font-weight: bold;">;</span>                                                     
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #009900; font-style: italic;">// PUBLIC PROPERTIES                                                                     </span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #009900; font-style: italic;">// PUBLIC METHODS                                                                        </span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #3f5fbf;">/**
     * Constructor 
     */</span>		
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> StatusHeaderRenderer<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #009900; font-style: italic;">// OVERRIDES</span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #3f5fbf;">/**
     * Override to add the custom component. 
     */</span>		
    override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> createChildren<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>createChildren<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      _btn = <span style="color: #0033ff; font-weight: bold;">new</span> Button<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
      _btn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">;</span>
      _btn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">;</span>
      _btn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">setStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #990000;">'skin'</span><span style="color: #000066; font-weight: bold;">,</span> StatusMarkerHeaderIconSkin <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> _btn <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #3f5fbf;">/**
     * Override to layout the children 
     * @param unscaledWidth
     * @param unscaledHeight
     */</span>		
    override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> updateDisplayList<span style="color: #000000;">&#40;</span> unscaledWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> 
                                                  unscaledHeight<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
    <span style="color: #000000;">&#123;</span>
      _btn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = LEFT_PADDING<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
      <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>updateDisplayList<span style="color: #000000;">&#40;</span> unscaledWidth<span style="color: #000066; font-weight: bold;">,</span> unscaledHeight <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
    <span style="color: #009900; font-style: italic;">// PRIVATE METHODS</span>
    <span style="color: #009900; font-style: italic;">/////////////////////////////////////////////////////////////////////////////////////////</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Here we&#8217;ve added a 16&#215;16 button with a custom skin that will serve as our column header and we adjust the position of the custom skin so that it displays where we&#8217;d like it to.</p>
<p>Now, we can provide this class name to our AdvancedDataGridColumn that we wish to customize. We do this by assigning our custom class to the headerRenderer property of the AdvancedDataGridColumn. This property can be set via MXML or ActionScript. I&#8217;ll show an example in ActionScript as that approach is slightly more involved.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>ClassFactory<span style="color: #000066; font-weight: bold;">;</span> 
myADGColumn<span style="color: #000066; font-weight: bold;">.</span>headerRenderer = <span style="color: #0033ff; font-weight: bold;">new</span> ClassFactory<span style="color: #000000;">&#40;</span> StatusHeaderRenderer <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Here we&#8217;ve used ClassFactory to get an instance of our custom renderer and we&#8217;ve assigned that instance to our chosen data grid column. Now, all that&#8217;s left to do is compile our application to see the result.</p>
<p><a href="http://technophi.com/wp-content/uploads/olgk_custom_header.png"><img src="http://technophi.com/wp-content/uploads/olgk_custom_header-300x195.png" alt="" title="olgk_custom_header" width="300" height="195" class="aligncenter size-medium wp-image-388" /></a></p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Using a Custom AdvancedDataGridHeaderRenderer to Display a Custom Image" data-url="http://technophi.com/2010/02/09/using-a-custom-advanceddatagridheaderrenderer-to-display-a-custom-image/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton385" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2Fj1N9nx&amp;via=heroizm&amp;text=Using%20a%20Custom%20AdvancedDataGridHeaderRenderer%20to%20Display%20a%20Custom%20Image&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F02%2F09%2Fusing-a-custom-advanceddatagridheaderrenderer-to-display-a-custom-image%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/02/09/using-a-custom-advanceddatagridheaderrenderer-to-display-a-custom-image/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing Opticon Runtime Debugger</title>
		<link>http://technophi.com/2010/01/09/introducing-opticon-runtime-debugger/</link>
		<comments>http://technophi.com/2010/01/09/introducing-opticon-runtime-debugger/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 12:49:48 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=340</guid>
		<description><![CDATA[Opticon is a runtime debugging console useful for Flash/Flex developers. It&#8217;s simple to start using in your projects. To use, follow these steps after installing the application: 1. Launch the application 2. Click the Settings button 3. Click on the SWC icon to add the OpticonConnector to your project&#8217;s build path 4. Replace your trace [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://technophi.com/wp-content/uploads/ol_opticon_adm_banner_495x250.png" alt="ol_opticon_adm_banner_495x250" title="ol_opticon_adm_banner_495x250" width="495" height="250" class="aligncenter size-full wp-image-348" /></p>
<p>Opticon is a runtime debugging console useful for Flash/Flex developers. It&#8217;s simple to start using in your projects. To use, follow these steps after installing the application:</p>
<p>1. Launch the application<br />
2. Click the Settings button<br />
3. Click on the SWC icon to add the OpticonConnector to your project&#8217;s build path<br />
4. Replace your trace statements with one of the following:</p>
<ul style="list-style-type:none">
<li> a) <font color="green">Opticon.log(&#8216;message to display&#8217;)</font></li>
<li> b) <font color="darkorange">Opticon.warning(&#8216;warning to display&#8217;)</font></li>
<li> c) <font color="#cc0000">Opticon.error(&#8216;error to display&#8217;)</font></li>
</ul>
<p>Download available from:<br />
<a href="http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&#038;offeringid=17303">Adobe AIR Marketplace</a><br />
<a href="http://opticon.riaforge.org">RIAForge</a></p>
<p><strong><em>Some might ask why?</strong></em> This idea first appeared when AIR was Apollo and was born out of necessity (I always forget some trace statements during cleanup). Could I use global find and replace? Sure, when I&#8217;m developing with Eclipse-based IDEs but that&#8217;s not always the case.</p>
<p><strong><em>Why not use one of the other great tools out there?</strong></em> After 2 years in the shadows, it&#8217;s ready to be shared with the world and, because I have a vision of where I&#8217;d like to take this so hopefully you&#8217;ll come along for the ride.</p>
<p><strong><em>Where can I submit any bugs I find?</strong></em> I&#8217;ll have the bug reporting mechanism in place shortly. You&#8217;ll be notified via the application or you can subscribe to this post to be notified once that goes live.</p>
<p><strong><em>My version doesn&#8217;t include the connector. What can I do?</strong></em> This happened as a result of a build error. Visit this link to download the connector <a href="http://labs.otuome.com/get/OpticonConnector">Get Opticon Connector</a>. </p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Introducing Opticon Runtime Debugger" data-url="http://technophi.com/2010/01/09/introducing-opticon-runtime-debugger/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton340" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2FirJWU8&amp;via=heroizm&amp;text=Introducing%20Opticon%20Runtime%20Debugger&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2010%2F01%2F09%2Fintroducing-opticon-runtime-debugger%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2010/01/09/introducing-opticon-runtime-debugger/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Double-headed Arrows with GraphicsUtil</title>
		<link>http://technophi.com/2009/12/07/double-headed-arrows-with-graphicsutil/</link>
		<comments>http://technophi.com/2009/12/07/double-headed-arrows-with-graphicsutil/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:00:03 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://technophi.com/?p=333</guid>
		<description><![CDATA[I recently ran across this awesome utility class, GraphicsUtil, created by Noel Billig. It allows the ability to draw lines with an arrow on one end using the drawing API in AS3. This proved useful for a project I was working on. In addition to its default behavior however, I needed the utility class to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran across this awesome utility class, <a href="http://www.dncompute.com/blog/2008/07/17/graphicsutil-a-utility-class-for-drawing-arrows.html">GraphicsUtil</a>, created by Noel Billig. It allows the ability to draw lines with an arrow on one end using the drawing API in AS3. This proved useful for a project I was working on. In addition to its default behavior however, I needed the utility class to provide the ability to draw lines with arrows on both ends. Well thanks to Noel&#8217;s clean code, I was able to easily modify the base class to do just that by adding the following static method:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/**
 * Draws a double-headed arrow. Pass in ArrowStyle
 * objects for both arrows to override the default settings.
 * @param graphics
 * @param start
 * @param end
 * @param startStyle
 * @param endStyle
 */</span>
<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> drawArrows<span style="color: #000000;">&#40;</span> <span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Graphics</span><span style="color: #000066; font-weight: bold;">,</span>
        <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">,</span>end<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">,</span>
        startStyle<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span>=<span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span>
        endStyle<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span>=<span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">// variables used for arrow 1</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startArrowStyle<span style="color: #000066; font-weight: bold;">:</span>ArrowStyle<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startHalfWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> vect1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> start1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> start2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> end1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> end2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startHeadPnt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startHeadPntNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdge1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdge2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startShaftCenter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startInter1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startInter2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdgeCenter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdgeNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdgeCntrl1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> startEdgeCntrl2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// variables used for arrow 2</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endArrowStyle<span style="color: #000066; font-weight: bold;">:</span>ArrowStyle<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endHalfWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> vect2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> end3<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> end4<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> start3<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> start4<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endHeadPnt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endHeadPntNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdge1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdge2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endShaftCenter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endInter1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endInter2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdgeCenter<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdgeNorm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdgeCntrl1<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> endEdgeCntrl2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">equals</span><span style="color: #000000;">&#40;</span>end<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">///////////////////////////////// start arrow config \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>startStyle == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		startArrowStyle = <span style="color: #0033ff; font-weight: bold;">new</span> ArrowStyle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>startStyle <span style="color: #0033ff; font-weight: bold;">is</span> ArrowStyle<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		startArrowStyle = startStyle <span style="color: #0033ff; font-weight: bold;">as</span> ArrowStyle<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">else</span>
	<span style="color: #000000;">&#123;</span>
		startArrowStyle = <span style="color: #0033ff; font-weight: bold;">new</span> ArrowStyle<span style="color: #000000;">&#40;</span> startStyle <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	vect1 = end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">start</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startHalfWidth = <span style="color: #000000;">&#40;</span>startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headWidth <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headWidth <span style="color: #009966; font-style: italic;">/ 2 : startArrowStyle.headLength /</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span> 
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out the line start/end points</span>
	startNorm = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span> vect1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">-</span>vect1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>shaftThickness<span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	start1 = <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> startNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	start2 = <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> startNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	end1 = end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> startNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	end2 = end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> startNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//figure out where the arrow head starts</span>
	startHeadPnt = vect1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> startHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headLength <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startHeadPnt = startHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">start</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//calculate the arrowhead corners</span>
	startHeadPntNorm = startNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startHeadPntNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> startHalfWidth <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdge1 = startHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> startHeadPntNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdge2 = startHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> startHeadPntNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out where the arrow connects the the shaft, then calc the intersections</span>
	startShaftCenter = <span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">interpolate</span><span style="color: #000000;">&#40;</span> end<span style="color: #000066; font-weight: bold;">,</span> startHeadPnt<span style="color: #000066; font-weight: bold;">,</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>shaftPosition <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startInter1 = GeomUtil<span style="color: #000066; font-weight: bold;">.</span>getLineIntersection<span style="color: #000000;">&#40;</span> start1<span style="color: #000066; font-weight: bold;">,</span> end1<span style="color: #000066; font-weight: bold;">,</span> startShaftCenter<span style="color: #000066; font-weight: bold;">,</span> startEdge1 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startInter2 = GeomUtil<span style="color: #000066; font-weight: bold;">.</span>getLineIntersection<span style="color: #000000;">&#40;</span> start2<span style="color: #000066; font-weight: bold;">,</span> end2<span style="color: #000066; font-weight: bold;">,</span> startShaftCenter<span style="color: #000066; font-weight: bold;">,</span> startEdge2 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out the control points</span>
	startEdgeCenter = <span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">interpolate</span><span style="color: #000000;">&#40;</span> end<span style="color: #000066; font-weight: bold;">,</span> startHeadPnt<span style="color: #000066; font-weight: bold;">,</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>edgeControlPosition <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdgeNorm = startNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdgeNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> startHalfWidth <span style="color: #000066; font-weight: bold;">*</span> startArrowStyle<span style="color: #000066; font-weight: bold;">.</span>edgeControlSize <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdgeCntrl1 = startEdgeCenter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> startEdgeNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	startEdgeCntrl2 = startEdgeCenter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> startEdgeNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">///////////////////////////////// end arrow config \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>endStyle == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		endArrowStyle = <span style="color: #0033ff; font-weight: bold;">new</span> ArrowStyle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>endStyle <span style="color: #0033ff; font-weight: bold;">is</span> ArrowStyle<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		endArrowStyle = endStyle <span style="color: #0033ff; font-weight: bold;">as</span> ArrowStyle<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #0033ff; font-weight: bold;">else</span>
	<span style="color: #000000;">&#123;</span>
		endArrowStyle = <span style="color: #0033ff; font-weight: bold;">new</span> ArrowStyle<span style="color: #000000;">&#40;</span> endStyle <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	vect2 = <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> end <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endHalfWidth = <span style="color: #000000;">&#40;</span>endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headWidth <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headWidth <span style="color: #009966; font-style: italic;">/ 2 : endArrowStyle.headLength /</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out the line start/end points</span>
	endNorm = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Point</span><span style="color: #000000;">&#40;</span> vect2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">-</span>vect2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>shaftThickness <span style="color: #000066; font-weight: bold;">/</span> <span style="color: #000000; font-weight:bold;">2</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	start3 = <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> endNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	start4 = <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> endNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	end3 = end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> endNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	end4 = end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> endNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//figure out where the arrow head starts</span>
	endHeadPnt = vect2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> endHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">-</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>headLength <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endHeadPnt = endHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> end <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//calculate the arrowhead corners</span>
	endHeadPntNorm = endNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endHeadPntNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> endHalfWidth <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdge1 = endHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> endHeadPntNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdge2 = endHeadPnt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> endHeadPntNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out where the arrow connects the the shaft, then calc the intersections</span>
	endShaftCenter = <span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">interpolate</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">,</span> endHeadPnt<span style="color: #000066; font-weight: bold;">,</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>shaftPosition <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endInter1 = GeomUtil<span style="color: #000066; font-weight: bold;">.</span>getLineIntersection<span style="color: #000000;">&#40;</span> end3<span style="color: #000066; font-weight: bold;">,</span> start3<span style="color: #000066; font-weight: bold;">,</span> endShaftCenter<span style="color: #000066; font-weight: bold;">,</span> endEdge1 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endInter2 = GeomUtil<span style="color: #000066; font-weight: bold;">.</span>getLineIntersection<span style="color: #000000;">&#40;</span> end4<span style="color: #000066; font-weight: bold;">,</span> start4<span style="color: #000066; font-weight: bold;">,</span> endShaftCenter<span style="color: #000066; font-weight: bold;">,</span> endEdge2 <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">//Figure out the control points</span>
	endEdgeCenter = <span style="color: #004993;">Point</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">interpolate</span><span style="color: #000000;">&#40;</span> <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">,</span> endHeadPnt<span style="color: #000066; font-weight: bold;">,</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>edgeControlPosition <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdgeNorm = endNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">clone</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdgeNorm<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">normalize</span><span style="color: #000000;">&#40;</span> endHalfWidth <span style="color: #000066; font-weight: bold;">*</span> endArrowStyle<span style="color: #000066; font-weight: bold;">.</span>edgeControlSize <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdgeCntrl1 = endEdgeCenter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span> endEdgeNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	endEdgeCntrl2 = endEdgeCenter<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">subtract</span><span style="color: #000000;">&#40;</span> endEdgeNorm <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">///////////////////////////////// draw the graphics \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\</span>
	<span style="color: #009900; font-style: italic;">// draw 1st arrow</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">moveTo</span><span style="color: #000000;">&#40;</span> start1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> start2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> startInter1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startInter1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> startEdge1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startEdge1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">curveTo</span><span style="color: #000000;">&#40;</span> startEdgeCntrl1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startEdgeCntrl1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> end<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">curveTo</span><span style="color: #000000;">&#40;</span> startEdgeCntrl2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startEdgeCntrl2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> startEdge2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startEdge2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> startInter2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> startInter2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> start2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> start2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> start1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> start1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// draw 2nd arrow</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">moveTo</span><span style="color: #000000;">&#40;</span> end3<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> end4<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> endInter1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endInter1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> endEdge1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endEdge1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">curveTo</span><span style="color: #000000;">&#40;</span> endEdgeCntrl1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endEdgeCntrl1<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">start</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">curveTo</span><span style="color: #000000;">&#40;</span> endEdgeCntrl2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endEdgeCntrl2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span> endEdge2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endEdge2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> endInter2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> endInter2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> end4<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> end4<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">graphics</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">lineTo</span><span style="color: #000000;">&#40;</span> end3<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> end3<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Those are the basics. It can be tweaked to taste, etc. Kudos to Noel for such a useful class&#8230; <img src='http://technophi.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="Double-headed Arrows with GraphicsUtil" data-url="http://technophi.com/2009/12/07/double-headed-arrows-with-graphicsutil/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton333" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2FkVAwN5&amp;via=heroizm&amp;text=Double-headed%20Arrows%20with%20GraphicsUtil&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2009%2F12%2F07%2Fdouble-headed-arrows-with-graphicsutil%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2009/12/07/double-headed-arrows-with-graphicsutil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZamfBrowser &#8211; ZendAMF Service Browser</title>
		<link>http://technophi.com/2009/11/13/zamfbrowser-zendamf-service-browser/</link>
		<comments>http://technophi.com/2009/11/13/zamfbrowser-zendamf-service-browser/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Hasan Otuome</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[OSX Server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ZendAmf]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<a href="http://www.zamfbrowser.org"><img src="http://www.zamfbrowser.org/images/zamfbrowser.png"/></a>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zamfbrowser.org"><img src="http://www.zamfbrowser.org/images/zamfbrowser.png"/></a></p>
<p>One of my colleagues at <a href="http://almerblank.com"><b>Almer/Blank</b></a>, Omar Gonzalez, just released a very promising project into the open source community today, <a href="http://www.zamfbrowser.org/"><b>ZamfBrowser</b></a>. This AIR application is a lifeline for all the developers who have embraced <a href="http://framework.zend.com/manual/en/zend.amf.html"><b>ZendAMF</b></a> since its release yet have longed for that familiar service browser paradigm we grew used to with AMFPHP. Well, wait no longer. ZamfBrowser performs server introspection to give you access to your ZendAMF services and it even features test retention by remembering the last arguments used for method testing between sessions. This is definitely an application worth a look if you plan on doing any AMF development.</p>
<div style="float: right; padding: 3px;"><a href="http://bufferapp.com/add" class="buffer-add-button" data-text="ZamfBrowser &#8211; ZendAMF Service Browser" data-url="http://technophi.com/2009/11/13/zamfbrowser-zendamf-service-browser/" data-via="bufferapp" data-count="none">Buffer</a><script type="text/javascript" src="http://static.bufferapp.com/js/button.js"></script></div><div id="tweetbutton106" class="tw_button" style="padding: 3px;float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fj.mp%2Fk9KkoC&amp;via=heroizm&amp;text=ZamfBrowser%20%26%238211%3B%20ZendAMF%20Service%20Browser&amp;related=heroizm&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Ftechnophi.com%2F2009%2F11%2F13%2Fzamfbrowser-zendamf-service-browser%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://technophi.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://technophi.com/2009/11/13/zamfbrowser-zendamf-service-browser/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

