I’m building an app in Adobe Air 2 with AS3 and need to get the users ip address. From what I understand this code should work but is tracing: “::1” not an ip. Thank you.
var netInterfaces = NetworkInfo.networkInfo.findInterfaces();
var addresses = netInterfaces[0].addresses;
var userIp = addresses[0].address;
trace(userIp);
The code you wrote actually returns the ip adress of the first network Interface it finds.
This is in your case the so called loopback device which is used for local connections
with IP4 the ip adress would be 127.0.0.1
with IP6 the ip-adress is ::1