Hello again,
I am having trouble trying to figure out how to** stop** the mouse from being able to draw when I go to a different scene.
I have a Flash file with the AS below. This AS lets the user draw with the mouse but when the user goes to another frame/scene by selecting a button the ability to draw with the mouse is still there and I do not want it to be.
How do I make the mouse capability go away when the user chooses to go to the next scene so the mouse can only draw at that one particular scene and not others?
Any guidance is appreciated. Thanks.
Here is the AS being used:
Mouse.addListener(mouseListener);
this.createEmptyMovieClip(“drawing_mc”, this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
this.drawing = true;
drawing_mc.moveTo(_xmouse, _ymouse);
drawing_mc.lineStyle(3, 0x99CC00, 100);
};
mouseListener.onMouseUp = function() {
this.drawing = false;
};
mouseListener.onMouseMove = function() {
if (this.drawing) {
drawing_mc.lineTo(_xmouse, _ymouse);
}
updateAfterEvent();
};
Mouse.addListener(mouseListener);
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.DELETEKEY) || Key.isDown(Key.BACKSPACE)) {
drawing_mc.clear();
}
};
Key.addListener(keyListener);
Thanks for any help.