In the application I'm currently developing, end users need to log in to utilize it. Also I need to keep track of who is logged in so that I can input that into a local database after certain actions. I've tried using a public variable in a commonly used class, however since an instance of that class is newly declared when a new window opens up the value is set back to null, making it unusable. I've heard of using an actionscript file inside a package used by the App containing the variables but since the examples I've seen have them as static and const variables and thus can't be changed from their default values. So my question is this, is it possible in AIR to pass the value of a variable from the native application window to another window component?
To help clear things up, essentially the user logs in and the username is set as the value of a variable declared someplace, then in another window, an action takes place, info is recorded in the database and the app looks up the username in the variable, and records it along with the other stuff in the db.