diminionone
Technical User
Hey, I'm following a tutorial on making a drawing pad in flash, using this code.
I've got everything working, but I'd like to add a background on which users can draw on. So basically, how would I go about telling flash to display on a layer, rather on the root space? Thanks
Code:
lineThickness = 0;
selectedColor = "0x000000";
_root.onMouseDown = startDrawing;
_root.onMouseUp = stopDrawing;
function startDrawing() {
if (_xmouse<455) {
_root.lineStyle(lineThickness, selectedColor);
_root.moveTo(_root._xmouse, _root._ymouse);
_root.onMouseMove = drawLine;
}
}
function drawLine() {
_root.lineTo(this._xmouse, this._ymouse);
}
function stopDrawing() {
delete this.onMouseMove;
}