![]() ![]() | |
Flash Player 7.
styleSheet.onLoad = function (success) {}
success A Boolean value indicating whether the CSS file was successfully loaded.
Nothing.
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.
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.
varstyleObj= new TextField.StyleSheet();styleObj.load("styles.css");styleObj.onLoad = function (success) { if(success) { news_txt.styleSheet =styleObj; } }
![]() ![]() | |