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.