Hi, Im learning flash media server at the mo and have a
problem. I'm trying to use an onsync handler so that when a player
clicks a movieclip on stage and moves it, the same movieclip moves
on all other clients.
The way i am trying to initiate this is as follows,
//>> First i've set a remote sharede objects data to be
updated.
///tank_coord_so.data[tName]={sx : x,sy : z,destx : x,desty :
dy};
I've just got 4 variables, start x & y and destination x
& y
//>> The onSync handler does work but it does not move
the movieclip on any of the other clients, only the client who
moved the movieclip;
///tank_coord_so.onSync = function(list) {
for(i in tank_coord_so.data){
var pos=tank_array_info_so.data[ i ]; //finds the position
in local array that contains tank object
trace("onsync pos"+pos);
var x=tank_coord_so.data
.sx;
var y=tank_coord_so.data.sy;
var destx=tank_coord_so.data
.destx;
var desty=tank_coord_so.data.desty;
var obj : Object=_root.tanks[pos];
obj.clip._x=destx;
obj.clip._x=desty;
So the onSync works but only moves the movieclip on one
client (the client who selected it to move);
Any advice or insight would be appreciated a lot.
Thanks,
B.