Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsI've started creating a game for my interactive class and I need to know how to disable keys on the keyboard in flash.
Another problem in my game is that at one point I tell the user to push the up key. The user pushes the up key at the appropriate time and it gotoAndPlays the appropriate scene perfectly. Then when the next instance occurs, the user is told to push the down key. Once the down key is pressed, it plays the appropriate frame but the user can continue pressing the downkey and it will go back to the frame where I originally told the movie to play when the down key was pressed. The other strange part is that at the same time the down key can be pressed, the up key can also be pressed and will carry out its function of going back to the place in the timeline that it played when the user first pressed up. it's only at this area in the movie that there is this problem.
Please help me! Heres my code for both the up button area and the down button area.
Up button:
stage.addEventListener(KeyboardEvent.KEY _DOWN, upkeyhandler1);
stage.focus = buttonpushup;
function upkeyhandler1(event:KeyboardEvent): void{
if(event.keyCode == Keyboard.UP)
{gotoAndPlay(717)}
}
down button:
stage.addEventListener(KeyboardEvent.KEY _DOWN, downkeyhandler1);
stage.focus = buttonpushdown;
function downkeyhandler1(event:KeyboardEvent): void{
if(event.keyCode == Keyboard.DOWN)
{gotoAndPlay(1045)}
}