MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 706

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

The following is displayed in the Output panel:
bodyText
heading
See also
TextField.StyleSheet.getStyle()
TextField.StyleSheet.load()
Availability
Flash Player 7.
Usage
styleSheet.load(url)
Parameters
The URL of a CSS file to load. The URL must be in the same domain as the URL where
url
the SWF file currently resides.
Returns
Nothing.
Description
Method; starts loading the CSS file into
the
TextField.StyleSheet.onLoad
The CSS file must reside in exactly the same domain as the SWF file that is loading it. For more
information about restrictions on loading data across domains, see
on page
188.
Example
The following example loads the CSS file named styles.css (not shown) into the style sheet object
. When the file has finished loading successfully, the style sheet object is applied to a
styleObj
TextField object named
var styleObj = new TextField.StyleSheet();
styleObj.load("styles.css");
styleObj.onLoad = function (success) {
if(success) {
news_txt.styleSheet = styleObj;
}
}
See also
TextField.StyleSheet.onLoad
706
Chapter 12: ActionScript Dictionary
styleSheet
callback handler to determine when the file has finished loading.
.
news_txt
. The load operation is asynchronous; use
"Flash Player security features"

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Table of Contents