For an application, I have code that closes the current window and creates a new window. How do I replace the current window with the new one and migrate what's in the old window to the new one?
Well, you can actually re-parent your document class as easily as any other display object. So to move it from one window to another you can do the following (where "this" is the reference to your document class).
Short post today, but it's really easy to get an Object's class in AS3, for purposes like checking what the user has clicked or what object type a character has run into (though I'd probably have a variable in the Object for the second case indicating what material it is).
I've added this static method to my Util class, so I can access it anywhere by typing Util.getClass(obj);
Something easy that everyone should be able to do, pure AS3 (no Flash IDE or timeline objects) - tracking the frames per second and memory of a current project! Here's how:
At work, I have a multiple monitor setup, where my primary monitor is not a touchscreen. Since I work principally with touch events, I need my second monitor (the touchscreen) to be the one where my Flash stuff appears, but since it's not the primary monitor I run into the trouble of having to make it the 'primary' monitor whenever I need to test an application.
Adobe Air is sandboxed in a few ways, one of them being it can't write to its own application directory during runtime. However, you can read and write to multiple other locations including the user's desktop and documents. For my latest game project, I've been using a static Settings.as class to store important variables that need to be accessed by any class.
Here's how to load and write the variables dynamically from and to a text file.