fms.mxml
<?xml version="1.0" encoding="utf-8"?>
<!--http://www.blueidea.com/tech/multimedia/2007/4990.asp--> <!--ffmpeg-->
<!--http://www.cnblogs.com/beniao/archive/2009/02/27/1392115.html-->
<!--http://livedocs.adobe.com/flashmediaserver/3.0/docs/help.html-->
<!--http://www.adobe.com/cfusion/tdrc/index.cfm?product=flashmediaserver&loc=en_us-->
<!--http://hi.baidu.com/webok/blog/item/a1f5bbd3ee23d13c960a164b.html-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
" layout="absolute" fontSize="14" fontFamily="arial">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
//Flex与FMS建立连接的对象
private var nc:NetConnection;
//FMS服务器的地址,使用rtmp协议
private var rtmpUrl:String="rtmp://localhost/firstFMS";
//当Flex应用程序启动的时候就建立与FMS服务器的连接
internal function goconnect():void
{
nc = new NetConnection();
nc.connect(rtmpUrl);
nc.addEventListener(NetStatusEvent.NET_STATUS,onNetStatusHandler);
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR,onAsyncErrorHandler);
}
private function onNetStatusHandler(evt:NetStatusEvent):void
{
switch (evt.info.code)
{
case "NetConnection.Connect.Success":
Alert.show("成功连接FMS服务器!");
break;
case "NetConnection.Connect.Rejected":
Alert.show("访问FMS服务器权限不足,连接被拒绝!");
break;
case "NetConnection.Connect.InvalidApp":
Alert.show("指定的应用程序名称没有找到");
break;
case "NetConnection.Connect.Failed":
Alert.show("连接失败!");
break;
case "NetConnection.Connect.AppShutDown":
Alert.show("服务器端应用程序已经关闭(由于资源耗用过大等原因)或者服务器已经关闭!");
break;
case "NetConnection.Connect.Closed":
Alert.show("与FMS的连接中断!");
break;
}
}
private function onAsyncErrorHandler(evt:AsyncErrorEvent):void
{
}
]]>
</mx:Script>
<mx:Panel horizontalCenter="0" verticalCenter="0" width="250" height="200" layout="absolute" title="http://www.my400800.cn
">
<mx:Button x="10" y="121" label="400电话
" click="goconnect()" fontSize="12" fontWeight="normal"/>
<mx:Text id="text1" text="hello the worldhello th
e worldhello the worldhello the worldhello the worl
dhello the worldhello the worldhello the worldhello
the worldhello the worldhello the worldhello the worldhe
llo the worldhello the worldhello the worldhello the world
hello the worldhello the worldhello the worldhello the w
orldhello the worldhello the worldhello the worldhello the
worldhello the worldhello the world!" x="10" y="10" width="210" height="103">
</mx:Text>
</mx:Panel>
</mx:Application>
分享到:
相关推荐
Flex+FMS写的视频聊天,在本机亲测通过。但唯一不足得是在别的机子上连接不成功。我也不知道为什么。望有才之士能完善。huzhaohui1992@qq.com 如能完善,请给我邮箱一份,在下感激不尽。
详解flex连接到fms,flex视频发送到fms Flex Media Server
利用flex和FMS建立聊天室,fms为源码
通过flex 和 fms开发的一个简易的调用摄像头和音频录制的例子。亲测可以用的。需要本地搭建一个fms服务器,并在flex中填写好fms服务器地址即可使用
Flex和Fms3打造在线聊天室(利用NetConnection对象和SharedObject对象) 中文说明文档和代码, 简单明了好资料
fms实现的视频播放系统,带说明,带安装说明带文档
利用fms作为流媒体服务器,进行实时通信视频聊天
Flex FMS 发送和接收视频的实例(含FMS的配置文档和Flex源码)
免费美女视频聊天,多人视频会议功能加强版本(Fms3和Flex开发(附源码)) 中文说明文档和代码, 简单明了好资料
FMS的最新版本已经到FMS 3了 ,本入门教程使用Flash Media Server 2 演示,但你可以很容易的升到 3,因为FMS 到 FMS3 的更新几乎没有什么改动 ,还有本教程客户端使用as1演示如果你需要用AS3的话,语法会有些变化,...
FMS中文帮助文档,很有用的。特别适合flex和fms交互方面的需求
鏖战三天,总结出来的解决办法,总有一种适合你的问题,欢迎回访和沟通交流心得。 这个东西,你值得一试。
NULL 博文链接:https://abstractforever.iteye.com/blog/524123
FMS 4.5 + Flex mobile 之 Hello World 工程源代码,包括FMS 服务器端asc脚本和Flex Mobile客户端工程源代码,供入门参考。
首先下载fms服务器安装好,并在fms安装目录的applications目录下新建一个test_video文件夹目录,一定要与flext程序中rtmp://127.0.0.1/test_video的test_video要一致,fms服务器启动后,执行flex程序,即可实现
FMS聊天室FMS聊天室FMS聊天室FMS聊天室FMS聊天室
FMS4.5 注册码 FMS4.5 测试可用
利用FLEX编写的摄像头录制视频文件,并上传到FMS服务器,同时就如何安装FMS服务器及配置进行说明.
通过FMS实现时时视频聊天(Flash|Flex)源码
在FMS软件的手册中附有连接多种无线电遥控器的接口电路图,可以连接到电脑的串口,也可以连接到电脑的并口(打印机口)。国外的爱好者甚至自己制作了只用一个电阻和一个三极管的接口,并公布了电路图。还有人做了...