Hey, ive created a sketch book that allows the user to basically draw whatever, but im having trouble with buttons that allow you to change the colour of the line.
heres the code on an empty mc:
onClipEvent(load){
draw = false;
_root.lineStyle(1,0x000000, 100);
}
onClipEvent(mouseDown){
draw = true;
_root.moveTo(_root._xmouse,_root._ymouse);
}
onClipEvent(mouseUp){
draw = false;
}
onClipEvent(enterFrame){
if(draw){
_root.lineTo(_root._xmouse,_root._ymouse);
}
}
and the code on the button: (would be the red button)
on(release){
_root.lineStyle(1,0xFF0000, 100);
}