FlashTextEditor.styleInit

Availability

Flash Player 8
Flash Player 9(AS3 version)

Usage

listenerObject = new Object();
listenerObject.styleInit = function( eventObject ){
	// insert your code here 
}
myTextEditor.addEventListener( "styleInit", listenerObject )

Description

Event; Broadcast to all registered listeners when StyleSheet for targeted text field is initialized.
Event object properties:

target - component instance
style - StyleSheet. Instance of the TextField.StyleSheet object
styles - Array. Contains the names of CSS styles.
pstyles - Array. Contains the names of CSS paragraph styles.

Example

The following code will output names of all paragraph styles of targeted text field styleSheet object:

textListener = new Object(); 
textListener.styleInit = function( eo:Object ){ 
	for (var i in eo.pstyles) {
		trace( eo.pstyles[i] );
	}
} 
myTextEditor.addEventListener("styleInit", textListener);