EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Setcompositionstring (Ime.setcompositionstring Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
666 ActionScript classes
mc.txt.border = true;
mc.txt.background = true;
mc.txt.autoSize = "left";
mc.txt.text = "Click this text to add and remove a listener.";
mc.onPress = function() {
if(System.capabilities.hasIME) {
Selection.setFocus(mc.txt);
System.IME.setCompositionString(mc.txt.text);
}
}
setCompositionString (IME.setCompositionString
method)
public static setCompositionString(composition:String) : Boolean
Sets the IME composition string. When this string is set, the user can select IME candidates
before committing the result to the text field that currently has focus.
Availability: ActionScript 1.0; Flash Player 8
Parameters
composition:String - The string to send to the IME.
Returns
Boolean - If the IME composition string is successfully set, returns true. This method fails
and returns
false if no text field has focus.
Example
The following example shows how to set the IME composition string. If the user's system has
IME, clicking in the text field shows the IME options.
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";
mc.txt.text = "Set this text as the composition string.";
mc.onPress = function() {
if(System.capabilities.hasIME) {
Selection.setFocus(mc.txt);
trace(System.IME.setCompositionString(mc.txt.text));
}
}

Table of Contents

Related product manuals