Actionscript 3 在AdobeAIR中获取活动IP

Actionscript 3 在AdobeAIR中获取活动IP,actionscript-3,air,ip,Actionscript 3,Air,Ip,我正在尝试获取连接到Internet的计算机的IP地址。我试过这个: var netInterfaces:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces(); var addresses:Vector.<InterfaceAddress> = netInterfaces[0].addresses; var userIp:String = addresses[0].address; va

我正在尝试获取连接到Internet的计算机的IP地址。我试过这个:

var netInterfaces:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
var addresses:Vector.<InterfaceAddress> = netInterfaces[0].addresses;
var userIp:String = addresses[0].address;
var netInterfaces:Vector.=NetworkInfo.NetworkInfo.findInterfaces();
变量地址:向量网络接口[0]。地址;
var userIp:String=地址[0]。地址;

但是这段代码给了我很多IP地址,我希望应用程序本身能够确定连接到internet的IP,那么如何做到呢

您总是可以加载一个页面,告诉您的IP(类似于),然后从那里获取数据