redrocketcms.classes.Commander
The Commander class initiates the entire RRC framework. It is automatically initialed with either the Probe or Body classes from the framework. There is no need to manually initialze this class.
However, once it has been initialized from a proper Component, it stores vital information you can use at any point throughout the development timeline to retrieve information about the site.
This class is entirely static, so all methods can be called like the following example:
import redrocketcms.classes.Commander;
var home = Commander.getHomeUrl();
Sets the Commander into motion, which in turn initializes other framworks like the History and Soundtrack, then loads and parses the root index.xml file.
Delivers an event object to any listeners that are listening for the event.
obj:Object
the obj paramter is an event object formatted like an EventDispatcher event. it has at least 2 properties:
obj.target:MovieClip - the item dispatching the event
obj.type:String - the name of the event
Subscribes an object to an event. Uses EventDispatcher.
type:String
the event to listen to
obj:Object
the object, movieclip, or function to listen to the event
Unsubscribes an object from an event. Uses EventDispatcher.
type:String
the event to no longer listen to
obj:Object
the object, movieclip, or function to unsubscribe to the event
returns String
A string containing the description for the global site.
returns String
A string containing the keywords for the global site.
return String
A string representing the home linkage. RRC use a proprietary internal linkage for loading internal content in the format:
../{HASH}
where {HASH} is the directory in the publish folder where the content lives. If you need to use this information somewhere, you need to make sure and strip the "asfunction:INTERNAL:" portion of the string to get just the hash.
returns String
Each RR site gets assigned a unique "key" that is 6 characters long. Normally, this is used behind the scenes, but if you should need it, it is there.
returns Array
An array of objects representing the "root", or first level or nodes of the navigation. Each member of the array has an object with the following properties:
title: the title of the node
href: the url in a proprietary asfuntion format
target: the target frame for the getURL function
style: any style information
reference: the text part of the hash, a url-friendly version of the title
id: the numeric id of the node
pid: the numeric id of the parent node this belongs to (always 0 for root nodes)
pid:String
the id of the node to which you wish to find all corresponding child nodes. with this function you can create recursive functions to create an eternally-deep navigation structure.
returns Array
An array of objects representing the noes which match the pid given. Each member of the array has an object with the following properties:
title: the title of the node
href: the url in a proprietary asfuntion format
target: the target frame for the getURL function
style: any style information
reference: the text part of the hash, a url-friendly version of the title
id: the numeric id of the node
pid: the numeric id of the parent node this belongs to (always the pid parameter)
pid:String
the id of the node to which you wish returned.
returns Array
An objects representing the noeds which match the id given. The object is returned with the following properties:
title: the title of the node
href: the url in a proprietary asfuntion format
target: the target frame for the getURL function
style: any style information
reference: the text part of the hash, a url-friendly version of the title
id: the numeric id of the node
pid: the numeric id of the parent node this belongs to