1

我试图按照这个例子:http ://coenraets.org/blog/2010/07/video-chat-for-android-in-30-lines-of-code/但我在搜索任何几个小时后仍然收到错误网上的解决方案。

我正在使用 Adob​​e 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 完全陌生,所以如果有一个简单的解决方案,请不要杀了我。提前致谢!

4

1 回答 1

1

<s:Application>根标签呢?

更新: 试试这个,可能你也有空格。

于 2012-01-20T11:32:32.917 回答