IME (System.IME)


Object
    |
    +-System.IME

public class IME
extends Object

The IME class lets you directly manipulate the operating system's input method editor (IME) in the Flash Player application that is running on a client computer. You can determine whether an IME is installed, whether or not the IME is enabled, and which IME is enabled. You can disable or enable the IME in the Flash Player application, and you can perform other limited functions, depending on the operating system.

Input method editors let users type non-ASCII text characters in Asian languages such as Chinese, Japanese, and Korean. For more information on IMEs, see the operating system documentation for the platform for which you are developing applications. Some additional resources for information about input methods are listed here:

On the Macintosh, calls to the IME application programming interface (API) fail if you do not have the IME enabled. Once you manually enable the IME, subsequent calls work as expected. For example, if you are using Japanese IME on your system, it must be enabled and in one of four possible modes (Hiragana, Full-width Katakana, Full-width Alphanumeric, Half-width Katakana) before this API is called.

The following table shows the platform coverage of this class:

Capability

Windows

Macintosh OSX

Macintosh Classic

Linux/Solaris XIM

Determine whether the IME is installed   System.capabilities.hasIME

Yes

Yes

Yes

Yes

Set IME on or off   System.IME.setEnabled()

Yes

Yes

Yes ***

Yes

Find out whether IME is on or off    System.IME.getEnabled()

Yes

Yes

Yes

Yes

Set IME conversion mode   System.IME.setConversionMode()

Yes

Yes **

No

Yes

Get IME conversion mode    System.IME.getConversionMode()

Yes

Yes **

No

Yes

Send IME the string to be converted   System.IME.setCompositionString()

Yes *

No

No

Yes

Get from IME the original string before conversion    System.IME.addListener()    listener.onIMEComposition()    System.IME.removeListener()

Yes *

No

No

Yes

Send request to convert to IME    System.IME.doConversion()

Yes *

No

No

Yes

* Not all Windows IMEs support all of these operations. So far the only IME that supports them all is the Japanese IME. Every IME differs in its support of the OS calls.

** On Macintosh these methods are supported only for Japanese, and they are not supported for third-party IMEs.

*** One of the Japanese modes (Hiragana, Full & Half-width Katakana, Full-width alphanumeric) must be enabled before using this API.

Availability: ActionScript 1.0; Flash Player 8

Property summary

Modifiers

Property

Description

static

ALPHANUMERIC_FULL:String

A string with the value "ALPHANUMERIC_FULL" for use with setConversionMode() and getConversionMode().

static

ALPHANUMERIC_HALF:String

A string with the value "ALPHANUMERIC_HALF" for use with setConversionMode() and getConversionMode().

static

CHINESE:String

A string with the value "CHINESE" for use with setConversionMode() and getConversionMode().

static

JAPANESE_HIRAGANA:String

A string with the value "JAPANESE_HIRAGANA" for use with setConversionMode() and getConversionMode().

static

JAPANESE_KATAKANA_FULL:String

A string with the value "JAPANESE_KATAKANA_FULL" for use with setConversionMode() and getConversionMode().

static

JAPANESE_KATAKANA_HALF:String

A string with the value "JAPANESE_KATAKANA_HALF" for use with setConversionMode() and getConversionMode().

static

KOREAN:String

A string with the value "KOREAN" for use with setConversionMode() and getConversionMode().

static

UNKNOWN:String

A string with the value "UNKNOWN" for use with getConversionMode().

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


Event summary

Event

Description

onIMEComposition = function([readingString:String]) {}

Notified when the IME composition string is being set.

Method summary

Modifiers

Signature

Description

static

addListener(listener:Object) : Void

Registers an object to receive notification when an IME event handler is invoked by the onIMEComposition event.

static

doConversion() : Boolean

Instructs the IME to select the first candidate for the current composition string.

static

getConversionMode() : String

Indicates the conversion mode of the current IME.

static

getEnabled() : Boolean

Indicates whether the system IME is enabled.

static

removeListener(listener:Object) : Boolean

Removes a listener object that was previously registered to an IME instance with IME.addListener().

static

setCompositionString(composition:String) : Boolean

Sets the IME composition string.

static

setConversionMode(mode:String) : Boolean

Sets the conversion mode of the current IME.

static

setEnabled(enabled:Boolean) : Boolean

Enables or disables the system IME.

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)



Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001730.html