fscommand function

fscommand(command:String, parameters:String) : Void

The fscommand() function lets a SWF file communicate with the Flash Lite player or the environment for a mobile device (such as an operating system). The parameters define the name of the application being started and the parameters to it, separated by commas.

Command

Parameters

Purpose

launch

application-path, arg1, arg2,..., argn

This command launches another application on a mobile device. The name of the application its parameters are passed in as a single argument.

Note: This feature is operating-system dependent. Please use this command carefully as it can call on the host device to perform an unsupported operation. Using it in this way could cause the host device to crash.

This command is supported only when the Flash Lite player is running in stand-alone mode. It is not supported when the player is running in the context of another application (for example, as a plug-in to a browser).

activateTextField

"" (ignored)

This command asynchronously activates the currently selected text field, making it active for user edits. Because it behaves asynchronously, this command is processed at the end of the frame. ActionScript that immediately follows the call to fscommand() executes first. If no text field is selected when the command is processed, nothing happens. This command gives focus to a text field previously passed to the Selection.setFocus() method and activates the text field for editing. This command has an effect only when the handset supports inline text editing.

This command can be called as part of the Selection.onSetFocus() event listener callback. This causes text fields to become active for editing when they are selected.

Note: Because the fscommand() function is executed asynchronously, the text field does not immediately become active; it becomes active at the end of the frame.

Parameters

command:String - A string passed to the host application for any use, or a command passed to the Flash Lite player.

parameters:String - A string passed to the host application for any use, or a value passed to the Flash Lite player.

Example

In the following example, the fscommand() function opens wap.yahoo.com on the services/Web browser on Series 60 phones:

on(keyPress "9") {
 status = fscommand("launch", "z:\\system\\apps\\browser\\browser.app,http://wap.yahoo.com");
}