Hello
I'm trying to get mac Address on mac os and windows with :
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('------------------------------------------');
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('----------------');
trace( " type: " + address.ipVersion );
trace( " address: " + address.address );
trace( " broadcast: " + address.broadcast );
trace( " prefix length: " + address.prefixLength );
}
}
}
It's ok when my computer is online but when I'm offline, I can't get the mac Address.
How can I resolve this problem ?
Thank
(Sorry if my english is not really good
)
North America
Europe, Middle East and Africa
Asia Pacific