RRIndexPairs

redrocketcms.components.RRIndexPairs

 

The IndexPairs Component allows to easily assemble the many IndexPairs into one place.

p id:String

Static. This id is the sybolID linkage necessary for dynamic attachment using attachMovie().

 

Example Usage. Identical functionally to dropping the IndexPairs component on the stage:

import redrocketcms.components.RRIndexPairs; this.attachMovie(RRIndexPairs.id, "indexpairs", this.getNextHighestDepth());

p itemSelectorFunction:Function

Read/Write.

 

This is for advanced users only. This function visually "selects" the item. This function is called when a user click on it’s corresponding index from the able of contents. the function is passed a single argumet of the target movieclip to select.

p jsScrollHandler:String (Javascript Scroll Handler)

Write-only. Sets the function name for the javascript scroll function.

 

The default javascript resize handler is "ScrollFlash". This functionality is only available if the orientation is Vertical and the Vertical Resize Policy is true, or if the orientation is Horizontal and the Horizonal resize Policy is true. It is a part of the default itemSelectorFunction - overwriting it will cancel this functionality.

 

If the above conditions are met, when a user selects an item from the indexes table of contents, a javascript function with two arguments will get called.

 

direction:String - either "x" or "y" to indicate an axis to scroll to

offset:Number - the distance within THIS COMPONENT

 

Example: (in javascript)

function ScrollFlash (direction, offset) { // do something to resize }

m selectItem(str:String):Void

Use this function to programatically select an item in the IndexPairs assemby.

 

str:String

the id of the IndexPair to select

Assembly

p orientation:String (Orientation)

Read/Write. Valid values:

  • "Vertical" - stacks Assemby Children vertically, top down.
  • "Horizontal" - staks Assemby Children horizontally, left to right.

 

p skipExisting:Boolean (Skip Existing)

Write-only. If set to true, if you use the _api features of the Content Bucket to manually pull out individual Assemby childen to render in a specific way, AND use this Component, it will not add those Assemby childen to the lineup.

p childPositionFunction:Function

Read/Write.

 

This is for advanced users only. This function positions each Assemby Child. Each time the Component is invalidated, Each Assemby Child will be positioned with this function as itself resolving to "this". For reference, the built-in function is shown below:

function () { if (this._api.previousSibling._height==0&&this._api.previousSibling._width==0) return; if (this._api.isFirst==true) return; var bounds = this._api.previousSibling.getBounds(this._api.owner); if (this._api.owner.orientation=="Vertical") this._y = Math.round(bounds.yMax) + this._api.owner.spacing; else this._x = Math.round(bounds.xMax) + this._api.owner.spacing; }

p spacing:Number (Spacing)

Read/Write

 

If using the built-in childPositionFunction, the spacing property adds a gap between each Assemby child. This works for both horizonalt and vertical orientations.

Scrollable

redrocketcms.classes.collector.auditable.Scrollable

 

The Scollable class adds ScrollPane functionality to certain classes. For this to function, you will need the Macromedia v2 ScrollPane Component available in the library.

p useScrollPane:Boolean (Use ScrollPane)

Write-only. If set to true, the component will use the scrollpane to add scrolling ability to the content.

p scrollpane:MovieClip

Read-only. Returns the instance of the Macromedia v2 ScrollPane component. From this, you can interact with the component just as you would normally (i.e. setting vScrollPolicy, etc).

p useClippingMask:Boolean (Use Clipping Mask)

Write-only. If useScrollpane is set to false, this property handles how overflow information that falls outside of the bounding box is handled. If true, only the visible bounding box area of the component will be visible. Otherwise, no clipping will occur, and it will all be shown.

p content:MovieClip

Read-only. Returns the actual content from the ContentHolder class. This Movieclip is the actual rendered content, and is not an intermediay class.

p holder:MovieClip

Read-only. Returns the intermediary instance of the ContentHolder Class that holds the actual content.

Auditable

redrocketcms.classes.collector.Auditable

 

The auditable is the class adds the first set of Component Inspectable properties. Any library-based Components will become a child of this class.

p hSizePolicy:Boolean (Size Policy - Horizontal)

Write-only. The horizontal size policy instructs the component to resize itself to match the maximum width of the component’s containing objects.

p vSizePolicy:Boolean (Size Policy - Vertical)

Write-only. The vertical size policy instructs the component to resize itself to match the maximum height of the component’s containing objects.

Collector

redrocketcms.classes.Collector

 

The Collector class searches for data within it’s heirarcy. It will search for the closeset Provider and store the data.

p data:Object

The data property is a dump of the data that feeds the Component/Class. Typically, this is an object with properties or sub-objects that have exhaustive data realting to the component.

 

To find out what is in the data object you could write something like this:

// where _api is the component/class you are trying to read from. var data = _api.data; for (var prop in data) trace (prop + ": " + data[prop]);

Component

thetainteractive.classes.architecture.Component

 

This is the base class for any class that is a Libray-based component. This class sets up the EventDispatcher, and base functions.

m setSize(width:Number, height:Number):Void

Sets the size of the bounding box of the component.

 

param width:Number

the size, in pixels of the width of the component. pass null if you do not want to set a width.

 

param height:Number

the size, in pixels of the height of the component. pass null if you do not want to set a height.

 

see also:

width

height

p width:Number

Sets the size of the component width in pixels.

p height:Number

Sets the size of the component height in pixels.

m move(x:Number, y:Number):Void

Moves the component.

 

param x:Number

moves the component x pixels horizontally.

 

param y:Number

moves the component y pixels vertically.

m invalidate()

The invalidate function is a very important function. Usually, invalidate is called internally by other methods to redraw the component.

 

However, it is a public method, and by calling invalidate() on any component that uses an invalidation routine essentially "redraws" the entire component.

 

Care should be taken not to continually call invaidate() on any one component on a loop or onEnterFrame() function. invalidate is usually processor and memory intensive for one frame, so be sure to call it when you are sure that you want the component to redraw.

 

Another note is that many of the components are nested within other components, and they are linked together visually. Therefore, calling invalidate() on one component may cause multiple ares to redraw, again, another reason to use sparingly.

e resize()

Event dispatched to listeners when the setSize() method is called. Note: this is also called if the width/height propeties are set.

e move()

Event Dispathced when the component is moved using the move() method.