Flash Lite 1.0.


getURL(url [ , window [, "variables"]])


The URL from which to obtain the document.

An optional parameter that specifies the window or HTML frame that the document should load into.
Note: The window parameter is not specified for Flash Lite applications, because browsers on cell phones do not support multiple windows.

You can enter an empty string, or the name of a specific window, or choose from the following reserved target names:

  • _self specifies the current frame in the current window.

  • _blank specifies a new window.

  • _parent specifies the parent of the current frame.

  • _top specifies the top-level frame in the current window.

A GET or POST method for sending variables. If there are no variables, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for sending long strings of variables.


Function; loads a document from a specific URL into a window or passes variables to another application at a defined URL. To test this function, make sure the file you want to load is in the specified location. To use an absolute URL (for example,, you need a network connection.

Flash Lite 1.0 recognizes only the HTTP, HTTPS, mailto, and tel protocols. Flash Lite 1.1 recognizes these protocols, and in addition, the file, SMS (short message service), and MMS (multimedia message service) protocols.

Flash Lite passes the call to the operating system, and the operating system handles the call with the registered default application for the specified protocol.

Only one getURL() function is processed per frame or per event handler.

Certain handsets restrict the getURL() function to key events only, in which case the getURL() call is processed only if it is triggered in a key event handler. Even under such circumstances, only one getURL() function is processed per event handler.


In the following ActionScript, the Flash Lite player opens in the default browser:

myURL = ""; 
    on(keyPress "1") { 

You can also use GET or POST for sending variables from the current timeline. The following example uses the GET method to append variables to a URL:

firstName = "Gus"; 
lastName = "Richardson"; 
age = 92; 
getURL("", "_blank", "GET");

The following ActionScript uses POST to send variables in an HTTP header:

firstName = "Gus"; 
lastName = "Richardson"; 
age = 92; 
getURL("", "POST");

You can assign a button function to open an e-mail composition window with the address, subject, and body text fields already populated. Use one of the following methods to assign a button function: Method 1 for either Shift-JIS or English character encoding; Method 2 only for English character encoding.

Method 1: Set variables for each of the desired parameters, as in this example:

on (release, keyPress "#"){ 
subject = "email subject"; 
body = "email body"; 
getURL("", "", "GET"); 

Method 2: Define each parameter within the getURL() function, as in this example:

on (release, keyPress "#"){ 
com&subject=I am the email subject&body=I am the email body"); 

Method 1 results in automatic URL encoding, while Method 2 preserves the spaces in the strings. For example, the strings that result from using Method 1 are as follows:


In contrast, Method 2 results in the following strings:

email subject 
email body

The following example uses the tel protocol:

on (release, keyPress "#"){ 

In the following example, getURL() is used to send an SMS message:

mySMS = "sms:4156095555?body=sample sms message"; 
on(keyPress "5") { 

In the following example, getURL() is used to send an MMS message:

// mms example 
myMMS = "mms:4156095555?body=sample mms message"; 
on(keyPress "6") { 

In the following example, getURL() is used to open a text file stored on the local file system:

// file protocol example 
filePath = "file://c:/documents/flash/myApp/myvariables.txt"; 
on(keyPress "7") {