Adobe Connect User Community
Menu

#1 2013-09-26 17:38:34

fritzdaworm

Syncing issue using Connect SDK

I've created a drag and drop game that I'd like the host to control only in Adobe Connect.  I've been working with the SDK (I'm doing this in Flash Pro and not Flex thanks to this http://blog.easelsolutions.com/2011/06/ … -8-pods/).

I have added a dispatch message to my startDrag function:

connector.dispatchSyncMessage("mouse", myObj, true);

I have an eventListener that listens for the SyncSwfEvent:

connector.addEventListener(SyncSwfEvent.SYNC_MSG_RCVD, mouseListen);

Finally, I have the  mouseListen function:

function mouseListen(e.SyncSwfEvent):void {
    if (e.data.msgNm == "mouse") {
         myObj = e.data.msgVal as Array;
    }
}

I can't seem to get the drag event to sync.  What am I missing?

Offline

#2 2013-10-02 11:56:30

fritzdaworm

Re: Syncing issue using Connect SDK

Ok, I figured out that I needed to do an Index of the array and pass specific x/y values. 

This does partially solve my problem in that I can drag a movieclip and have the syncConnector pass the x/y ending coordinates.

However, when testing this in Adobe Connect, a user can't see the movieclip being dragged, they only see where the movieclip ends up on the screen (i.e. the movieclip "jumps" to its target instead of a user seeing the movieclip being dragged).

I can't seem to pass a startDrag function to the syncConnector.   I get a TypeError: Error #1034: Type Coercion failed: cannot convert myClip1_1@7ffff0122e1 to com.adobe.sync.events.SyncSwfEvent.at CustomPod_fla::MainTimeline/pickUp().

Is it possible to pass a startDrag function to the connector and have that event sync?

Offline

#3 2014-01-20 10:20:57

develliot

Re: Syncing issue using Connect SDK

fritzdaworm wrote:

Ok, I figured out that I needed to do an Index of the array and pass specific x/y values. 

This does partially solve my problem in that I can drag a movieclip and have the syncConnector pass the x/y ending coordinates.

However, when testing this in Adobe Connect, a user can't see the movieclip being dragged, they only see where the movieclip ends up on the screen (i.e. the movieclip "jumps" to its target instead of a user seeing the movieclip being dragged).

I can't seem to pass a startDrag function to the syncConnector.   I get a TypeError: Error #1034: Type Coercion failed: cannot convert myClip1_1@7ffff0122e1 to com.adobe.sync.events.SyncSwfEvent.at CustomPod_fla::MainTimeline/pickUp().

Is it possible to pass a startDrag function to the connector and have that event sync?

Hi fritzdaworm,

You could animate the move once the pod receives a sync message.

To be honest I wouldn't send heavy objects in sync messages at all. Sync messages are flaky at the best of times. When using sync messages what you really want to be aiming for is to do a job with a few sync messages as possible sending as little data as possible. Lots of sync messages or sync messages with large amounts of data can grind a meeting room to a halt.

Also I believe that when dragging an event would be fired on frame which is every 11ms or similar. You really don't want to be flooding the room with that many sync messages it would make your Connect server cry before having an epileptic fit.

There is also the question of what happens if two host drag the same object at the same time. With by sending move co-ordinates and IDs the last move wins but two competing drag handlers sending a stream of events from two hosts would be very messy.

Last edited by develliot (2014-01-20 10:32:11)

Offline

#4 2017-05-15 05:41:29

GregArthur100

Re: Syncing issue using Connect SDK

Hi chaps,

Would one of you be able to share some screenshots of the code for this? I'm trying to do exactly the same - just a simple drag/drop that syncs in Connect. I don't even need the move, just the drag then instant drop.

Just struggling a bit to configure the code. I've got the "code snippets" to send out the drag/drop code, it's just the sync function (which i'm presuming needs to be on every item?).

Any help would be fantastic, thank you!

Offline

Board footer