1)File path to user directory [in windows user director name = user name]
2) parse the path to get user name [last string has user name ie: c:\..\..\username]
Implementation:
var userFolder:String = File.userDirectory.nativePath;
var userName:String = userFolder.substr(userFolder.lastIndexOf(File.separator) + 1);
No comments:
Post a Comment