Saving A Drawing on a Drawing Pad ???
Hey,
I would like to save the drawing that users do on my drawing pad (so that anyone can contribute to the same drawing), does anyone know how to do this?? I have never used Flash before so I very much have no idea about whats going on. My drawing pad works fine, but I don't know how to save it or even how to test if it saves. I thought I might be able to use remote shared object with persistence, but I don't know how to integrate it to my actionscript.
This is what I have now:
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;
}
line0.onPress = function() {
lineThickness = 0;
};
line3.onPress = function() {
lineThickness = 3;
};
line6.onPress = function() {
lineThickness = 6;
};
colorRed.onPress = function() {
selectedColor = "0xFF0000";
};
colorGreen.onPress = function() {
selectedColor = "0x00FF00";
};
colourPink.onPress = function() {
selectedColor = "0xFF66FF";
};
colourBlue.onPress = function() {
selectedColor = "0x0033FF";
};
colourLGreen.onPress = function() {
selectedColor = "0xCCFF33";
};
colourOrange.onPress = function() {
selectedColor = "0xFFCC00";
};
colourYellow.onPress = function() {
selectedColor = "0xFFFF00";
};
nc = new NetConnection();
nc.connect("webaddress";
so = SharedObject.getRemote("drawLine", nc.uri, "/a/b/c");
so.connect(nc);
so2 = SharedObject.getRemote("drawLine", nc.uri, "/a/b/c");
Please help me!!!