A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Disabling Right Click Menu?

  1. #1
    Blind Metal™ Solomon Cloud's Avatar
    Join Date
    Aug 2001
    Location
    In A Rusty 1969 Ford Galaxie
    Posts
    147

    Disabling Right Click Menu?

    Just a quick question how would I disable right click cheating in my flash game.

    Also I use flash 5 and well am wondering if its possible to disable the menu.

    Thanks in advance
    Lucy, is an artist. Lucy paints pictures of Barbara Streisand.

    http://www.blindmetal.com

  2. #2

  3. #3
    *insert clever title* SergeantK's Avatar
    Join Date
    Nov 2004
    Location
    Akron, Ohio
    Posts
    506
    I didnt check kendudes links, but here is the html code:

    Code:
    <embed src="mygame.swf" quality="high" loop="false" menu="false" />
    <!--Be sure to add the wifth and height-->
    Or on the PARAM attributes, just say

    Code:
    <param name="menu" value="false" />
    But for that you have to be using the object attribute in your HTML document.

    Hope I helped


  4. #4
    Say hello to Bob Kakihara's Avatar
    Join Date
    Jul 2004
    Location
    kent, England
    Posts
    1,067
    Well this is handy, i wanted to do the exact same thing.

    By the way Kendude did you check the first few posts in the bottom link you posted, something about allowing use of the right click of the mouse in gameplay, does that actually work?

    thanks guys.
    If our body is a clock ticking away and if while we experience all that this world has to offer time has still continued to pass, are we living or just experiencing a slow death?

  5. #5
    hmm Pugger's Avatar
    Join Date
    Sep 2003
    Location
    Perth, Australia
    Posts
    616
    Yeah in MX 2004 you can add custom options to the right click menu. The options can then run a function.

    I think its called something like "customMenu". Can't quite remember, but look in the flash MX 2004 help files about it.

    I suppose they would be good for strategy games or in game menus.

  6. #6
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    I was a bit confused by some of the conversations on the forums that kendude pointed to, so is there a way to completely removed it? Basically make nothing pop up, just like left clicking?

    Thanks...

  7. #7
    hmm Pugger's Avatar
    Join Date
    Sep 2003
    Location
    Perth, Australia
    Posts
    616
    I don't think you can completely remove it. You will always be left with settings and about flash.

  8. #8
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    "something about allowing use of the right click of the mouse in gameplay, does that actually work?"

    Yeah you can scan it like a normal keypress, even under Flash6 ( And possibly 5 ), although you still get the nasty menu.

    The middle mouse button also works too.
    code:

    Key.isDown(4)


    I think the RMB is 3 off the top of my head, and the LMB 1 or 2 ( Just have a play around with it ).

    Squize.

  9. #9
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    Just one more question, if its not possible for Flash to completely disable the right-click menu, could you somehow disable it if you made it a downloadable application?

  10. #10
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Only really with the major 3rd party wrappers, such as zinc, screenweaver etc.

    I'm pretty sure you can hack the actual exe as well to do the same, but that's just a silly amount of effort.

    Squize.

  11. #11
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    Thanks, I understand now....

    Edit: *shakes angry fist at macromedia for not allowing right-click to be used well in games*
    Last edited by UnknownGuy; 04-15-2005 at 08:54 AM.

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