dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Hide Right Click Menu in Flex

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    46

    Hide Right Click Menu in Flex

    How can i hide right click menu using hidebuiltinitems?
    Im using Flex 3
    thanks in advance

  2. #2
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    import Stage:

    import flash.display.Stage;


    and tuck one of these somewhere:

    stage.showDefaultContextMenu = false;

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    46
    Thanks for the reply, But I couldn’t make this code work. Im a newbie.
    When I did following ;

    PHP Code:
        <mx:Script>
            <![
    CDATA[
                
    import flash.display.Stage;
                
    stage.showDefaultContextMenu false;
            ]]>
        </
    mx:Script
    It shows me this error:
    “Access of an Undefined Property stage”

    Can you plz post a working example?

  4. #4
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Important differences highlighted:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="init()" layout="absolute">
    <mx:Script>
    <![CDATA[
    import flash.display.Stage;
    private function init():void
    {
    stage.showDefaultContextMenu = false;
    }

    ]]>
    </mx:Script>
    </mx:Application>

  5. #5
    Member
    Join Date
    Dec 2007
    Posts
    46
    I tried it too, It saves without any error, but when i run the webpage, it gives error.
    plz compile and figure out the problem
    Thanks

  6. #6
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Quote Originally Posted by manofspirit
    I tried it too, It saves without any error, but when i run the webpage, it gives error.
    plz compile and figure out the problem
    Thanks

    ???????

    I don't need to figure it out. My webpage (Flex 3 / FP9) uses it as I type this. I don't know why you are having problems but haven't seen any of your examples

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center