Imagination time: Imagine for a moment that you have an app, it has one button and one little window. When you click the button it changes the text within the window to something else. Now, when you get into flash development it seems like the easiest and clearest way to do this is to wipe out the contents in the window, but you would be wrong for thinking so. While it is the most obvious I intend to prove to you that to do so is both slower and prevents you from turning on the juice later with caching.
On to story time: We're building an app for the OpenPeak tabletop device, it's totally rad and you'll love it I promise but that's really not the point of the post. When we started the app we had what I considered a pretty awesome solution, we'd clear the state, build it onto a global, then write the global out to a window on the app. It actually worked great for a long time until we decided to start doing some caching where it became wildly apparent that I had actually written all three parts of that app dead wrong. It's pretty exciting to do something wrong enough that you can write about it later. :) Read More…