Translate

> > Flex get Mac Address

Flex get Mac Address

Posted on Monday, September 19, 2011 | No Comments

    import __AS3__.vec.Vector;

    import flash.net.NetworkInfo;
    import flash.net.NetworkInterface;


public function getMacID():ArrayCollection
        {
            var MacAddress:String;
            var ni:NetworkInfo = NetworkInfo.networkInfo;
            var interfaceVector:Vector.<NetworkInterface> = ni.findInterfaces();
            for each (var item:NetworkInterface in interfaceVector)
            {
                var child:NetworkInterface = item as NetworkInterface;
                MacAddress = child.hardwareAddress;
                break;
            }
            return MacAddress;
        }

Leave a Reply

Powered by Blogger.