5
\$\begingroup\$

How can I disable the Flash player forward and back button in AS3? These buttons make it possible to cheat in my game by moving from level to level.

\$\endgroup\$

2 Answers 2

5
\$\begingroup\$

I guess you're referring to the default entries in the Flash-Player menu:

flash player menu

The entries there can be customize (to a certain degree) by using the ContextMenu class.

Here's an example. In a frame of your timeline (preferrably at the beginning), place the following code:

var menu:ContextMenu = new ContextMenu();
var items:ContextMenuBuiltInItems = new ContextMenuBuiltInItems();

// disable the undesired items from the built-in items
items.play = false;
items.rewind = false;
items.forwardAndBack = false;

menu.builtInItems = items;

// override the context menu with our own menu
this.contextMenu = menu;
\$\endgroup\$
1
  • \$\begingroup\$ @LocalLocas No problem. Feel free to accept my answer (by clicking the checkmark) if it helped you solve your problem :) \$\endgroup\$
    – bummzack
    Apr 17, 2013 at 13:33
0
\$\begingroup\$

No, there is no way to disable that browser function in ac3. I wouldn't worry about cheating too much.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I think he's referring to the flash forward/back functions, not browser forward/back buttons \$\endgroup\$
    – ssb
    Apr 17, 2013 at 4:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .