May
8
好吧 前面也了解了LCCS的管理
现在弄个LCCS聊天室、文档协作的实例来耍耍
在flex中新建个项目 并引用LCCS SDK中的SWC 在SDK中的lib文件夹中 有flash9、flash10、flash10.1等各个版本
其中roomURL就是你在afcs申请的帐号中的房间地址了
Roster会返回在房间中的用户列表
SharedWhiteBoard是一个类似涂鸦板的玩意
SimpleChat是一个简单的聊天控件
每个控件后的id都很重要 在本地的lccs管理中都可以看到
恩 这个例子后就基本了解了LCCS的用法
现在弄个LCCS聊天室、文档协作的实例来耍耍
在flex中新建个项目 并引用LCCS SDK中的SWC 在SDK中的lib文件夹中 有flash9、flash10、flash10.1等各个版本
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" xmlns:rtc="AfcsNameSpace">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
public function onClick(event:Event) : void
{
auth.userName = username.text;
cSession.login();
}
public function onAuthFailure(event:Event) : void
{
Alert.show('………………');
}
public function onAuthSuccess(event:Event) : void
{
vs.selectedIndex = 1;
}
]]>
</mx:Script>
<rtc:AdobeHSAuthenticator id="auth" authenticationSuccess="onAuthSuccess(event);" authenticationFailure="onAuthFailure(event);" />
<mx:ViewStack id="vs" width="100%" height="100%">
<mx:VBox width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
<mx:TextInput id="username" text="Username" click="username.text = ''" />
<mx:Button id="btn" label="Login" click="onClick(event);" />
</mx:VBox>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" roomURL="http://connectnow.acrobat.com/gggg/mybox/" autoLogin="false">
<rtc:Roster id="roster" width="200" height="200" />
<rtc:SharedWhiteBoard id="wb" width="400" height="400" x="205" />
<rtc:SimpleChat id="chat" width="200" height="200" y="205" />
</rtc:ConnectSessionContainer>
</mx:ViewStack>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" xmlns:rtc="AfcsNameSpace">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
public function onClick(event:Event) : void
{
auth.userName = username.text;
cSession.login();
}
public function onAuthFailure(event:Event) : void
{
Alert.show('………………');
}
public function onAuthSuccess(event:Event) : void
{
vs.selectedIndex = 1;
}
]]>
</mx:Script>
<rtc:AdobeHSAuthenticator id="auth" authenticationSuccess="onAuthSuccess(event);" authenticationFailure="onAuthFailure(event);" />
<mx:ViewStack id="vs" width="100%" height="100%">
<mx:VBox width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
<mx:TextInput id="username" text="Username" click="username.text = ''" />
<mx:Button id="btn" label="Login" click="onClick(event);" />
</mx:VBox>
<rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" roomURL="http://connectnow.acrobat.com/gggg/mybox/" autoLogin="false">
<rtc:Roster id="roster" width="200" height="200" />
<rtc:SharedWhiteBoard id="wb" width="400" height="400" x="205" />
<rtc:SimpleChat id="chat" width="200" height="200" y="205" />
</rtc:ConnectSessionContainer>
</mx:ViewStack>
</mx:Application>
其中roomURL就是你在afcs申请的帐号中的房间地址了
Roster会返回在房间中的用户列表
SharedWhiteBoard是一个类似涂鸦板的玩意
SimpleChat是一个简单的聊天控件
每个控件后的id都很重要 在本地的lccs管理中都可以看到
恩 这个例子后就基本了解了LCCS的用法



学习LCCS 第二步
flex来加载XML播放
