# Help with Drawing with the mouse in Flash from scene to scene

**URL:** https://forum.kirupa.com/t/help-with-drawing-with-the-mouse-in-flash-from-scene-to-scene/331231
**Category:** Uncategorized
**Created:** [June 18, 2013, 3:04am UTC](https://forum.kirupa.com/t/help-with-drawing-with-the-mouse-in-flash-from-scene-to-scene/331231 "2013-06-18T03:04:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![News2Me](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@News2Me](https://forum.kirupa.com/u/News2Me)
#### Post date: [June 18, 2013, 3:04am UTC](https://forum.kirupa.com/t/help-with-drawing-with-the-mouse-in-flash-from-scene-to-scene/331231/1 "2013-06-18T03:04:21Z")

</div>

Hi there,  
I am having trouble trying to figure out how to stop the drawing from showing up when I go to the next 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 drawing still appears on the screen. How do I make it go away when the user chooses to go to the next scene? Any guidance is appreciated. Thanks.

Here is the AS I am using:

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.
