<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Taking control of right-click in Adobe Flex</title>
	<atom:link href="http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/</link>
	<description>&#60;mx:Flex Development Examples /&#62;</description>
	<lastBuildDate>Wed, 07 Apr 2010 20:46:00 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cybersimmas</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-67</link>
		<dc:creator>cybersimmas</dc:creator>
		<pubDate>Mon, 23 Nov 2009 14:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-67</guid>
		<description>Hi thanks a lot.. This thing worked very well for me. i made little changes in ur sample.. instead of creating new instance of &quot;RightClickPopup&quot; class, i created Menu object which can contain submenus, icons  and a seperator..

			private function handleRightClick():void
			{
				// create menu items (using ActionScript shorthand for objects and arrays)
				var fruits:Object = { label: &quot;Fruits&quot;, children: [ &quot;Apple&quot;, &quot;Orange&quot;, &quot;Banana&quot; ], icon: &quot;leaf&quot; };
				var colors:Object = { label: &quot;Colors&quot;, children: [ &quot;Red&quot;, &quot;Blue&quot;, &quot;Green&quot; ], icon: &quot;leaf&quot; };
				var separator:Object = { type: &quot;separator&quot; };
				
				// creat the root menu structure
				var menuData:Object = { children: [ fruits, separator, colors ] };
				
				// create the menu
				var menu:Menu = Menu.createMenu( parent, menuData, false );
				
				// register menu click handler
				menu.addEventListener( MenuEvent.ITEM_CLICK, handleMenuClick );
				
				// show the menu
				showMenu(menu);
}

protected function showMenu( menu:Menu):void
			{
				// get the menu parent from the mouse event
				var parent:DisplayObjectContainer = this;
				
				// position menu relative to the parent
				var point:Point = new Point( parent.mouseX , parent.mouseY );
				point = parent.localToGlobal( point );
				
				// show the menu
				menu.show( point.x, point.y );
			}</description>
		<content:encoded><![CDATA[<p>Hi thanks a lot.. This thing worked very well for me. i made little changes in ur sample.. instead of creating new instance of &#8220;RightClickPopup&#8221; class, i created Menu object which can contain submenus, icons  and a seperator..</p>
<p>			private function handleRightClick():void<br />
			{<br />
				// create menu items (using ActionScript shorthand for objects and arrays)<br />
				var fruits:Object = { label: &#8220;Fruits&#8221;, children: [ "Apple", "Orange", "Banana" ], icon: &#8220;leaf&#8221; };<br />
				var colors:Object = { label: &#8220;Colors&#8221;, children: [ "Red", "Blue", "Green" ], icon: &#8220;leaf&#8221; };<br />
				var separator:Object = { type: &#8220;separator&#8221; };</p>
<p>				// creat the root menu structure<br />
				var menuData:Object = { children: [ fruits, separator, colors ] };</p>
<p>				// create the menu<br />
				var menu:Menu = Menu.createMenu( parent, menuData, false );</p>
<p>				// register menu click handler<br />
				menu.addEventListener( MenuEvent.ITEM_CLICK, handleMenuClick );</p>
<p>				// show the menu<br />
				showMenu(menu);<br />
}</p>
<p>protected function showMenu( menu:Menu):void<br />
			{<br />
				// get the menu parent from the mouse event<br />
				var parent:DisplayObjectContainer = this;</p>
<p>				// position menu relative to the parent<br />
				var point:Point = new Point( parent.mouseX , parent.mouseY );<br />
				point = parent.localToGlobal( point );</p>
<p>				// show the menu<br />
				menu.show( point.x, point.y );<br />
			}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deyounni</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-64</link>
		<dc:creator>deyounni</dc:creator>
		<pubDate>Tue, 01 Sep 2009 16:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-64</guid>
		<description>I see, The objects under the mouse are retrieved, and the top most get a double click dispatched from it.

Maybe a new event, (RightClickEvent extends event), would be better. If you didn&#039;t want to have to hook into the MouseEvent.DOUBLE_CLICK.</description>
		<content:encoded><![CDATA[<p>I see, The objects under the mouse are retrieved, and the top most get a double click dispatched from it.</p>
<p>Maybe a new event, (RightClickEvent extends event), would be better. If you didn&#8217;t want to have to hook into the MouseEvent.DOUBLE_CLICK.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-63</link>
		<dc:creator>Christopher</dc:creator>
		<pubDate>Tue, 01 Sep 2009 10:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-63</guid>
		<description>This code supports handling different actions for different objects as long as they are children of the application class, just like any other click event.  Its up to you whether you implement event listeners in each display component or you build a controller to generalize the behavior.  If you come up with a good solution be sure to link to it here so I can check it out.</description>
		<content:encoded><![CDATA[<p>This code supports handling different actions for different objects as long as they are children of the application class, just like any other click event.  Its up to you whether you implement event listeners in each display component or you build a controller to generalize the behavior.  If you come up with a good solution be sure to link to it here so I can check it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deyounni</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-62</link>
		<dc:creator>deyounni</dc:creator>
		<pubDate>Tue, 01 Sep 2009 05:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-62</guid>
		<description>Missed the download source link the first time.

Got it working on my machine.

Any good ideas on making this modular / generic for multiple libraries? Something like a central dispatcher or registration for the right click? because if every component is using this right click, they are gonna have to be managed somehow.

-Nick</description>
		<content:encoded><![CDATA[<p>Missed the download source link the first time.</p>
<p>Got it working on my machine.</p>
<p>Any good ideas on making this modular / generic for multiple libraries? Something like a central dispatcher or registration for the right click? because if every component is using this right click, they are gonna have to be managed somehow.</p>
<p>-Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-61</link>
		<dc:creator>Christopher</dc:creator>
		<pubDate>Tue, 01 Sep 2009 02:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-61</guid>
		<description>Click the &quot;Download the Source&quot; link above for the full project.  In short, the body tag looks like:

&lt;body scroll=&quot;no&quot; id=&quot;main&quot; onload=&quot;RightClick.init(&#039;${application}&#039;,&#039;flashcontent&#039;);&quot;&gt;
...</description>
		<content:encoded><![CDATA[<p>Click the &#8220;Download the Source&#8221; link above for the full project.  In short, the body tag looks like:</p>
<p>&lt;body scroll=&#8221;no&#8221; id=&#8221;main&#8221; onload=&#8221;RightClick.init(&#8217;${application}&#8217;,'flashcontent&#8217;);&#8221;&gt;<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deyounni</title>
		<link>http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/comment-page-1/#comment-60</link>
		<dc:creator>deyounni</dc:creator>
		<pubDate>Tue, 01 Sep 2009 00:48:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.huyler.net/flexblog/2009/02/02/taking-control-of-right-click-in-adobe-flex/#comment-60</guid>
		<description>little help on the html template - 
did you just wrap everything that was in the body into a div?

what does your onload look like? something like Rightclick.init()?

did you simply reace the AF_RUN(...)with SWFObject(...) ?

 - nick on my iphone</description>
		<content:encoded><![CDATA[<p>little help on the html template &#8211;<br />
did you just wrap everything that was in the body into a div?</p>
<p>what does your onload look like? something like Rightclick.init()?</p>
<p>did you simply reace the AF_RUN(&#8230;)with SWFObject(&#8230;) ?</p>
<p> &#8211; nick on my iphone</p>
]]></content:encoded>
	</item>
</channel>
</rss>
