public function onMainPannelMouseMove(event:MouseEvent):void {
mainPannel.graphics.lineTo(event.localX,event.localY);
mainPannel.graphics.lineStyle(linept);
try {
/*
so.setProperty("mainPannelX", event.localX);
so.setProperty("mainPannelY", event.localY);
so.setProperty("drawType", "rawdraw");
so.setProperty("action", "draw");
so.setProperty("figure", linept);
*/so.setProperty("soPannel", mainPannel); //----------- Try to dispach SYNC event on remote sharedObject by the whole object not just parameters only.
} catch (err:Error) {
trace("Sync error!");
}
}
The mainPannel is a Sprite object which is the dynamic part of my
application and every MouseEvent.MOUSE_MOVE event draws a line between
the MouseEvent.MOUSE_DOWN and MouseEvent.MOUSE_UP event locals(resp.
event.localX and event.localY).
The SYNC event which is using to redraw the figure at the remote intance
looks like:
public function onSyncRemoteObject(event:SyncEvent):void {
trace("Sync so.data.pannel: "+so.data.soPannel);
//mainPannel.graphics.lineStyle(so.data.figure);
//mainPannel.graphics.lineTo(so.data.mainPannelX,so.data.mainPannelY);
if (so.data.soPannel is Sprite) mainPannel = so.data.soPannel;
}
so my question is can I use the reference to the whole object as Sprite
or only use a setProperty() to the custom properties which can be user
to redraw the figure on the remote application. I saw that when I use
so.setProperty() on Sprite object it does not dispatch SYNC event when
the MouseEvent.MOUSE_MOVE event occure. The commented code works but it
is crude course of acion i think.
Thanks in advance. Dimitar
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
