Have you ever made a game where you wanted to hide a button? Perhaps the button was used for a secret or unlockable in your game. Or maybe you have an escape the room game where you don’t want people cheating. Well, in this tutorial I’ll show you how to add some simple code to disable the use of those annoying yellow boxes that appear when a player presses the tab button in your game.
I’ve already mentioned how the tab button can be used to cheat in your game, but it also can distract from your gameplay. Suppose a player accidentally presses it, that ugly yellow box will appear around your game art or design. It just doesn’t look good. So how do you get rid of it?
Simple, just add this little piece of actionscript 2 to the frame:
button1.tabEnabled=false;//turn off the tab-ability of button1 button2.tabEnabled=false;//turn off the tab-ability of button2
You’ll need to be sure your buttons have an instance name, otherwise this won’t work, since the code relies on turning of the tab-ability of certain buttons.
That’s all. Now you know how to remove those annoying yellow boxes that appear around your button when tab is pressed.