TextField.StyleSheet.onLoad

Availability

Flash Player 7.

Usage

styleSheet.onLoad = function (success) {}

Parameters

success A Boolean value indicating whether the CSS file was successfully loaded.

Returns

Nothing.

Description

Callback handler; invoked when a TextField.StyleSheet.load() operation has completed. If the style sheet loaded successfully, the success parameter is true. If the document was not received, or if an error occurred in receiving the response from the server, the success parameter is false.

Example

The following example loads the CSS file named styles.css (not shown) into the style sheet object styleObj. When the file has finished loading successfully, the style sheet object is applied to a TextField object named news_txt.

var styleObj = new TextField.StyleSheet();
styleObj.load("styles.css");
styleObj.onLoad = function (success) {
  if(success) {
    news_txt.styleSheet = styleObj;
  }
}

See also

TextField.StyleSheet.load()