发现在Adobe AIR的IP地址 [英] Finding the IP address in Adobe AIR

查看:162
本文介绍了发现在Adobe AIR的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何知道系统中的AIR应用程序正在运行的IP地址,或者 如何限制的AIR应用程序使用一个特定的国家?

How to know the IP address of the system in which the AIR application is currently running, Or how to restrict the usage of AIR application for a particular country?

推荐答案

请尝试以下code,它为我工作。

Please try the following code, it works for me.

import flash.net.InterfaceAddress;
import flash.net.NetworkInterface;

var netInterfaces:Vector.<NetworkInterface> = NetworkInfo.networkInfo.findInterfaces();
var addresses:Vector.<InterfaceAddress> = netInterfaces[0].addresses;
ipAddress = addresses[0].address;

这篇关于发现在Adobe AIR的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆