学习flash media server helloword 就遇到了挫折
今天下载了了flesh media server 3.5 flex builder 打算给自己扫扫盲结果 抑郁了
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
//Flex与FMS建立连接的对象
private var nc:NetConnection;
//FMS服务器的地址,使用rtmp协议
private var rtmpUrl:String="rtmp://localhost/vod";
//当Flex应用程序启动的时候就建立与FMS服务器的连接
internal function onClick():void
{
nc = new NetConnection();
nc.connect(rtmpUrl);
nc.addEventListener(NetStatusEvent.NET_STATUS,onNetStatusHandler);
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR,onAsyncErrorHandler);
}
private function onClickHandler(evt:MouseEvent):void
{
trace("正在连接FMS服务器");
nc = new NetConnection();
nc.connect("rtmp://localhost/vod");
nc.client=this;
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":
trace("成功连接FMS服务器!");
break;
case "NetConnection.Connect.Rejected":
trace ("访问FMS服务器权限不足,连接被拒绝!");
break;
case "NetConnection.Connect.InvalidApp":
trace("指定的应用程序名称没有找到");
break;
case "NetConnection.Connect.Failed":
trace("连接失败!");
break;
case "NetConnection.Connect.AppShutDown":
trace("服务器端应用程序已经关闭(由于资源耗用过大等原因)或者服务器已经关闭!");
break;
case "NetConnection.Connect.Closed":
trace("与FMS的连接中断!");
break;
}
}
private function onAsyncErrorHandler(evt:AsyncErrorEvent):void
{}
]]>
</mx:Script>
<mx:Button x="135" y="89" label="Button" click="onClick()" fontSize="12" fontWeight="normal"/>
</mx:Application>
flash media server 3.5 intract 版本
调试的时候总是跳到介个地方
case "NetConnection.Connect.Rejected":
trace ("访问FMS服务器权限不足,连接被拒绝!");
抑郁阿 怎么白度google 也不知道怎么回事情。
查看日志如下 :
#Version: 1.0
#Start-Date: 2011-08-09 19:09:31
#Software: Adobe Flash Media Server 3.5.2 r654
#Date: 2011-08-09
#Fields: date time x-pid x-status x-ctx x-comment
2011-08-09 19:09:26 5548 (i)2581173 Host: PC2010042015fhi IPv4: 192.168.10.28 -
2011-08-09 19:09:27 5548 (i)2631174 Listener started ( _defaultRoot__edge1 ) : localhost:19350/v4 -
2011-08-09 19:09:28 5548 (i)2581252 Registering core (3796). -
2011-08-09 19:09:28 5548 (i)2631174 Listener started ( _defaultRoot__edge1 ) : 80/v4 -
2011-08-09 19:09:28 5548 (i)2631174 Listener started ( _defaultRoot__edge1 ) : 1935/v4 -
2011-08-09 19:09:56 5548 (i)2581252 Registering core (4304). -
2011-08-09 19:09:56 5548 (i)2581251 Proxy to core (4304) failed. -
2011-08-09 19:09:56 5548 (w)2641213 Connection rejected by server. Reason : [ Server.Reject ] : Rejecting connection from to rtmp://localhost/vod. -
2011-08-09 19:14:57 5548 (i)2581250 Edge disconnected from core (4304). -
2011-08-09 19:21:56 5548 (i)2581252 Registering core (1396). -
2011-08-09 19:27:03 5548 (i)2581251 Proxy to core (1396) failed. -
2011-08-09 19:27:03 5548 (w)2641213 Connection rejected by server. Reason : [ Server.Reject ] : Rejecting connection from to rtmp:/vod. -
2011-08-09 19:27:47 5548 (i)2581251 Proxy to core (1396) failed. -
2011-08-09 19:27:47 5548 (w)2641213 Connection rejected by server. Reason : [ Server.Reject ] : Rejecting connection from to rtmp:/vod. -
抑郁了 请各位老鸟帮我看看