BigFish wants to publish my game, BUT...

Nomosoft

  • Posts: 122
... one of their requirements is that I "Disable the Adobe Flash right-click context menu." I've been all over the internet, and these forums, looking for the solution. Mostly, what I find is "stage.showDefaultContextMenu = false," which I finally figured out needs to be "FlxG._game.stage.showDefaultContextMenu=false," but which doesn't seem to do anything, at all. Anyway, that apparently only hides some of the menu items. The other solution I see looks something like this:

var newMenu:ContextMenu = new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;

However, Flash chokes on "ContextMenu." I have no idea what package or library ContextMenu is part of, or how to import it into a StencylWorks project, even if I did. I see this question has been asked once or twice, but there doesn't seem to have been any real solution discovered. Can I disable the right-click menu in code, or not?

Legendary Hoamaru

  • *
  • Posts: 1088
FlxG._game.contextMenu.customItems = new Array();
FlxG._game.contextMenu.hideBuiltInItems();

You can't get rid of the settings or about in any flash app without use of JavaScript, but the code above along gets rid of everything else.

« Last Edit: December 18, 2011, 12:35:27 pm by Legendary Hoamaru »

RayonMazter

  • Posts: 123
Congrats on BFG! Sounds great.

Jon

  • *
  • Posts: 17529
Congrats on getting sponsored by BigFish - we'd be happy to work with you to iron out any sponsor's terms if you contact us. Let me know if Mike's solution works for you.

http://www.stencyl.com/about/contact/

This is for Ace Escape I assume?

Nomosoft

  • Posts: 122
FlxG._game.contextMenu.customItems = new Array();
FlxG._game.contextMenu.hideBuiltInItems();

You can't get rid of the settings or about in any flash app without use of JavaScript, but the code above along gets rid of everything else.

Cool, thanks for the tip.

Congrats on BFG! Sounds great.

Congrats on getting sponsored by BigFish - we'd be happy to work with you to iron out any sponsor's terms if you contact us. Let me know if Mike's solution works for you.

http://www.stencyl.com/about/contact/

This is for Ace Escape I assume?

Thanks :) "Sponsored" is maybe a bit grandiose, it's just a flat rate for non-exclusive use of the game on their site, but it's still pretty cool. Yes, this is for Ace Escape, but it is for a much-improved version of Ace Escape, with graphics and music redone by Ethan718. People with a Flash Game License account can see it, here: www.flashgamelicense.com/view_game_external.php?game_id=20995&cmd=next I will also post the updated version here on Stencyl when I get a chance, probably tonight.

I will implement Mike's solution as soon as I get home, and I'll update this thread with results.