Gaia Framework for Adobe Flash v3.0.9
Release Date: 03.23.2009
This version of Gaia is no longer available.
3.0.9 OverviewGaia 3.0.9 contains some requested feature updates, a bug fix for the panel, and fixes the issue in CS4 where main.swf was occasionally showing up blank when using the scaffolding.
Pages.asGaia sites now have a new static class called Pages.as which is put inside the class package specified in the panel. This class is auto-generated by Gaia whenever you scaffold. It creates a public static const (var in AS2) for each page that is the page's route and the value is the page's branch. This makes it easy to do strictly typed goto() commands with the added bonus of being able to change the architecture of the site.xml without having to change your goto() methods! It also reduces the need to use gotoRoute().
If you update your site to the latest version of Gaia and then Scaffold, Gaia will generate the Pages.as file for you. Note that this class is not meant to be customized by you, as Gaia will overwrite it every time you scaffold.
Here's what the default Gaia site.xml would create in Pages.as.
public static const HOME:String = "index/nav/home";
And here's how you would use it:
Gaia.api.goto(Pages.HOME);
And if you wanted to pass a deeplink beyond the site.xml, it's as easy as this:
Gaia.api.goto(Pages.HOME + "/foo");
Remember that each page's route is the page's title or the route attribute, if set. Any spaces or special characters are converted to underscores in the Pages class.
loadSiteXML() AS3Gaia AS3 now has a protected function loadSiteXML() like AS2 has. This allows you to override it if you want to do some initialization BEFORE the site.xml loads. Simply override this method in Main.as and call super.loadSiteXML() when you're finished doing whatever you need to do.
Panel Scaffolding Not Swapping out %TWEENLITE%In 3.0.8, I changed the Page template classes from using the token %TWEEENLITE% to %IMPORTS%, but forgot to update these templates when you update your site and also support the old %TWEENLITE% token in the panel for sites that were not updated. This has been fixed and you should now be able to scaffold sites using %TWEENLITE%, and if you update a site, it will update the Page.as template, as well.
Fixed bug with blank scaffoldingThanks to
willwork's post, I was able to fix the issue in Flash CS4 where AS3 scaffolded sites were showing up blank. Apparently, there's an issue with drawing a mask the size of the stage in the constructor of a loaded swf when running inside the Flash CS4 IDE. I solved this by replacing the dynamically drawn mask with a MovieClip mask in the scaffold.swf instead. I have scaffolded sites a bunch of times and it looks like the problem is gone because I can't recreate it. If anyone still sees it on newly scaffolded sites (scaffold.swf is not replaced when you update an existing site), please let me know.