Upon hoping to the frame with the drawing board actionscript on it, i’ve successfully created the erase button to remove all the drawings made, but then i also have a ‘HOME’ button that takes me back home. BUT the drawing board actionscript is still active even on the HOME frame. +On the home button i’ve added in the clear(); function to also remove the drawing.
Either way this still does not remove the drawing board actionscript.
How do I completely disable the drawing board actionscript upon clicking home? but still be able to reactivate it when I’m on the frame again.
**Drawing board Actionscript used from Kirupa.com
**
// 1. SETTING THINGS
_root.createEmptyMovieClip(“line”,1);
// 2. EVENTS IN _ROOT:
_root.onMouseDown = function(){
line.moveTo(_xmouse,_ymouse);
line.lineStyle(2,0x000000,100);
this.onMouseMove = function(){
line.lineTo(_xmouse,_ymouse);
updateAfterEvent();
}
}
_root.onMouseUp = function(){
this.onMouseMove = null;
}
**Erase Button actionscript
**// 3. BUTTON “ERASE”:
// --------------------
buttonErase.onPress = function(){
_root.line.clear();
}
Thankyou