Global navigation for Flash and Gaia Flash FrameworkFebruary 25, 2009 by: Christian
My own AS2 website framework was almost finished when AS3 came out. I knew some day I would have to port it from AS2 to AS3. At the same time I planned to do it a lot better, because on the long way of programming my AS2 framework I had been learning a lot about OOP and I wanted to do it much better in the next version. But I came to realize that it would take a very long time to do it the way I wanted it, so instead of reinventing the wheel I started to search for a solution. After some time I came across the Gaia Flash Framework of Steven Sacks and after a while studying it, it hit me like a thunderstroke. I realized it was all there: the handling of loading/unloading content pages, the implementation of swfobject and swfaddress, a xml setup file for the site structure. And, most important: It it a framework others are using as well, so all of a sudden the times of having an individual framework for almost each website was gone. From now on it was easy to work together with other flash designers/coders on the same project. It was just perfect. There was only something missing I had in my AS2 framework: A global navigation system! But, as I had much time left because I didn’t have to port my framework to AS3, I put some extra time into developing a global navigation that can be used either stand alone or seemlessly integrated into Gaia.
How does it work?
The global navigation consists of 3 parts: a SWF of a single button with rollover, rollout, press etc. states and a text label, an XML file containing the structure and a class (in fact there are 3 main classes, but you don’t need to worry about them), which mixes everything together and spits out a neat navigation.