[AS3.0] Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.解决办法
2024-08-24 20:55:55
在运用FMS录制视频时,假如出现这个错误,最直接的解决办法如下:
_netConnection.client = { onBWDone: function():void{ trace("onBWDone"); } };
不过也存在第二种解决办法:
_netConnection.client = this; public function onBWDone(...rest):void
{
var p_bw:Number;
if (rest.length > 0){
p_bw = rest[0];
}
trace("bandwidth = " + p_bw + " Kbps.");
}
还有第三种解决办法:
_netConnection.client = new NetConnectionClient();
package
{
public class NetConnectionClient
{
public function NetConnectionClient()
{
} public function onBWCheck(...rest):Number
{
return 0;
} public function onBWDone(...rest):void
{
var p_bw:Number;
if (rest.length > 0){
p_bw = rest[0];
}
trace("bandwidth = " + p_bw + " Kbps.");
}
}
}
最新文章
- java多线程解读一(基础篇)
- ASP.NET使用Memcached
- oracle细节
- [译]git reset
- SQL_CURSOR_游标循环
- jquery 图片手风琴效果
- 解决安装 Visual Studio 2012 后无法连接VPN的问题
- 第十八篇 js高级知识---作用域链
- node.js 发送http 请求
- LightOJ1341 Aladdin and the Flying Carpet
- php函数 array_change_key_cash
- c# 设置MdiClient窗体的背景图片
- python网络编程(二)
- maven配置私服
- hive中sql使用英文分号
- NOIP2018 No regrets youth
- C# GDI绘制波形图
- oracle ORA-01722:无效数字 记录
- [Debug] Debug Node.js Application by using Chrome Dev tools
- 编程中的幂等性 — HTTP幂等性