ActionScript Reference - TextSatellite

 

TextSatellite.controls

Availability

Flash Player 7

Usage

TextSatellite.controls : Array

Description

Allows customizing of control bar
Controls can be:

Examples

The following code will change text editor's control bar to contain "bold" and "italic" buttons in two rows with 5 pixels distance

TextSatellite.controls = ["bold", ">5", "italic"];

The following code will change text editor's control bar to contain "bold" and "italic" buttons with 4 pixels distance, divider and "underline" button

TextSatellite.controls = ["bold", 4, "italic", "mc:divider", "underline"];

 

 

TextSatellite.gotoPage

Availability

Flash Player 7

Usage

myTextSatellite.gotoPage(no)

Parameters

no - String or Number. Number of the page to display, or "next" or "prev"

Returns

Boolean value. True if page after or before exists. Valid only if parameter passed to the function is "next" or "prev"

Description

Method; displays content of the page.

Example

The following code will display the content of the next page and it will return true if content for the page after next exists:

myTextSatellite.gotoPage("next");

 

 

TextSatellite.palette

Availability

Flash Player 7

Usage

myTextEditor.palette : Array

Description

Allows changing of palette used by Flash Text Editor;

Examples

With following code, when "Font Color" button of the Flash Text Editor is clicked, color palette will display red and blue only.

myTextSatellite.palette = [0xff0000,0x0000ff];

 

TextSatellite.current

Availability

Flash Player 7

Usage

myTextEditor.current : Number

Description

Returns number of page currently displayed;

Examples

Following code will output number of the currently displayed page in output window.

trace( myTextSatellite.current );

 

TextSatellite.hasPrev

Availability

Flash Player 7

Usage

myTextEditor.hasPrev : Boolean

Description

Returns true if previous page exists, false if does not;

Examples

Following code will disable Button instance named "prev_btn" if there is no content for the pages before currently displayed page.

prev_btn.enabled = myTextSatellite.hasPrev;

 

TextSatellite.hasNext

Availability

Flash Player 7

Usage

myTextEditor.hasNext : Boolean

Description

Returns true if next page exists, false if does not;

Examples

Following code will disable Button instance named "next_btn" if currently displayed page is the last one that exists.

next_btn.enabled = myTextSatellite.hasNext;


TextSatellite.load

Availability

Flash Player 7

Usage

listenerObject = new Object();  
listenerObject.load = function( eventObject ){  	//
 insert your code here
   	trace(eventObject.data); 
}  
myTextSatellite.addEventListener("load", listenerObject )

Event Object Parameters

target - MovieClip
data - Object.

Description

Event; broadcast to all registered listeners when content(or content meta data) of the satellite is loaded.

Example

The following code handles the load event:

myLoadListener = new Object();   
myLoadListener.load = function( eo:Object ){
   	trace("Content Loaded!"); 
}   
myTextSatellite.addEventListener("load", myLoadListener);