Avatar

Level 1

Of course, I have several files, basically, I was following the video tutortials that ship with the sdk

This is the main mxml file :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:rtc="AfcsNameSpace" xmlns="*"
    backgroundColor="#ffffff" backgroundGradientAlphas="[0, 0]"
    creationComplete="creationCompleteHandler()">
    
    <mx:Script>
        <![CDATA[
            import mx.managers.PopUpManager;
            
            protected var loginDialog:LoginDialog;
            
            protected function creationCompleteHandler():void
            {
                loginDialog = new LoginDialog();
                loginDialog.connectSession = connectSession;
                loginDialog.addEventListener("login", loginHandler);
                PopUpManager.addPopUp(loginDialog, this);
                PopUpManager.centerPopUp(loginDialog);
        
            }
            
            protected function loginHandler(event:Event):void
            {
                PopUpManager.removePopUp(loginDialog);
            }
        ]]>
    </mx:Script>
    
    <rtc:AdobeHSAuthenticator id="authenticator" />
    
    <rtc:ConnectSessionContainer id="connectSession" 
        width="100%" height="100%" autoLogin="false"
        roomURL="http://connectnow.acrobat.com/julienc/whiteboard" 
        authenticator="{authenticator}" >
        <mx:HBox width="100%" height="100%" 
            horizontalAlign="center" horizontalScrollPolicy="off" 
            verticalAlign="middle" verticalScrollPolicy="off">    
            <mx:VDividedBox width="80%" height="100%" 
                horizontalScrollPolicy="off" 
                verticalScrollPolicy="off">
                <rtc:SharedWhiteBoard id="whiteboard" width="100%" height="80%" />        
                <rtc:SimpleChat id="chat" width="100%" height="20%" />
            </mx:VDividedBox>
            <rtc:Roster id="roster" width="20%" height="100%" />
        </mx:HBox>
    </rtc:ConnectSessionContainer>
</mx:Application>

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
    title="Login with a username" width="300" height="100" 
    horizontalAlign="center" horizontalScrollPolicy="off"
    paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"
    verticalAlign="middle" verticalScrollPolicy="off">
    
    <mx:Metadata>
        [Event(name="login")]
    </mx:Metadata>    
        
    <mx:Script>
        <![CDATA[
            import com.adobe.rtc.session.IConnectSession;
            
            [Bindable]
            public var connectSession:IConnectSession;
            
            protected function loginHandler():void
            {
                if (userName.text == null || userName.text.length < 1)
                    return;
                
                connectSession.authenticator.userName = userName.text;
                connectSession.login();
                
                callLater(function():void { userName.text = "" });
                
                var e:Event = new Event("login");
                dispatchEvent(e);
            }
        ]]>
    </mx:Script>    
        
    <mx:HBox width="100%" height="100%"
        horizontalAlign="center" horizontalScrollPolicy="off"
        verticalAlign="middle" verticalScrollPolicy="off">
        <mx:Label text="Username :" fontWeight="bold" />
        <mx:TextInput id="userName" width="100%" enter="loginHandler()" />
        <mx:Button label="Login" click="loginHandler()" />    
    </mx:HBox>
</mx:Panel>