User Guide

664 ActionScript classes
See also
setConversionMode (IME.setConversionMode method), getConversionMode
(IME.getConversionMode method)
onIMEComposition (IME.onIMEComposition event
listener)
onIMEComposition = function([readingString:String]) {}
Notified when the IME composition string is being set. To use this listener, you must create a
listener object. You can then define a function for this listener and use
IME.addListener()
to register the listener with the IME object, as in the following code:
var someListener:Object = new Object();
someListener.onIMEComposition = function () {
// statements
}
System.IME.addListener(someListener);
Listeners enable different pieces of code to cooperate because multiple listeners can receive
notification about a single event.
Availability: ActionScript 1.0; Flash Player 8
Parameters
readingString:String [optional] - The original text typed into the IME before the user
started picking candidates.
Example
The following example shows how to add a listener object with the callback method
onIMEComposition() to System.IME, which outputs notification when a user sets the
composition string by clicking in the text field.
var IMEListener:Object = new Object();
IMEListener.onIMEComposition = function(str:String) {
trace(">> onIMEComposition: " + str);
}
System.IME.addListener(IMEListener);
trace(System.IME.length);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.createTextField("txt", this.getNextHighestDepth(), 0, 0, 0, 0);
mc.txt.border = true;
mc.txt.background = true;
mc.txt.autoSize = "left";