我有以下的code在一个关键帧在Adobe Flash Professional CS6操作:
I have the following code in Actions of a keyframe in Adobe Flash Professional CS6:
var networkInterface : Object = NetworkInfo.networkInfo.findInterfaces();
var networkInfo : Object = networkInterface[0];
var physicalAddress : String = networkInfo.hardwareAddress.toString();
当我按Ctrl + Enter运行电影,我得到以下编译器错误:
When I hit Ctrl+Enter to run the movie, I get the following compiler error:
场景1,图层图层1,第2帧,第1行1120:未定义的属性的访问的NetworkInfo
Scene 1, Layer 'Layer 1', Frame 2, Line 1 1120: Access of undefined property NetworkInfo.
我该怎么办错了?
您必须添加:
import flash.net.NetworkInfo;
在发布你必须选择Adobe AIR的设置,而不是Flash播放器
and in publish settings you must chose Adobe AIR rather than flash player