0

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();

When I hit Ctrl+Enter to run the movie, I get the following compiler error:

Scene 1, Layer 'Layer 1', Frame 2, Line 1 1120: Access of undefined property NetworkInfo.

What do I do wrong?

Yekoor
  • 73
  • 7

1 Answers1

1

you must add:

import flash.net.NetworkInfo;

and in publish settings you must chose Adobe AIR rather than flash player

Nadia
  • 247
  • 1
  • 13
  • It works, thanks, although it seems import is not necessary and I don't understand why the target had to be changed. – Yekoor Mar 13 '14 at 14:33
  • Air is more powerful than flash player, some system info can't be retrieved by the simple flash player. – Nadia Mar 13 '14 at 18:42