<?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: Adding custom context menu items to a Flex application</title>
	<atom:link href="http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-9999</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 27 Sep 2011 01:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-9999</guid>
		<description>Congratulations on possessing actually 1 of among the most refined blogs Ive arrive across in a although! Its just amazing how a good deal you&#039;ll be capable of consider away from a factor mainly merely on account of how visually beautiful it&#039;s. You&#039;ve location collectively an exceptional blog net website home 锟紺nice graphics, motion pictures, layout. This is certainly a should-see net web site!</description>
		<content:encoded><![CDATA[<p>Congratulations on possessing actually 1 of among the most refined blogs Ive arrive across in a although! Its just amazing how a good deal you&#8217;ll be capable of consider away from a factor mainly merely on account of how visually beautiful it&#8217;s. You&#8217;ve location collectively an exceptional blog net website home 锟紺nice graphics, motion pictures, layout. This is certainly a should-see net web site!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-6050</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sun, 18 Oct 2009 15:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-6050</guid>
		<description>New example posted; &lt;a href=&quot;http://blog.flexexamples.com/2009/10/18/adding-custom-context-menu-items-to-a-flex-4-application/&quot; rel=&quot;nofollow&quot;&gt;&quot;Adding custom context menu items to a Flex 4 application&quot;&lt;/a&gt;

Peter</description>
		<content:encoded><![CDATA[<p>New example posted; <a href="http://blog.flexexamples.com/2009/10/18/adding-custom-context-menu-items-to-a-flex-4-application/" rel="nofollow">&#8220;Adding custom context menu items to a Flex 4 application&#8221;</a></p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-6049</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sun, 18 Oct 2009 15:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-6049</guid>
		<description>@MechanisM,

It&#039;s almost exactly the same, except replace &lt;code&gt;&lt;em&gt;application&lt;/em&gt;.contextMenu.customItems&lt;/code&gt; with &lt;code&gt;&lt;em&gt;FlexGlobals.topLevelApplication&lt;/em&gt;.contextMenu.customItems&lt;/code&gt;, as seen in the following example:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application name=&quot;Spark_Application_contextMenu_test&quot;
        xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
        xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
        xmlns:mx=&quot;library://ns.adobe.com/flex/halo&quot;
        initialize=&quot;init();&quot;&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.core.FlexGlobals;

            private function init():void {
                var customMenuItem1:ContextMenuItem = new ContextMenuItem(&quot;Flex SDK &quot; + mx_internal::VERSION, false, false);
                var customMenuItem2:ContextMenuItem = new ContextMenuItem(&quot;Player &quot; + Capabilities.version, false, false);
                var contextMenuCustomItems:Array = FlexGlobals.topLevelApplication.contextMenu.customItems;
                contextMenuCustomItems.push(customMenuItem1);
                contextMenuCustomItems.push(customMenuItem2);
            }
        ]]&gt;
    &lt;/fx:Script&gt;

    &lt;s:Label text=&quot;Right click to see custom context menu items.&quot;
             horizontalCenter=&quot;0&quot; verticalCenter=&quot;0&quot; /&gt;

&lt;/s:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@MechanisM,</p>
<p>It&#8217;s almost exactly the same, except replace <code><em>application</em>.contextMenu.customItems</code> with <code><em>FlexGlobals.topLevelApplication</em>.contextMenu.customItems</code>, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_Application_contextMenu_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span></span>
<span style="color: #000000;">        initialize=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import mx.core.FlexGlobals;</span>
&nbsp;
<span style="color: #000000;">            private function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                var customMenuItem1:ContextMenuItem = new ContextMenuItem<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Flex SDK &quot;</span> + mx_internal::VERSION, false, false<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                var customMenuItem2:ContextMenuItem = new ContextMenuItem<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Player &quot;</span> + Capabilities.version, false, false<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                var contextMenuCustomItems:Array = FlexGlobals.topLevelApplication.contextMenu.customItems;</span>
<span style="color: #000000;">                contextMenuCustomItems.push<span style="color: #66cc66;">&#40;</span>customMenuItem1<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                contextMenuCustomItems.push<span style="color: #66cc66;">&#40;</span>customMenuItem2<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;Right click to see custom context menu items.&quot;</span></span>
<span style="color: #000000;">             horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MechanisM</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-6047</link>
		<dc:creator>MechanisM</dc:creator>
		<pubDate>Sun, 18 Oct 2009 12:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-6047</guid>
		<description>What About Example for Flex 4 beta 2?</description>
		<content:encoded><![CDATA[<p>What About Example for Flex 4 beta 2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: handoyo</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-4624</link>
		<dc:creator>handoyo</dc:creator>
		<pubDate>Sun, 19 Jul 2009 15:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-4624</guid>
		<description>Hi,i want to ask..What should i do suppose i want to add a link to the context menu items on it??Thanks...</description>
		<content:encoded><![CDATA[<p>Hi,i want to ask..What should i do suppose i want to add a link to the context menu items on it??Thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-3997</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 22 Jan 2009 16:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-3997</guid>
		<description>Massic,

Correct, &quot;Select All&quot; is a reserved/restricted word. For a complete list, see http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/ContextMenuItem.html

&lt;blockquote&gt;
The following captions are not allowed, but the words may be used in conjunction with other words to form a custom caption (for example, although &quot;Paste&quot; is not allowed, &quot;Paste tastes great&quot; is allowed):
&lt;ul&gt;
&lt;li&gt;Save&lt;/li&gt;
&lt;li&gt;Zoom In&lt;/li&gt;
&lt;li&gt;Zoom Out&lt;/li&gt;
&lt;li&gt;100%&lt;/li&gt;
&lt;li&gt;Show All&lt;/li&gt;
&lt;li&gt;Quality&lt;/li&gt;
&lt;li&gt;Play&lt;/li&gt;
&lt;li&gt;Loop&lt;/li&gt;
&lt;li&gt;Rewind&lt;/li&gt;
&lt;li&gt;Forward&lt;/li&gt;
&lt;li&gt;Back&lt;/li&gt;
&lt;li&gt;Movie not loaded&lt;/li&gt;
&lt;li&gt;About&lt;/li&gt;
&lt;li&gt;Print&lt;/li&gt;
&lt;li&gt;Show Redraw Regions&lt;/li&gt;
&lt;li&gt;Debugger&lt;/li&gt;
&lt;li&gt;Undo&lt;/li&gt;
&lt;li&gt;Cut&lt;/li&gt;
&lt;li&gt;Copy&lt;/li&gt;
&lt;li&gt;Paste&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;li&gt;Select All&lt;/li&gt;
&lt;li&gt;Open&lt;/li&gt;
&lt;li&gt;Open in new window&lt;/li&gt;
&lt;li&gt;Copy link&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Massic,</p>
<p>Correct, &#8220;Select All&#8221; is a reserved/restricted word. For a complete list, see <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/ContextMenuItem.html" rel="nofollow">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/ContextMenuItem.html</a></p>
<blockquote><p>
The following captions are not allowed, but the words may be used in conjunction with other words to form a custom caption (for example, although &#8220;Paste&#8221; is not allowed, &#8220;Paste tastes great&#8221; is allowed):</p>
<ul>
<li>Save</li>
<li>Zoom In</li>
<li>Zoom Out</li>
<li>100%</li>
<li>Show All</li>
<li>Quality</li>
<li>Play</li>
<li>Loop</li>
<li>Rewind</li>
<li>Forward</li>
<li>Back</li>
<li>Movie not loaded</li>
<li>About</li>
<li>Print</li>
<li>Show Redraw Regions</li>
<li>Debugger</li>
<li>Undo</li>
<li>Cut</li>
<li>Copy</li>
<li>Paste</li>
<li>Delete</li>
<li>Select All</li>
<li>Open</li>
<li>Open in new window</li>
<li>Copy link</li>
</ul>
</blockquote>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Massic</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-3999</link>
		<dc:creator>Massic</dc:creator>
		<pubDate>Thu, 22 Jan 2009 10:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-3999</guid>
		<description>Nice, but dont let your immagination be kissed by the idea to add &quot;select all&quot; menu item. You&#039;ll never see it :(  Maybe its a &quot;reserved&quot; label ...</description>
		<content:encoded><![CDATA[<p>Nice, but dont let your immagination be kissed by the idea to add &#8220;select all&#8221; menu item. You&#8217;ll never see it :(  Maybe its a &#8220;reserved&#8221; label &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raza</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-3998</link>
		<dc:creator>Raza</dc:creator>
		<pubDate>Sun, 09 Nov 2008 01:40:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-3998</guid>
		<description>Very Nice Example
I extended your example by adding an event listener and navigating to a webpage!
It works fine, but when i do right click on a swf loader, it doesnt navigate to webpage (seems like it simply bypass the event)

Could you please find the solution of this problem?

My code is here

//in initApp
mx.core.Application.application.contextMenu.hideBuiltInItems();
var mnuCRight:ContextMenuItem = new ContextMenuItem(&quot;Copyright © 2008&quot;, true);
mnuCRight.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, ctMenu);
mx.core.Application.application.contextMenu.customItems.push(mnuCRight);

//function
		private function ctMenu(event:ContextMenuEvent):void
		{
			navigateToURL(new URLRequest(&quot;www.myweb.com&quot;), &quot;_blank&quot;);
		}</description>
		<content:encoded><![CDATA[<p>Very Nice Example<br />
I extended your example by adding an event listener and navigating to a webpage!<br />
It works fine, but when i do right click on a swf loader, it doesnt navigate to webpage (seems like it simply bypass the event)</p>
<p>Could you please find the solution of this problem?</p>
<p>My code is here</p>
<p>//in initApp<br />
mx.core.Application.application.contextMenu.hideBuiltInItems();<br />
var mnuCRight:ContextMenuItem = new ContextMenuItem(&#8220;Copyright © 2008&#8243;, true);<br />
mnuCRight.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, ctMenu);<br />
mx.core.Application.application.contextMenu.customItems.push(mnuCRight);</p>
<p>//function<br />
		private function ctMenu(event:ContextMenuEvent):void<br />
		{<br />
			navigateToURL(new URLRequest(&#8220;www.myweb.com&#8221;), &#8220;_blank&#8221;);<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-3995</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sat, 08 Nov 2008 02:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-3995</guid>
		<description>Ram,

This isn&#039;t a Gumbo example (and should only require Flash Player 9.0.115.0), but what version of Flash Player 10 are you using? &lt;a href=&quot;http://blog.flexexamples.com/about-you/&quot; rel=&quot;nofollow&quot;&gt;&lt;u&gt;http://blog.flexexamples.com/about-you/&lt;/u&gt;&lt;/a&gt;

Does this happen in all browsers, or just one?

Peter</description>
		<content:encoded><![CDATA[<p>Ram,</p>
<p>This isn&#8217;t a Gumbo example (and should only require Flash Player 9.0.115.0), but what version of Flash Player 10 are you using? <a href="http://blog.flexexamples.com/about-you/" rel="nofollow"><u><a href="http://blog.flexexamples.com/about-you/" rel="nofollow">http://blog.flexexamples.com/about-you/</a></u></a></p>
<p>Does this happen in all browsers, or just one?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram</title>
		<link>http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/comment-page-1/#comment-3996</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Sat, 08 Nov 2008 01:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/#comment-3996</guid>
		<description>Could not see any of the GUMBO examples. &quot;It says download
error. Try to download again?&quot; I have Flash 10 installed in
my computer. I am using a XP machine.</description>
		<content:encoded><![CDATA[<p>Could not see any of the GUMBO examples. &#8220;It says download<br />
error. Try to download again?&#8221; I have Flash 10 installed in<br />
my computer. I am using a XP machine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

