Initiating a phone call

To initiate a phone call from a Flash Lite application, you use the getURL() function. Typically, you use this function to open a web page, but in this case you specify tel: as the protocol (in place of http), and then provide the phone number you wish the phone to dial. When you call this function, Flash Lite displays a confirmation dialog box asking the user for permission to make the call to the specified number.

The following code attempts to initiate call to 555-1212:

getURL("tel:555-1212");

Flash Lite only processes one getURL() action per frame or per event handler. Certain handsets restrict the getURL() action to keypress events only, in which case the getURL() call is processed only if it is triggered within a keypress event handler. Even under such circumstances, only one getURL() action is processed per keypress event handler. The following example starts a phone call when the user presses the Select button on the device:

on (keyPress "<Enter>"){
    getURL("tel:555-1212");
}

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/00005706.html