User Guide

Table Of Contents
29
CHAPTER 5
New FSCommand and FSCommand2 commands
This chapter discusses the new FSCommand() and FSCommand2() commands in Macromedia
Flash Lite 1.1. These new commands fall into these categories: general commands, commands
controlling Flash playback, and platform integration commands.
General commands
The commands in this section provide general control of Flash Lite content on mobile phones.
URL Encoding
Two new commands have been added to encode a string into a format that is safe for network
transfer to a server and back to the mobile phone:
Escape and Unescape.
Escape
The
Escape function encodes an arbitrary string into a format that is safe for network transfer. All
characters that are not alphanumeric are replaced with a hexadecimal escape sequence (%xx, or
%xx%xx in the case of double-byte characters). The encoded string is returned in a variable that is
passed into the SWF file by name.
This function is executed immediately upon invocation.
Syntax
status = FSCommand2( "Escape", original, encoded )
In this code example, original is the string to be encoded into a format safe for URLs, and
encoded is the resulting encoded string.
Return value
A value of 0 upon failure; 1 upon success.