1
我试图遵循这个例子:http://coenraets.org/blog/2010/07/video-chat-for-android-in-30-lines-of-code/但是在网络上搜索任何解决方案几小时后,我仍然遇到错误。ConnectSessionContainer的声明必须包含在<Declarations>标记中
我使用的是Adobe Flash Builder 4.6和Flex 4.5.1 SDK,我还安装了LifeCycle Collaboration Service,并将lccs.swf添加到我的项目构建路径中。
<?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:rtc="http://ns.adobe.com/rtc" currentState="logon" fontSize="28">
<fx:Script>
[Bindable] private var roomURL:String = "URL HERE!";
protected function connect():void {
auth.userName = userName.text;
currentState = "default";
session.login();
}
</fx:Script>
<s:states>
<s:State name="default"/>
<s:State name="logon"/>
</s:states>
<fx:Declarations>
<rtc:AdobeHSAuthenticator id="auth"/>
</fx:Declarations>
<s:TextInput id="userName" includeIn="logon" top="200" horizontalCenter="0"/>
<s:Button label="Connect" click="connect()" includeIn="logon" top="250" horizontalCenter="0" height="50" width="150"/>
<rtc:ConnectSessionContainer id="session" roomURL="{roomURL}" authenticator="{auth}" autoLogin="false" width="100%" height="100%" includeIn="default">
<rtc:WebCamera top="10" left="10" bottom="10" right="10"/>
</rtc:ConnectSessionContainer>
</s:Application>
编译器说以下内容:
“ConnectSessionContainer”声明必须包含在 标签内,因为它是不能分配到默认 属性的元素类型“mx.core.IVisualElement”。
我总是新来Flex,所以如果有简单的解决方案,就不要杀了我。提前致谢!
对不起,我在Flash Builder中有该标签。似乎我忘记了一些如何,当我做这个线程。 –
@opous您能否请编辑您的代码片段,因为它在Flash Builder中? –
我已经更新了帖子,整个源代码:) –