Site XML

Overview

The site.xml file is located in the bin folder.

It defines the structure of your site and is used by the Gaia Flash Framework during runtime.

The site.xml consists of three nodes: site, page, and asset.

The node asset is optional and is used to preload media with a page.

Site Node

<site title="Gaia Scaffold Site: %PAGE%">

The site node is the root node of the XML. All of the attributes are optional.

Page Node

<page id="index" src="index.swf">

The page node has two required attributes, id and src, and the rest are optional.

Child pages load on top of parent pages (unless otherwise specified) and if a page has at least one child, it will load its first child as part of its branch by default (unless the defaultChild attribute is set, as outlined below).

There is a special page node id index, which is required as the first page node inside the site node. The page index loads before all other pages, and one good use for it is to place your background, as it loads in behind all other swfs. Also, because index never unloads, it’s a good place to put global code and/or assets.

menu

Set this to true if this page should appear in the right-click context menu.

seo

The seo attribute is used with Gaia’s SEO Scaffolding.

Setting seo=”true” will generate an XHTML page named after the page id (e.g. “home.html”).

You can also set seo to a custom file name.

Page nodes with a seo attribute must have a title attribute, as well, or will not have XHTML pages generated for them.

Asset Node

<asset id="assetID" src="asset.mp3">

Asset nodes go inside page nodes. Assets are preloaded with a page. Currently supported asset types are mp3, flv, xml, swf, jpg, png, and gif. AS3 also supports AAC (m4a) files as of Flash Player 9.0.115. The asset node has two required attributes, id and src, and six optional ones, title, depth, type, preload, progress and streaming.

Post A Comment

Anti-Spam Quiz: