[AS3]as3获取ip地址,as3取ip的方法
[AS3]as3获取ip地址,as3取ip的方法
[AS3]as3获取ip地址,as3取ip的方法
- package {
- import flash.display.Sprite;
- import flash.net.InterfaceAddress;
- import flash.net.NetworkInfo;
- import flash.net.NetworkInterface;
- public class GetAddress extends Sprite {
- public function GetAddress() {
- var networkInfo:NetworkInfo = NetworkInfo.networkInfo;
- var interfaces:Vector.<NetworkInterface> = networkInfo.findInterfaces();
- if(interfaces != null ) {
- trace( "Interface count: " + interfaces.length );
- for each ( var interfaceObj:NetworkInterface in interfaces ) {
- trace( "\nname: " + interfaceObj.name );
- trace( "display name: " + interfaceObj.displayName );
- trace( "mtu: " + interfaceObj.mtu );
- trace( "active?: " + interfaceObj.active );
- trace( "parent interface: " + interfaceObj.parent );
- trace( "hardware address: " + interfaceObj.hardwareAddress );
- if( interfaceObj.subInterfaces != null ) {
- trace( "# subinterfaces: " + interfaceObj.subInterfaces.length );
- }
- trace("# addresses: " + interfaceObj.addresses.length );
- for each ( var address:InterfaceAddress in interfaceObj.addresses ) {
- trace( " cuplayer.com type: " + address.ipVersion );
- trace( " cuplayer.com address: " + address.address );
- trace( " cuplayer.com broadcast: " + address.broadcast );
- trace( " cuplayer.com prefix length: " + address.prefixLength );
- }
- }
- }
- }
- }
- }
热门文章推荐
- [HLS]做自己的m3u8点播系统使用HTTP Live Streaming(HLS技术)
- [FMS]FMS流媒体服务器配置与使用相关的介绍
- [AS3]什么是M3U8,与HTML5的区别是什么
- AS2.0 让flash自适应全屏,并且不自动缩放
- [AS3]as3.0的sound类常用技巧整理
- [AS3]as3与ByteArray详解、ByteArray介绍、ByteArray用法
- 关于RTMP,RTMPT,RTMPS,RTMPE,RTMPTE协议的介绍
- [JS]分享浏览器弹出窗口不被拦截JS示例
请稍候...