ActionScript Reference

 

 

Properties

 

Methods

 

Events

 

 

 

Properties

 

guestBook.currentPage

Availability

Flash Player 7

Usage

guestBook.currentPage

Description

Number. Read only, returns the current page number.

Example

trace(myGuestBook.currentPage);

 

 

guestBook.displayLineSpacing

Availability

Flash Player 7

Usage

guestBook.displayLineSpacing

Description

Number. Sets the spacing between entries on a page.

Example

myGuestBook.displayLineSpacing = 1;
trace(myGuestBook.displayLineSpacing);

 

 

guestBook.fieldsPerPage

Availability

Flash Player 7

Usage

guestBook.fieldsPerPage

Description

Number. The number of fields to display per page.

Example

myGuestBook.fieldsPerPage = 3;
trace(myGuestBook.fieldsPerPage);

 

 

guestBook.GBDisplayHolder

Availability

Flash Player 7

Usage

guestBook.GBDisplayHolder

Description

MovieClip. Sets the clip within which to display the entries.

Example

myGuestBook.GBDisplayHolder = this.myClip;
trace(myGuestBook.GBDisplayHolder);

 

 

guestBook.GBDisplayLinkage

Availability

Flash Player 7

Usage

guestBook.GBDisplayLinkage

Description

MovieClip. The linkage identifier for the movie clip used to display each record.

Example

myGuestBook.GBDisplayLinkage = myClip;
trace(myGuestBook.GBDisplayLinkage);

 

 

guestBook.sortBy

Availability

Flash Player 7

Usage

guestBook.sortBy

Description

String. Select the parameter to sort records by.

Example

myGuestBook.sortBy = "Name";
trace(myGuestBook.sortBy);

 

 

guestBook.sortOrder

Availability

Flash Player 7

Usage

guestBook.sortOrder

Description

String. Sort records ascending (ASC) or descending (DESC).

Example

myGuestBook.sortOrder = "ASC";
trace(myGuestBook.sortOrder);

 

 

guestBook.testURL

Availability

Flash Player 7

Usage

guestBook.testURL

Description

String. Specifies the path to the server-side script folder.

Example

myGuestBook.testURL = "http://www.yourdomain.com/folder/";
trace(myGuestBook.testURL);

 

 

guestBook.totalEntries

Availability

Flash Player 7

Usage

guestBook.totalEntries

Description

Number. Read only, returns the total number of records in the database.

Example

trace(myGuestBook.totalEntries);

 

 

guestBook.totalPages

Availability

Flash Player 7

Usage

guestBook.totalPages

Description

Number. Read only, returns the total number of pages in the database.

Example

trace(myGuestBook.totalPages);

 

 

 

Methods

 

guestBook.clearAll

Availability

Flash Player 7

Usage

guestBook.clearAll()

Parameters

None

Description

Clears all fields in the guestBook form.

Example

myGuestBook.clearAll();

 

 

guestBook.search

Availability

Flash Player 7

Usage

guestBook.search(keyword)

Parameters

keyword:String. Keyword to search for.

Description

This method can be used to search all records in the database.

Example

myGuestBook.search("exciting");

 

 

guestBook.submit

Availability

Flash Player 7

Usage

guestBook.submit()

Parameters

None

Description

Submits the form field entries to the database.

Example

myGuestBook.submit();

 

 

guestBook.viewAllEntries

Availability

Flash Player 7

Usage

guestBook.viewAllEntries

Parameters

None

Description

This function retrieves all database entries.

Example

myGuestBook.viewAllEntries();

 

 

guestBook.viewNextEntries

Availability

Flash Player 7

Usage

guestBook.viewNextEntries()

Parameters

None

Description

Retrieves the next page of entries.

Example

myGuestBook.viewNextEntries();

 

 

guestBook.viewPage

Availability

Flash Player 7

Usage

guestBook.viewPage(pageNumber)

Parameters

pageNumber:Number. Page number to view.

Description

Retrieves the specified page.

Example

myGuestBook.viewPage(2);

 

 

guestBook.viewPrevEntries

Availability

Flash Player 7

Usage

guestBook.viewPrevEntries()

Parameters

None

Description

Retrieves previous page of entries.

Example

myGuestBook.viewPrevEntries();

 

 

 

 

Events

 

guestBook.clear

Availability

Flash Player 7

Usage

Listener.clear = function()

Description

Event dispatched when all fields are cleared.

Example

var guestbookListener:Object = new Object();
guestbookListener.clear = function(){
	trace("clear event dispatched");
}
myGuestBook.addEventListener("clear", guestbookListener);

 

 

guestBook.displayComplete

Availability

Flash Player 7

Usage

Listener.displayComplete = function()

Description

Event dispatched when the component displays all entries of the current page.

Example

var guestbookListener:Object = new Object();
guestbookListener.displayComplete = function(){
	trace("displayComplete event dispatched");
}
myGuestBook.addEventListener("displayComplete", guestbookListener);

 

 

guestBook.onSubmit

Availability

Flash Player 7

Usage

Listener.submit = function()

Description

Event dispatched when an entry is successfully submitted to the database.

Example

var guestbookListener:Object = new Object();
guestbookListener.onSubmit = function(){
	trace("submit event dispatched");
}
myGuestBook.addEventListener("onSubmit", guestbookListener);

 

 

guestBook.validationError

Availability

Flash Player 7

Usage

Listener.validationError = function()

Description

Event dispatched when the form is submitted and a required field has not been completed.

Example

var guestbookListener:Object = new Object();
guestbookListener.validationError = function(err:Object){
	trace("error message: " + err.validationMessage);
	trace("error target: " + err.target);
	trace("error type: " + err.type);
}
myGuestBook.addEventListener("validationError", guestbookListener);