0

Just a quick question, I googled around for a bit but everything resulted in other AS3 tidbits.

Is it at all possible to access a user's computer logon name from AS3? I wouldn't have assumed so but given we can access other information directly from the computer (eg date), I just wondered if it was possible.

Thanks! Harry.

hazdog
  • 121
  • 1
  • 3
  • 20

2 Answers2

1

On the web, I believe you can't get such an info.

If you are working on the desktop with AIR, you may retrieve the user's directory with

File.userDirectory

and its name which should be the same as the user's

File.userDirectory.name
Kodiak
  • 5,978
  • 17
  • 35
0

I'd love to know the login of the user, but also his password.

I think it's not desirable to be able to get such information, especially from a client-side script. This is possible with ASP.NET using Windows Authentication. When the user is authenticated you can use User.Identity.Name. It should be possible to write that name to the front-end, and you can pass that to Flash using ExternalInterFace

If you are using Adobe Air, it is easier to grab the users name, since you have access to the users filesystem. See Get the current logged in OS user in Adobe Air.

Btw, on the web, it is not an unusual question to ask the user what his (user)name is.

Community
  • 1
  • 1
Mark Knol
  • 9,663
  • 3
  • 29
  • 44