RRGallery

redrocketcms.components.RRGallery

 

The Gallery component works directly with the Album to render the Album photos with 3rd party Components such as SlideShowPro.

p id:String

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

 

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

import redrocketcms.components.RRGallery; this.attachMovie(RRGallery.id, "gallery", this.getNextHighestDepth());

p display:MovieClip

Read-only. Returns the movieclip instance of the component. Use this reference to modify/style/setup the instance however you need to.

p arrayProcessFunction:Function

Write-only. You can create an intermediary function that parses the array of photos going into the renderer. You can use this feature to do manual sorting, hard-code links, or remove items that you plan on rendering seprately. Below is an example that removes the first photo (seemingly because we’ll render it elsewhere):

// where gallery is an instance of the RRGallery Class gallery.arrayProcessFunction = function (arr:Array) { arr.shift(); // pops the first element out of the array return arr; // return our new array }

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.