syncConnector and role in use with Collaboration Builder sdk

122 Views Asked by At

I am trying to get the user's role in Adobe Connect, and then use that in my pod to restrict access to buttons in an embedded swf file. So I created this in my mxml:

<mx:SWFLoader id="mySWFLoader" source="GameShow.swf" complete="setSwfMc()"/>
<sync:SyncConnector id="syncConnector" syncMessageReceived = "syncMessageReceived(event)" caughtUp="caughtUp(event)" />

Then I added this complete method for the loaded swf:

private function setSwfMc():void{
    mySwfMc = mySWFLoader.content as MovieClip;
    mySwfMc.addEventListener(FFTalkEvent.TALK_TO_FLEX,listenToFlash);
    this.addEventListener(FFTalkEvent.TALK_TO_FLASH,mySwfMc.mainFrame_mc.listenToFlex);
    dispatchEvent(new FFTalkEvent(FFTalkEvent.TALK_TO_FLASH, true, true, syncConnector.role));
}

The dispatch event at the end triggers this listener inside my embedded swf:

function listenToFlex(e:FFTalkEvent):void{
    trace("listening to Flex "+e.said);
    role = e.said;
    role_txt.text = e.said;
}

When I test this locally, i can get the embedded swf to spit back information. But when I put it into Adobe Connect, nothing shows up in the role_txt file, so it is not getting my syncConnector.role into my embedded swf. So I am wondering how do I know I have a value for syncConnector.role, and when can I trigger it off to my embedded flash file to know that a user has a role?

1

There are 1 best solutions below

0
On

Never mind. I found out the answer. The Flex project has to be in the index.html or index.swf as the first file in the project. Otherwise I don't think it has access to the collaboration builder details or properties.