I'm new to developing with Adobe AIR. I find it both exciting, and difficult to grasp coming from a non-event driven language.
What I'm trying to do (HTML/JS based):
- Main window visibility set to false
- Upon first run of the application (or if settings file doesn't exist), fetch JSON data from an external site and prompt the user (new window, visibility true) based on data fetched; save data to a settings/preferences file.
- After either opening the settings file or fetching the data from the site, use those preferences to fetch further JSON data from (same) site to dynamically create GUI controls.
- Display main window (set visibility to true).
Would I be best off to first set an event listener for the prompt windows' close (if settings file doesn't exist) and to then proceed with further actions, or is there an easier, better way to accomplish this? How should my flow structure be handled? (Rough pseudocode examples anybody?) I'm having difficulty seeing how it all fits together, and it's a pretty simple application I'm trying to build. Any help would be greatly appreciated.
Post your code.
I've attached my code in a zip file. It's a complete mess as all I've really been doing thus far is testing the waters, trying to get a grasp on the "right" way to go about doing this.
I apologize for the delay, the external site that the app is getting information from is internal to our network, I had to patch together a stripped down duplicate and move it to my personal site for the purposes of showing the current hob-job code that I have.