Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

Adding custom context menu items to a Flex application – ContextMenuItem

Posted on February 13, 2010 | No Comments

The following example shows how you can add custom context menu items to a Flex application by creating new ContextMenuItem objects and adding them to the Flex application’s buy viagra online order | buy cialis tadalafil | buy levitra vardenafil customItems array (via the contextMenu property).

<?xml version="1.0" encoding="utf-8"?>
<mx:Application     name="Application_contextMenu_test"
          xmlns:mx="http://www.adobe.com/2006/mxml"
          layout="vertical"
          verticalAlign="middle"
          backgroundColor="white"
        initialize="init();">
     
    <mx:Script>
          <![CDATA[
              private function init():void {
                  var customMenuItem1:ContextMenuItem = new   ContextMenuItem("Flex   SDK " + mx_internal::VERSION, false, false);
                    var customMenuItem2:ContextMenuItem = new ContextMenuItem(&quot;Player   &quot; <a href="http://over50losingweight.com/images/">order online levitra</a>      + Capabilities.version, false, false);
                  var contextMenuCustomItems:Array     = application.contextMenu.customItems;
                contextMenuCustomItems.push(customMenuItem1);
                      contextMenuCustomItems.push(customMenuItem2);
                  }
          ]]&gt;
 <a href="http://marvabrooks.com/images/">buy   viagra pill | where can i buy cialis | buy levitra online</a>     &lt;/mx:Script&gt;
     
    &lt;mx:Label   text=&quot;Right click   to see custom context menu items.&quot; /&gt;
 
&lt;/mx:Application&gt;

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Comments

Leave a Reply

You must be logged in to post a comment.