博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

flash 获取Mac地址

Posted on 2012-09-11 10:26  奥客  阅读(3377)  评论(0编辑  收藏  举报


import flash.net.InterfaceAddress;
import flash.net.NetworkInfo;
import flash.net.NetworkInterface;
var networkInfo:NetworkInfo = NetworkInfo.networkInfo;
var interfaces:Vector.<NetworkInterface> = networkInfo.findInterfaces();
if( interfaces != null )
{
for each ( var interfaceObj:NetworkInterface in interfaces )
{
for each ( var address:InterfaceAddress in interfaceObj.addresses )
{
trace( " type: " + address.ipVersion );
trace( " address: " + address.address );
}
}