Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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;
share|improve this answer
    
:) thank you very much @bummzack –  Local Locas Apr 17 '13 at 13:15
    
@LocalLocas No problem. Feel free to accept my answer (by clicking the checkmark) if it helped you solve your problem :) –  bummzack Apr 17 '13 at 13:33
    
Done ! ........ –  Local Locas Apr 22 '13 at 22:05

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

share|improve this answer
1  
I think he's referring to the flash forward/back functions, not browser forward/back buttons –  ssb Apr 17 '13 at 4:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.