Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-user sketchboard

Status
Not open for further replies.

MarkZK

Technical User
Jul 13, 2006
202
GB
Hi all

I've noticed there's no forum specific to flash communication server here so I'm not expecting anyone to know, but I thought I'd ask here anyway.

does anyone know what code would be needed to make my basic sketchpad multi-user, it only needs to be very basic (no userlist), and what needs to be added to the server-side application main.asc.

this is the basic code so far,

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;
}


Thanks for reading.
 
Hi Kenneth Kawamoto,

Thanks for the reply.

I actually achieved this in the end, but didn't post the solution because the result was a browser crash.

I can now understand why this guy at flash didn't add a freehand tool to his whiteboard component.

pushing an array on mouse move that would later be sent as a shared object would become huge, after just a few scribbles IE crashed and Firefox wasn't far behind, I'm guessing it was being redrawn each time and getting worse as more objects/arrays were added.

If I do get the time to redo this and figure out a better way I'll update this thread so anyone googleing will have an easier time than I had.

I was thinking along the lines of creating a new bitmap image on release and updating that with shared object, should be less demanding than redrawing each new line.


Thanks again.
 
yep, you're probably right there, and I'd have to think about transparency so not to over lap them, it'd be interesting to see if the whiteboards out there use the same method that I tried, but I can't see looping through the x and y positions being the best way, oh well, back to the drawing board (literally) :)

 
Hello,

I'm searching to do exactly the same thing, If you 've find out the solution, can you plz explain me ?

I think you have uses remote sharedobjects ? I've installed a working red5 server.

My e-mail : clemfree@free.fr

Thanks


Clem
 
Hi cl00m,

I still haven't had time to work with this again yet, having said that, I'm not sure how compatible flash communication server and red5 server are with each other and whether or not they'd need different code/files, but, while searching for information on this I did bookmark this red5 based link that may or may not help you, I figure it's worth adding just in case it does help.


Goodluck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top