Hi Andy,

Actually there is a way, though I think it's a metaphysical law that
somebody has to say it's impossible before an answer appears.

I had to do this so that folk could copy paste with ctrl-c ctrl-v and have
the text modified before put in atext field but not allow a
right-click-paste into the text field that could mess up the rich text
properties otherwise.

I only did it for one textfield, though I don't see any reason why you
wouldn't be able to apply the same idea everywhere.

The basic idea is that you create a custom right click menu and trap it's
onSelect event. When that event gets triggered, you create an editable
textfield and set the focus to it, since the object that received the event
no longer has focus, the right click menu goes away.

It was a while ago but I believe this was the snippet that did the trick.

public function onLoad() {
       var menu_cm:ContextMenu = new ContextMenu();
       menu_cm.hideBuiltInItems();
       menu_cm.onSelect = function(item:Object,item_menu:Object){
           GhostObj.createTextField("Paste_txt", 10000, 0, 0, 10, 20);
           GhostObj.Paste_txt.type = "input";
           Selection.setFocus(eval("GhostObj.Paste_txt"));
       }
       Capture_txt.menu = menu_cm;
...

Let me know if it works for you,

-Cort

On 2/28/07, Kalani Bright <[EMAIL PROTECTED]> wrote:


Hi Andy,

This will drive you wild until you're living with the lions in
Africa.  Save
yourself.  It's not possible especially in a .swf.  They removed that
possibility in flash 5 or 6.

I even tried putting in in a C# windows application with complicated
scripting to toggle a layer above it and faking mouse events that I wanted
to send.  I found you can't send fake events to flash.  You would need
access to the unmanaged code area (for other readers).  It's especially
not
possible with a swf or an application unless that application is a Zinc
app
or if you shell out some big moolah to Adobe for a special license (but
won't work for a swf either).

Come back, Andy, come back into the light...it's not worth it really.

Kalani


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Jones
Sent: Wednesday, February 28, 2007 7:18 AM
To: [email protected]
Subject: [Flashcoders] Right Click disabling

Hi,

I know this has been done to death but nothing has answered my real
problem.
I need to turn off the right click menu completely in a swf.
I don't want it to display custom stuff (I can do that), I want it to
detect
a right click but not show the menu.  This can only be in a swf, not an
exe
so the compilers don't work.

Please help - this has been driving me wild!


Andy Jones
Learning Consultant



This email was sent to you by Reuters, the global news and information
company.
To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Reuters
Limited.

Reuters Limited is part of the Reuters Group of companies, of which
Reuters
Group PLC is the ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South
Colonnade, Canary Wharf, London E14 5EP, United Kingdom Registered No:
3296375 Registered in England and Wales


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to