var drawing = false;
var color = 0x000000;
this.onMouseDown = function() {
drawing = true;
if (drawing == true) {
this.createEmptyMovieClip("line", this.getNextHighestDepth())
line.moveTo(_root._xmouse,_root._ymouse)
}
}
this.onMouseMove = function() {
if (drawing == true) {
line.lineTo(_root._xmouse,_root._ymouse)
}
}
updateAfterEvent();
this.onMouseUp = function() {
drawing = false;
}
this.onEnterFrame = function() {
line.lineStyle(4, 0x000000);
}
rb.onRelease = function() {
var color = 0xFF0000;
}
bb.onRelease = function() {
var color = 0x000000;
}
gb.onRelease = function() {
var color = 0x00FF00;
}
bbb.onRelease = function() {
var color = 0x0000FF;
}
yb.onRelease = function() {
var color = 0xFFFF0;
}
cb.onRelease = function() {
var color = 0x00FFFF;
}
pb.onRelease = function() {
var color = 0xFF00FF;
}
//colors
//black = 0x000000;
//red = 0xFF0000;
//green = 0x00FF00;
//blue = 0x0000FF;
//yellow = 0xFFFF00;
//cyan = 0x00FFFF;
//pink = 0xFF00FF;
Then near the bottom, when I click the red button to make it draw red, I don't know how, near the bottom of the code that's what I did.
Please help me learn how to make it change colors by pushing a button :D