Hi,
I tried to run the second video tutorial (Your Second AFCS Application) on LCCS SDK Navigator with no success.
VideoChat.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600" xmlns:rtc="AfcsNameSpace">
<!-- Place non-visual elements (e.g., services, value objects) here -->
<!--<rtc:ConnectSessionContainer id="cSession" autoLogin="true" width="100%"
height="100%" roomURL="https://connectnow.acrobat.com/smoky6880/room">
-->
<!--
<rtc:ConnectSessionContainer width="100%" height="100%" roomURL="https://connectnow.acrobat.com/smoky6880/room4">
-->
<rtc:ConnectSessionContainer id="cSession" autoLogin="false" width="100%" height="100%" roomURL="https://connectnow.acrobat.com/smoky6880/room4" creationComplete="showLogin()">
<rtc:authenticator>
<rtc:AdobeHSAuthenticator userName="Guest"/>
</rtc:authenticator>
<mx:HBox width="100%" height="95%">
<mx:VBox width="25%" height="100%">
<rtc:WebCamera width="100%" height="100%"/>
</mx:VBox>
<rtc:SimpleChat width="75%" height="100%"/>
</mx:HBox>
</rtc:ConnectSessionContainer>
<fx:Script>
<![CDATA[
import mx.managers.PopUpManager;
protected function showLogin():void {
var login:LoginDialog2 = new LoginDialog2();
login.connectSession = cSession;
PopUpManager.addPopUp(login, this);
PopUpManager.centerPopUp(login);
}
]]>
</fx:Script>
</s:Application>
LoginDialog2.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" title="Enter Guest Name" width="274" height="116">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.adobe.rtc.session.IConnectSession;
import mx.managers.PopUpManager;
[Bindable]
public var connectSession:IConnectSession;
protected function login():void {
connectSession.authenticator.userName = userNameField.text;
connectSession.login();
PopUpManager.removePopUp(this);
}
]]>
</fx:Script>
<s:TextInput width="234" id="userNameField" enter="login()" x="10" y="10"/>
<s:Button label="Ok" click="login()" x="173" y="43" width="69"/>
</s:Panel>
Basically, I pressed the Debug button and all I am getting is:
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 646,462 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 370,463 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 2,292,131 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 648,239 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 441,686 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 1,429,050 bytes after decompression
[SWF] C:\Documents and Settings\Kevin Lee\Adobe Flash Builder 4\VideoChat\bin-debug\VideoChat.swf - 323,414 bytes after decompression
I am not getting any message related to connection. Any idea of what's wrong?
Thanks,
Kevin
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I got your problem :). You were doing fine earlier except that you need to call the showLogin() function on creationComplete() of the Application and not the ConnectSessionContainer. This is because, the connectsession will be created only when you show the login UI and enter using that UI.
I am attaching the two updated files. Let me know if there is anything else
Hope this helps
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi Kevin,
Any chance you put the ConnectSessionContainer in the declarations tag
area? I see 3 of them, most commented out, as well as the declarations
comment there.
let me know, we'll get it sorted out.
nigel
Views
Replies
Total Likes
I got the following error:
Description Resource Path Location Type
Parse error: '<fx:Script>' is not allowed to follow '<fx:Declarations>'. LoginDialog2.mxml /VideoChat/src line 9 Flex Problem
If I did:
<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" title="Enter Guest Name" width="274" height="116">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<fx:Script>
<![CDATA[
import com.adobe.rtc.session.IConnectSession;
import mx.managers.PopUpManager;
[Bindable]
public var connectSession:IConnectSession;
protected function login():void {
connectSession.authenticator.userName = userNameField.text;
connectSession.login();
PopUpManager.removePopUp(this);
}
]]>
</fx:Script>
</fx:Declarations>
<s:TextInput width="234" id="userNameField" enter="login()" x="10" y="10"/>
<s:Button label="Ok" click="login()" x="173" y="43" width="69"/>
</s:Panel>
in LoginDialog2.mxml, putting <fx: Script> inside <fx:Declarations>
I then tried to change some of the code segments around in VideoChat.mxml but still no success:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600" xmlns:rtc="AfcsNameSpace">
<!-- Place non-visual elements (e.g., services, value objects) here -->
<fx:Script>
<![CDATA[
import mx.managers.PopUpManager;
protected function showLogin():void {
var login:LoginDialog2 = new LoginDialog2();
login.connectSession = cSession;
PopUpManager.addPopUp(login, this);
PopUpManager.centerPopUp(login);
}
]]>
</fx:Script>
<rtc:ConnectSessionContainer id="cSession" autoLogin="false" width="100%" height="100%" roomURL="https://connectnow.acrobat.com/smoky6880/room4" creationComplete="showLogin()">
<rtc:authenticator>
<rtc:AdobeHSAuthenticator userName="Guest"/>
</rtc:authenticator>
<mx:HBox width="100%" height="95%">
<mx:VBox width="25%" height="100%">
<rtc:WebCamera width="100%" height="100%"/>
</mx:VBox>
<rtc:SimpleChat width="75%" height="100%"/>
</mx:HBox>
</rtc:ConnectSessionContainer>
</s:Application>
Views
Replies
Total Likes
Hi,
I got your problem :). You were doing fine earlier except that you need to call the showLogin() function on creationComplete() of the Application and not the ConnectSessionContainer. This is because, the connectsession will be created only when you show the login UI and enter using that UI.
I am attaching the two updated files. Let me know if there is anything else
Hope this helps
Thanks
Hironmay Basu
Views
Replies
Total Likes
Thanks, Hironmay. It works!!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies