Avatar

Level 2

Here is some simple code that demonstrates my problem (you can add  sharedID="default_FileSharePod" to rtc:FileShare tag to see my 2nd problem about the uploaded file not showing):

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication initialize="windowedapplication1_initializeHandler(event)" xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0" showFlexChrome="false"  layout="absolute" width="100%" height="100%" xmlns:rtc="AfcsNameSpace">
    <mx:Script>
        <![CDATA[
            import com.adobe.rtc.authentication.AdobeHSAuthenticator;
            import com.adobe.rtc.events.SessionEvent;
            import com.adobe.rtc.session.ConnectSession;
           
            import mx.events.FlexEvent

            protected function windowedapplication1_initializeHandler(event:FlexEvent):void
            {
                connectToRoom("firstRoom");
            }
           
            private var authenticator:AdobeHSAuthenticator = new AdobeHSAuthenticator();
           
            [Bindable]
            public var connectSession:ConnectSession = new ConnectSession();
           
            public function connectToRoom(roomName:String):void
            {
                    authenticator.userName = "guest";
               
               
                connectSession.authenticator = authenticator;
               
                connectSession.roomURL = [YOUR ROOM URL HERE];
                connectSession.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onConnectionChange);
                connectSession.login();
               
            }
           
            private function onConnectionChange(event:SessionEvent):void
            {
                this.connectSession = event.currentTarget as ConnectSession;
            }

        ]]>
    </mx:Script>
        <rtc:FileShare width="100%" height="100%" connectSession="{this.connectSession}"  />
</mx:WindowedApplication>