5 Replies Latest reply on May 15, 2007 4:23 AM by willrose

    Hide context menu items

    willrose Level 1
      Is it possible to hide the "copy" and "paste" context menu items for a TextField when a user right clicks on a TextField? I know you can use the ContextMenu object to hide built-in items for the flash player, but I haven't been able to figure out how to hide the built-in items for the TextField menu.

        • 1. Re: Hide context menu items
          Rothrock Level 5
          I think if you make the text not selectable they will go away?

          If they are selectable, why would you need them to go away? Just curious.
          • 2. Re: Hide context menu items
            willrose Level 1
            I'm trying to make it as hard as possible for a user to copy text from a textfield and then paste it into say a Word document and save it. I do however provide them with a custom copy and paste button on stage that copies and pastes using an object I set up. This object however only works within my flash app, which is what I want.
            • 3. Re: Hide context menu items
              willrose Level 1
              As another option, is there any way I can assign my own handler to the copy and paste items in the context menu? If I can override them to use my own object instead of the system clipboard, that would be even better.
              • 4. Re: Hide context menu items
                Greg Dove Level 4
                I'm pretty sure the answer is an unfortunate 'no'. I've looked at this type of thing in the past, working on a rich text editor. You can add contextmenu items but not remove those 'mandatory' ones from a text field. Unless you're doing a projector exe, where you can use a third party tool to change things or even (in windows) do some hackery with the resources in the exe.

                The only situation I can think of in a selectable input text field where the context menu 'copy' function is unavailable is when the password property is set to true.
                • 5. Re: Hide context menu items
                  willrose Level 1
                  That's what I suspected. Thanks.