Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 06:17, 14 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Introduction to fscommands

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Platform(s): Flash Lite 1.1 and later
Created: Risalmin (04 Dec 2007)
Last edited: hamishwillee (14 May 2013)

Fscommand enables the communcation between Flash Lite applications and the host environment, like a handset or other device, using ActionScript



Historically, the fscommand function was introduced for Flash Player 3 to enable the Flash movie to to communicate with the Flash Player, or application hosting the Flash Player. The fscommand function was also used to to pass messages to Macromedia Director, or to Visual Basic, Visual C++, and other programs hosting ActiveX controls. Most of the original fscommand actions are not supported in Flash Lite, with the exception of "launch".


The fscommand2 function was introduced in Flash Lite 1.1 to support interaction with mobile devices capabilities such as locale data, date and time, network and battery level, operating system version and the IMEI code of the device. It can also be used to give feedback to the user through vibration. This article will concentrate on the fscommand2.



status = fscommand("Launch", "application-path, arg1, arg2,..., argn")


returnValue = fscommand2(command [, expression1 ... expressionN])

Differences between fscommand and fscommand2

The main purpose of the two functions is the same, the interaction between the host system and the Flash movie, but there are two main differences:

execution point in time

  • fscommand() is run at the end of the current frame
  • in Flash Lite, fscommand2() is executed immediately

return value

  • fscommand() is always void and does not return a value
  • fscommand2() returns failure, succes or a specific return value

List of supported fscommand2() actions

The following is a list of fscommand2() actions supported in Nokia ans s60 handsets in general. You can find more information of each command from Adobe.

The Adobe site is more general Flash Lite, some of the commands are links to Nokia device specific code examples:

Device information commands


  • GetMaxSignalLevel
    • Maximum network signal level
  • GetSignalLevel
    • Current signal level
  • GetNetworkConnectionName
    • The name of the active network
  • GetNetworkConnectStatus
    • Connection status
  • GetNetworkGeneration
    • 2g 3g etc.
  • GetNetworkName
    • Name of the current network
  • GetNetworkRequestStatus
    • Status of the most recent HTTP request
  • GetNetworkStatus
    • Home network or roaming

Battery status

  • GetBatteryLevel
    • Returns the device's battery level
  • GetMaxBatteryLevel
    • Returns the device's maximum battery level
  • GetPowerSource
    • Charging or on battery

Platform & Device ID

  • GetPlatform
    • series 40, s60, etc.
  • GetDevice
    • Returns a device identifier
  • GetDeviceID
    • IMEI code

Memory and volume

  • GetTotalPlayerMemory
    • Maximum heap memory size
  • GetFreePlayerMemory
    • Heap memory size available
  • GetMaxVolumeLevel
    • The device's maximum volume level
  • GetVolumeLevel
    • Current volume level

Locale, date & time

  • GetLanguage
    • The locale ID
  • GetLocaleLongDate
    • Long date format of current locale
  • GetDateWeekday
    • Current weekday
  • GetLocaleTime
    • Current time

Using device capabilities

  • ExtendBacklightDuration
    • Extends the on time of the backlight
  • FullScreen
    • Forces the application to fullscreen mode
  • StartVibrate
    • Starts vibration
  • StopVibrate
    • Stops vibration

User interaction

  • SetFocusRectColor
    • Color of the focus rectangle
  • SetInputTextType
    • Alpha, numeric, etc.
  • SetSoftKeys
    • Remaps device's softkeys
  • ResetSoftKeys
    • Resets softkeys to default
  • Quit
    • Causes the Flash Lite Player to stop playback and exit

There are individual differences between handsets and Flash Lite versions. The best place to check is Adobe Device Central

This page was last modified on 14 May 2013, at 06:17.
81 page views in the last 30 days.