Actionscript Hell

Ever since I came up with the idea for my project I knew it was going to be an exercise in patience and willingness to immerse myself in unfamiliar aspects of Flash programming. I suppose this was part of the plan all along, so as to satisfy the "breaking the comfort zone" aspect, but as of the past week or so I got a real taste of the depths to which the sheer madness of this coding project is going to entail.

So to begin with, John helped me quite a bit in terms of setting me on my way to achieving one particular goal of the project-- integrating images pulled from Google Image Search into the Flash interface. He supplied me with some code that he had strung together with the Google API, where text that the user inputs will result in a matching image from GIS embedded in the flash file. To further build on the functionality of this with relevance to my project, I need to be able to take these images and then save them to the hard drive for reference later.

The purpose of saving these images is so that one can look back at my old work, and be able to see the image that was grabbed from the internet to inspire it (among all the other parameters). Since I'm using AIR to establish an application on the user's computer rather than through a web-based service, we need to be able to keep a copy on the HD to accomplish this.

Unfortunately, the ability of Flash to easily load/save files from the hard drive's filesystem is limited. As a result, I spent the better part of two days wading through the technical difficulties required to achieve such a seemingly simple thing. Here's a basic rundown of the process I went through with trying to code a simple script to add "save image" functionality to the GIS scripting that Park had laid down:
-Find tutorial code for saving images
-Adapt code to project
-Find out save functionality is not supported
-Install updates to Flash CS3
-Find out I need Adobe AIR 1.5 to use Save functionality
-Search for updates to bring AIR 1.5 to Flash CS3
-Find out I actually have to update to CS4
-Install Flash CS4 overnight
-Save functionality still doesn't work
-Install small update to Flash CS4

ALL so that I could go from this:



To this:
















It's good to have this out of the way, as file loading/saving is going to be critical for the whole process in several different places:
-Saving GIS images under the daily design's "profile"
-Loading the daily designs as they are completed, for display within the application
-Saving "calendar" output images of all the month's designs allocated by day (hopefully)

What I realized that I'm falling behind on is having actual designs to back up this process, so what I need to do at this moment is code the randomization of design parameters and start using it as it's meant to, drawing up stuff day by day; the coding for the fully finished product can wait.