|
|
|||
Flash Player 8
Flash Player 9(AS3 version)
listenerObject = new Object();
listenerObject.styleInit = function( eventObject ){
// insert your code here
}
myTextEditor.addEventListener( "styleInit", listenerObject )
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.
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);
|
|
|
|