You need a Grounds Gold Account to post on the NG BBS!If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!
//create an invisible movie clip across the entire stage using API
_root.createEmptyMovieClip("base", 1);
var onStage:Boolean = false;
with (base) {
lineStyle(2, 0x0000000, 0);
beginFill(0x0000000, 0);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
}
//remove the hand cursor
base.useHandCursor = false;
//check whether it's on stage or not
base.onRollOut = function() {
onStage = false;
};
base.onRollOver = function() {
onStage = true;
};
function onEnterFrame() {
if (onStage) {
//code
}
}
Well, I put that In, but now I can't click on anything. Where is that code supposed to go? I put it in a blank layer.
So, In a game I've made, I realised that at some parts you can just move the mouse out of the game and put it somewhere else. Obviously, I want to stop this. But I have no clue how! I'm assuming it's something like
blahblahblah {
game = false
//"game" is a var and when it's false, you lose.
}
But I don't know what kind of handler to use! anyone know what to do?
Hey, I have a question about anti cheat methods too. How can you stop someone from dragging the mouse out of the screen, then putting it on somewhere else?
Half of the time, when I download a song from NG, I try to import it to my flash and I get an error message that says: "Error, can not open file because there were problems reading the file."