You are on page 1of 165

Developing

FLASH LITE 4 Applications

2010 Adobe Systems Incorporated and its licensors. All rights reserved.
Copyright

Developing Adobe Flash Lite 4 Applications This guide is protected under copyright law, furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. This guide is licensed for use under the terms of the Creative Commons Attribution Non-Commercial 3.0 License. This License allows users to copy, distribute, and transmit the user guide for noncommercial purposes only so long as (1) proper attribution to Adobe is given as the owner of the guide; and (2) any reuse or distribution of the user guide contains a notice that use of the guide is governed by these terms. The best way to provide notice is to include the following link. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ Adobe, the Adobe logo, ActionScript, Flash, and Flash Lite are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. ActiveX and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Macintosh is a trademark of Apple Inc., registered in the United States and other countries. Symbian and all Symbian based marks and logos are trademarks of Symbian Limited. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Arial is a trademark of The Monotype Corporation registered in the U.S. Patent and Trademark Office and certain other jurisdictions. Helvetica is a trademark of Heidelberger Druckmaschinen AG exclusively licensed through Linotype Library GmbH, and may be registered in certain jurisdictions. All other trademarks are the property of their respective owners. Updated Information/Additional Third Party Code Information available at http://www.adobe.com/go/thirdparty. Portions include software under the following terms: MPEG Layer-3 audio compression technology licensed by Fraunhofer IIS and Thomson Multimedia http://www.iis.fhg.de/amm/). This software is based in part on the work of the Independent JPEG Group. Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc. Video compression and decompression in Flash is powered by On2 TrueMotion video technology. 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com. Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are Commercial Items, as that term is defined at 48 C.F.R. 2.101, consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202, as applicable. Consistent with 48 C.F.R. 12.212 or 48 C.F.R. 227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference.

Last updated 3/22/2011

iii

Contents
Chapter 1: Flash Lite 4 overview Flash Lite basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Flash Lite 4 features ................................................................................................... 1

Chapter 2: Getting started with Flash Lite Hello World Flash Lite application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The Adobe Device Central emulator and device database Workflow for authoring Flash Lite applications About Flash Lite content types ............................................................... 6 ......................................................................... 6

......................................................................................... 7

Chapter 3: Tutorial: Creating a Flash Lite application View the completed application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Create the application ................................................................................................. 8

Chapter 4: Creating interactivity and navigation User interaction and supported keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Default navigation Multi-touch support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Handling mouse and key events

Chapter 5: Working with text and fonts Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Text input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Flash text engine Font rendering Scrolling text

Chapter 6: Working with sound Device sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Native sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Chapter 7: Working with video Working with FLV files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 RTMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Enhancements

Chapter 8: Working with device APIs Geolocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Accelerometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Chapter 9: Introduction to Flash Lite 4 ActionScript Supported, partially supported, and unsupported ActionScript classes and language elements Partially supported ActionScript classes: details Unsupported ActionScript elements: details

. . . . . . . . . . . . . . . . . . . . . . . . . 53

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Last updated 3/22/2011

Chapter 1: Flash Lite 4 overview


Adobe Flash Lite is a version of Adobe Flash Player designed for devices.

Flash Lite basics


About Flash Lite
Flash Lite 4 is based on Flash Player 10. It offers features to improve the web browsing experience for users of mobile devices. Many of these features were present in Flash Player 9 but not supported in Flash Lite; they are now supported in Flash Lite 4. Flash Lite 4 introduces the ability to play back Adobe ActionScript 3.0 content when encountered on Flash 10 websites. Flash Lite 4 also supports the processing and playback of ActionScript 3.0, which was introduced in Flash Player 9. For more information, see Flash Lite 4 features on page 1.

About components in Flash Lite


The components installed with Adobe Flash Professional CS5(for example, DataGrid) were designed for use in Flash desktop applications. The memory requirements and processing power that they require typically prohibit their use in Flash Lite applications. Adobe recommends that you do not use the standard user interface components in your Flash Lite applications.

Optimizing content for performance and memory


To optimize content for mobile devices, pay attention to basic principles of developing content. For example, Flash developers have often had to avoid complex artwork, excessive tweening, and overusing transparency. Flash Lite developers sometimes face challenges due to limitations of mobile devices. Some devices perform better than others, sometimes dramatically. Mobile authoring often requires publishing to many different devices. As a result, developers must sometimes author for devices that have the least features. Optimizing content for mobile devices often requires making trade-offs. For example, one technique looks better, while another results in better performance. As you measure these trade-offs, you go back and forth repeatedly between testing in the emulator and on the target device. Adobe Flash Professional CS5 includes an Adobe Flash Lite emulator available on Adobe Device Central CS5. This emulator lets you test your application in the authoring tool as it appears and functions on an actual device. When youre satisfied with the application running in the emulator, you can test it on an actual device.

Flash Lite 4 features


Improved interactivity and navigation
Flash Lite 4 offers various features to improve the interactivity and navigation for users of mobile devices. Some of these features are present in earlier versions of the Flash Player but not supported in Flash Lite. These features are now supported in Flash Lite 4.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Flash Lite 4 overview

Multi-touch support
Flash Lite 4 introduces multi-touch support to handle multi-touch events and native gesture events. All mobile devices that support this feature respond to multiple touch points on the screen. In addition, a series of incoming touch point data can be processed into higher level gestures.

Text and font enhancements


Flash Player 10 text engine
Flash Lite 4 supports the new Flash Player 10 text layout engine. This engine supports complex and two-way language, TrueType font, and advanced features, such as rotation, masking, and so on. The new engine has been developed for memory optimization and high performance. For more information, see Flash text engine on page 35.

Using inline text input


In Flash Lite 4, background events can continue during an inline text input, which was not possible in the earlier versions. In addition, with this release, restricted mode is not applicable and ActionScript is processed during inline text entry. For more information, see Using inline text input on page 29.

Video enhancements
RTMP data channel
ActionScript 3.0 uses the AMF 3 format for serializing and deserializing ActionScript objects. This format sends object traits and strings in addition to object instances. In addition, AMF 3 supports some of the data types introduced in ActionScript 3.0. For more information, see RTMP on page 45.

RTMPE
Flash Lite 4 supports encrypted RTMP streams. This means that Flash Lite requests an encrypted version of a media stream from Adobe Flash Media Server 3. Flash Lite then decrypts that stream on the mobile device. For more information, see RTMPE on page 46.

RTMPT and RTMPTE


In Flash Lite 4, RTMPT and RTMPTE are enabled through HTTP. As a result, RTMP packet transmissions are enabled for users attempting to connect behind a firewall that blocks any transmission attempt. For more information, see RTMPT on page 47 and RTMPTE on page 47.

Multi bit-rate streaming


Flash Lite 4 supports dynamic bit-rate switching when streaming from the Flash Media Server. As a result, the application can adapt to the dynamic changes in network conditions while streaming recorded content. For more information, see Multi bit-rate streaming on page 48.

New device APIs


Flash Lite 4 enables you to obtain the geographical location and directional acceleration values of a mobile device with the introduction of two device APIs.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Flash Lite 4 overview

Geolocation
This feature allows you to register for the location updates from the onboard location sensor of a mobile device. The device returns its geographical location in the form of latitudinal and longitudinal coordinates. For more information, see Geolocation on page 49.

Accelerometer
The Accelerometer enables you to obtain the acceleration data of a device through an accelerometer sensor installed on the device. This data represents the location of the device along a three-dimensional axis or the movement of the device along the three-dimensional axis. For more information, see Accelerometer on page 50.

Shared object behavior changes


The shared object implementation in Flash Lite 4 is fully compatible with Flash Player 10 SWF files. Flash Lite 4 supports all methods of the ActionScript 3.0 SharedObject class. A SWF file runs the same way in Flash Lite 4 as it does on Flash Player 10. The only difference is that there is no Settings Manager on the device. As a result, the storage size of a shared object is restricted to less than 100 kb per domain. If the storage size increases above 100 kb, then shared object transactions fail. Mobile devices generally have less storage and memory capacities. By restricting the storage size, you reduce the disk storage and access overhead on these devices. For more information about remote shared objects, see www.help.adobe.com. Note: Any new content in ActionScript 3.0 must be authored according to Flash Player 10 documentation.

Remote shared objects


With Flash Lite 4, you can create and use remote shared objects. These objects are shared in real time by all clients connected to your application. If a client changes the property of a remote shared object, the change is applicable for all other clients that are connected. For more information about remote shared objects, see www.help.adobe.com.

ActionScript extensions
The Extensions feature in Flash Lite 4 allows third-party developers to add features and ActionScript APIs to Flash Lite using a static or dynamically linked library. The DLL provides the implementation for the features, and Flash Lite allows the DLL to be used by calling ActionScript APIs. As a result, you can interact with APIs that are exposed by host devices. To do so, you write a DLL that bridges the capabilities of the device and the Flash Player. These extensions can be statically or dynamically linked to the host implementation. For example, using this capability, developers can write applications that access the devices filing system, or use GPS data provided by the device, and so on. Note: The ActionScript Extensions feature is available to third-party developers only if it is enabled by the manufacturer of the target device.

Testing and debugging


Adobe Device Central CS5 lets you test and debug your Flash Lite projects on various device. You can emulate device display, memory use, and performance on specific devices.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Flash Lite 4 overview

Partially Supported Classes


For the detailed list of classes that are partially supported for this release, see Introduction to Flash Lite 4 ActionScript on page 53.

Unsupported Classes
For the detailed list of classes that are not supported for this release, see Introduction to Flash Lite 4 ActionScript on page 53.

Last updated 3/22/2011

Chapter 2: Getting started with Flash Lite


Hello World Flash Lite application
In this section, you create a simple Flash Lite application and test it in the Adobe Device Central CS5 emulator. For a more complete sample application, see Tutorial: Creating a Flash Lite application on page 8. For the purposes of this tutorial, assume that youre developing content for the Flash Lite stand-alone player. The procedure targets a generic device. First, decide which devices and Flash Lite content type you are targeting.

Configure and create a simple Flash Lite application


1 Start Flash. 2 On the main Flash screen, select Create New > Flash Lite 4. 3 In the Tools panel, select the Text tool and drag to create a text field on the Stage.

Type Hello, world! (or other text) in the text field.


4 In the Properties tab, select Classic Text from the Text Engine pop-up menu and Static Text from the Text Type

pop-up menu.
5 Select Control > Test Movie > in Device Central to export your application to Adobe Device Central and view your

application in the Adobe Device Central emulator. Note: During testing in Device Central, you can change the device and content type to see your application on a different platform. To do so, double-click a device in the library panel and select a new content type from Content Type. When you return to Flash, Flash remembers the settings you last used in the emulator.

Configure important settings for mobile applications


Certain settings require special consideration for Flash Lite 4 applications on mobile devices. Most recommended values are set automatically when you choose either Create New > Flash Lite 4 from the Welcome screen, or File > New > Flash Lite 4 from the menu. Set Properties for the document 1 In Flash Professional, go to the stage. Click in an unused portion of the stage so that no components are selected.
2 Open the Properties window by pressing Ctrl+F3, or select Window > Properties from the menu. If you successfully

de-selected all components, the top panel of the Properties window displays the title Document and the name of your project.
3 In the Properties window, expand the Properties area. 4 Under FPS, select an optimal frame rate for your target device. Processor speed, availability of hardware

acceleration, and amount of memory can affect video playback performance. Device OEMs can provide the information needed to optimize this setting for a particular device.
5 Set Size to fit the screen dimensions of your default device. This value sets the default size. For other devices, you

can change the size dynamically at runtime using the flash.display.Stage class.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Getting started with Flash Lite

Set Publish Settings 1 Choose File > Publish Settings to open the Publish Settings dialog box.
2 On the Formats tab, select HTML (.html) to create an embedded SWF file that runs in a browser. 3 On the Flash tab, select Flash Lite 4.0 from the Player drop-down list, and select ActionScript 3.0 from the Script

drop-down list.

The Adobe Device Central emulator and device database


The Adobe Device Central emulator lets you test your content as it will run and appear on an actual device. You can select a different test device or content type and view detailed information about your application. Device Central contains an extensive database of mobile devices from which you can select to create your own test environment.

Workflow for authoring Flash Lite applications


Creating Flash Lite content is an iterative process that involves the following steps:
Identify your target devices and Flash Lite content type Different devices have different screen sizes, support different audio formats, and have different screen color depths, among other factors. These factors influence your applications design or implementation.

In addition, different devices support different Flash Lite content types, such as screen savers, stand-alone applications, or animated ring tones. The content type for which you are developing also determines the features that are available to your application.
Create your application in Flash and test in Adobe Device Central Adobe Flash Professional CS5 includes an emulator on Adobe Device Central that lets you test your application without having to transfer it to a device. You use the emulator to refine your application design and fix any problems before you test it on a mobile device. Test the application on your target device or devices The Adobe Device Central emulator doesnt emulate all aspects of the target device, such as its processor speed, color depth, or network latency. Consider the following example. Suppose an animation runs smoothly on the emulator. You cant expect it to run as quickly on the device because of its slower processor speed. In addition, a color gradient that appears smooth in the emulator can appear banded when viewed on the actual device. After you test your application on a device, you may have to refine the applications design in the Flash authoring tool.

The following illustration shows the iterative development and testing process:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Getting started with Flash Lite

A.Editing the FLA file in Adobe Flash B.Testing in the Adobe Device Central emulator C. Testing on a device

About Flash Lite content types


Before you start developing a Flash Lite application, remember the following:

The device or devices on which you want to run the content (target devices). The Flash Lite player is installed on
various devices. For a list of devices that have Flash Lite installed, see the Supported Devices page on the Adobe website at www.adobe.com/go/mobile_supported_devices.

The Flash Lite content types that the target devices support. Each Flash Lite installation supports one or more
application modes (content types). For example, some devices use Flash Lite to enable screen savers or animated ring tones based on Flash. Other devices use Flash Lite to render content that is embedded in mobile web pages. Not all content types support all Flash Lite features. Each Flash Lite content type, paired with a specific device, defines a specific set of Flash Lite features that are available to your application. For example, a desktop application that is running as a screensaver is not typically allowed to make network connections or download data. The Flash Lite testing features in Adobe Device Central let you test against multiple devices and different Flash Lite content types. This ability lets you determine if your application uses features not available for the type of content that you are developing.

Last updated 3/22/2011

Chapter 3: Tutorial: Creating a Flash Lite application


In this tutorial, youll develop an Adobe Flash Lite application. The application takes a live feed from an online website, parses the XML, and displays the information on your device screen.

View the completed application


You can view the application in the Adobe Device Central emulator. You can also transfer the completed applications to the stand-alone Flash Lite player installed on a mobile device.
1 Download and decompress the tutorial files. Browse to www.adobe.com/go/learn_flt_samples_and_tutorials.

Download the ZIP file for your Flash Lite version.


2 In Flash, choose File > Open, and select the file named blogs-rss_complete.fla in the Tutorial folder. 3 Choose File > Publish Settings. On the Flash tab of the Publish Settings dialog box, make sure that Player is set to

Flash Lite 4.0.


4 Select Control > Test Movie > In Device Central to test the application in Device Central. Be sure to choose the

Flash Lite 4.0 32 240x320 test device profile. Note: This simple tutorial application does not support multi-touch functionality.
5 To interact with the application, do the following:

On the homescreen, wait for the blog headlines to load on the device screen. Click the Down key to scroll
through the blog entries. Click the Select key to view details about a blog entry.

Click the Down key to scroll through the full entries. Press 9 on the device keypad to return to the list of
headlines. You can also press 7 to open the blog entry in a web browser on your device.

Create the application


The tutorial application reads an RSS feed from the Adobe blogs website (blogs.adobe.com). It displays a summary catalog of the blog entries and lets the user view the full text of any entry. Users can also choose to launch the browser to view an entry on the website.

Download the RSS feed


1 In Flash, choose File > Open, and select the blogs-rss_start.fla file located in the Tutorials folder. 2 Choose File > Save As, and save the file as blogs-rss.fla. 3 In the Timeline (Window > Timeline), select Frame 1 in the action layer and open the Actions panel (Window >

Actions).
4 Below the import statement on line 1, add a preloader component to the stage. This object is a graphical placeholder

that appears only until the application parses the RSS XML content:
var a1:preloader = new preloader();

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Tutorial: Creating a Flash Lite application

5 Define global variables for use throughout the application:


var var var var var myNews:Array; visi:Number=0; selectedNews=0; newsshowing:Sprite; isSet:Boolean=false;

Note: The following three steps dont require action on your part. They merely describe what the existing tutorial code does.
6 The following existing code creates a URLLoader object and adds event listeners to that object:
var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE,loadxml); loader.addEventListener(IOErrorEvent.IO_ERROR,ioerror); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityerror);

7 The following existing code calls the URLLoader.load() function, passing the URL of the live blog feed through a
URLRequest object: loader.load(new URLRequest("http://blogs.adobe.com/index.xml"));

8 The following existing code defines callback functions for loader events:
function loadxml(e):void{ } function ioerror(e):void { trace(e.type); } function securityerror(e):void { trace(e.type); }

Parse the downloaded RSS feed


In the following steps, add the indicated code to the loadxml() function body:
1 Now that you are ready to parse the XML and display the RSS feed, remove the preloader object from the stage:
stage.removeChild(a1);

2 Create an XML object, and assign the RSS feed to the XML object:
var xml:XML=new XML(loader.data);

3 Create an array and assign it to the myNews global variable:


myNews = new Array();

4 Parse the XML to display the title, URL, description, and publication date for the blog entry:
for each (var param:XML in xml.channel.item) { myNews.push({title:param.title,link:param.link, description:param.description,date:param.pubDate} ); }

The loadxml() function now looks like:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Tutorial: Creating a Flash Lite application

10

function loadxml(e):void { stage.removeChild(a1); var xml=new XML(loader.data); myNews = new Array(); for each (var param:XML in xml.channel.item) { myNews.push({title:param.title,link:param.link, description:param.description,date:param.pubDate}); } }

Create the homescreen


1 In the Timeline, select Frame 1 in the header layer. Click the Library panel, and drag an instance of the header object

to the top of the document on the stage.


2 Select Frame 1 in the stage layer. Add four dynamic text fields, aligned vertically, in the four slots below the header

object. For each text field, set width to 230.00 and height to 45.25.
3 In the Properties panel, name the text field instances tf1, tf2, tf3, and tf4, respectively, from top to bottom. 4 Select Frame 1 in the action layer, and open the Actions panel. Create the showText() function to display blog

entry titles in the text fields:


function showText():void { tf1.text=myNews[visi].title; tf2.text=myNews[visi+1].title; tf3.text=myNews[visi+2].title; tf4.text=myNews[visi+3].title; }

Note: The visi variable stores the index value of the topmost visible blog entry.
5 Call the showText() function on the final line of the loadxml() function:
function loadxml(e):void { stage.removeChild(a1); var xml=new XML(loader.data); myNews = new Array(); for each (var param:XML in xml.channel.item) { myNews.push({title:param.title,link:param.link, description:param.description,date:param.pubDate}); } showText(); }

6 From the Library panel, drag an instance of the highlight object and place it on tf1. In the Properties tab, enter

highlightBar as the instance name.

Display the current date and time in the header


The header component contains the title Adobe blogs on the left and a text field named tf on the right. In the following steps, you add a time/date stamp to tf.
1 In the Library panel, double-click the header component to open it for editing. The header component becomes the

only object on the stage.


2 Deselect all header elements by clicking on an unoccupied stage area. Open the Actions panel.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Tutorial: Creating a Flash Lite application

11

3 In the Actions panel, add a listener for the ENTER_FRAME event. To do so, paste the following code in Layer 1,

Frame 1 of the current selection (the header component):


addEventListener(Event.ENTER_FRAME,changeDate);

4 On the next line, add the following code to implement the event handler that displays the date and time:
function changeDate(e):void { var date = new Date(); tf.text = date.toDateString(); tf.appendText("\n"+date.toLocaleTimeString()); }

Create a scrolling list of blog entries


1 Open Scene 1 on the stage. 2 In the Timeline, select Frame 1 in the scroller layer. From the Library panel, drag an instance of the scroll object to

the right edge of the stage document. Place the scroll object so that its top lies within the right edge the header. In the Properties tab, enter scrollee as the instance name.
3 Select Frame 1 in the actions layer. In the Actions panel, add an event listener to the Stage to detect keypad events:
stage.addEventListener(KeyboardEvent.KEY_DOWN,onkeyDown);

4 Add a handler for the KEY_DOWN event. In this handler, you implement the functionality for scrolling through

the blog headlines. You also add the ability to select a blog headline and display its details:
function onkeyDown(e):void { if (e.keyCode==Keyboard.ENTER) { trace(myNews[visi+selectedNews].title); if(isSet==false){ showNews(); isSet=true; } return; } if (e.keyCode==57) { // 9 key comeBack(); } if (e.keyCode==55) { // 7 key goto(); } if (e.keyCode==53) { // 5 key if(isSet==false){onrefresh();} } if (e.keyCode==Keyboard.DOWN) { if(isSet==true){return;} if (selectedNews<3) { highlightBar.y+=62; selectedNews+=1; scrollee.scroller.y+=(280/myNews.length); return; } if (((visi+4)>=(myNews.length))) { return; }

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Tutorial: Creating a Flash Lite application

12

scrollee.scroller.y+=(280/myNews.length); visi+=1; showText(); } if (e.keyCode==Keyboard.UP) { if(isSet==true){return;} if (selectedNews>0) { highlightBar.y-=62; selectedNews-=1; scrollee.scroller.y-=(280/myNews.length); return; } if (visi==0) { return; } scrollee.scroller.y-=(280/myNews.length); visi-=1; showText(); } }

Add the showNews() function


When you press the Select key to view the details of a blog entry, the application calls the readNews class. This class is defined in the readNews.as file in the Tutorials folder. The readNews class provides functionality that displays the full content of a blog entry. In Frame 1 of the action layer, paste the following code in the Actions panel:
function showNews():void { newsshowing=new readNews(stage,myNews[visi+selectedNews].title, myNews[visi+selectedNews].description,myNews[visi+selectedNews].date); newsshowing.x=3; newsshowing.y=32; addChild(newsshowing); }

Add the comeback() function


To return to the list of blog entries, you press 9 on the keypad. In Frame 1 of the action layer, add the following code in the Actions panel:
function comeBack():void { if (isSet==true) { removeChild(newsshowing); isSet=false; } return; }

Refresh the list of blog entries


To refresh the list of blog entries, you press 5 on the keypad. The application refetches the RSS feed and displays the current XML.
1 In Frame 1 of the actions layer, add the following code in the Actions panel:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Tutorial: Creating a Flash Lite application

13

function onrefresh():void { visi=0; selectedNews=0; scrollee.scroller.y=0; highlightBar.y=73.95; loader.load(new URLRequest("http://blogs.adobe.com/index.xml")); stage.addChild(a1); }

2 Near the top of the Actions panel code, call the onrefresh() function immediately after the loader event listeners

are added:
var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE,loadxml); loader.addEventListener(IOErrorEvent.IO_ERROR,ioerror); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityerror); onrefresh();

Navigate to the web page of the blog entry


To view a blog entry in a separate browser window, you press 7 on the keypad. In Frame 1 of the actions layer, add the following code in the Actions panel:
function goto():void { if (isSet==true) { navigateToURL(new URLRequest(myNews[visi+selectedNews].link)); } return; }

Test and publish the application


Your tutorial application is now complete. You can test it in Device Central by choosing either Debug > Debug Movie > In Device Central, or Control > Test Movie > In Device Central. To publish your application, choose File > Publish. Flash Professional saves your embedded SWF file as blogs-rss.html. Flash Player security requires you to register your local SWF file as trusted before Flash Player can display it. For information on registering your file, see www.adobe.com/go/learn_fl_securitypanel_en.

Last updated 3/22/2011

14

Chapter 4: Creating interactivity and navigation


To interact with your Adobe Flash Lite application, a user must be able to do the following:

Determine which object on the screen currently has focus. Navigate among objects. Initiate an action by selecting an object.

User interaction and supported keys


About user interaction in Flash Lite
Flash Lite supports navigation and user interaction through the devices keypad, or through a stylus or touchscreen interface on devices that provide one. The options available to your application vary depending on the target device and content type. For more information about content types, see About Flash Lite content types on page 7. The simplest way to add key-based interactivity to a Flash Lite application is through default navigation. Default navigation uses the devices four-way keypad like the arrow keys or the Tab and Shift+Tab keys in a desktop application. The user moves the focus to the desired object and then presses the Select key. The application includes event handler code to respond to these button events. Default navigation in Flash Lite works with buttons, input text fields, and, optionally, movie clips. Default navigation is most appropriate for simple user interactions such as menus. Applications can also respond to arbitrary mouse and keypress events that Flash Lite generates when a user clicks a mouse button or presses a particular key. Event-based navigation allows you to create Flash Lite applications, such as games that have a complex user interaction model.

Keys supported by Flash Lite


In addition to the alphanumeric keys available on standard telephones, most mobile devices feature a navigation keypad. This keypad lets users navigate and select items on the device screen. A typical navigation keypad has four navigation keys (Up, Down, Left, and Right) and a Select key (typically located at the center of the keypad). Different applications can use these keys in different ways. For example, a game uses the navigation keys to let the user move a character on the screen. The game can also use the Select key to perform another action, such as make the character jump. Not all devices and Flash Lite content types support all these keys. For example, devices that support two-way navigation dont support the left and right navigation keys. Flash Lite supports the following keys on mobile devices:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

15

Description Numeric, *, # Five-way keypad

Keys 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, # Select, up, and down Left and right

Availability All devices All devices Devices that support four-way navigation only (see Keyboard navigation modes on page 15)

Keyboard keys

!, , #, $, %, &, , (, ), *, +, ,, -, ., /, 0, 1, 2, Devices that have a QWERTY keyboard 3, 4, 5, 6, 7, 8, 9, :, ;, <, +, >, ?, @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, , a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, Backspace

For more information about the System.Capabilities class, seeAdobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Default navigation
Using default keyboard navigation in Flash Lite
On desktop applications, the Tab and Shift+Tab keys let users switch focus among objects on the screen. The arrow keys function in a similar way in some other applications. In Flash Lite, the navigation keys on the devices keypad serve the same purpose as the arrow or Tab and Shift+Tab keys in desktop applications. After the desired object has focus, the user can press the Select key to trigger an action in the application. You define event handlers to respond when a button or movie clip is selected; for more information, see Handling mouse and key events on page 20. Default keyboard navigation in Flash Lite works with buttons and input text fields. Movie clips are also included if they meet the following criteria:

Their tabEnabled property is set to true. They have event handlers associated with them and their tabEnabled property is not set to false.
When an input text field has focus and the user presses the Select key, Flash Lite activates the text field for inline editing. For an example of using default navigation, see Create a simple menu using buttons with mouse navigation on page 22.

Keyboard navigation modes


Flash Lite supports three modes of keyboard navigation: two-way, four-way, and four-way with wraparound. Different devices and Flash Lite content types support different navigation modes. Two-way navigation in Flash Lite is analogous to tab navigation in desktop applications. In desktop applications, the Tab and Shift+Tab keys navigate among objects on the screen. The down navigation key on the device corresponds to the Tab key, and the up navigation key corresponds to the Shift+Tab key. The default tab order in two-way navigation is generally left-to-right and top-to-bottom. For example, the following image shows a three-by-three grid of Button objects in a Flash Lite application. The numbers above each button indicate the order in which each button get keypad focus as the user presses the devices down navigation key repeatedly. After the button in the lower-right corner receives focus, the focus wraps around to the upper-left button the next time the user presses the down navigation key.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

16

Example tab order in two-way navigation

You can customize the tab order in two-way navigation using the tabIndex property of the Button, MovieClip, and TextField objects. For more information, see Controlling tab order in two-way navigation on page 19. For an example of two-way navigation, see the Flash Lite Samples and Tutorials page at www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample file named 2-way.fla. Four-way navigation in Flash Lite is similar to using the arrow keys on a desktop computers keyboard to navigate among objects on the screen. The devices up, down, left, and right navigation keys correspond to the four arrow keys on a computers keyboard. Pressing a navigation key moves the keypad focus to the object located in that direction, if one exists. If no object exists in that direction, then the keypad focus does not change from the current object. Note: The tabIndex property is not supported on devices that support four-way navigation, but tabEnabled and tabChildren are. This behavior is different from how these properties work in desktop applications. For an example that uses four-way navigation, see the Flash Lite Samples and Tutorials page at www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample file named 4-way.fla. Four-way navigation with wraparound functions like a combination of standard four-way navigation and two-way navigation. Like standard four-way navigation described previously, users change keypad focus using the devices four-way navigation keys. The difference is that, similar to two-way navigation, keypad focus wraps around to the object on the opposite side of the screen. For example, in the image below, the button with the current keypad focus is located at the lower-left corner of the screen. If the user presses the down navigation key, the next button to receive focus is located in the middle of the top row of buttons.

A. Button with current focus B. Next button to receive focus after user presses navigation key

You can test the behavior of two-way and four-way navigation modes in the Adobe Device Central emulator using the samples named 2-way.fla and 4-way.fla located at www.adobe.com/go/learn_flt_samples_and_tutorials. On the Samples and Tutorials page, locate, download, and decompress the ZIP file for your Flash Lite version. Then navigate to the Samples folder to access the samples.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

17

Each sample file consists of the same three-by-three grid of buttons, as discussed previously. However, there is a single difference. Each FLA file is configured to target a combination of device and Flash Lite content type that supports the navigation mode (two-way or four-way). To use each sample file, open it in Flash and test it in the Adobe Device Central emulator (select Control > Test Movie > In Device Central). Click the arrow keys on the emulators keypad (or press the arrow keys on your keyboard) to see how each navigation mode affects user navigation.

Array of buttons in sample file

Guidelines for using default navigation


The following are guidelines and considerations for using default navigation in your Flash Lite applications.

If you disable the default focus rectangle by setting focusRect to false, make sure that you provide an alternative
focus indicator. This focus indicator is for your buttons, input text fields, and tab-enabled movie clips. For buttons, you can do the same by adding a visual element to the buttons over state. The over state is that part of a button objects timeline thats displayed when the button has focus. For an example of this technique, see the sample application in Create a simple menu using buttons with mouse navigation on page 22. For input text fields, you can use the Stage object to determine when the text field has received focus and display the desired focus indicator.

Have at least two objects (input text fields, buttons, tab-enabled movie clips, or a combination) on the screen at the
same time. Suppose the screen contains a single input text field, button, or tab-enabled movie clip. In this situation, the user cant change the focus and can feel stuck in the user interface. If a screen in your application contains only a single button for user interaction, consider detecting a keypress event rather than using button events.

When appropriate, consider using the Stage.focus() property to set the initial focus to a specific object on the
screen. This property can help guide the user through the interface and reduce the amount of key navigation they must perform. For example, suppose a screen in your application contains an input text field. To enter a value in the text field, a user first presses a navigation key to give the text field focus. Then, the user presses the Select key to open the text input dialog box. You can use the following ActionScript to automatically set the keypad focus to the input text field named inputTxt:
stage.focus = inputTxt;

For more information, see the sample application in Controlling focus with ActionScript on page 18.

The alignment of objects on the screen is important for default navigation. When objects are offset from each other
on the screen, the sequence in which they get focus is not necessarily intuitive for your users. You can prevent this situation by making objects consistent in size and aligning them as vertically and horizontally as possible. With two-way navigation, you can also control the sequence using the tabIndex property.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

18

About the focus rectangle


By default, Flash Lite draws a yellow rectangle around the button or input text field that has focus. Movie clips are also included if they meet the following conditions:

Their tabEnabled property is set to true. They have event handlers associated with them and their tabEnabled property is not set to false.
The focus rectangle lets the user know about the object on the screen that responds when the user presses the devices Select key. For example, the following image shows the focus rectangle drawn around a button that has the current keypad focus:

Button with current focus and default focus rectangle

For buttons and movie clips, the focus rectangles bounding box is determined by the objects tap area. The tap area is the invisible region that (in desktop applications) defines the part of the button or movie clip that responds to mouse clicks. For input text fields, the text fields dimensions determine the focus rectangles bounding box. You can customize the color of the focus rectangle or disable it.

Customizing the focus rectangle


The focus rectangle is a default yellow highlight that indicates which button or input text field is currently selected. Movie clips are included if their tabEnabled property is set to true. Movie clips are also selected if they have event handlers associated with them and their tabEnabled property is not set to false. You can disable the default focus rectangle behavior by setting the Stage.stageFocusRect() property to false. You can also disable the focus rectangle for specific interactive objects, such as Movie clips and buttons by setting the objects focusRect property. For more information,

Controlling focus with ActionScript


You can use the Stage object to get and set the current keypad focus, or to be notified when an object receives or loses keypad focus. Using the Stage object is useful, for example, if you want to automatically set the focus to a specific button when your application first loads. You can also use the Stage object if you want to be notified when a specific object on the screen has received or lost keypad focus. Based on the notification, you can update the screen. The following code uses the Stage.Focus() method to set focus to the button instance named login_btn:
Stage.Focus = login_btn;

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

19

The FocusEvent.FOCUS_IN and FocusEvent.FOCUS_OUT events let you determine when the focus has changed. You can use these events, for example, to create a custom focus manager for all interactive objects. The following procedure shows how to create a custom focus manager that changes the border color of the TextField object with focus. For a sample of the completed application (custom_focus_manager.fla), see the Flash Lite Samples and Tutorials page at www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample.

Create a custom text input focus manager


1 In Flash, create a new mobile document and save it as custom_focus_manager.fla. 2 Using the Text tool, create a text field on the Stage. 3 With the text field still selected, in the Properties tab, select Input Text from the Text Type pop-up menu. Type

inputTxt_1 in the Instance Name text field, and select the Show Border Around Text option.
4 In the same manner, create another input text field below the first one with the instance name of inputTxt_2. Select

the Show Border Around Text option for the second text field.
5 In the Timeline, select Frame 1 in the layer named ActionScript. 6 Open the Actions panel (Window > Actions) and enter (or copy and paste) the following code:
//Set the display to full screen. stage.displayState = StageDisplayState.FULL_SCREEN //Add focus in and out event listeners for the current context. stage.addEventListener(FocusEvent.FOCUS_IN, focushandler); stage.addEventListener(FocusEvent.FOCUS_OUT, focusouthandler); function focushandler(e:FocusEvent): void { if (e.target is TextField){ //Set border color of text field with focus to red. e.target.borderColor = 0xFF0000; } } function focusouthandler(e:FocusEvent): void { if (e.target is TextField){ //Set border color of text field without focus to black. e.target.borderColor = 0x000000; } }

7 Save your changes and test the application in the emulator (Control > Test Movie > In Device Central). 8 Press the emulators down and up navigation keys to switch keypad focus between the two text fields. The text field

with focus has a red border, and the text field without focus has a black border. Press the Select key when a text field has focus to make the text input dialog box appear.

Controlling tab order in two-way navigation


Two-way navigation in Flash Lite is analogous to tab navigation in Flash, and therefore supports the InteractiveObject.tabIndex property that allows you to specifically set the tab order of buttons, movie clips, and input text fields. On devices that support four-way navigation, the tabIndex property is not supported. Therefore, its not possible to set tab order using the tabIndex property for four-way navigation.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

20

To control tab order in two-way navigation, you assign each interactive objects tabIndex property a number that specifies the objects order in the default navigation. For example, suppose that an application contains a button (my_button), a movie clip (my_movieclip), and an input text field (my_inputTxt). The following code establishes the tab order so that the button gets focus first, then the movie clip, and finally the input text field.
my_button.tabIndex = 1; my_movieclip.tabEnabled = true; my_movieclip.tabIndex = 2; my_inputTxt.tabIndex = 3;

Note: Most interactive objects must have tabEnabled set to true except for a few exceptions, including buttons and input text fields. See the flash.display.InteractiveObject.tabEnabled() property description for more information.

Handling mouse and key events


In ActionScript 3.0, the event architecture has been rewritten from the ground up. You can use interactive objects (any object that derives from flash.display.InteractiveObject) to add interactivity to your Flash Lite applications.

About mouse events


Event handlers and event listeners specify how the application responds to user- and system-generated occurrences. In addition to using default navigation and responding to related events, a Flash Lite application can listen for and respond to mouse events.

Handling mouse events


Flash Lite supports the following ActionScript mouse events:
Mouse event
CLICK DOUBLE_CLICK MOUSE_DOWN MOUSE_MOVE MOUSE_OUT MOUSE_OVER MOUSE_UP MOUSE_WHEEL ROLL_OUT

Description Defines the value of the type property of a click event object. Defines the value of the type property of a doubleClick event object. Defines the value of the type property of a mouseDown event object. Defines the value of the type property of a mouseMove event object. Defines the value of the type property of a mouseOut event object. Defines the value of the type property of a mouseOver event object. Defines the value of the type property of a mouseUp event object. Defines the value of the type property of a mouseWheel event object. Defines the value of the type property of a rollOut event object. Defines the value of the type property of a rollOver event object.

ROLL_OVER

The following procedure demonstrates how to create a simple application that handles mouse events. For an example of how to create a simple menu using buttons with mouse navigation, see Create a simple menu using buttons with mouse navigation on page 22.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

21

Create a mouse event handler for buttons


1 In Flash, create a new mobile document and save it as custom_mouse_handler.fla. 2 Select Window > Common Libraries > Buttons to open an external library of prebuilt button symbols. 3 In the Library panel, double-click the classic buttons folder to open it, and then open the Circle Buttons folder. 4 Drag an instance of the Menu button symbol to the Stage. 5 In the Properties tab, in the Instance Name text field, type btn_1. 6 Drag another instance of the same button to the Stage and position it directly below the first button. 7 In the Properties tab, in the Instance Name text field, type btn_2. 8 In the Timeline, select Frame 1 in the layer named ActionScript. 9 Open the Actions panel (Window > Actions) and enter the following code:
// Disable the focus rectangle because buttons have an over state. stage.stageFocusRect = false; //Add event listeners for btn_1. btn_1.addEventListener(MouseEvent.MOUSE_DOWN, downhandler1); btn_1.addEventListener(MouseEvent.MOUSE_UP, uphandler1); btn_1.addEventListener(MouseEvent.MOUSE_OVER, overhandler1); btn_1.addEventListener(MouseEvent.MOUSE_OUT, outhandler1); //Add event handlers for btn_1. function downhandler1(e:MouseEvent):void { trace("you pressed Button 1"); } function uphandler1(e:MouseEvent):void { trace("you released Button 1"); } function overhandler1(e:MouseEvent):void { trace("Button 1 has focus"); } function outhandler1(e:MouseEvent):void { trace("Button 1 lost focus"); } //Add event listeners for btn_2. btn_2.addEventListener(MouseEvent.MOUSE_DOWN, downhandler2);

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

22

btn_2.addEventListener(MouseEvent.MOUSE_UP, uphandler2); btn_2.addEventListener(MouseEvent.MOUSE_OVER, overhandler2); btn_2.addEventListener(MouseEvent.MOUSE_OUT, outhandler2); //Add event handlers for btn_2. function downhandler2(e:MouseEvent):void { trace("you pressed Button 2"); } function uphandler2(e:MouseEvent):void { trace("you released Button 2"); } function overhandler2(e:MouseEvent):void { trace("Button 2 has focus"); } function outhandler2(e:MouseEvent):void { trace("Button 2 lost focus"); }

10 Test the application in the emulator (Control > Test Movie > In Device Central).

Watch the messages in the Output panel as you click the buttons on the Stage. Other types of objects support different events. For example, the TextField object includes a change event that is run when the content of a text field changes. You can write event handler code for these events using the same format as the button event handlers in this procedure. For more information, see the TextField and MovieClip classes in Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Create a simple menu using buttons with mouse navigation


To create a simple menu using buttons with mouse navigation, you design the menu and then write event handling code for handling mouse events. To create the menu, you use three button symbols, one for each menu. Then you write event handling code that displays a message when the user rolls over each menu option. That is, when the user gives focus to the corresponding button, and when the user clicks the particular menu option. For more information about handling mouse events in Flash Lite, see Handling mouse events on page 20. Start with a partially completed Flash document. You can change these settings to target a different device and content type (see Using Adobe Device Central CS5).
1 Download and open the file named simple_menu_start.fla located at

www.adobe.com/go/learn_flt_samples_and_tutorials. On the Samples and Tutorials page, locate, download, and decompress the ZIP file for your Flash Lite version. Then navigate to the Samples folder to access the sample.
2 Open the Library panel (Window > Library).

Notice that the Library contains three button symbols named News Button, Weather Button, and Sports Button.
3 In the Timeline (Window > Timeline), select the layer named Menu Buttons. 4 Drag an instance of the News Button symbol from the Library panel to the Stage. 5 In the Properties tab, in the Instance Name text field, type btn_news. 6 Repeat steps 4 and 5 for the Sports and Weather buttons, naming them btn_sports and btn_weather, respectively. 7 Align the three buttons vertically, as shown in the following example: 8 In the Tools panel, select the Text tool and create a text field along the bottom of the Stage.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

23

This text field displays a short message when the user rolls over each menu option.
9 With the new text field still selected, do the following in the Properties tab: a Type txt_status in the Instance Name text field. b Select Dynamic Text from the Text Type pop-up menu. c Select Use Device Fonts from the Font Rendering Method pop-up menu. 10 In the Timeline, select Frame 1 in the layer named ActionScript. 11 Open the Actions panel (Window > Actions) and enter the following code:
//Disable the focus rectangle because buttons have an over state. stage.stageFocusRect = false; //Add event listeners for each button to listen for roll overs and clicks. btn_news.addEventListener(MouseEvent.ROLL_OVER, mouserollhandler); btn_news.addEventListener(MouseEvent.CLICK, mouseclickhandler); btn_sports.addEventListener(MouseEvent.ROLL_OVER, mouserollhandler); btn_sports.addEventListener(MouseEvent.CLICK, mouseclickhandler); btn_weather.addEventListener(MouseEvent.ROLL_OVER, mouserollhandler); btn_weather.addEventListener(MouseEvent.CLICK, mouseclickhandler); //Set the function to respond to roll overs. function mouserollhandler (myEvent:MouseEvent): void { //Check if the current button is the btn_news button. if (myEvent.target == btn_news){ //Set the text field text. txt_status.text = "Press to select News" } //Check if the current button is the btn_sports button. else if (myEvent.target == btn_sports){ txt_status.text = "Press to select Sports" } //Check if the current button is the btn_weather button. else if (myEvent.target == btn_weather){ txt_status.text = "Press to select Weather" } } //Set the function to respond to clicks. function mouseclickhandler (myEvent:MouseEvent): void { //Check if the current button is the btn_news button. if (myEvent.target == btn_news){ txt_status.text = "You pressed News" } //Check if the current button is the btn_sports button. else if (myEvent.target == btn_sports){ txt_status.text = "You pressed Sports" } //Check if the current button is the btn_weather button. else if(myEvent.target == btn_weather){ txt_status.text = "You pressed Weather" } }

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

24

12 Select Control > Test Movie > In Device Central to preview the application in the emulator.

Click each menu option. When you click each item, notice the message that is displayed.

Handling keyboard events


Flash Lite generates keyboard events in response to the user pressing keys on the device. You can write key handler code to respond to these events. For a list of the keys that Flash Lite supports, see Keys supported by Flash Lite on page 14. The following table lists the ActionScript 3.0 keyboard events that Flash Lite supports:
Keyboard event
KEY_DOWN

Description Defines the value of the type property of a keyDown event object. Defines the value of the type property of a keyUp event object.

KEY_UP

Writing an event listener


An easy way to handle keypress events is to add a listener for the keyDown keyboard event that refers to a handler function. The following sample code associates an event handler function to respond when the user presses the right navigation key on the device:
//Add an event listener to the stage for the keyDown event using the equivalent //constant value KEY_DOWN from the KeyboardEvent class. This associates the event //with a "handler" function to respond to the event. stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDownHandler); //Create a handler function to respond to the event. function onKeyDownHandler(event:KeyboardEvent):void { //Because the right navigation key has the key code 39, //check for the keycode value 39, then respond. if(event.keyCode == 39){ trace("You pressed the Right Arrow key"); } }

Handle keyboard events through a key listener


1 In Flash, create a new mobile document and save it as keylistener.fla. 2 Select Layer 1 in the Timeline and rename it as Content. 3 In the Tools panel, select the Oval tool and create an oval or circle on the Stage. Then convert it into a movie clip. 4 With the new movie clip selected, in the Properties tab, type circle in the Instance Name text field. 5 In the Timeline, insert a layer and rename it as ActionScript. In this layer, select the first frame. 6 Open the Actions panel (Window > Actions), and enter the following code:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

25

//Add an event listener to the circle movie clip for the keyDown event using //the equivalent constant value KEY_DOWN from the KeyboardEvent class. //This associates the event with a "handler" function to respond to the event. circle.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDownHandler); circle.focusRect = false; stage.focus = circle; //Create a handler function to respond to the event. function onKeyDownHandler(event:KeyboardEvent):void { //Because the right navigation key has the key code 39, //check for the keycode value 39, then respond. if(event.keyCode == 39){ circle.x++; } //Now respond to the left key. else if(event.keyCode == 37){ circle.x--; } //Now respond to the up key. else if(event.keyCode == 38){ circle.y--; } //Now respond to the down key. else if(event.keyCode == 40){ circle.y++; } }

7 Test the application by selecting Control > Test Movie > In Device Central.

Press the four navigation keys on the emulators keypad (or the corresponding arrow keys on your keyboard) to make the circle move around the Stage.

Multi-touch support
Flash Lite 4 introduces multi-touch support to handle multi-touch events and native gesture events. This means that all supported mobile devices accommodate and respond to multiple touch points. In addition, the incoming touch point data is processed into higher level gestures. To enable this feature, new touch and gesture event APIs have been created for ActionScript 3.0. With this feature, you can interact with devices by touching the screen with one or more fingers. The underlying operating system tracks each touch point. Flash Lite 4 content has been created specifically for multiple-touch capable devices. Touch event APIs are available to expose the touch events to the ActionScript code. Multi-touch support can be categorized into two broad categories. In the first category, the Flash Lite content responds directly to events as the digitizer and the device drivers generate them. For example, you can drag two fingers across the screen in a paint application to draw parallel lines. In the second category, the operating system synthesizes an incoming stream of touch points into higher level gestures. The APIs expose the native operating system gestures to the Flash Lite content through the ActionScript 3.0 APIs. For example, you can reduce the size of a picture by dragging your fingers along the screen in a pinching motion.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Creating interactivity and navigation

26

Touch event handling


ActionScript 3.0 objects respond to touch inputs by listening to a set of touch event types. These objects mirror existing mouse events by listening for over, out, and roll events in addition to basic state events, such as down, move, or up. ActionScript 3.0 objects do not support hover states or a proximity sensor. A touch event and a mouse event have one main difference. Each touch event contains a unique touch point ID that identifies a set of related events. This means that all events generated by a single finger are assigned an ID unique from every other finger. The touch down and touch up events maintain this ID between them. For touch only systems, the operating system assigns a single touch point as primary. It also assigns a parallel stream of OS-level mouse events to map the primary touch point.

Native gesture event handling


The digitizer hardware generates native gestures at the OS level and forwards them to the Flash Lite content in the form of a new event class. The digitizer assigns a gesture phase to every gesture event. These phases are begin, update, and end. When the OS detects a new gesture, it tests the gesture against a stack of objects at the gesture location. If the OS identifies a listener, it sends the initial gesture event and all subsequent events associated with the gesture. The OS ignores the locations of the subsequent events even if they are different from the initial gesture event.

ActionScript 3.0 API


For this feature, ActionScript 3.0 introduces the Multitouch class. This helper class manages the global state of the multi-touch system. For more information about the Multitouch class and its subclasses, properties, and methods, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Last updated 3/22/2011

27

Chapter 5: Working with text and fonts


You can add static and dynamic text fields or input text fields to Adobe Flash Lite 4.

Text
About text in Flash Lite
Flash Lite 4 supports the following text features:

Static, dynamic, and input text fields


At runtime, the contents of a static text field cant change, but the contents of a dynamic or input text field can change. Input text fields allow users to enter text. Flash Lite 4 supports inline text input on most devices. On devices that support complex languages, input text fields use the devices generic text input mechanism.

Embedded and device fonts


Flash Lite 4 can render text fields using font outlines that you embed in the SWF file or using fonts available on the device. For more information, see Font rendering methods in Flash Lite on page 36.

Unicode text encoding


Flash Lite 4 can display text in any language as long as fonts containing the required character glyphs are available. For information on multilanguage authoring in Flash, see Creating Multilanguage Text in Using Flash.

Partial support for HTML formatting and the TextFormat class properties Scrolling text Inline text input
Inline text input support lets the user enter text directly into text fields.

Flash Player 10 text engine support


Flash Lite supports the flash.text.engine for this release. The flash.text.engine provides low-level support sophisticated control of text metrics, formatting, and two-way text. For more information about the flash.text.engine, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Predictive text support


This feature enables functionality such as word completion and candidate lists. Flash Lite 4 supports the top predictive text engines (such as T9, eZiTap/eZiText, and iTap) on any platform. This support is applicable as long as the text engine implementations are similar to the standard APIs provided by the predictive text engine vendors.

XMLSocket support
XML Socket support extends Flash desktop support to Flash Lite 4. It enables you to create continuous, low-latency data connections for applications such as games and chat. Flash Lite 4 does not support all the text features available in the desktop version of Flash Player. Flash Lite 4 has the following limitations:

Advanced anti-aliasing, the enhanced font rendering technology available in Adobe Flash Player 8 and later, is not
supported.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

28

Text formatting is supported, but only the color, face, size, bold, and italic options are available. Also, formatting is
not displayed if the device text font does not include the selected option. For example, a field formatted as italic appears as regular text when the device font does not include an italic version.

Device text cannot be masked, used as a mask, or rendered with transparency. The Render Text As HTML formatting option is partially supported for input and dynamic text fields. Text is
displayed without visible HTML tags. However, formatting is allowed only for the following tags: p, br, sbr, font (with face, color, and size attributes), b, and i.

Flash Lite 4 does not support Cascading Style Sheets (CSS). Flash components, including Label, TextArea, and TextInput, are not supported. The TextField and TextFormat objects are partially supported, and additional limitations apply for Arabic, Hebrew,
and Thai. For more information, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Creating and formatting text


You create and format text in Flash Lite 4 as you would for a Flash desktop application. For more information about working with text in Flash, see the following topics in Using Flash:

Creating text Setting text attributes Editing text Controlling text with ActionScript
For a list of text features that are not supported in Flash Lite, see About text in Flash Lite on page 27.

Text input
Using input text fields
Flash Lite 4 supports inline text input. This feature lets users edit text fields directly in the Flash Lite application, rather than in a separate text input box as in earlier versions. For example, the following figure shows how an inline input text field appears on a Symbian Series 60 device running Flash Lite 4:

A B

A.Input mode indicator B.Text field being edited inline

Flash Lite 4 supports inline text input for Latin and Asian languages. However, this feature does not support complex languages, which include right-to-left languages such as Arabic, Hebrew, Urdu, Farsi, and Yiddish, as well as some Asian languages.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

29

If a device does not support inline text input, you can still edit the contents of input text fields. You can do so using a modal dialog box that appears over the Flash Lite content. For example, the following figure shows an example of a text input dialog box on a Symbian Series 60 device running Flash Lite 4:

A.Text input dialog box B.Text field being edited

In general, content authored for earlier versions of Flash Lite can work without any modification in Flash Lite 4. In place of the modal dialog box, you can simply edit input text fields inline. However, make sure that legacy content is reauthored to use the features that are available only in Flash Lite 4. An example is the ability to run ActionScript and background animations during text input. For more information about the input text dialog box, see About the devices text input dialog box (Flash Lite 4) on page 32.

Using inline text input


Flash Lite 4 supports inline text input, which allows users to enter and edit text directly in an input text field. While entering text in a Flash Lite application, users interact with the devices native input method editor (IME). The Flash Lite player does not process the user input itself. Note: The Flash Lite emulator in Adobe Device Central does not show inline text. Before a text field can accept text input from a user, you must activate it. You can activate an input text field by giving it selection focus. Then, you either press the devices Select key or a soft key for which the application sets the text entry to the focused state. For more information, see Activating input text fields with ActionScript 3.0 on page 31.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

30

The following figure shows the different states of an input text field: not selected, selected (but not activated), and activated:
flash.text.TextField.selectionBeginIndex flash.text.TextField.caretIndex flash.text.TextField.selectionEndIndex flash.display.Stage.focus

Button

unselected

selected

selected and focused

selected

unselected

TextField

text

text

text ex

text

text

onSetFocus flash.text.TextField.setSelection()

onKillFocus

Content published for Flash Lite 2.1 and 3.x If Flash Lite 2.1 and 3.x content runs in the Flash Lite 4 standalone player, it uses the restricted mode for inline text entry. In this mode, no ActionScript is processed and all animation, sound, and stop-video-playing events are ignored. After a text field is deactivated, Flash Lite 4 resumes normal operating mode. Content published for Flash Lite 4 If Flash Lite 4 content runs in the Flash Lite 4 standalone player, then the restricted mode is disabled. Also, ActionScript is processed during inline text input. Similarly, if the player is a browser plug-in, then the restricted mode is not applicable.

Impact of disabling restricted mode


The following table describes how the disabling of the restricted mode impacts different components of Flash Lite.
Flash Lite Components ActionScript Impact ActionScript processing continues when the text field is active and text entry occurs. All registered event notification callbacks continue to be called even when the text field is in focus. These notifications do not wait for the text field to be out of focus. The notifications include, but are not limited to, keyboard and mouse events. Both motion and shape tweens continue regardless of the state of the input text field.

Events

Animations

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

31

Flash Lite Components Video

Impact Video playback continues when the text field is active so that you can enter text while watching the video. In this context, video refers to external, embedded, and remote video. Sound playback continues despite inline text entry. For any streamed media, the playback is not paused if you select a text field. In addition, the content is able to load data to the network.

Audio Network

The onChange event for text fields


In the earlier versions of Flash Lite, the onChange event is sent once for the entire text input session, after the text field is deselected. In Flash Lite 4, onChange events are sent for each committed conversion string and each keypress event. A conversion string is committed if the user confirms the string. Consider the following example. Suppose you are typing on a Symbian Series 60 device running Flash Lite 4 in a print-to-text mode. When you type a few letters of a particular string, the device displays possible words to complete that string. Also, the string is underlined. When you select a string from the options and press Enter, the string then becomes committed. Notice that the committed string is not underlined.

Inline input text fields and navigation


An activated text field contains a pointer that indicates the current insertion point. The user can change the pointers location within the text field using the devices navigation keys. By default, Flash Lite draws a focus rectangle around the text field that has the current focus. This focus rectangle can sometimes obscure an activated text fields flashing pointer or insertion indicator. For this reason, its recommended that you disable the focus rectangle (by setting focusRect to false) and use a custom focus indicator. For an example of an application that uses a custom focus indicator, see the Flash Lite Samples and Tutorials page at www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample.

Activating input text fields with ActionScript 3.0


You can activate an input text field that has keypad focus by pressing the devices Select key. A Flash Lite application can also automatically activate an input text field when it receives focus using the setSelection() method. This method activates the currently selected text field; if there is no selected field when the command is executed, nothing happens. To put focus on a text field and then activate it, you can use the Stage classs focus property along with the TextField classs setSelection() method. The following code snippet describes how to use this property and method.
//TextField will have focus after this call stage.focus = txt; //TextField will be activated after this call txt.setSelection(0,0);

For a completed sample application that uses this technique, see the Inline Text Input sample at www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

32

Input mode indicator


To assist users with common text input tasks, most devices provide several input modes. These modes can be either predictive or manual (triple tap or multi tap) text entry, or all number-only modes. When Flash Lite runs in full screen mode, the device displays a letter A for alpha input mode and a number sign (#) for numeric input mode. In other screen modes, the device draws an input mode indicator on a status bar or some other location on the display. For example, the following image shows the input mode indicator in non-full screen mode on the Series 60 stand-alone version of Flash Lite 4:

A B

A. Input mode indicator, non-full screen mode B. Text field being edited

When the player is running in full-screen mode, the device draws an input mode indicator to a location of its choice on the display. For example, the following figure shows the input mode indicator in full screen mode on the Series 60 stand-alone version of Flash Lite 4:

A. Input mode indicator, full screen mode

The input mode indicator for full screen applications shown in the previous figure is a reference implementation for the stand-alone Series 60 player. The device determines the specific indicator, if any, that appears on the display.

About the devices text input dialog box (Flash Lite 4)


To open the devices input dialog box, you first give focus to an input text field, and then press the devices Select key. The text input dialog box is modal, which means that you cant interact with the content while the dialog box has focus. Flash Lite also pauses the playhead in the application while the dialog box has focus. If you select OK (the Left soft key), the text input dialog box closes, and Flash Lite automatically assigns the text to the input text field. On selecting Cancel (the Right soft key), no text is assigned to the input text field. The Adobe Device Central emulator mimics the features of the text input dialog box when you test your application in the Flash authoring tool. The following image shows the text input dialog box running in the emulator:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

33

Text input dialog box running in the emulator

For an example of using an input text field in an application, see Create a text field sample application on page 34.

Specifying types of input text fields


Flash Lite supports single line, multiline, and password input text fields. You specify an input text fields type by using the Line Type pop-up menu in the Properties tab. The line type specified for an input text field determines the behavior of the devices input text dialog box when a user edits the text field. For example, when a user edits a single-line input text field, the devices input text dialog box shows a single-line input text field. The input text field scrolls horizontally if the user enters more characters than can be displayed.

Input text dialog boxes (Flash Lite 4)


In earlier versions of Flash Lite, you enter text into a separate modal dialog box rather than interacting with the onscreen text field directly. The host application controls this dialog box, and not Flash Lite. During this interaction, the Flash Lite player is effectively paused until the user exits the dialog box. In Flash Lite 4, you can enter text directly into the onscreen text field. The following image shows a devices input text dialog box for a single-line input text field in a Flash Lite 4 application:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

34

When you edit a multiline input text field, the devices input text dialog box expands to display all the text entered, as the following image shows:

When you edit a password input text field, the devices input text dialog box displays each character that is entered. When you click OK, the entire password is masked with asterisks, as the following image shows:

Create a text field sample application


This simple application gets text input from the user, and then formats and displays that text in an HTML-enabled dynamic text field. For a completed sample application (textfield_example.fla) that uses this technique, see www.adobe.com/go/learn_flt_samples_and_tutorials. Locate the ZIP file for your version of ActionScript, and download and decompress the ZIP file. Then navigate to the Samples folder to access the sample.
1 In Flash, create a new mobile document and save it as textfield.fla. 2 Using the Text tool in the Tools panel, create a single-line text field across the top of the Stage. 3 With the text field still selected, in the Properties tab, do the following: a Select Classic Text from the Text Engine pop-up menu. b Select Input Text from the Text Type pop-up menu. c Select Use Device Fonts from the Font Rendering Method pop-up menu. d Enter inputTxt in the Instance Name text field. 4 Create another text field below the first. Make sure that the second text field is much longer than the first one. 5 With the text field still selected, in the Properties tab, do the following: a Select Classic Text from the Text Engine pop-up menu. b Select Dynamic Text from the Text Type pop-up menu. c Select Use Device Fonts from the Font Rendering Method pop-up menu. d Click the Render Text As HTML icon to select it.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

35

e Enter messageTxt in the Instance Name text field. 6 In the Timeline, select Frame 1 on Layer 1. 7 Open the Actions panel (Window > Actions) and enter the following code:
messageTxt.htmlText = ""; inputTxt.addEventListener(TextEvent.TEXT_INPUT, onTextInput); function onTextInput(e:TextEvent){ messageTxt.htmlText += "You Entered <i>" + e.text + "</i>\n"; }

The input text fields TextInput event can be listened to for any input to the text field. In this example, the TextInput event is used to receive the text entered, and display it in the dynamic messageTxt text field.
8 Save your changes and start the application (Control > Test Movie). 9 To use the application, press the emulators Select key to open the text input dialog box and enter some text using

your computers keyboard. Then click OK to close the dialog box. The text that you entered appears in the messageTxt text field in italics.

Flash text engine


You can use the flash.text.engine to create and manage simple text elements, although it was developed for creating text-handling components. The flash.text.engine consists of classes that enable you to create, format, and control text. The following code example shows the use of the flash.text.engine:
import flash.text.engine.*; var str:String="Hello World"; // Fontdescription represents properties necessary to describe a font, for example, // font name. This example uses the embedded Arial font. var fontDescription:FontDescription = new FontDescription(); fontDescription.fontName = "Arial" fontDescription.fontLookup = flash.text.engine.FontLookup.EMBEDDED_CFF; // The Element format provides formatting information such as color, alpha, size, and // so on. In this example, the color of text is green and the text size is 18. var format:ElementFormat=new ElementFormat(fontDescription); format.color = 0x00ff00; format.fontSize = 18; // TextElement represents a formatted string, and is set to the content property // of textBlock to create a block of text. var textElement:TextElement=new TextElement(str,format); // textBlock represents a paragraph. It is a container for text and graphic elements. var textBlock:TextBlock = new TextBlock(); textBlock.content=textElement; // Creates a text line with a maximum of 500 characters. var textLine:TextLine=textBlock.createTextLine(null,500); textLine.y=20; // Adds the text line to the display object for rendering to make the line display on // the screen. addChild(textLine);

For more information about how the classes of the flash.text.engine function, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

36

Font rendering
Font rendering methods in Flash Lite
Flash Lite can render text field fonts in any of the following ways:
Using fonts that are available on the device You can apply a font to a text field that you know is available on the

device. Or you can specify one of the three generic device fonts (_sans, _serif, or _typewriter) that are available in the Font pop-up menu. If you select a generic device font, Flash Lite tries to match the selected generic font to a font on the device at runtime. For example, _sans is mapped to a sans serif font, if available.
Rendering the font as a bitmap Flash Lite renders bitmap text by aligning font outlines to pixel boundaries, which

makes text readable at small point sizes (such as ten points or smaller). This option requires that you include font outlines in the published SWF file for the selected font. (See Embedding font outlines in SWF files on page 37.)
Rendering the font as anti-aliased vectors Flash Lite renders anti-aliased text using vector-based representations of

font outlines, which you embed in the published SWF file. (See Embedding font outlines in SWF files on page 37.) You select a font rendering method for a text field using the Font Rendering Method pop-up menu located in the Properties tab. The Font Rendering Method pop-up menu contains five rendering options; however, only three are available to Flash Lite developers. The other two methods (Anti-Alias for Readability and Custom Anti-Alias) are available only to applications that are targeting Flash Player 8 or later on desktop computers. Below are some guidelines to consider when you choose between anti-aliased, bitmap, and device text:

If youre using embedded fonts with dynamic or input text fields, embed the outlines only for the characters that
you want to display. Reducing the number of outlines helps you to reduce the file size. For example, if youre using an input text field to capture a users age (a number), include only the font outline for number characters (0-9). In this case, consider restricting the character input to numbers.

The Adobe Device Central emulator does not emulate device fonts, unless you have the same fonts installed on the
computer that youre using to develop the content. Therefore, the layout and appearance of your device text field can be different in the emulator than on the device.

Suppose you apply one of the generic device font faces (_sans, _serif, or _typewriter). In this case, Flash Lite tries to
find a similar font on the device to display the text. However, mobile devices typically have fewer fonts and font styles than a desktop computer. As a result, sometimes a font such as _sans does not map to a sans serif font. Make sure that you test the application on each target device to determine the proper font settings. Anti-aliased text in Flash Lite is, essentially, a complex vector shape. Like any vector shape, it takes some processing power to render. Because processing speed on most devices is relatively slow, animating numerous anti-aliased text can degrade application performance. To improve performance, try temporarily lowering the Flash Lite players rendering quality during the animation. Then return it to the higher rendering quality when the animation is complete.

Select a font rendering method for a text field


1 Select a text field on the Stage. 2 In the Properties tab, select one of the following options from the Font Rendering Method pop-up menu:

Select Use Device Fonts to have Flash Lite use a font that is available on the device. No font data is embedded in
the published SWF file.

Select Bitmap Text [No Anti-Alias] to have Flash Lite align font outlines along pixel boundaries, which makes
small text appear crisp and clear. This option requires that Flash embed font outlines in the published SWF file. (See Embedding font outlines in SWF files on page 37.)

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

37

Select Anti-Alias for Animation to have Flash Lite anti-alias the text fields font according to the current
rendering quality setting. This option requires that Flash embed font outlines in the published SWF file.

Flash Lite rendering quality and anti-aliased text


Use the Stage objects quality property to control how Flash Lite renders vector graphics and bitmap graphics. Possible values are "LOW", "MEDIUM", "HIGH", and "BEST". The default value is "HIGH". Flash Lite renders anti-aliased text using vector representations of font outlines. If you want anti-aliased text to appear as smooth as possible, leave the rendering quality set to high. The following figure shows an anti-aliased text field (Arial, 24 point) rendered at high quality:

You can maximize animation performance and frame rate. Consider the following example. During an intensive animation or tween sequence, you can temporarily set the rendering quality to a lower setting. You return it to the previous setting after the animation has completed.

Embedding font outlines in SWF files


To render a text fields font, Flash Lite either uses fonts available on the device or font outlines that are embedded in the published SWF file. By embedding font outlines in the SWF file, you ensure that the text fields font appears the same on all target platforms. However, the file size increases considerably. Flash Lite requires font outlines to render either bitmap (no anti-alias) or anti-aliased text. For static text fields that use the anti-alias or bitmap font rendering methods, Flash automatically embeds the font outlines required to display the text fields contents. Consider the following example. A static text field contains the word Submit. In this case, Flash automatically embeds the font outlines required to display the six characters (S, u, b, m, i, and t). Because the contents of a static text field cant change, the SWF file has to include font outlines only for those characters. You specify characters for which you want the font outlines to embed in the published SWF file. This specification is required for dynamic and input text fields that use the anti-alias or bitmap font rendering methods. The contents of those types of text fields can change during playback; consequently, Flash cant assume the font outlines that are required. You can include font outlines for all characters in the selected font, a range of characters, or specific characters. You use the Character Embedding dialog box to specify which characters you want to embed in the published SWF file.

Embed font outlines for a dynamic or input text field


1 Select the dynamic or input text field on the Stage. 2 In the Properties tab, select Bitmap Text [No Anti-Alias) or Anti-Alias for Animation from the Font Rendering

Method pop-up menu.


3 Click the Embed button to open the Font Embedding dialog box. 4 Select the characters you want to embed from the list. You can also type the characters that you want to embed in

the Also Include These Characters text field.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

38

5 Click OK.

Scrolling text
Creating scrolling text
Flash Lite 4 supports the TextField.scrollV, TextField.scrollH, TextField.maxscrollV, and TextField.maxscrollH properties, which let you create scrolling text fields. The scrollV property specifies the first visible line in a text block; you can get and set its value. For example, the following code scrolls the text field whose variable name is story_text down by five lines:
story_text.scrollV += 5;

The maxscrollV property specifies the first visible line in a text block in which the last line of the text is not visible. This property is read-only. You can compare a text fields maxscrollV property to its scrollV property to determine how far a user has scrolled down within a text field. This information is useful if you create a vertical scroll bar that provides feedback about the users current scroll position relative to the maximum scroll position. The TextField.scrollH and TextField.maxscrollH properties have the same behavior.

Create a scrolling text field and control it with ActionScript


1 In Flash, create a new mobile document. 2 Using the Text tool, drag a text field approximately the size shown in the following image on the Stage:

3 Select Classic Text from the Text Engine pop-up menu in the Properties tab 4 Select Dynamic Text from the Text Type pop-up menu in the Properties tab. 5 Select Use Device Fonts from the Font Rendering Method pop-up menu in the Properties tab. 6 Select Multiline from the Line Type pop-up menu in the Properties tab. 7 Select Text > Scrollable to make the text field scrollable. 8 Type story in the Instance Name text field in the Properties tab.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with text and fonts

39

9 Double-click inside the text field, and enter enough text so that one or more lines of text extend below its lower edge.

10 In the Timeline, select the first frame on Layer 1, and open the Actions panel (Window > Actions). Enter the

following code in the Actions panel:


stage.focus = story; story.addEventListener(KeyboardEvent.KEY_DOWN, onKeyEvent); function onKeyEvent(e:KeyboardEvent): void { if (e.keyCode == 38) { story.scrollV++; } else if (e.keyCode == 40) { story.scrollV--; } }

11 Select Control > Test Movie > In Device Central to test the application.

Use the up and down arrow keys to move the text up or down.

Last updated 3/22/2011

40

Chapter 6: Working with sound


Adobe Flash Lite supports two types of sound: device sound and standard (native) Flash sound. Device sounds are played directly by the device rather than by the Flash Lite player. Native sounds, in contrast, are played directly by the Flash Lite player, just as they are in the desktop version of Adobe Flash Player. Some examples of device sound formats include MIDI or MFi, but supported sound formats vary from device to device.

Device sound
About device sound
Device sounds refers to audio played directly by the device, rather than by the Flash Lite player. Different devices support different sound formats, including MIDI, MFi, or mp3. To incorporate device sounds in your Flash Lite content, you can include them within your published SWF file. You can also load external sound files over the network or from the devices local file system. With some exceptions, you can use the Sound class of ActionScript to control device sounds, as you would control sounds in the desktop version of Flash Player.

Playing external device sounds


In Flash Lite, you can load and play external sound files. To play external device sounds, you use the load() method of the Sound class. As with bundled device sound, the Flash Lite player passes the externally loaded audio to the device to decode and play. The following information about playing external device sounds in Flash Lite is important to remember:

Unlike the desktop application, externally loaded sounds in the Flash Lite player are always treated as event sounds.
As a result, external device sounds do not stream (play as they are being downloaded). The sound data has to download fully before you can play the sound. For the same reason, you call the Sound classs play() method to play the sound once it is fully loaded (see the following code example).

The Flash Lite player does not play externally loaded mp3 files natively. If your application loads an external mp3
file, Flash Lite passes the sound data to the device, as it does with any externally loaded sound file. The device decodes and plays this sound. The following code shows how to load and play an external sound file:
//The following URLRequest assumes that the mp3 file is in the same directory as //the SWF file when published. You can use a full URL for a remote file. var MySound:Sound = new Sound(Areq); MySound.addEventListener(Event.COMPLETE, onSoundLoaded); var Areq:URLRequest = new URLRequest("click.mp3"); MySound.load(Areq); function onSoundLoaded(event:Event):void { var mysound:Sound = event.target as Sound; mysound.play(); }

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with sound

41

Native sound
About native Flash sounds
In addition to supporting device sound, Flash Lite also supports standard, or native, Flash sounds. Essentially, a native sound is a sound in any format that the Flash authoring tool recognizes. Native sound in Flash Lite can play either as event sound or synchronized sound. The general workflow for using native sounds in your Flash Lite applications is the same as that for desktop applications, with the following exceptions:

Flash Lite does not support playing external mp3 files natively. However, if the device can play mp3 audio, you can
load external mp3 files in your application.

Flash Lite does not support the Speech audio compression option.

Using the 8 kHz sampling rate feature


By default, the Flash authoring tool exports native audio at sampling rates of 5, 11, 22, or 44 kHz (kHz). However, many devices dont support playback of audio data at these sampling rates. For example, the Symbian Series 60 devices support only 8 kHz and 16 kHz. Previous versions of the Flash Lite player resampled the audio at runtime to 8 kHz before calling the devices native sound APIs to play the sound. This resampling required additional processing time and memory consumption. In Adobe Flash Professional CS5, you can choose to have the authoring tool resample your applications native audio at 8 kHz during SWF file publishing. You apply this setting to all stream and event sounds in your application. The following procedure explains how to use the Publish Settings dialog box to set this option globally for all event and stream sounds. Note: For stream sounds, Flash always applies the global sound compression options that you specify in the Publish Settings dialog box. The per-sound compression options that you specify in the Sound Properties dialog box apply only to event sounds.

Enable the 8-kHz sampling rate feature for all native sounds
1 In Flash, select File > Publish Settings. 2 In the Publish Settings dialog box, click the Flash tab. 3 To enable the 8-kHz sampling rate for all stream sounds in your application, do the following: a Click Set Stream sound options. b In the Sound Settings dialog box that appears, select mp3 from the Compression pop-up menu.

The 8-kHz sampling feature is available only for MP3-compressed audio.


c Select the Use 8kHz Sample Rate option. d Click OK to close the Publish Settings dialog box. 4 To enable the 8-kHz sampling rate for all event sounds, do the following: a Click Set Event Sound Options. b In the Sound Properties dialog box that appears, select mp3 from the Compression pop-up menu.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with sound

42

Note: The 8-kHz sampling feature is available only for MP3-compressed audio.
c Select the Use 8kHz Sample Rate option. d Click OK. 5 Click OK to close the Publish Settings dialog box.

Last updated 3/22/2011

43

Chapter 7: Working with video


Flash Lite 4 decodes and renders On2 and Sorenson Spark codec video formats. This release of Flash Lite supports video streaming using RTMP, RTMPE, RTMPT, and RTMPTE protocols. The multi bit-rate streaming feature helps switching of video in fluctuating network conditions without any pause in the playing of the video.

Working with FLV files


About FLV file support in Flash Lite 4
Flash Lite 4 supports FLV files using versions of the On2 and Sorenson Spark codecs optimized for mobile devices. Flash Lite 4, not the device, renders the FLV files. If a device supports Flash Lite 4, you can add FLV files to your application. Note: Device manufacturers can choose not to support FLV files if they have already implemented an efficient device video playback mechanism. In this case, use device video in your applications. Check the Device Profiles tab in Adobe Device Central to see whether FLV files are supported on a particular device. You can include FLV files in an application in any of the following ways:

Embed FLV files in the application. Play external FLV files from a local hard drive or web server over HTTP. Play external FLV files from Flash Media Server over RTMP, RTMPE, RTMPT, or RTMPTE.
You can also convert video (such as QuickTime or Windows Media video files) to FLV files. To do so:

Use an encoder (such as Adobe Media Encoder CS5, or Sorenson Squeeze). Use the FLV Export plug-in to export FLV files from supported video-editing applications.
The following video features are not available in Flash Lite 4:

The Camera class or the recording of video. RTMPS and RTMFP connections Alpha channel video The FLVPlayback component. For more information, see About components in Flash Lite on page 1.

Embed FLV files in an application


To embed an FLV file, import it into the library of a document. When you publish the application, the authoring tool embeds the FLV file into the published SWF file. Embedded FLV files are attached to the Timeline. For example, if a Flash document is set to play at 10 frames per second, a 10-second FLV file fills the Timeline from frames 1 100. To control playback of an embedded FLV file, use ActionScript to play, stop, and move the playhead in the Timeline. You can also give the embedded video object an instance name and control it with the properties of the ActionScript Video object.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with video

44

When you embed FLV files, you can synchronize them with other elements in your document. For example, you could add interactive elements on certain frames that link to other documents. Embedding FLV files is recommended if the files are short and dont have an audio track. Embedding FLV files can add significantly to the size of the published SWF file.
1 In Flash, click Flash Lite 4 under Create New. A new file opens. 2 Select File > Import > Import Video.

The Import Video wizard appears.


3 On the Select Video screen, select the option to import a file on your computer and click Browse. 4 Browse to the folder that contains the FLV file and select it.

If you dont see the video file listed (or if you can see it but cant select it), select All Files (*.*) from the Files of Type pop-up menu (Windows), or All Files from the Enable pop-up menu (Macintosh).
5 Click Open. Select the Embed FLV in SWF and Play in Timeline option and click Next. 6 On the Embedding screen, select Embedded video as the symbol type and click Next. 7 On the Finish Video Import screen, click Finish to import the video.

A new video symbol linked to the FLV file appears in the Library panel and on the Stage.
8 Select the video object on Stage and enter an instance name for the Video object in the Properties tab.

You can use the instance name to control the Video object with the properties of the ActionScript Video class.

Play external FLV files in an application


An external FLV file is not embedded in a SWF file. An external FLV file resides on the memory card of a device, on a remote web server, or on Adobe Flash Media Server. You can use ActionScript to play and control external FLV files in Flash Lite 4 at runtime. Playing external FLV files provides several advantages over embedding video in a Flash document. You can use long video clips without slowing down playback because external FLV files require less memory than embedded video files. External FLV files can have different frame rates than the Flash document in which they play. For example, you can set the Flash document frame rate to 30 frames per second (fps) and the video frame rate to 21 fps. This control ensures smooth video playback. This control also allows you to play FLV files at different frame rates without having to alter existing rich media content. You can manipulate Video objects much like you can manipulate MovieClip objects. You can rotate and scale the video. You can set the alpha transparency value. You can composite and blend the video with other rich media content. You can also use the Sound class to control the sound of the video.
1 In the library in Flash, right-click and from the options select New Video to create a video symbol. Make sure that

the video type is Video (ActionScript-Controlled) and click OK.


2 Drag the video symbol to the Stage and enter an instance name in the Properties tab. This example uses the instance

name MyVideo.
3 In the Timeline, select frame 1 and open the Actions panel. 4 Enter the following code:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with video

45

var MyNC:NetConnection = new NetConnection(); MyNC.connect(null); var MyNS:NetStream = new NetStream(MyNC); MyNS.play("http://www.helpexamples.com/flash/video/clouds.flv"); MyVideo.attachNetStream(MyNS); //The clouds.flv video has metadata that Adobe is not using, so create //an error handler to ignore the message generated by the runtime //about the metadata. MyNS.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); function asyncErrorHandler(event:AsyncErrorEvent):void { //Ignore metadata error message. }

Note: To load FLV files from a web server, register the filename extension and MIME type with the web server. The MIME type for FLV files is video/x-flv. Its possible that the MIME type is already registered with the web server. For more information, check the web server documentation.

Controlling FLV files with ActionScript


Use ActionScript to connect to, display, and control external FLV files. Use the NetConnection class to establish a connection. Use the Video class to display the video. Use the NetStream class to control playback. To control FLV files, call the methods of the NetStream class, for example, the NetStream.pause() method. See Adobe ActionScript 3.0 Reference for the Adobe Flash Platform for detailed descriptions of these classes, along with code examples that illustrate their use. In addition, Flash Lite 4 supports all the methods, properties, and events documented in the Adobe ActionScript 3.0 Reference for the Adobe Flash Platform. The only exception is the MovieClipLoader.checkPolicyFile property.

RTMP
The Real Time Messaging Protocol (RTMP) data channel is used to stream video data between a client (Flash Lite player) and the server (Flash Media Server). The Flash Lite player and server communicate this data in the form of ActionScript objects. To serialize and deserialize ActionScript objects while they are sent across the network, use a compact binary format called Action Message Format (AMF). The first version of the format, AMF 0, is used in ActionScript 2.0. ActionScript 3.0 uses the AMF3 format for serializing and deserializing ActionScript objects. AMF 3 sends object traits and strings in addition to object instances. AMF 3 also supports some of the data types introduced in ActionScript 3.0. For details about the AMF 3 format, see the AMF 3 specification. By default, RTMP uses port 1935. The following example uses the MyVideo instance to load a video from Flash Media Server using RTMP:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with video

46

var MyVideo:Video = new Video(); addChild(MyVideo); var nc:NetConnection = new NetConnection(); var ns:NetStream; // Add event listeners for the connection status and errors. nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler) nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); // Provide the video location. nc.connect("rtmp://fmsexamples.adobe.com/vod");

function netStatusHandler(event:NetStatusEvent):void { trace(event.info.code); if(event.info.code == "NetConnection.Connect.Success"){ // Create a NetStream object and pass it the NetConnection object. ns = new NetStream(nc); // Assign the ns.client property to the object that is handling onMetaData. ns.client = this; // Attach the NetStream object to the video object on Stage. MyVideo.attachNetStream(ns); // Play the file "sample.flv". Do not include ".flv" when // playing the file on Flash Media Server. ns.play("sample"); } } function asyncErrorHandler(event:AsyncErrorEvent):void // ignore error } function onMetaData(item:Object):void { // See the metadata in the trace output. var key:String; for (key in item){ trace(key + ": " + item[key]); } } {

Enhancements
A few features related to video have been updated for this release of Flash Lite 4.

RTMPE
If you want to protect the transport of streaming video data from Flash Media Server to Flash Lite player, you can enable encryption. You can encrypt data by using RTMPE. Flash Media Server encrypts all content at runtime, which means that you do not need to encrypt the source file. RTMPE uses the industry standard cryptographic primitives consisting of the Diffie-Hellman key exchange and HMACSHA256. While data is transported, RTMPE generates a pair of RC4 keys. One key encrypts data sent by the server and the other encrypts data sent to the server. RTMPE prevents third-party applications from listening to the data transfer between the client and the server. To encrypt a data stream, you use the following syntax:

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with video

47

nc.connect("rtmpe://localhost/vod/");

If you use the source parameter of the FLVPlayback component, the path is:
rtmpe://localhost/vod/flvFileName

By adding the letter e, you instruct Flash Media Server to add real-time encryption to the data stream. RTMPE encrypts the data while it is transported. You do not require any key to decrypt the data. Only Flash Lite player can terminate RTMPE. If an application uses RTMPE without specifying a port, Flash Player scans the ports in the following order: 1935 (RTMPE), 443 (RTMPE), and 80 (RTMPE). RTMPE is enabled by default. To disable RTMPE, open the fms.ini file located at C:\Program Files\Adobe\Flash Media Server 3\conf, and set the ADAPTOR.RTMPE_ENABLED parameter to off. Restart the server after the change.

RTMPT
Many organizations have firewalls and proxy servers that do not allow direct RTMP socket connections. As a result, many organizations were unable to use Flash Media Server applications. This problem is addressed by sending the RTMP data wrapped in HTTP requests. This method is known as tunneling. In Flash Lite player, you can load tunneling either explicitly or automatically. For this release of Flash Lite, netConnection.connect() is extended to support a new protocol, RTMP Tunneling (RTMPT). RTMPT means RTMP tunneled over HTTP; RTMP data is encapsulated as HTTP data. By default, RTMPT uses port 80. To call RTMPT explicitly, you use the following syntax:
nc.connect("rtmpt://myserver/myapp"); // defaults to port 80

Else, you specify the port:


nc.connect("rtmpt://myserver:port/myapp");

Automatic retries
The Flash Lite player's automatic retry feature is extended to include a special connection scenario. Automatic retries occur only when a connection is specified as RTMP with a default port. Consider the following syntax:
nc.connect("rtmpt://myserver/myapp");

This command tries the following ports in sequence:


nc.connect("rtmp://myserver/myapp"); // Defaults to port 1935. nc.connect("rtmp://myserver:443/myapp"); nc.connect("rtmp://myserver:80/myapp");

RTMPTE
Flash Media Server 3 introduces RTMPTE, which enables you to encrypt RTMPT. The default port is 80. RTMPTE secures your data even when you transfer data from your Flash Media Server to third-party servers through tunneling. For this release of Flash Lite, netConnection.connect() is extended to support a new protocol, RTMP Tunneling Encrypt (RTMPTE). It means that encrypted RTMP data is encapsulated as HTTP data. To encrypt a tunneled data stream, you use the following syntax:
nc.connect("rtmpte://localhost/vod/");

If you use the source parameter of the FLVPlayback component, the path is:
rtmpte://localhost/vod/flvFileName

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with video

48

In the RTMPTE protocol, you instruct Flash Media Server to add real-time encryption to the tunneling data stream. RTMPTE encrypts the data while it is transported. You do not require any key to decrypt the data.

Multi bit-rate streaming


Flash Lite 4 supports dynamic bit-rate switching when streaming from Flash Media Server. As a result, the application can adapt to the dynamic changes in network conditions while streaming recorded content. Publishers of online content face a major issue when trying to stream video that is of higher quality (especially HD video) and longer duration. The issue is that of fluctuating network connections of users. The problem can multiply when any of the following conditions apply to a single connection:

Users who multitask Fluctuating wireless networks Simultaneous users


The result is a moving target for the bandwidth that is available. As a result, users end up rebuffering and waiting for the video to play if the network cant support the necessary bandwidth. Dynamic streaming solves this problem. It detects fluctuating bandwidth and switches among streams of different bit rates to match the content stream to the user's bandwidth. On the other hand, some users start the stream with low available bandwidth, and then free up more bandwidth after the video starts playing. In this scenario, dynamic streaming can offer the ability to up-scale the video quality to a higher level, once again improving the user's experience. Another issue that can hinder playback (especially with large-dimension HD video and full-screen playback), can be the user's hardware performance limitations. If the CPU cannot decode the video stream fast enough, it results in dropped frames. It adversely affects the smoothness of the user's video display. In this case, using a lower-quality video file enables less strain on the CPU to decode in sync and maintain performance. In the past, the alternative was to perform initial or frequent bandwidth detection routines. However, these tests were costly and often didn't provide the accuracy needed due to the normal fluctuations and changes in bandwidth. Now, with the dynamic streaming capabilities and Quality of Service (QoS) information available, bandwidth detection tests have lost much of their value. Dynamic streaming can provide an optimal solution to network fluctuations and CPU overloading. By continually monitoring key QoS metrics on the client, dynamic streaming can effectively identify when to switch up or down to different-quality streams.

Last updated 3/22/2011

49

Chapter 8: Working with device APIs


You can obtain the geographical location and the directional acceleration values of your device with Flash Lite 4. For this purpose, Flash Lite 4 supports two device APIs.

Geolocation
The Geolocation class enables you to register for the location updates from the onboard location sensor of a device. If a device that hosts Flash Lite supports this feature, you can obtain the current geographical location of the device. The geographical location is returned in the form of latitudinal and longitudinal coordinates. When the location changes, you can receive updates about the changes in your device. Using this feature, you can obtain the following information:

Latitude: Specifies the latitude of the devices location. The latitude values have the following range:
-90 <= Lat <= +90 Negative latitude is South and positive latitude is North.

Longitude: Specifies the longitude of the devices location. The longitude values have the following range:
-180 <= Long < +180 Negative longitude is West and positive latitude is East.

Altitude: Specifies the altitude of the devices location. The altitude is measured in meters (m). Horizontal accuracy: Specifies the range of deviation from the exact longitudinal coordinates and returns the value
in meters. For example, 50 m from 5 W.

Vertical accuracy: Specifies the range of deviation from the exact latitudinal coordinates and returns the value in
meters. For example, 10 m from 20 N.

Heading: Specifies the direction of movement with respect to True North, and returns the value in degrees. For
example, 10 means that the device is moving at an angle of 10 from True North.

Speed: Specifies the speed at which the device is moving and returns the value in m/sec. For example, 0.010 m/sec. Time stamp: Specifies the duration of time since the application was started. The value is measured in milliseconds.
Time stamp is dynamic and the value keeps changing based on the change in location that happens for a specified time interval.

Event dispatching
The Geolocation class dispatches events based on any activity detected by the devices location sensor. You can control the time interval for geolocation updates using the setRequestedUpdateInterval() method. The time interval is measured in milliseconds. Note: The update interval is only used as a hint to conserve the battery power. The actual time between location updates can be greater or smaller than this value. If you do not use the setRequestedUpdateInterval() method, then the host device returns updates based on its default interval.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with device APIs

50

Using Geolocation
The following code sample demonstrates the functioning of geolocation. The code first checks if the device supports geolocation. If it does, then an event listener is registered to listen for changes in the location after the application has started. Whenever the listener detects a change, the gpsListener function is called and it returns the different coordinate information. The time interval for acceleration updates is set at 5 seconds. For more information, see Geolocation on page 49.
import flash.sensors.*; if (Geolocation.isSupported) { var gps:Geolocation = new Geolocation(); function gpsListener(evt:GeolocationEvent):void { trace("Latitude: " + evt.latitude.toString()); trace("Longitude: " + evt.longitude.toString()); trace("Altitude: " + evt.altitude.toString()); trace("Horizontal Accuracy: " + evt.horizontalAccuracy.toString()); trace("Vertical Accuracy: " + evt.verticalAccuracy.toString()); trace("Speed: " + evt.speed.toString()); trace("Heading: " + evt.heading.toString()); trace("Timestamp: " + evt.timestamp.toString()); } gps.addEventListener(GeolocationEvent.UPDATE, gpsListener); gps.setRequestedUpdateInterval(5000); gps.removeEventListener(GeolocationEvent.UPDATE, gpsListener); } else { trace("GPS not supported."); }

For details about the Geolocation and GeolocationEvent classes, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Accelerometer
The Accelerometer class enables you to obtain the acceleration data of a device through an accelerometer sensor installed on the device. This data can represent the following:

The device's location in space along a three-dimensional axis The movement of the device along the three-dimensional axis
The three-dimensional axis is made up of the X, Y, and Z axes. When the device moves, the sensor detects this movement and returns the acceleration coordinates of the device. For more information about the orientation of the three-dimensional axes, see Axis orientation on page 51. You can also obtain the time stamp of the acceleration changes. Timestamp specifies the duration of time since the application was started. The value is measured in milliseconds. Timestamp is dynamic and the value keeps changing based on the change in acceleration that happens for a specified time interval.

Event dispatching
The Accelerometer class dispatches events based on any activity detected by the devices motion sensor.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with device APIs

51

You can control the time interval for acceleration updates using the setRequestedUpdateInterval() method. The time interval is measured in milliseconds. Note: The update interval is only used as a hint to conserve the battery power. The actual time between acceleration updates can be greater or lesser than this value. If you do not use the setRequestedUpdateInterval() method, then the host device returns updates based on its default interval.

Axis orientation
The three-dimensional axes are based on the orientation of the content displayed in the device, as displayed in the following images.
+Y -Z

-X

+X

+Z -Y

A. Axis orientation in portrait mode


+Y -Z

-X

+X

+Z -Y

A. Axis orientation in landscape mode

The acceleration along the axes is defined in the following manner:

Acceleration along the X axisThe acceleration value is measured in Gs (9.81 m/sec2). The X axis runs from the
left of the device to its right when the device is parallel to the ground. The acceleration is positive if the device moves toward the right.

Acceleration along the Y axisThe acceleration value is measured in Gs (9.81 m/sec2). The Y axis runs from the
bottom of the device to its top when the device is parallel to the ground. The acceleration is positive if the device moves toward the front.

Acceleration along the Z axisThe acceleration value is measured in Gs (9.81 m/sec2). The Z axis runs
perpendicular to the face of the device when the device is parallel to the ground. The acceleration is positive if you move the device further from the ground.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Working with device APIs

52

Using Accelerometer
The following code sample demonstrates the functioning of the accelerometer. The code first checks if the device supports accelerometer. If it does, then an event listener is registered to listen for changes in the acceleration after the application has started. Whenever the listener detects a change, the accListener function is called and it returns the different acceleration information. The time interval for acceleration updates is set at 5 seconds. For more information, see Accelerometer on page 50.
import flash.sensors.*; if ((Accelerometer.isSupported) { var acc:Accelerometer = new Accelerometer(); function accListener(evt:AccelerometerEvent) { trace("AccelerationX: " + evt.accelerationX.toString()); trace("AccelerationY: " + evt.accelerationY.toString()); trace("AccelerationZ: " + evt.accelerationZ.toString()); trace("Timestamp: "+evt.timestamp.toString()); } acc.addEventListener(AccelerometerEvent.UPDATE, accListener); acc.setRequestedUpdateInterval(5000); acc.removeEventListener(AccelerometerEvent.UPDATE, accListener); } else { trace("Accelerometer not supported."); }

For more information about the Accelerometer and AccelerometerEvent classes, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Last updated 3/22/2011

53

Chapter 9: Introduction to Flash Lite 4 ActionScript


The Adobe Flash Lite 4 software is based on Flash Player 10, but differs from it in the following respects:

Flash Lite supports some features only partially. Flash Lite adds some features specifically for mobile devices.

Supported, partially supported, and unsupported ActionScript classes and language elements
Accelerometer
The following table shows those members of the Accelerometer class that ActionScript 3.0 and Flash Lite 4 support.
Member Name Accelerometer() isSupported : Boolean muted : Boolean setRequestedUpdateInterval(interval:Number):void update ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes No Yes Yes

AccelerometerEvent
The following table shows those members of the AccelerometerEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name accelerationX : Number accelerationY : Number accelerationZ : Number ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

AccelerometerEvent(type:String, bubbles:Boolean = false, Yes cancelable:Boolean = false, timestamp:Number = 0, accelerationX:Number = 0, accelerationY:Number = 0, accelerationZ:Number = 0) timestamp : Number clone():Event toString():String UPDATE : String = accelerometerUpdate Yes Yes Yes Yes

Yes No No Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

54

ActionGenerator
The following table shows those members of the ActionGenerator class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionGenerator() generateAction(a:AutomationAction):void generateActions(actionList:Array):void ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

ActionScriptVersion
The following table shows those members of the ActionScriptVersion class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ACTIONSCRIPT3 : uint = 3 ActionScript 3.0 Yes Flash Lite 4 Yes

ApplicationDomain
The following table shows those members of the ApplicationDomain class that ActionScript 3.0 and Flash Lite 4 support.
Member Name currentDomain : ApplicationDomain domainMemory : ByteArray MIN_DOMAIN_MEMORY_LENGTH : uint parentDomain : ApplicationDomain ApplicationDomain(parentDomain:ApplicationDomain = null) constructApplicationDomainObject(parentDomain:Application Domain = null):* getDefinition(name:String):Object hasDefinition(name:String):Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Yes Yes

Yes Yes

ArgumentError
The following table shows those members of the ArgumentError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ArgumentError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

arguments
The following table shows those members of the arguments class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

55

Member Name callee : Function length : Number

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

Array
The following table shows those members of the Array class that ActionScript 3.0 and Flash Lite 4 support.
Member Name length : uint Array(... values) Array(numElements:int = 0) concat(... args):Array every(callback:Function, thisObject:* = null):Boolean filter(callback:Function, thisObject:* = null):Array forEach(callback:Function, thisObject:* = null):void indexOf(searchElement:*, fromIndex:int = 0):int join(sep:*):String lastIndexOf(searchElement:*, fromIndex:int = 0x7fffffff):int map(callback:Function, thisObject:* = null):Array pop():* push(... args):uint reverse():Array shift():* ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

slice(startIndex:int = 0, endIndex:int = 16777215):Array Yes some(callback:Function, thisObject:* = null):Boolean sort(... args):Array sortOn(fieldName:Object, options:Object = null):Array splice(startIndex:int, deleteCount:uint, ... values):Array toLocaleString():String toString():String unshift(... args):uint CASEINSENSITIVE : uint = 1 DESCENDING : uint = 2 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

56

Member Name NUMERIC : uint = 16 RETURNINDEXEDARRAY : uint = 8 UNIQUESORT : uint = 4

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

AsyncErrorEvent
The following table shows those members of the AsyncErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name AsyncErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", error:Error = null) clone():Event toString():String ASYNC_ERROR : String = "asyncError" ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes Yes

Yes Yes Yes

AutomationAction
The following table shows those members of the AutomationAction class that ActionScript 3.0 and Flash Lite 4 support.
Member Name type : String AutomationAction(type:String) ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

AVM1Movie
For details about the members of the AVM1Movie class that ActionScript 3.0 and Flash Lite 4 support, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Bitmap
The following table shows those members of the Bitmap class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bitmapData : BitmapData pixelSnapping : String smoothing : Boolean Bitmap(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false) constructBitmapObject(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false):void ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Yes

Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

57

BitmapData
The following table shows those members of the BitmapData class that ActionScript 3.0 and Flash Lite 4 support.
Member Name height : int rect : Rectangle transparent : Boolean width : int BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF) applyFilter(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, filter:BitmapFilter):void clone():BitmapData colorTransform(rect:Rectangle, colorTransform:flash.geom:ColorTransform):void compare(otherBitmapData:BitmapData):Object constructBitmapDataObject(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF):void copyChannel(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, sourceChannel:uint, destChannel:uint):void copyPixels(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false):void dispose():void draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:flash.geom:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void fillRect(rect:Rectangle, color:uint):void floodFill(x:int, y:int, color:uint):void generateFilterRect(sourceRect:Rectangle, filter:BitmapFilter):Rectangle getColorBoundsRect(mask:uint, color:uint, findColor:Boolean = true):Rectangle getPixel(x:int, y:int):uint getPixel32(x:int, y:int):uint getPixels(rect:Rectangle):ByteArray getVector(rect:Rectangle):Vector.<uint> histogram(hRect:Rectangle = null):Vector.<Vector.<Number>> ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Yes

No

Yes Yes

Yes Yes

Yes Yes

Yes Yes

Yes

Yes

Yes

Yes

Yes Yes

Yes Yes

Yes Yes Yes

Yes Yes No

Yes

Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

58

Member Name hitTest(firstPoint:Point, firstAlphaThreshold:uint, secondObject:Object, secondBitmapDataPoint:Point = null, secondAlphaThreshold:uint = 1):Boolean lock():void merge(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redMultiplier:uint, greenMultiplier:uint, blueMultiplier:uint, alphaMultiplier:uint):void noise(randomSeed:int, low:uint = 0, high:uint = 255, channelOptions:uint = 7, grayScale:Boolean = false):void paletteMap(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redArray:Array = null, greenArray:Array = null, blueArray:Array = null, alphaArray:Array = null):void perlinNoise(baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean, fractalNoise:Boolean, channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array = null):void pixelDissolve(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, randomSeed:int = 0, numPixels:int = 0, fillColor:uint = 0):int scroll(x:int, y:int):void setPixel(x:int, y:int, color:uint):void setPixel32(x:int, y:int, color:uint):void setPixels(rect:Rectangle, inputByteArray:ByteArray):void setVector(rect:Rectangle, inputVector:Vector.<uint>):void threshold(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false):uint unlock(changeRect:Rectangle = null):void

ActionScript 3.0 Yes

Flash Lite 4 Yes

Yes Yes

No Yes

Yes

No

Yes

Yes

Yes

No

Yes

No

Yes Yes Yes Yes Yes Yes

No Yes Yes Yes Yes No

Yes

No

BitmapDataChannel
The following table shows those members of the BitmapDataChannel class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ALPHA : uint = 8 BLUE : uint = 4 GREEN : uint = 2 RED : uint = 1 ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Boolean
The following table shows those members of the Boolean class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

59

Member Name Boolean(expression:Object = false) toString():String valueOf():Boolean

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

BreakOpportunity
The following table shows those members of the BreakOpportunity class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ALL : String = "all" ANY : String = "any" AUTO : String = "auto" NONE : String = "none" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

ByteArray
The following table shows those members of the ByteArray class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ByteArray() bytesAvailable : uint clear():void compress():void defaultObjectEncoding : uint deflate():void endian : String inflate():void length : uint objectEncoding : uint position : uint readBoolean():Boolean readByte():int readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void readDouble():Number readFloat():Number readInt():int readMultiByte(length:uint, charSet:String):String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes No Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

60

Member Name readObject():* readShort():int readUnsignedByte():uint readUnsignedInt():uint readUnsignedShort():uint readUTF():String readUTFBytes(length:uint):String toString():String uncompress():void writeBoolean(value:Boolean):void writeByte(value:int):void writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void writeDouble(value:Number):void writeFloat(value:Number):void writeInt(value:int):void writeMultiByte(value:String, charSet:String):void writeObject(object:*):void writeShort(value:int):void writeUnsignedInt(value:uint):void writeUTF(value:String):void writeUTFBytes(value:String):void

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Capabilities
The following table shows those members of the Capabilities class that ActionScript 3.0 and Flash Lite 4 support.
Member Name avHardwareDisable : Boolean cpuArchitecture hasAccessibility : Boolean hasAudio : Boolean hasAudioEncoder : Boolean hasEmbeddedVideo : Boolean hasIME : Boolean hasMP3 : Boolean hasPrinting : Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes No Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

61

Member Name hasScreenBroadcast : Boolean hasScreenPlayback : Boolean hasStreamingAudio : Boolean hasStreamingVideo : Boolean hasTLS : Boolean hasVideoEncoder : Boolean isDebugger : Boolean isEmbeddedInAcrobat : Boolean language : String localFileReadDisable : Boolean manufacturer : String maxLevelIDC : String os : String pixelAspectRatio : Number playerType : String screenColor : String screenDPI : Number screenResolutionX : Number screenResolutionY : Number serverString : String supports32BitProcesses : Boolean supports64BitProcesses : Boolean touchscreenType : String version : String

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No Yes

CFFHinting
The following table shows those members of the CFFHinting class that ActionScript 3.0 and Flash Lite 4 support.
Member Name HORIZONTAL_STEM : String = "horizontalStem" NONE : String = "none" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Class
For details about the members of the Class class that ActionScript 3.0 and Flash Lite 4 support, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

62

ColorTransform
The following table shows those members of the ColorTransform class that ActionScript 3.0 and Flash Lite 4 support.
Member Name alphaMultiplier : Number alphaOffset : Number blueMultiplier : Number blueOffset : Number color : uint ColorTransform(redMultiplier:Number = 1.0, greenMultiplier:Number = 1.0, blueMultiplier:Number = 1.0, alphaMultiplier:Number = 1.0, redOffset:Number = 0, greenOffset:Number = 0, blueOffset:Number = 0, alphaOffset:Number = 0) concat(second:flash.geom:ColorTransform):void greenMultiplier : Number greenOffset : Number redMultiplier : Number redOffset : Number toString():String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes

ContentElement
The following table shows those members of the ContentElement class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ContentElement(elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") elementFormat : ElementFormat eventMirror : EventDispatcher GRAPHIC_ELEMENT : uint = 0xFDEF groupElement : GroupElement rawText : String text : String textBlock : flash.text.engine:TextBlock textBlockBeginIndex : int textRotation : String userData : * ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

63

DataEvent
The following table shows those members of the DataEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event data : String DATA : String = "data" DataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:String = "") toString():String UPLOAD_COMPLETE_DATA : String = "uploadCompleteData" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Yes Yes

Yes Yes

Date
The following table shows those members of the Date class that ActionScript 3.0 and Flash Lite 4 support.
Member Name date : Number Date(yearOrTimevalue:Object, month:Number, date:Number = 1, hour:Number = 0, minute:Number = 0, second:Number = 0, millisecond:Number = 0) dateUTC : Number day : Number dayUTC : Number fullYear : Number fullYearUTC : Number getDate():Number getDay():Number getFullYear():Number getHours():Number getMilliseconds():Number getMinutes():Number getMonth():Number getSeconds():Number getTime():Number getTimezoneOffset():Number getUTCDate():Number getUTCDay():Number getUTCFullYear():Number ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

64

Member Name getUTCHours():Number getUTCMilliseconds():Number getUTCMinutes():Number getUTCMonth():Number getUTCSeconds():Number hours : Number hoursUTC : Number milliseconds : Number millisecondsUTC : Number minutes : Number minutesUTC : Number month : Number monthUTC : Number parse(date:String):Number seconds : Number secondsUTC : Number setDate(day:Number):Number setFullYear(year:Number, month:Number, day:Number):Number setHours(hour:Number, minute:Number, second:Number, millisecond:Number):Number setMilliseconds(millisecond:Number):Number setMinutes(minute:Number, second:Number, millisecond:Number):Number setMonth(month:Number, day:Number):Number setSeconds(second:Number, millisecond:Number):Number setTime(millisecond:Number):Number setUTCDate(day:Number):Number setUTCFullYear(year:Number, month:Number, day:Number):Number setUTCHours(hour:Number, minute:Number, second:Number, millisecond:Number):Number setUTCMilliseconds(millisecond:Number):Number setUTCMinutes(minute:Number, [second:Number], [millisecond:Number]) : Number setUTCMinutes(minute:Number, second:Number, millisecond:Number):Number setUTCMonth(month:Number, day:Number):Number

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes

Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

Yes

Yes

Yes Yes

Yes Yes

Yes

Yes

Yes

Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

65

Member Name setUTCSeconds(second:Number, millisecond:Number):Number setYear(year:Number) : Number time : Number timezoneOffset : Number toDateString():String toLocaleDateString():String toLocaleString():String toLocaleTimeString():String toString():String toTimeString():String toUTCString():String UTC(year:Number, month:Number, date:Number = 1, hour:Number = 0, minute:Number = 0, second:Number = 0, millisecond:Number = 0):Number valueOf():Number

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes

Yes

DefinitionError
The following table shows those members of the DefinitionError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DefinitionError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Dictionary
The following table shows those members of the Dictionary class that ActionScript 3.0 and Flash Lite 4 support.
Member Name Dictionary(weakKeys:Boolean = false) ActionScript 3.0 Yes Flash Lite 4 Yes

DigitCase
The following table shows those members of the DigitCase class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DEFAULT : String = "default" LINING : String = "lining" OLD_STYLE : String = "oldStyle" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

DigitWidth
The following table shows those members of the DigitWidth class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

66

Member Name DEFAULT : String = "default" PROPORTIONAL : String = "proportional" TABULAR : String = "tabular"

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

DisplayObject
The following table shows those members of the DisplayObject class that ActionScript 3.0 and Flash Lite 4 support.
Member Name accessibilityProperties : AccessibilityProperties added addedToStage alpha : Number blendMode : String blendShader : Shader cacheAsBitmap : Boolean enterFrame exitFrame filters : Array frameConstructed getBounds(targetCoordinateSpace:DisplayObject):Rectangle getRect(targetCoordinateSpace:DisplayObject):Rectangle globalToLocal(point:Point):Point globalToLocal3D(point:Point):Vector3D height : Number hitTestObject(obj:DisplayObject):Boolean hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean loaderInfo : LoaderInfo local3DToGlobal(point3d:Vector3D):Point localToGlobal(point:Point):Point mask : DisplayObject modified : Boolean mouseX : Number mouseY : Number name : String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 No Yes Yes Yes No No Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

67

Member Name opaqueBackground : Object parent : DisplayObjectContainer removed removedFromStage render root : DisplayObject rotation : Number rotationX : Number rotationY : Number rotationZ : Number scale9Grid : Rectangle scaleX : Number scaleY : Number scaleZ : Number scrollRect : Rectangle stage : Stage transform : flash.geom:Transform visible : Boolean width : Number x : Number y : Number z : Number

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes Yes Yes Yes Yes Yes No

DisplayObjectContainer
The following table shows those members of the DisplayObjectContainer class that ActionScript 3.0 and Flash Lite 4 support.
Member Name addChild(child:DisplayObject):DisplayObject addChildAt(child:DisplayObject, index:int):DisplayObject areInaccessibleObjectsUnderPoint(point:Point):Boolean contains(child:DisplayObject):Boolean getChildAt(index:int):DisplayObject getChildByName(name:String):DisplayObject getChildIndex(child:DisplayObject):int ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

68

Member Name getObjectsUnderPoint(point:Point):Array mouseChildren : Boolean numChildren : int removeChild(child:DisplayObject):DisplayObject removeChildAt(index:int):DisplayObject setChildIndex(child:DisplayObject, index:int):void swapChildren(child1:DisplayObject, child2:DisplayObject):void swapChildrenAt(index1:int, index2:int):void tabChildren : Boolean textSnapshot : flash.text:TextSnapshot

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes No

EastAsianJustifier
The following table shows those members of the EastAsianJustifier class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():flash.text.engine:TextJustifier EastAsianJustifier(locale:String = "ja", lineJustification:String = "allButLast", justificationStyle:String = "pushInKinsoku") justificationStyle : String ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes

Yes

ElementFormat
The following table shows those members of the ElementFormat class that ActionScript 3.0 and Flash Lite 4 support.
Member Name alignmentBaseline : String alpha : Number baselineShift : Number breakOpportunity : String clone():ElementFormat color : uint digitCase : String digitWidth : String dominantBaseline : String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

69

Member Name

ActionScript 3.0

Flash Lite 4 Yes

ElementFormat(fontDescription:FontDescription = null, fontSize:Number = Yes 12.0, color:uint = 0x000000, alpha:Number = 1.0, textRotation:String = "auto", dominantBaseline:String = "roman", alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0.0, kerning:String = "on", trackingRight:Number = 0.0, trackingLeft:Number = 0.0, locale:String = "en", breakOpportunity:String = "auto", digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common", typographicCase:String = "default") fontDescription : FontDescription fontSize : Number getFontMetrics():FontMetrics kerning : String ligatureLevel : String locale : String locked : Boolean textRotation : String trackingLeft : Number trackingRight : Number typographicCase : String Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Endian
The following table shows those members of the Endian class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BIG_ENDIAN : String = "bigEndian" LITTLE_ENDIAN : String = "littleEndian" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

EOFError
The following table shows those members of the EOFError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name EOFError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Error
The following table shows those members of the Error class that ActionScript 3.0 and Flash Lite 4 support.
Member Name Error(message:String = "", id:int = 0) errorID : int getStackTrace():String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

70

Member Name message : String name : String toString():String

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

ErrorEvent
The following table shows those members of the ErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event ERROR : String = "error" ErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") errorID : int toString():String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes

No Yes

EvalError
The following table shows those members of the EvalError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name EvalError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Event
The following table shows those members of the Event class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ACTIVATE : String = "activate" ADDED : String = "added" ADDED_TO_STAGE : String = "addedToStage" bubbles : Boolean CANCEL : String = "cancel" cancelable : Boolean CHANGE : String = "change" CLEAR : String = "clear" clone():Event CLOSE : String = "close" COMPLETE : String = "complete" CONNECT : String = "connect" ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

71

Member Name COPY : String = "copy" currentTarget : Object CUT : String = "cut" DEACTIVATE : String = "deactivate" ENTER_FRAME : String = "enterFrame" Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false) eventPhase : uint EXIT_FRAME : String = "exitFrame" formatToString(className:String, ... arguments):String FRAME_CONSTRUCTED : String = "frameConstructed" FULLSCREEN : String = "fullScreen" ID3 : String = "id3" INIT : String = "init" isDefaultPrevented():Boolean MOUSE_LEAVE : String = "mouseLeave" OPEN : String = "open" PASTE : String = "paste" preventDefault():void REMOVED : String = "removed" REMOVED_FROM_STAGE : String = "removedFromStage" RENDER : String = "render" RESIZE : String = "resize" SCROLL : String = "scroll" SELECT : String = "select" SELECT_ALL : String = "selectAll" SOUND_COMPLETE : String = "soundComplete" stopImmediatePropagation():void stopPropagation():void TAB_CHILDREN_CHANGE : String = "tabChildrenChange" TAB_ENABLED_CHANGE : String = "tabEnabledChange" TAB_INDEX_CHANGE : String = "tabIndexChange" target : Object

ActionScript 3.0 Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

72

Member Name toString():String type : String UNLOAD : String = "unload"

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

EventDispatcher
The following table shows those members of the EventDispatcher class that ActionScript 3.0 and Flash Lite 4 support.
Member Name activate addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void deactivate dispatchEvent(event:Event):Boolean EventDispatcher(target:IEventDispatcher = null) hasEventListener(type:String):Boolean ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes Yes Yes

Yes Yes Yes Yes Yes

removeEventListener(type:String, listener:Function, useCapture:Boolean Yes = false):void willTrigger(type:String):Boolean Yes

Yes

EventPhase
The following table shows those members of the EventPhase class that ActionScript 3.0 and Flash Lite 4 support.
Member Name AT_TARGET : uint = 2 BUBBLING_PHASE : uint = 3 CAPTURING_PHASE : uint = 1 ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Extension
The following table shows those members of the Extension class that ActionScript 3.0 and Flash Lite 4 support.
Member Name callMethod(methodName:String, ... rest):* Extension(extensionName:String, ... rest) ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

ExternalInterface
The following table shows those members of the ExternalInterface class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

73

Member Name addCallback(functionName:String, closure:Function):void available : Boolean call(functionName:String, ... arguments):* marshallExceptions : Boolean = false objectID : String

ActionScript 3.0 Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes

FocusDirection
The following table shows those members of the FocusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BOTTOM : String = "bottom" NONE : String = "none" TOP : String = "top" ActionScript 3.0 Yes Yes Yes Flash Lite 4 No No No

FocusEvent
The following table shows those members of the FocusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event FocusEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, relatedObject:InteractiveObject = null, shiftKey:Boolean = false, keyCode:uint = 0) FOCUS_IN : String = "focusIn" FOCUS_OUT : String = "focusOut" isRelatedObjectInaccessible : Boolean keyCode : uint KEY_FOCUS_CHANGE : String = "keyFocusChange" MOUSE_FOCUS_CHANGE : String = "mouseFocusChange" relatedObject : InteractiveObject shiftKey : Boolean toString():String ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Font
The following table shows those members of the Font class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

74

Member Name enumerateFonts(enumerateDeviceFonts:Boolean = false):Array fontName : String fontStyle : String fontType : String hasGlyphs(str:String):Boolean registerFont(font:Class):void

ActionScript 3.0 Yes Yes Yes Yes Yes Yes

Flash Lite 4 Partial Yes Yes Yes Yes Yes

FontDescription
The following table shows those members of the FontDescription class that ActionScript 3.0 and Flash Lite 4 support.
Member Name cffHinting : String clone():FontDescription FontDescription(fontName:String = "_serif", fontWeight:String = "normal", fontPosture:String = "normal", fontLookup:String = "device", renderingMode:String = "cff", cffHinting:String = "horizontalStem") fontLookup : String fontName : String fontPosture : String fontWeight : String isFontCompatible(fontName:String, fontWeight:String, fontPosture:String):Boolean relatedObject : InteractiveObject locked : Boolean renderingMode : String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes

Yes Yes Yes

FontLookup
The following table shows those members of the FontLookup class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DEVICE : String = "device" EMBEDDED_CFF : String = "embeddedCFF" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

FontMetrics
The following table shows those members of the FontMetrics class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

75

Member Name emBox : Rectangle FontMetrics(emBox:Rectangle, strikethroughOffset:Number, strikethroughThickness:Number, underlineOffset:Number, underlineThickness:Number, subscriptOffset:Number, subscriptScale:Number, superscriptOffset:Number, superscriptScale:Number) strikethroughOffset : Number strikethroughThickness : Number subscriptOffset : Number subscriptScale : Number superscriptOffset : Number superscriptScale : Number underlineOffset : Number underlineThickness : Number

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

FontPosture
The following table shows those members of the FontPosture class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ITALIC : String = "italic" NORMAL : String = "normal" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

FontType
The following table shows those members of the FontType class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DEVICE : String = "device" EMBEDDED : String = "embedded" EMBEDDED_CFF : String = "embeddedCFF" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

FontWeight
The following table shows those members of the FontWeight class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BOLD : String = "bold" NORMAL : String = "normal" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

FrameLabel
The following table shows those members of the FrameLabel class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

76

Member Name frame : int name : String

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

FullScreenEvent
The following table shows those members of the FullScreenEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event fullScreen : Boolean FullScreenEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, fullScreen:Boolean = false) FULL_SCREEN : String = "fullScreen" toString():String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes

Yes Yes

Function
The following table shows those members of the Function class that ActionScript 3.0 and Flash Lite 4 support.
Member Name apply(thisArg:*, argArray:*):* call(thisArg:*, ... args):* ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Geolocation
The following table shows those members of the Geolocation class that ActionScript 3.0 and Flash Lite 4 support.
Member Name Geolocation() muted : Boolean update isSupported : Boolean setRequestedUpdateInterval(time:Number):* status ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes No Yes Yes Yes Yes

GeolocationEvent
The following table shows those members of the GeolocationEvent class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

77

Member Name altitude : Number

ActionScript 3.0 Yes

Flash Lite 4 Yes Yes

GeolocationEvent(type:String, bubbles:Boolean = false, Yes cancelable:Boolean = false, latitude:Number = 0, longitude:Number = 0, altitude:Number = 0, hAccuracy:Number = 0, vAccuracy:Number = 0, speed:Number = 0, heading:Number = 0, timestamp:int = 0) heading : Number horizontalAccuracy : Number latitude : Number longitude : Number speed : Number timestamp : Number verticalAccuracy : Number clone() : Event toString() : String UPDATE : String = "geolocationUpdate" Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes No No Yes

GestureEvent
The following table shows those members of the GestureEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name altKey : Boolean clone():Event commandKey : Boolean controlKey : Boolean ctrlKey : Boolean GestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0, localY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) GESTURE_TWO_FINGER_TAP : String = "gestureTwoFingerTap" localX : Number localY : Number phase : String shiftKey : Boolean stageX : Number stageY : Number toString():String updateAfterEvent():void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 No Yes No No No Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes No Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

78

GesturePhase
The following table shows those members of the GesturePhase class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ALL : String = "all" BEGIN : String = "begin" END : String = "end" UPDATE : String = "update" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 No Yes Yes Yes

GradientType
The following table shows those members of the GradientType class that ActionScript 3.0 and Flash Lite 4 support.
Member Name LINEAR : String = "linear" RADIAL : String = "radial" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

GraphicElement
The following table shows those members of the GraphicElement class that ActionScript 3.0 and Flash Lite 4 support.
Member Name elementHeight : Number elementWidth : Number graphic : DisplayObject GraphicElement(graphic:DisplayObject = null, elementWidth:Number = 15.0, elementHeight:Number = 15.0, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Graphics
The following table shows those members of the Graphics class that ActionScript 3.0 and Flash Lite 4 support.
Member Name beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void beginFill(color:uint, alpha:Number = 1.0):void beginGradientFill(type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0):void beginShaderFill(shader:Shader, matrix:Matrix = null):void clear():void ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes

Yes Yes

Yes Yes

No Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

79

Member Name copyFrom(sourceGraphics:Graphics):void curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void drawCircle(x:Number, y:Number, radius:Number):void drawEllipse(x:Number, y:Number, width:Number, height:Number):void drawGraphicsData(graphicsData:Vector.<IGraphicsData>):void drawPath(commands:Vector.<int>, data:Vector.<Number>, winding:String = "evenOdd"):void drawRect(x:Number, y:Number, width:Number, height:Number):void drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN):void drawTriangles(vertices:Vector.<Number>, indices:Vector.<int> = null, uvtData:Vector.<Number> = null, culling:String = "none"):void endFill():void lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void lineGradientStyle(type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0):void lineShaderStyle(shader:Shader, matrix:Matrix = null):void

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

Yes Yes

No No

Yes

Yes

Yes

Yes

Yes

No

Yes Yes

Yes No

Yes

No

Yes

No Partial

lineStyle(thickness:Number = NaN, color:uint = 0, alpha:Number = Yes 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3):void lineTo(x:Number, y:Number):void moveTo(x:Number, y:Number):void Yes Yes

Yes Yes

GroupElement
The following table shows those members of the GroupElement class that ActionScript 3.0 and Flash Lite 4 support.
Member Name elementCount : int getElementAt(index:int):ContentElement getElementAtCharIndex(charIndex:int):ContentElement getElementIndex(element:ContentElement):int GroupElement(elements:Vector.<ContentElement> = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

80

Member Name groupElements(beginIndex:int, endIndex:int):GroupElement mergeTextElements(beginIndex:int, endIndex:int):flash.text.engine:TextElement

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

replaceElements(beginIndex:int, endIndex:int, Yes newElements:Vector.<ContentElement>):Vector.<ContentElement> setElements(value:Vector.<ContentElement>):void splitTextElement(elementIndex:int, splitIndex:int):flash.text.engine:TextElement ungroupElements(groupIndex:int):void Yes Yes

Yes

Yes Yes

Yes

Yes

HTTPStatusEvent
The following table shows those members of the HTTPStatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event HTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0) HTTP_STATUS : String = "httpStatus" status : int toString():String ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes Yes

Yes Yes Yes

IBitmapDrawable
For details about the IBitmapDrawable interface that ActionScript 3.0 and Flash Lite 4 support, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

ID3Info
The following table shows those members of the ID3Info class that ActionScript 3.0 and Flash Lite 4 support.
Member Name album : String artist : String comment : String genre : String songName : String track : String year : String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

81

IDataInput
The following table shows those members of the IDataInput interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name bytesAvailable : uint endian : String objectEncoding : uint readBoolean():Boolean readByte():int readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void readDouble():Number readFloat():Number readInt():int readMultiByte(length:uint, charSet:String):String readObject():* readShort():int readUnsignedByte():uint readUnsignedInt():uint readUnsignedShort():uint readUTF():String readUTFBytes(length:uint):String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Ye Yes

IDataOutput
The following table shows those members of the IDataOutput interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name endian : String objectEncoding : uint writeBoolean(value:Boolean):void writeByte(value:int):void writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void writeDouble(value:Number):void writeFloat(value:Number):void writeInt(value:int):void writeMultiByte(value:String, charSet:String):void writeObject(object:*):void writeShort(value:int):void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

82

Member Name writeUnsignedInt(value:uint):void writeUTF(value:String):void writeUTFBytes(value:String):void

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

IDynamicPropertyOutput
The following table shows those members of the IDynamicPropertyOutput interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name writeDynamicProperty(name:String, value:*):void ActionScript 3.0 Yes Flash Lite 4 Yes

IDynamicPropertyWriter
The following table shows those members of the IDynamicPropertyWriter interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name writeDynamicProperties(obj:Object, output:IDynamicPropertyOutput):voi d ActionScript 3.0 Yes Flash Lite 4 Yes

IEventDispatcher
The following table shows those members of the IEventDispatcher interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void dispatchEvent(event:Event):Boolean hasEventListener(type:String):Boolean removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void willTrigger(type:String):Boolean ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes Yes

Yes Yes Yes

Yes

Yes

IExternalizable
The following table shows those members of the IExternalizable interface that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

83

Member Name readExternal(input:IDataInput):void

ActionScript 3.0 Yes

Flash Lite 4 Yes Yes

writeExternal(output:IDataOutput):vo Yes id

IllegalOperationError
The following table shows those members of the IllegalOperationError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name IllegalOperationError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

IMEEvent
The following table shows those members of the IMEEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event imeClient : IIMEClient IMEEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") IME_COMPOSITION : String = "imeComposition" IME_START_COMPOSITION : String = "imeStartComposition" toString():String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes No Yes

Yes Yes

Yes No

Yes

Yes

int
The following table shows those members of the int class that ActionScript 3.0 and Flash Lite 4 support.
Member Name int(num:Object) MAX_VALUE : int = 2147483648 MIN_VALUE : int = -2147483648 toExponential(fractionDigits:uint):String toFixed(fractionDigits:uint):String toPrecision(precision:uint):String toString(radix:uint):String valueOf():int ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

84

InteractiveObject
The following table shows those members of the InteractiveObject class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clear click contextMenu : ContextMenu copy cut doubleClick doubleClickEnabled : Boolean focusIn focusOut focusRect : Object InteractiveObject() keyDown keyFocusChange keyUp mouseDown mouseEnabled : Boolean mouseFocusChange mouseMove mouseOut mouseOver mouseUp mouseWheel paste rollOut rollOver selectAll tabChildrenChange tabEnabled : Boolean tabEnabledChange tabIndex : int tabIndexChange ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes Yes No No No No No No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

85

InvalidSWFError
The following table shows those members of the InvalidSWFError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name InvalidSWFError(message:String = "", id:int = 0) ActionScript 3.0 Yes Flash Lite 4 Yes

IOError
The following table shows those members of the IOError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name IOError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

IOErrorEvent
The following table shows those members of the IOErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") IO_ERROR : String = "ioError" toString():String ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

JPEGLoaderContext
The following table shows those members of the JPEGLoaderContext class that ActionScript 3.0 and Flash Lite 4 support.
Member Name deblockingFilter : Number = 0.0 JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

JustificationStyle
The following table shows those members of the JustificationStyle class that ActionScript 3.0 and Flash Lite 4 support.
Member Name PRIORITIZE_LEAST_ADJUSTMENT : String = "prioritizeLeastAdjustment" PUSH_IN_KINSOKU : String = "pushInKinsoku" PUSH_OUT_ONLY : String = "pushOutOnly" ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes

Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

86

Kerning
The following table shows those members of the Kerning class that ActionScript 3.0 and Flash Lite 4 support.
Member Name AUTO : String = "auto" OFF : String = "off" ON : String = "on" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Keyboard
The following table shows those members of the Keyboard class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BACKSPACE : uint = 8 capsLock : Boolean CAPS_LOCK : uint = 20 CONTROL : uint = 17 DELETE : uint = 46 DOWN : uint = 40 END : uint = 35 ENTER : uint = 13 ESCAPE : uint = 27 F1 : uint = 112 F10 : uint = 121 F11 : uint = 122 F12 : uint = 123 F13 : uint = 124 F14 : uint = 125 F15 : uint = 126 F2 : uint = 113 F3 : uint = 114 F4 : uint = 115 F5 : uint = 116 F6 : uint = 117 F7 : uint = 118 F8 : uint = 119 F9 : uint = 120 hasVirtualKeyboard : Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

87

Member Name HOME : uint = 36 INSERT : uint = 45 isAccessible():Boolean LEFT : uint = 37 numLock : Boolean NUMPAD_0 : uint = 96 NUMPAD_1 : uint = 97 NUMPAD_2 : uint = 98 NUMPAD_3 : uint = 99 NUMPAD_4 : uint = 100 NUMPAD_5 : uint = 101 NUMPAD_6 : uint = 102 NUMPAD_7 : uint = 103 NUMPAD_8 : uint = 104 NUMPAD_9 : uint = 105 NUMPAD_ADD : uint = 107 NUMPAD_DECIMAL : uint = 110 NUMPAD_DIVIDE : uint = 111 NUMPAD_ENTER : uint = 108 NUMPAD_MULTIPLY : uint = 106 NUMPAD_SUBTRACT : uint = 109 PAGE_DOWN : uint = 34 PAGE_UP : uint = 33 physicalKeyboardType : String RIGHT : uint = 39 SHIFT : uint = 16 SPACE : uint = 32 TAB : uint = 9 UP : uint = 38

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes

KeyboardAutomationAction
The following table shows those members of the KeyboardAutomationAction class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

88

Member Name KeyboardAutomationAction(type:String, keyCode:uint = 0) IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") IO_ERROR : String = "ioError" toString():String

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

KeyboardEvent
The following table shows those members of the KeyboardEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name altKey : Boolean charCode : uint clone():Event ctrlKey : Boolean KeyboardEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, charCode:uint = 0, keyCode:uint = 0, keyLocation:uint = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) keyCode : uint KEY_DOWN : String = "keyDown" keyLocation : uint KEY_UP : String = "keyUp" shiftKey : Boolean toString():String updateAfterEvent():void ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 No Yes Yes No Yes

Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes No Yes No

LigatureLevel
The following table shows those members of the LigatureLevel class that ActionScript 3.0 and Flash Lite 4 support.
Member Name COMMON : String = "common" EXOTIC : String = "exotic" MINIMUM : String = "minimum" NONE : String = "none" UNCOMMON : String = "uncommon" ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

LineJustification
The following table shows those members of the LineJustification class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

89

Member Name ALL_BUT_LAST : String = "allButLast" ALL_INCLUDING_LAST : String = "allIncludingLast" UNJUSTIFIED : String = "unjustified"

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

Loader
The following table shows those members of the Loader class that ActionScript 3.0 and Flash Lite 4 support.
Member Name close():void content : DisplayObject contentLoaderInfo : LoaderInfo load(request:URLRequest, context:LoaderContext = null):void loadBytes(bytes:ByteArray, context:LoaderContext = null):void Loader() uncaughtErrorEvents : UncaughtErrorEvents unload():void unloadAndStop(gc:Boolean = true):void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes No Yes Yes

LoaderContext
The following table shows those members of the LoaderContext class that ActionScript 3.0 and Flash Lite 4 support.
Member Name applicationDomain : ApplicationDomain = null checkPolicyFile : Boolean = false LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) securityDomain : SecurityDomain = null ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes

Yes

LoaderInfo
The following table shows those members of the LoaderInfo class that ActionScript 3.0 and Flash Lite 4 support.
Member Name actionScriptVersion : uint applicationDomain : ApplicationDomain bytes : ByteArray bytesLoaded : uint ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

90

Member Name bytesTotal : uint childAllowsParent : Boolean complete content : DisplayObject contentType : String frameRate : Number getLoaderInfoByDefinition(object:Object):LoaderInfo height : int httpStatus init ioError loader : Loader loaderURL : String open parameters : Object parentAllowsChild : Boolean progress sameDomain : Boolean sharedEvents : EventDispatcher swfVersion : uint uncaughtErrorEvents : UncaughtErrorEvents unload url : String width : int

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes

LocalConnection
The following table shows those members of the LocalConnection class that ActionScript 3.0 and Flash Lite 4 support.
Member Name allowDomain(... domains):void allowInsecureDomain(... domains):void asyncError client : Object close():void connect(connectionName:String):void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

91

Member Name domain : String isPerUser : Boolean isSupported : Boolean LocalConnection() securityError send(connectionName:String, methodName:String, ... arguments):void status

ActionScript 3.0 Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes No No Yes Yes Yes

Yes

Yes

Math
The following table shows those members of the Math class that ActionScript 3.0 and Flash Lite 4 support.
Member Name abs(val:Number):Number acos(val:Number):Number asin(val:Number):Number atan(val:Number):Number atan2(y:Number, x:Number):Number ceil(val:Number):Number cos(angleRadians:Number):Number E : Number = 2.71828182845905 exp(val:Number):Number floor(val:Number):Number LN10 : Number = 2.302585092994046 LN2 : Number = 0.6931471805599453 log(val:Number):Number LOG10E : Number = 0.4342944819032518 LOG2E : Number = 1.442695040888963387 max(val1:Number, val2:Number, ... rest):Number min(val1:Number, val2:Number, ... rest):Number PI : Number = 3.141592653589793 pow(base:Number, pow:Number):Number random():Number round(val:Number):Number sin(angleRadians:Number):Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

92

Member Name sqrt(val:Number):Number SQRT1_2 : Number = 0.7071067811865476 SQRT2 : Number = 1.4142135623730951 tan(angleRadians:Number):Number

ActionScript 3.0 Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes

Matrix
The following table shows those members of the Matrix class that ActionScript 3.0 and Flash Lite 4 support.
Member Name a : Number b : Number c : Number clone():Matrix concat(m:Matrix):void createBox(scaleX:Number, scaleY:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void createGradientBox(width:Number, height:Number, [rotation:Number], [tx:Number], [ty:Number]) : Void d : Number deltaTransformPoint(point:Point):Point identity():void invert():void Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0) rotate(angle:Number):void scale(sx:Number, sy:Number):void toString():String transformPoint(point:Point):Point translate(dx:Number, dy:Number):void tx : Number ty : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Yes

Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

MemoryError
The following table shows those members of the MemoryError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name MemoryError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

93

MorphShape
For details about the MorphShape class that ActionScript 3.0 and Flash Lite 4 support, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

MouseAutomationAction
The following table shows those members of the MouseAutomationAction class that ActionScript 3.0 and Flash Lite 4 support.
Member Name delta : int MIDDLE_MOUSE_DOWN : String = "middleMouseDown" MIDDLE_MOUSE_UP : String = "middleMouseUp" MouseAutomationAction(type:String, stageX:Number = 0, stageY:Number = 0, delta:int = 0) MOUSE_DOWN : String = "mouseDown" MOUSE_MOVE : String = "mouseMove" MOUSE_UP : String = "mouseUp" MOUSE_WHEEL : String = "mouseWheel" RIGHT_MOUSE_DOWN : String = "rightMouseDown" RIGHT_MOUSE_UP : String = "rightMouseUp" stageX : Number stageY : Number ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes

MouseEvent
The following table shows those members of the MouseEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name altKey : Boolean buttonDown : Boolean CLICK : String = "click" clone():Event ctrlKey : Boolean delta : int DOUBLE_CLICK : String = "doubleClick" isRelatedObjectInaccessible : Boolean localX : Number localY : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

94

Member Name

ActionScript 3.0

Flash Lite 4 Yes

MouseEvent(type:String, bubbles:Boolean = true, cancelable:Boolean Yes = false, localX:Number = NaN, localY:Number = NaN, relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, buttonDown:Boolean = false, delta:int = 0) MOUSE_DOWN : String = "mouseDown" MOUSE_MOVE : String = "mouseMove" MOUSE_OUT : String = "mouseOut" MOUSE_OVER : String = "mouseOver" MOUSE_UP : String = "mouseUp" MOUSE_WHEEL : String = "mouseWheel" relatedObject : InteractiveObject ROLL_OUT : String = "rollOut" ROLL_OVER : String = "rollOver" shiftKey : Boolean stageX : Number stageY : Number toString():String updateAfterEvent():void Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes No

MovieClip
The following table shows those members of the MovieClip class that ActionScript 3.0 and Flash Lite 4 support.
Member Name currentFrame : int currentFrameLabel : String currentLabel : String currentLabels : Array currentScene : Scene enabled : Boolean framesLoaded : int gotoAndPlay(frame:Object, scene:String = null):void gotoAndStop(frame:Object, scene:String = null):void MovieClip() nextFrame():void nextScene():void play():void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

95

Member Name prevFrame():void prevScene():void scenes : Array stop():void totalFrames : int trackAsMenu : Boolean

ActionScript 3.0 Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes No

Multitouch
The following table shows those members of the Multitouch class that ActionScript 3.0 and Flash Lite 4 support.
Member Name inputMode : String maxTouchPoints : int supportedGestures : Vector.<String> supportsGestureEvents : Boolean supportsTouchEvents : Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

MultitouchInputMode
The following table shows those members of the MultitouchInputMode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name GESTURE : String = gesture NONE : String = none TOUCH_POINT : String = touchPoint ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Namespace
The following table shows those members of the Namespace class that ActionScript 3.0 and Flash Lite 4 support.
Member Name Namespace(prefixValue:*, uriValue:*) Namespace(uriValue:*) prefix : String toString():String uri : String valueOf():String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

96

NetConnection
The following table shows those members of the NetConnection class that ActionScript 3.0 and Flash Lite 4 support.
Member Name asyncError addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void call(command:String, responder:Responder, ... arguments):void client : Object close():void connect(command:String, ... arguments):void connected : Boolean connectedProxyType : String defaultObjectEncoding : uint farID : String farNonce : String ioError maxPeerConnections : uint nearID : String nearNonce : String NetConnection() netStatus objectEncoding : uint protocol : String proxyType : String securityError unconnectedPeerStreams : Array uri : String usingTLS : Boolean ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes No No Yes No No No Yes Yes Yes No Yes Yes No Yes Yes

NetGroup
The following table shows those members of the NetGroup class that ActionScript 3.0 and Flash Lite 4 support.
Member Name estimatedMemberCount : Number info : NetGroupInfo localCoverageFrom : String ActionScript 3.0 Yes Yes Yes Flash Lite 4 No No No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

97

Member Name localCoverageTo : String neighborCount : Number receiveMode : String replicationStrategy : String NetGroup(connection:NetConnection, groupspec:String) addHaveObjects(startIndex:Number, endIndex:Number):void addMemberHint(peerID:String):Boolean addNeighbor(peerID:String):Boolean addWantObjects(startIndex:Number, endIndex:Number):void close():void convertPeerIDToGroupAddress(peerID:String):String denyRequestedObject(requestID:int):void post(message:Object):String removeHaveObjects(startIndex:Number, endIndex:Number):void removeWantObjects(startIndex:Number, endIndex:Number):void sendToAllNeighbors(message:Object):String sendToNearest(message:Object, groupAddress:String):String sendToNeighbor(message:Object, sendMode:String):String writeRequestedObject(requestID:int, object:Object):void

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 No No No No No No No No No No No No No No No No No No No

NetGroupInfo
The following table shows those members of the NetGroupInfo class that ActionScript 3.0 and Flash Lite 4 support.
Member Name objectReplicationReceiveBytesPerSecond : Number objectReplicationSendBytesPerSecond : Number postingReceiveControlBytesPerSecond : Number postingReceiveDataBytesPerSecond : Number postingSendControlBytesPerSecond : Number postingSendDataBytesPerSecond : Number routingReceiveBytesPerSecond : Number routingSendBytesPerSecond : Number toString():String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 No No No No No No No No No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

98

NetGroupReceiveMode
The following table shows those members of the NetGroupReceiveMode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name EXACT : String = "exact" NEAREST : String = "nearest" ActionScript 3.0 Yes Yes Flash Lite 4 No No

NetGroupReplicationStrategy
The following table shows those members of the NetGroupReplicationStrategy class that ActionScript 3.0 and Flash Lite 4 support.
Member Name LOWEST_FIRST : String = "lowestFirst" RAREST_FIRST : String = "rarestFirst" ActionScript 3.0 Yes Yes Flash Lite 4 No No

NetGroupSendMode
The following table shows those members of the NetGroupSendMode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name NEXT_DECREASING : String = "nextDecreasing" NEXT_INCREASING : String = "nextIncreasing" ActionScript 3.0 Yes Yes Flash Lite 4 No No

NetGroupSendResult
The following table shows those members of the NetGroupSendResult class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ERROR : String = "error" NO_ROUTE : String = "no route" SENT : String = "sent" ActionScript 3.0 Yes Yes Yes Flash Lite 4 No No No

NetStatusEvent
The following table shows those members of the NetStatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event info : Object ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

99

Member Name NetStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, info:Object = null) NET_STATUS : String = "netStatus" toString():String

ActionScript 3.0 Yes

Flash Lite 4 Yes

Yes Yes

Yes Yes

NetStream
The following table shows those members of the NetStream class that ActionScript 3.0 and Flash Lite 4 support.
Member Name asyncError attach(connection:NetConnection) : void attachAudio attachCamera audioReliable : Boolean audioSampleAccess : Boolean backBufferLength : Number backBufferTime : Number bufferLength : Number bufferTime : Number bufferTimeMax : Number bytesLoaded : uint bytesTotal : uint checkPolicyFile : Boolean client : Object close() : Void CONNECT_TO_FMS : String = "connectToFMS" currentFps : Number dataReliable : Boolean DIRECT_CONNECTIONS : String = "directConnections" farID : String farNonce : String inBufferSeek : Boolean info : NetStreamInfo ioError liveDelay : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes No No No No No No No Yes Yes No Yes Yes No Yes Yes Yes Yes No Yes No No No Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

100

Member Name maxPauseBufferTime : Number multicastAvailabilitySendToAll : Boolean multicastAvailabilityUpdatePeriod : Number multicastFetchPeriod : Number multicastInfo : NetStreamMulticastInfo multicastPushNeighborLimit : Number multicastRelayMarginDuration : Number multicastWindowDuration : Number nearNonce : String netStatus objectEncoding : uint onPeerConnect(subscriber:NetStream):Boolean onCuePoint onImageData onMetaData onPlayStatus onPlayStatus onXMPData pause():void play(... arguments):void peerStreams : Array play2(param:NetStreamPlayOptions):void publish(name:String = null, type:String = null):void receiveAudio(flag:Boolean):void receiveVideo(flag:Boolean):void receiveVideoFPS(FPS:Number):void resume():void seek(offset:Number):void send(handlerName:String, ... arguments):void soundTransform : flash.media:SoundTransform step(frames:int):void time : Number

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes No No No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes No Yes Yes Yes Yes Yes No No No Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

101

Member Name togglePause():void videoReliable : Boolean videoSampleAccess : Boolean

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes No No

NetStreamInfo
The following table shows those members of the NetStreamInfo class that ActionScript 3.0 and Flash Lite 4 support.
Member Name audioBufferByteLength : Number audioBufferLength : Number audioByteCount : Number audioBytesPerSecond : Number audioLossRate : Number byteCount : Number currentBytesPerSecond : Number dataBufferByteLength : Number dataBufferLength : Number dataByteCount : Number dataBytesPerSecond : Number" droppedFrames : Number NetStreamInfo(curBPS:Number, byteCount:Number, maxBPS:Number, audioBPS:Number, audioByteCount:Number, videoBPS:Number, videoByteCount:Number, dataBPS:Number, dataByteCount:Number, playbackBPS:Number, droppedFrames:Number, audioBufferByteLength:Number, videoBufferByteLength:Number, dataBufferByteLength:Number, audioBufferLength:Number, videoBufferLength:Number, dataBufferLength:Number, srtt:Number, audioLossRate:Number) maxBytesPerSecond : Number playbackBytesPerSecond : Number toString():String SRTT : Number videoBufferByteLength : Number videoBufferLength : Number videoByteCount : Number videoBytesPerSecond : Number videoLossRate : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

102

NetStreamPlayOptions
The following table shows those members of the NetStreamPlayOptions class that ActionScript 3.0 and Flash Lite 4 support.
Member Name len : Number NetStreamPlayOptions() oldStreamName : String start : Number streamName : String transition : String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

NetStreamPlayTransitions
The following table shows those members of the NetStreamPlayTransitions class that ActionScript 3.0 and Flash Lite 4 support.
Member Name APPEND : * = append RESET : * = reset STOP : * = stop SWAP : * = swap SWITCH : * = switch ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Number
The following table shows those members of the Number class that ActionScript 3.0 and Flash Lite 4 support.
Member Name MAX_VALUE : Number MIN_VALUE : Number NaN : Number NEGATIVE_INFINITY : Number Number(num:Object) POSITIVE_INFINITY : Number toExponential(fractionDigits:uint):String toFixed(fractionDigits:uint):String toPrecision(precision:uint):String toString(radix:Number) : String valueOf() : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

103

Object
The following table shows those members of the Object class that ActionScript 3.0 and Flash Lite 4 support.
Member Name constructor : Object hasOwnProperty(name:String):Boolean isPrototypeOf(theClass:Object):Boolean Object() propertyIsEnumerable(name:String):Boolean prototype : Object prototype:Object ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes

setPropertyIsEnumerable(name:String, isEnum:Boolean = Yes true):void toLocaleString():String toString():String valueOf():Object Yes Yes Yes

Yes Yes Yes

ObjectEncoding
The following table shows those members of the ObjectEncoding class that ActionScript 3.0 and Flash Lite 4 support.
Member Name AMF0 : uint = 0 AMF3 : uint = 3 DEFAULT : uint = 3 dynamicPropertyWriter : IDynamicPropertyWriter ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

PixelSnapping
The following table shows those members of the PixelSnapping class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ALWAYS : String = "always" AUTO : String = "auto" NEVER : String = "never" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Point
The following table shows those members of the Point class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

104

Member Name add(v:Point) : Point clone() : Point distance(pt1:Point, pt2:Point):Number equals(toCompare:Point):Boolean interpolate(pt1:Point, pt2:Point, f:Number):Point length : Number normalize(thickness:Number):void offset(dx:Number, dy:Number):void Point(x:Number = 0, y:Number = 0) polar(len:Number, angle:Number):Point subtract(v:Point):Point toString():String x : Number y : Number

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

PressAndTapGestureEvent
The following table shows those members of the PressAndTapGestureEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event GESTURE_PRESS_AND_TAP : String = "gesturePressAndTap" PressAndTapGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0, localY:Number = 0, tapLocalX:Number = 0, tapLocalY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) tapLocalX : Number tapLocalY : Number tapStageX : Number tapStageY : Number toString():String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

ProgressEvent
The following table shows those members of the ProgressEvent class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

105

Member Name bytesLoaded : uint bytesTotal : uint clone():Event PROGRESS : String = "progress" ProgressEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bytesLoaded:uint = 0, bytesTotal:uint = 0) SOCKET_DATA : String = "socketData" toString():String

ActionScript 3.0 Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes

Yes Yes

Yes Yes

Proxy
The following table shows those members of the Proxy class that ActionScript 3.0 and Flash Lite 4 support. Note: The members listed in the following table are all protected methods.
Member Name callProperty(name:*, ... rest):* deleteProperty(name:*):Boolean getDescendants(name:*):* getProperty(name:*):* hasProperty(name:*):Boolean isAttribute(name:*):Boolean nextName(index:int):String nextNameIndex(index:int):int nextValue(index:int):* setProperty(name:*, value:*):void valueOf():Object ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

QName
The following table shows those members of the QName class that ActionScript 3.0 and Flash Lite 4 support.
Member Name localName : String QName(qname:QName) QName(uri:Namespace, localName:QName) toString():String uri : String valueOf():QName ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

106

RangeError
The following table shows those members of the RangeError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name RangeError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Rectangle
The following table shows those members of the Rectangle class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bottom : Number bottomRight : Point clone():Rectangle contains(x:Number, y:Number):Boolean containsPoint(point:Point):Boolean containsRect(rect:Rectangle):Boolean equals(toCompare:Rectangle):Boolean height : Number inflate(dx:Number, dy:Number):void inflatePoint(point:Point):void intersection(toIntersect:Rectangle):Rectangle intersects(toIntersect:Rectangle):Boolean isEmpty():Boolean left : Number offset(dx:Number, dy:Number):void offsetPoint(point:Point):void Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0) right : Number setEmpty():void size : Point top : Number topLeft : Point toString():String union(toUnion:Rectangle):Rectangle ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

107

Member Name width : Number x : Number y : Number

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

ReferenceError
The following table shows those members of the ReferenceError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ReferenceError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

RegExp
The following table shows those members of the RegExp class that ActionScript 3.0 and Flash Lite 4 support.
Member Name dotall : Boolean exec(str:String):Object extended : Boolean global : Boolean ignoreCase : Boolean lastIndex : Number multiline : Boolean RegExp(re:String, flags:String) source : String test(str:String):Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

RenderingMode
The following table shows those members of the RenderingMode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CFF : String = "cff" NORMAL : String = "normal" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Responder
The following table shows those members of the Responder class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

108

Member Name constructResponderObject(result:Function, status:Function = null):void Responder(result:Function, status:Function = null)

ActionScript 3.0 Yes

Flash Lite 4 Yes

Yes

Yes

Scene
The following table shows those members of the Scene class that ActionScript 3.0 and Flash Lite 4 support.
Member Name labels : Array name : String numFrames : int ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

ScriptTimeoutError
The following table shows those members of the ScriptTimeoutError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ScriptTimeoutError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Security
The following table shows those members of the Security class that ActionScript 3.0 and Flash Lite 4 support.
Member Name allowDomain(... domains):void allowInsecureDomain(... domains):void exactSettings : Boolean loadPolicyFile(url:String):void LOCAL_TRUSTED : String = "localTrusted" LOCAL_WITH_FILE : String = "localWithFile" LOCAL_WITH_NETWORK : String = "localWithNetwork" REMOTE : String = "remote" sandboxType : String showSettings(panel:String = "default"):void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

SecurityDomain
The following table shows those members of the SecurityDomain class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

109

Member Name currentDomain : SecurityDomain

ActionScript 3.0 Yes

Flash Lite 4 Yes

SecurityError
The following table shows those members of the SecurityError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name SecurityError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

SecurityErrorEvent
The following table shows those members of the SecurityErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") SECURITY_ERROR : String = "securityError" toString():String ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

SecurityPanel
The following table shows those members of the SecurityPanel class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CAMERA : String = "camera" DEFAULT : String = "default" DISPLAY : String = "display" LOCAL_STORAGE : String = "localStorage" MICROPHONE : String = "microphone" PRIVACY : String = "privacy" SETTINGS_MANAGER : String = "settingsManager" ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Shape
The following table shows those members of the Shape class that ActionScript 3.0 and Flash Lite 4 support.
Member Name graphics : Graphics Shape() ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

110

SharedObject
The following table shows those members of the SharedObject class that ActionScript 3.0 and Flash Lite 4 support.
Member Name asyncError client : Object clear():void close():void connect(myConnection:NetConnection, params:String = null):void data : Object defaultObjectEncoding : uint flush(minDiskSpace:int = 0):String fps : Number getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject getRemote(name:String, remotePath:String = null, persistence:Object = false, secure:Boolean = false):SharedObject netStatus objectEncoding : uint send(... arguments):void setDirty(propertyName:String):void setProperty(propertyName:String, value:Object = null):void size : uint sync ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

No

Yes

Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

SharedObjectFlushStatus
The following table shows those members of the SharedObjectFlushStatus class that ActionScript 3.0 and Flash Lite 4 support.
Member Name FLUSHED : String = "flushed" PENDING : String = "pending" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

SimpleButton
The following table shows those members of the SimpleButton class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

111

Member Name downState : DisplayObject enabled : Boolean hitTestState : DisplayObject overState : DisplayObject SimpleButton(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null) soundTransform : flash.media:SoundTransform trackAsMenu : Boolean upState : DisplayObject useHandCursor : Boolean

ActionScript 3.0 Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes

Yes Yes Yes Yes

No No Yes No

Socket
The following table shows those members of the Socket class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bytesAvailable : uint close close():void connect connect(host:String, port:int):void connected : Boolean endian : String flush():void ioError objectEncoding : uint readBoolean():Boolean readByte():int readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void readDouble():Number readFloat():Number readInt():int readMultiByte(length:uint, charSet:String):String readObject():* readShort():int readUnsignedByte():uint ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

112

Member Name readUnsignedInt():uint readUnsignedShort():uint readUTF():String readUTFBytes(length:uint):String securityError Socket(host:String = null, port:int = 0) socketData timeout : uint writeBoolean(value:Boolean):void writeByte(value:int):void writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void writeDouble(value:Number):void writeFloat(value:Number):void writeInt(value:int):void writeMultiByte(value:String, charSet:String):void writeObject(object:*):void writeShort(value:int):void writeUnsignedInt(value:uint):void writeUTF(value:String):void writeUTFBytes(value:String):void

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Sound
The following table shows those members of the Sound class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bytesLoaded : uint bytesTotal : int close():void complete extract(target:ByteArray, length:Number, startPosition:Number = -1):Number id3 : Event id3 : ID3Info isBuffering : Boolean ioError ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes No

Yes Partial Yes Yes

Yes Partial Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

113

Member Name length : Number load(stream:URLRequest, context:SoundLoaderContext = null):void open play(startTime:Number = 0, loops:int = 0, sndTransform:flash.media:SoundTransform = null):SoundChannel progress sampleData Sound(stream:URLRequest = null, context:SoundLoaderContext = null) url : String

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

Yes Yes Yes

Yes No Yes

Yes

Yes

SoundChannel
The following table shows those members of the SoundChannel class that ActionScript 3.0 and Flash Lite 4 support.
Member Name leftPeak : Number position : Number rightPeak : Number soundComplete soundTransform : flash.media:SoundTransform stop():void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

SoundLoaderContext
The following table shows those members of the SoundLoaderContext class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bufferTime : Number = 1000 checkPolicyFile : Boolean = false SoundLoaderContext(bufferTime:Number = 1000, checkPolicyFile:Boolean = false) ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

SoundMixer
The following table shows those members of the SoundMixer class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

114

Member Name areSoundsInaccessible():Boolean bufferTime : int computeSpectrum(outputArray:ByteArray, FFTMode:Boolean = false, stretchFactor:int = 0):void stopAll():void

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 No Yes No

Yes

Yes

SoundTransform
The following table shows those members of the SoundTransform class that ActionScript 3.0 and Flash Lite 4 support.
Member Name leftToLeft : Number leftToRight : Number pan : Number rightToLeft : Number rightToRight : Number SoundTransform(vol:Number = 1, panning:Number = 0) volume : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

SpaceJustifier
The following table shows those members of the SpaceJustifier class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():flash.text.engine:TextJustifier letterSpacing : Boolean maximumSpacing : Number minimumSpacing : Number optimumSpacing : Number SpaceJustifier(locale:String = "en", lineJustification:String = "unjustified", letterSpacing:Boolean = false) volume : Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes No No No Yes

Yes

Yes

Sprite
The following table shows those members of the Sprite class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

115

Member Name buttonMode : Boolean dropTarget : DisplayObject graphics : Graphics hitArea : Sprite soundTransform : flash.media:SoundTransform Sprite() startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void startTouchDrag(touchPointID:int, lockCenter:Boolean = false, bounds:Rectangle = null):void stopDrag():void stopTouchDrag(touchPointID:int):void useHandCursor : Boolean

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Yes

Yes

Yes Yes Yes

Yes Yes No

StackOverflowError
The following table shows those members of the StackOverflowError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name StackOverflowError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

Stage
The following table shows those members of the Stage class that ActionScript 3.0 and Flash Lite 4 support.
Member Name addChild(child:DisplayObject):DisplayObject addChildAt(child:DisplayObject, index:int):DisplayObject addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void align : String assignFocus(objectToFocus:InteractiveObject, direction:String):void colorCorrection : String colorCorrectionSupport : String dispatchEvent(event:Event):Boolean displayState : String focus : InteractiveObject Yes Yes Yes ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes

Yes No

No No Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

116

Member Name frameRate : Number fullScreen fullScreenHeight : uint fullScreenSourceRect : Rectangle fullScreenWidth : uint hasEventListener(type:String):Boolean height : Number isFocusInaccessible():Boolean mouseChildren : Boolean mouseLeave numChildren : int quality : String removeChildAt(index:int):DisplayObject resize scaleMode : String setChildIndex(child:DisplayObject, index:int):void showDefaultContextMenu : Boolean stageFocusRect : Boolean stageHeight : int stageWidth : int swapChildrenAt(index1:int, index2:int):void tabChildren : Boolean textSnapshot : flash.text:TextSnapshot width : Number willTrigger(type:String):Boolean

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes No No Yes No

StageAlign
The following table shows those members of the StageAlign class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BOTTOM : String = "B" BOTTOM_LEFT : String = "BL" BOTTOM_RIGHT : String = "BR" LEFT : String = "L" RIGHT : String = "R" ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

117

Member Name TOP : String = "T" TOP_LEFT : String = "TL" TOP_RIGHT : String = "TR"

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

StageCapture
The following table shows those members of the StageCapture class that ActionScript 3.0 and Flash Lite 4 support.
Member Name addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void cancel():void capture capture(type:String):void clipRect : Rectangle CURRENT : String = "current" fileNameBase : String MULTIPLE : String = "multiple" NEXT : String = "next" removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void ActionScript 3.0 Yes Flash Lite 4 Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes

StageCaptureEvent
The following table shows those members of the StageCaptureEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CAPTURE : String = "capture" checksum : uint StageCaptureEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, url:String = null, checksum:uint = 0) url : String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes

Yes

StageDisplayState
The following table shows those members of the StageDisplayState class that ActionScript 3.0 and Flash Lite 4 support.
Member Name FULL_SCREEN : String = "fullScreen" NORMAL : String = "normal" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

118

StageQuality
The following table shows those members of the StageQuality class that ActionScript 3.0 and Flash Lite 4 support.
Member Name BEST : String = "best" HIGH : String = "high" LOW : String = "low" MEDIUM : String = "medium" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

StageScaleMode
The following table shows those members of the StageScaleMode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name EXACT_FIT : String = "exactFit" NO_BORDER : String = "noBorder" NO_SCALE : String = "noScale" SHOW_ALL : String = "showAll" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

StaticText
The following table shows those members of the StaticText class that ActionScript 3.0 and Flash Lite 4 support.
Member Name text : String ActionScript 3.0 Yes Flash Lite 4 Yes

StatusEvent
The following table shows those members of the StatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event code : String level : String STATUS : String = "status" StatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, code:String = "", level:String = "") toString():String ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Yes

Yes

String
The following table shows those members of the String class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

119

Member Name charAt(index:Number = 0):String charCodeAt(index:Number = 0):Number concat(... args):String fromCharCode(... charCodes):String indexOf(val:String, startIndex:Number = 0):int lastIndexOf(val:String, startIndex:Number = 0x7FFFFFFF):int length : int localeCompare(other:String, ... values):int match(pattern:*):Array replace(pattern:*, repl:Object):String search(pattern:*):int slice(startIndex:Number = 0, endIndex:Number = 0x7fffffff):String split(delimiter:*, limit:Number = 0x7fffffff):Array String(val:String) substr(startIndex:Number = 0, len:Number = 0x7fffffff):String substring(startIndex:Number = 0, endIndex:Number = 0x7fffffff):String toLocaleLowerCase():String toLocaleUpperCase():String toLowerCase():String toUpperCase():String valueOf():String

ActionScript 3.0 Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes

Yes Yes Yes

Yes Yes Yes

Yes

Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

StyleSheet
The following table shows those members of the StyleSheet class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clear():void getStyle(styleName:String):Object parseCSS(CSSText:String):void setStyle(styleName:String, styleObject:Object):void styleNames : Array transform(formatObject:Object):flash.text:TextFormat ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

120

SWFVersion
The following table shows those members of the SWFVersion class that ActionScript 3.0 and Flash Lite 4 support.
Member Name FLASH1 : uint = 1 FLASH10 : uint = 10 FLASH2 : uint = 2 FLASH3 : uint = 3 FLASH4 : uint = 4 FLASH5 : uint = 5 FLASH6 : uint = 6 FLASH7 : uint = 7 FLASH8 : uint = 8 FLASH9 : uint = 9 ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

SyncEvent
The following table shows those members of the SyncEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name changeList : Array clone():Event SYNC : String = "sync" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean Yes = false, changeList:Array = null) toString():String Yes

Yes

SyntaxError
The following table shows those members of the SyntaxError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name SyntaxError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

System
The following table shows those members of the System class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4

disposeXML exit(code:uint):void

Yes Yes

No No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

121

Member Name freeMemory : Number gc():void ime : IME pause():void

ActionScript 3.0 Yes Yes Yes Yes

Flash Lite 4 No Yes Yes Yes

privateMemory : Number resume():void setClipboard(string:String):void totalMemory : uint totalMemoryNumber : Number useCodePage : Boolean

Yes Yes Yes Yes Yes Yes

No Yes No Yes No Yes

TabAlignment
The following table shows those members of the TabAlignment class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CENTER : String = "center" DECIMAL : String = "decimal" END : String = "end" START : String = "start" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

TabStop
The following table shows those members of the TabStop class that ActionScript 3.0 and Flash Lite 4 support.
Member Name alignment : String decimalAlignmentToken : String position : Number TabStop(alignment:String = "start", position:Number = 0.0, decimalAlignmentToken:String = "") ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

TextBaseline
The following table shows those members of the TextBaseline class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

122

Member Name ASCENT : String = "ascent" DESCENT : String = "descent" IDEOGRAPHIC_BOTTOM : String = "ideographicBottom" IDEOGRAPHIC_CENTER : String = "ideographicCenter" IDEOGRAPHIC_TOP : String = "ideographicTop" ROMAN : String = "roman" USE_DOMINANT_BASELINE : String = "useDominantBaseline"

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

TextBlock
The following table shows those members of the TextBlock class that ActionScript 3.0 and Flash Lite 4 support.
Member Name applyNonLinearFontScaling : Boolean baselineFontDescription : FontDescription baselineFontSize : Number baselineZero : String bidiLevel : int content : ContentElement createTextLine(previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine dump():String findNextAtomBoundary(afterCharIndex:int):int findNextWordBoundary(afterCharIndex:int):int findPreviousAtomBoundary(beforeCharIndex:int):int findPreviousWordBoundary(beforeCharIndex:int):int firstInvalidLine : flash.text.engine:TextLine firstLine : flash.text.engine:TextLine getTextLineAtCharIndex(charIndex:int):flash.text.engine:TextLine lastLine : flash.text.engine:TextLine lineRotation : String recreateTextLine(textLine:flash.text.engine:TextLine, previousLine:flash.text.engine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):flash.text.engine:TextLine releaseLineCreationData():void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes

Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

123

Member Name releaseLines(firstLine:flash.text.engine:TextLine, lastLine:flash.text.engine:TextLine):void tabStops : Vector.<flash.text.engine:TabStop> TextBlock(content:ContentElement = null, tabStops:Vector.<flash.text.engine:TabStop> = null, textJustifier:flash.text.engine:TextJustifier = null, lineRotation:String = "rotate0", baselineZero:String = "roman", bidiLevel:int = 0, applyNonLinearFontScaling:Boolean = true, baselineFontDescription:FontDescription = null, baselineFontSize:Number = 12.0) textJustifier : flash.text.engine:TextJustifier textLineCreationResult : String userData : *

ActionScript 3.0 Yes

Flash Lite 4 Yes

Yes Yes

Yes Yes

Yes Yes Yes

Yes Yes Yes

TextElement
The following table shows those members of the TextElement class that ActionScript 3.0 and Flash Lite 4 support.
Member Name replaceText(beginIndex:int, endIndex:int, newText:String):void text : String TextElement(text:String = null, elementFormat:ElementFormat = null, eventMirror:EventDispatcher = null, textRotation:String = "rotate0") ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

TextEvent
The following table shows those members of the TextEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event LINK : String = "link" text : String TextEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") TEXT_INPUT : String = "textInput" toString():String ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Yes Yes

Yes Yes

TextField
The following table shows those members of the TextField class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

124

Member Name alwaysShowSelection : Boolean antiAliasType : String appendText(newText:String):void autoSize : String background : Boolean backgroundColor : uint border : Boolean borderColor : uint bottomScrollV : int caretIndex : int change condenseWhite : Boolean defaultTextFormat : flash.text:TextFormat displayAsPassword : Boolean embedFonts : Boolean getCharBoundaries(charIndex:int):Rectangle getCharIndexAtPoint(x:Number, y:Number):int getFirstCharInParagraph(charIndex:int):int getImageReference(id:String):DisplayObject getLineIndexAtPoint(x:Number, y:Number):int getLineIndexOfChar(charIndex:int):int getLineLength(lineIndex:int):int getLineMetrics(lineIndex:int):flash.text:TextLineMetrics getLineOffset(lineIndex:int):int getLineText(lineIndex:int):String getParagraphLength(charIndex:int):int getTextFormat(beginIndex:int = -1, endIndex:int = 1):flash.text:TextFormat gridFitType : String htmlText : String isFontCompatible(fontName:String, fontStyle:String):Boolean length : int link maxChars : int maxScrollH : int

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes

No Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

125

Member Name maxScrollV : int mouseWheelEnabled : Boolean multiline : Boolean numLines : int replaceSelectedText(value:String):void replaceText(beginIndex:int, endIndex:int, newText:String):void restrict : String scroll scrollH : int scrollV : int selectable : Boolean selectionBeginIndex : int selectionEndIndex : int setSelection(beginIndex:int, endIndex:int):void setTextFormat(format:flash.text:TextFormat, beginIndex:int = -1, endIndex:int = -1):void sharpness : Number styleSheet : StyleSheet text : String textColor : uint TextField() textHeight : Number textInput textWidth : Number thickness : Number type : String useRichTextClipboard : Boolean wordWrap : Boolean

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

No Yes Yes Yes Yes Yes Yes Yes No Yes No Yes

TextFieldAutoSize
The following table shows those members of the TextFieldAutoSize class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

126

Member Name CENTER : String = "center" LEFT : String = "left" NONE : String = "none" RIGHT : String = "right"

ActionScript 3.0 Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes

TextFieldType
The following table shows those members of the TextFieldType class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DYNAMIC : String = "dynamic" INPUT : String = "input" ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

TextFormat
The following table shows those members of the TextFormat class that ActionScript 3.0 and Flash Lite 4 support.
Member Name align : String blockIndent : Object bold : Object bullet : Object color : Object font : String indent : Object italic : Object kerning : Object leading : Object leftMargin : Object letterSpacing : Object rightMargin : Object size : Object tabStops : Array target : String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes No Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

127

Member Name

ActionScript 3.0

Flash Lite 4 Yes

TextFormat(font:String = null, size:Object = null, color:Object = null, Yes bold:Object = null, italic:Object = null, underline:Object = null, url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null) underline : Object url : String Yes Yes

Yes Yes

TextFormatAlign
The following table shows those members of the TextFormatAlign class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CENTER : String = "center" JUSTIFY : String = "justify" LEFT : String = "left"NONE : String = "none" RIGHT : String = "right" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

TextJustifier
The following table shows those members of the TextJustifier class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():flash.text.engine:TextJustifier getJustifierForLocale(locale:String):flash.text.engine:TextJustifier lineJustification : String locale : String TextJustifier(locale:String, lineJustification:String) ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

TextLine
The following table shows those members of the TextLine class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ascent : Number atomCount : int descent : Number dump():String flushAtomData():void getAtomBidiLevel(atomIndex:int):int getAtomBounds(atomIndex:int):Rectangle getAtomCenter(atomIndex:int):Number ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes No Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

128

Member Name getAtomGraphic(atomIndex:int):DisplayObject getAtomIndexAtCharIndex(charIndex:int):int getAtomIndexAtPoint(stageX:Number, stageY:Number):int getAtomTextBlockBeginIndex(atomIndex:int):int getAtomTextBlockEndIndex(atomIndex:int):int getAtomTextRotation(atomIndex:int):String getAtomWordBoundaryOnLeft(atomIndex:int):Boolean getBaselinePosition(baseline:String):Number getMirrorRegion(mirror:EventDispatcher):flash.text.engine:TextLine MirrorRegion hasGraphicElement : Boolean hasTabs : Boolean MAX_LINE_WIDTH : int = 1000000 mirrorRegions : Vector.<flash.text.engine:TextLineMirrorRegion> nextLine : flash.text.engine:TextLine previousLine : flash.text.engine:TextLine rawTextLength : int specifiedWidth : Number textBlock : flash.text.engine:TextBlock textBlockBeginIndex : int textHeight : Number textWidth : Number unjustifiedTextWidth : Number userData : * validity : String

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

TextLineCreationResult
The following table shows those members of the TextLineCreationResult class that ActionScript 3.0 and Flash Lite 4 support.
Member Name COMPLETE : String = "complete" EMERGENCY : String = "emergency" INSUFFICIENT_WIDTH : String = "insufficientWidth" SUCCESS : String = "success" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

129

TextLineMetrics
The following table shows those members of the TextLineMetrics class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ascent : Number descent : Number height : Number leading : Number TextLineMetrics(x:Number, width:Number, height:Number, ascent:Number, descent:Number, leading:Number) width : Number x : Number ActionScript 3.0 Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes

Yes Yes

Yes Yes

TextLineMirrorRegion
The following table shows those members of the TextLineMirrorRegion class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bounds : Rectangle element : ContentElement mirror : EventDispatcher nextRegion : flash.text.engine:TextLineMirrorRegion previousRegion : flash.text.engine:TextLineMirrorRegion textLine : flash.text.engine:TextLine ActionScript 3.0 Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes

TextLineValidity
The following table shows those members of the TextLineValidity class that ActionScript 3.0 and Flash Lite 4 support.
Member Name INVALID : String = "invalid" POSSIBLY_INVALID : String = "possiblyInvalid" STATIC : String = "static" VALID : String = "valid" ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes

TextRotation
The following table shows those members of the TextRotation class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

130

Member Name AUTO : String = "auto" ROTATE_0 : String = "rotate0" ROTATE_180 : String = "rotate180" ROTATE_270 : String = "rotate270" ROTATE_90 : String = "rotate90"

ActionScript 3.0 Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes

TextSnapshot
The following table shows those members of the TextSnapshot class that ActionScript 3.0 and Flash Lite 4 support.
Member Name charCount : int findText(beginIndex:int, textToFind:String, caseSensitive:Boolean):int getSelected(beginIndex:int, endIndex:int):Boolean getSelectedText(includeLineEndings:Boolean = false):String getText(beginIndex:int, endIndex:int, includeLineEndings:Boolean = false):String getTextRunInfo(beginIndex:int, endIndex:int):Array hitTestTextNearPos(x:Number, y:Number, maxDistance:Number = 0):Number setSelectColor(hexColor:uint = 0xFFFF00):void setSelected(beginIndex:int, endIndex:int, select:Boolean):void ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes Yes

Yes Yes

Yes

Yes

Yes Yes

Yes Yes

Yes Yes

Yes Yes

Timer
The following table shows those members of the Timer class that ActionScript 3.0 and Flash Lite 4 support.
Member Name currentCount : int delay : Number repeatCount : int reset():void running : Boolean start():void stop():void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

131

Member Name timer Timer(delay:Number, repeatCount:int = 0) timerComplete

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

TimerEvent
The following table shows those members of the TimerEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event TIMER : String = "timer" TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) TIMER_COMPLETE : String = "timerComplete" toString():String updateAfterEvent():void ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Yes Yes Yes

Yes Yes Yes

TouchEvent
The following table shows those members of the TouchEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name altKey : Boolean clone():Event ctrlKey : Boolean isPrimaryTouchPoint : Boolean isRelatedObjectInaccessible : Boolean localX : Number localY : Number pressure : Number relatedObject : InteractiveObject shiftKey : Boolean sizeX : Number sizeY : Number stageX : Number stageY : Number toString():String ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 No Yes No Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

132

Member Name

ActionScript 3.0

Flash Lite 4 Yes

TouchEvent(type:String, bubbles:Boolean = true, cancelable:Boolean Yes = false, touchPointID:int = 0, isPrimaryTouchPoint:Boolean = false, localX:Number = NaN, localY:Number = NaN, sizeX:Number = NaN, sizeY:Number = NaN, pressure:Number = NaN, relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) touchPointID : int TOUCH_BEGIN : String = "touchBegin" TOUCH_END : String = "touchEnd" TOUCH_MOVE : String = "touchMove" TOUCH_OUT : String = "touchOut" TOUCH_OVER : String = "touchOver" TOUCH_ROLL_OUT : String = "touchRollOut" TOUCH_ROLL_OVER : String = "touchRollOver" TOUCH_TAP : String = "touchTap" updateAfterEvent():void Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Transform
The following table shows those members of the Transform class that ActionScript 3.0 and Flash Lite 4 support.
Member Name colorTransform : flash.geom:ColorTransform ActionScript 3.0 Yes Flash Lite 4 Yes Yes Yes No Yes No No Yes

concatenatedColorTransform : flash.geom:ColorTransform Yes concatenatedMatrix : Matrix getRelativeMatrix3D(relativeTo:DisplayObject):Matrix3D matrix : Matrix matrix3D : Matrix3D perspectiveProjection : PerspectiveProjection pixelBounds : Rectangle Yes Yes Yes Yes Yes Yes

TransformGestureEvent
The following table shows those members of the TransformGestureEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name clone():Event GESTURE_PAN : String = "gesturePan" GESTURE_ROTATE : String = "gestureRotate" ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

133

Member Name GESTURE_SWIPE : String = "gestureSwipe" GESTURE_ZOOM : String = "gestureZoom" offsetX : Number offsetY : Number rotation : Number scaleX : Number scaleY : Number TransformGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0, localY:Number = 0, scaleX:Number = 1.0, scaleY:Number = 1.0, rotation:Number = 0, offsetX:Number = 0, offsetY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) toString():String

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes

Yes

Yes

TypeError
The following table shows those members of theTypeError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name TypeError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

TypographicCase
The following table shows those members of the TypographicCase class that ActionScript 3.0 and Flash Lite 4 support.
Member Name CAPS : String = "caps" CAPS_AND_SMALL_CAPS : String = "capsAndSmallCaps" DEFAULT : String = "default" LOWERCASE : String = "lowercase" SMALL_CAPS : String = "smallCaps" TITLE : String = "title" UPPERCASE : String = "uppercase" ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes

uint
The following table shows those members of the uint class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

134

Member Name MAX_VALUE : uint = 4294967295 MIN_VALUE : uint = 0 uint(num:Object) toExponential(fractionDigits:uint):String toFixed(fractionDigits:uint):String toPrecision(precision:uint):String toString(radix:uint):String valueOf():uint

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes

URIError
The following table shows those members of URIError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name URIError(message:String = "") ActionScript 3.0 Yes Flash Lite 4 Yes

URLLoader
The following table shows those members of the URLLoader class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bytesLoaded : uint = 0 bytesTotal : uint = 0 close():void complete data : * dataFormat : String = "text" httpStatus ioError load(request:URLRequest):void open progress securityError ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

URLLoaderDataFormat
The following table shows those members of the URLLoaderDataFormat class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

135

Member Name BINARY : String = "binary" TEXT : String = "text" VARIABLES : String = "variables"

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

URLRequest
The following table shows those members of the URLRequest class that ActionScript 3.0 and Flash Lite 4 support.
Member Name authenticate : Boolean cacheResponse : Boolean contentType : String data : Object digest : String manageCookies : Boolean method : String requestHeaders : Array url : String URLRequest(url:String = null) useCache : Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 No No Yes Yes Yes No Yes Yes Yes Yes No

URLRequestHeader
The following table shows those members of the URLRequestHeader class that ActionScript 3.0 and Flash Lite 4 support.
Member Name name : String URLRequestHeader(name:String = "", value:String = "") value : String ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

URLRequestMethod
The following table shows those members of the URLRequestMethod class that ActionScript 3.0 and Flash Lite 4 support.
Member Name DELETE : String = DELETE GET : String = "GET" HEAD : String = HEAD ActionScript 3.0 Yes Yes Yes Flash Lite 4 No Yes No

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

136

Member Name OPTIONS : String = OPTIONS POST : String = "POST" PUT : String = PUT

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 No Yes No

URLStream
The following table shows those members of the URLStream class that ActionScript 3.0 and Flash Lite 4 support.
Member Name bytesAvailable : uint close():void complete connected : Boolean endian : String httpStatus ioError load(request:URLRequest):void objectEncoding : uint open progress readBoolean():Boolean readByte():int readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void readDouble():Number readFloat():Number readInt():int readMultiByte(length:uint, charSet:String):String readObject():* readShort():int readUnsignedByte():uint readUnsignedInt():uint readUnsignedShort():uint readUTF():String readUTFBytes(length:uint):String securityError ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

137

URLVariables
The following table shows those members of the URLVariables class that ActionScript 3.0 and Flash Lite 4 support.
Member Name decode(source:String):void toString():String URLVariables(source:String = null) ActionScript 3.0 Yes Yes Yes Flash Lite 4 Yes Yes Yes

Vector
The following table shows those members of the Vector class that ActionScript 3.0 and Flash Lite 4 support.
Member Name concat(... args):Vector.<T> every(callback:Function, thisObject:Object = null):Boolean filter(callback:Function, thisObject:Object = null):Vector.<T> fixed : Boolean forEach(callback:Function, thisObject:Object = null):void indexOf(searchElement:T, fromIndex:int = 0):int join(sep:String = ","):String lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int length : uint map(callback:Function, thisObject:Object = null):Vector.<T> pop():T push(... args):uint reverse():Vector.<T> shift():T slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T> some(callback:Function, thisObject:Object = null):Boolean sort(compareFunction:Function):Vector.<T> splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T> toLocaleString():String toString():String unshift(... args):uint ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

No No No

Yes Yes Yes

VerifyError
The following table shows those members of VerifyError class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

138

Member Name VerifyError(message:String = "")

ActionScript 3.0 Yes

Flash Lite 4 Yes

Video
The following table shows those members of the Video class that ActionScript 3.0 and Flash Lite 4 support.
Member Name attachCamera(camera:Camera):void attachNetStream(netStream:NetStream):void clear():void constructVideoObject(width:int = 320, height:int = 240):void deblocking : int smoothing : Boolean Video(width:int = 320, height:int = 240) videoHeight : int videoWidth : int ActionScript 3.0 Yes Yes Yes Yes Flash Lite 4 No Yes Yes Yes

Yes Yes Yes Yes Yes

Yes Yes Yes Yes Yes

XML
The following table shows those members of the XML class that ActionScript 3.0 and Flash Lite 4 support.
Member Name addNamespace(ns:Object):XML appendChild(child:Object):XML attribute(attributeName:*):XMLList attributes():XMLList child(propertyName:Object):XMLList childIndex():int children():XMLList comments():XMLList contains(value:XML):Boolean copy():XML defaultSettings():Object descendants(name:Object = *):XMLList elements(name:Object = *):XMLList hasComplexContent():Boolean hasOwnProperty(p:String):Boolean ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

139

Member Name hasSimpleContent():Boolean ignoreComments : Boolean ignoreProcessingInstructions : Boolean ignoreWhitespace : Boolean inScopeNamespaces():Array insertChildAfter(child1:Object, child2:Object):* insertChildBefore(child1:Object, child2:Object):* length():int localName():Object name():Object namespace(prefix:String = null):* namespaceDeclarations():Array nodeKind():String normalize():XML parent():* prependChild(value:Object):XML prettyIndent : int prettyPrinting : Boolean processingInstructions(name:String = "*"):XMLList propertyIsEnumerable(p:String):Boolean removeNamespace(ns:Namespace):XML replace(propertyName:Object, value:XML):XML setChildren(value:Object):XML setLocalName(name:String):void setName(name:String):void setNamespace(ns:Namespace):void setSettings(... rest):void settings():Object text():XMLList toString():String toXMLString():String valueOf():XML

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

XMLDocument
The following table shows those members of the XMLDocument class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

140

Member Name createElement(name:String):XMLNode createTextNode(text:String):XMLNode docTypeDecl : Object = null idMap : Object ignoreWhite : Boolean = false parseXML(source:String):void toString():String xmlDecl : Object = null XMLDocument(source:String = null)

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes

XMLList
The following table shows those members of the XMLList class that ActionScript 3.0 and Flash Lite 4 support.
Member Name attribute(attributeName:*):XMLList attributes():XMLList child(propertyName:Object):XMLList children():XMLList comments():XMLList comments():XMLList contains(value:XML):Boolean copy():XML descendants(name:Object = *):XMLList elements(name:Object = *):XMLList hasComplexContent():Boolean hasOwnProperty(p:String):Boolean hasSimpleContent():Boolean length():int normalize():XMLList parent():Object processingInstructions(name:String = "*"):XMLList propertyIsEnumerable(p:String):Boolean text():XMLList ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

141

Member Name toString():String toXMLString():String valueOf():XMLList

ActionScript 3.0 Yes Yes Yes

Flash Lite 4 Yes Yes Yes

XMLNode
The following table shows those members of the XMLNode class that ActionScript 3.0 and Flash Lite 4 support.
Member Name appendChild(node:XMLNode):void attributes : Object childNodes : Array cloneNode(deep:Boolean):XMLNode firstChild : XMLNode getNamespaceForPrefix(prefix:String):String getPrefixForNamespace(ns:String):String hasChildNodes():Boolean insertBefore(node:XMLNode, before:XMLNode):void lastChild : XMLNode localName : String namespaceURI : String nextSibling : XMLNode nodeName : String nodeType : uint nodeValue : String parentNode : XMLNode prefix : String previousSibling : XMLNode removeNode():void toString():String XMLNode(type:uint, value:String) ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

XMLNodeType
The following table shows those members of the XMLNodeType class that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

142

Member Name ELEMENT_NODE : uint = 1 TEXT_NODE : uint = 3

ActionScript 3.0 Yes Yes

Flash Lite 4 Yes Yes

XMLSocket
The following table shows those members of the XMLSocket class that ActionScript 3.0 and Flash Lite 4 support.
Member Name close close():void connect connect(host:String, port:int):void connected : Boolean data ioError securityError send(object:*):void timeout : int XMLSocket(host:String = null, port:int = 0) ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Global functions
flash.net
The following table shows the global functions of the flash.net package that ActionScript 3.0 and Flash Lite 4 support.
Member Name getClassByAlias(aliasName:String):Class navigateToURL(request:URLRequest, window:String = null):void registerClassAlias(aliasName:String, classObject:Class):void sendToURL(request:URLRequest):void ActionScript 3.0 Yes Yes Flash Lite 4 Yes Yes

Yes

Yes

Yes

Yes

flash.utils
The following table shows the global functions of the flash.utils package that ActionScript 3.0 and Flash Lite 4 support.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

143

Member Name clearInterval(id:uint):void clearTimeout(id:uint):void describeType(value:*):XML escapeMultiByte(value:String):String getAliasName(value:*):String getDefinitionByName(name:String):Object getQualifiedClassName(value:*):String getQualifiedSuperclassName(value:*):String getTimer():int setInterval(closure:Function, delay:Number, ... arguments):uint setTimeout(closure:Function, delay:Number, ... arguments):uint unescapeMultiByte(value:String):String

ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Yes

Yes

Yes

Yes

Top level
The following table shows the top level global functions that ActionScript 3.0 and Flash Lite 4 support.
Member Name Array(... args):Array Boolean(expression:Object):Boolean decodeURI(uri:String):String decodeURIComponent(uri:String):String encodeURI(uri:String):String encodeURIComponent(uri:String):String escape(str:String):String int(value:Number):int isFinite(num:Number):Boolean isNaN(num:Number):Boolean isXMLName(str:String):Boolean Number(expression:Object):Number Object(value:Object):Object parseFloat(str:String):Number parseInt(str:String, radix:uint = 0):Number String(expression:Object):String trace(... arguments):void ActionScript 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Flash Lite 4 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

144

Member Name uint(value:Number):uint unescape(str:String):String Vector(sourceArray:Object):Vector.<T> XML(expression:Object):XML XMLList(expression:Object):XMLList

ActionScript 3.0 Yes Yes Yes Yes Yes

Flash Lite 4 Yes Yes Yes Yes Yes

Partially supported ActionScript classes: details


A few ActionScript 3.0 classes are either partially or not supported by Flash Lite 4. For details about these classes, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

BitmapData class
The BitmapData class lets you work with the data (pixels) of a Bitmap object. You can use the methods of the BitmapData class to create arbitrarily sized transparent or opaque bitmap images. You can also use the BitmapData class to manipulate these images in various ways at runtime. In addition, you can access the BitmapData for a bitmap image that you load with the flash.display.Loader class.

Method summary
The following table lists the methods of the BitMapData class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method applyFilter() Description Takes a source image and a filter object and generates the filtered image. Determines the destination rectangle that the applyFilter() method call affects, given a BitmapData object, a source rectangle, and a filter object. Locks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are not updated when this BitmapData object changes. Fills an image with pixels representing random noise. Generates a Perlin noise image. Performs a pixel dissolve either from a source image to a destination image or by using the same image. Scrolls an image by a certain (x, y) pixel amount. Support Not supported

generateFilterRect()

Not supported

lock()

Not supported

noise() perlinNoise() pixelDissolve()

Not supported Not supported Not supported

scroll() threshold()

Not supported

Tests pixel values in an image against a specified threshold and Not supported sets pixels that pass the test to new color values. Unlocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, are updated when this BitmapData object changes. Not supported

unlock()

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

145

ByteArray class
The ByteArray class provides methods and properties to optimize reading, writing, and working with binary data.

Property summary
The following table lists the properties of the ByteArray class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property compress Description Compresses the byte array using the zlib compressed data format. Decompresses the byte array. Support Not supported

inflate

Not supported

Capabilities class
The Capabilities class provides methods and properties to optimize reading, writing, and working with binary data.

Property summary
The following table lists the properties of the Capabilities class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property supports32BitProcesses Description Specifies whether the system supports running 32-bit processes. Specifies whether the system supports running 64-bit processes. Support Not supported

supports64BitProcesses

Not supported

DisplayObject class
The DisplayObject class is the base class for all objects that can be placed on the display list. The display list manages all objects displayed in Flash Player. Use the DisplayObjectContainer class to arrange the display objects in the display list. DisplayObjectContainer objects can have child display objects, while other display objects, such as Shape and TextField objects, are "leaf" nodes that have only parents and siblings, no children.

Property summary
The following table lists the properties of the DisplayObject class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property accessibilityProperties blendMode Description The current accessibility options for this display object. A value from the BlendMode class that specifies which blend mode to use. Sets a shader that is used for blending the foreground and background. An indexed array that contains each filter object currently associated with the display object. Support Not supported Not supported

blendShader

Not supported

filters

Not supported

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

146

Property scaleZ

Description Indicates the depth scale (percentage) of an object as applied from the registration point of the object. The scroll rectangle bounds of the display object. Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container.

Support Not supported

scrollRect z

Not supported Not supported

DisplayObjectContainer class
The DisplayObjectContainer class is the base class for all objects that can serve as display object containers on the display list. The display list manages all objects displayed in Flash Player. Use the DisplayObjectContainer class to arrange the display objects in the display list. Each DisplayObjectContainer object has its own child list for organizing the z-order of the objects. The z-order is the front-to-back order that determines which object is drawn in front, which is behind, and so on.

Property summary
The following table lists the properties of the DisplayObjectContainer class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property textSnapshot Description Support

Returns a TextSnapshot object for this DisplayObjectContainer Not supported instance.

Font class
The Font class is used to manage embedded fonts in SWF files. Embedded fonts are represented as a subclass of the Font class. The Font class is currently useful only to find out information about embedded fonts; you cannot alter a font by using this class. You cannot use the Font class to load external fonts, or to create an instance of a Font object by itself. Use the Font class as an abstract base class.

Method summary
The following table lists the methods of the Font class that are partially supported by Flash Lite 4 when using ActionScript 3.0.
Method enumerateFonts() Description Specifies whether to provide a list of the currently available embedded fonts. Support Partially supported

Graphics class
The Graphics class contains a set of methods that you can use to create a vector shape. Display objects that support drawing include Sprite and Shape objects. Each of these classes includes a graphics property that is a Graphics object. The following are among those helper functions provided for ease of use: drawRect(), drawRoundRect(), drawCircle(), and drawEllipse().

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

147

Method summary
The following table lists the methods of the Graphics class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method beginShaderFill() Description Support

Specifies a shader fill that Flash Player uses for subsequent calls Not supported to other Graphics methods (such as lineTo() or drawCircle()) for the object. Submits a series of IGraphicsData instances for drawing. Submits a series of commands for drawing. Renders a set of triangles, typically to distort bitmaps and give them a three-dimensional appearance. Not supported Not supported Not supported

drawGraphicsData() drawPath() drawTriangles()

lineBitmapStyle() lineGradientStyle() lineShaderStyle() lineStyle()

Specifies a bitmap to use for the line stroke when drawing lines. Not supported Specifies a gradient to use for the stroke when drawing lines. Not supported

Specifies a shader to use for the line stroke when drawing lines. Not supported Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method. Partially supported

InteractiveObject class
The InteractiveObject class is the abstract base class for all display objects with which the user can interact, using the mouse and keyboard. You cannot instantiate the InteractiveObject class directly. A call to the new InteractiveObject() constructor throws an ArgumentError exception.

Property summary
The following table lists the properties of the InteractiveObject class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property contextMenu doubleClickEnabled tabEnabled tabIndex Description Specifies the context menu associated with this object. Specifies whether the object receives doubleClick events. Specifies whether this object is in the tab order. Specifies the tab ordering of objects in a SWF file. Support Not supported Not supported Not supported Not supported

Event summary
The following table lists the events of the InteractiveObject class that are not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

148

Event copy

Description Dispatched when the user activates the platform specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. Dispatched when the user activates the platform specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu.

Support Not supported

cut

Not supported

doubleClick

Dispatched when a user presses and releases the main button Not supported of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true. Dispatched when a mouse wheel is spun over an InteractiveObject instance in the Flash Player window. Dispatched when the user activates the platform specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. Not supported

mouseWheel

paste

Not supported

selectAll

Dispatched when the user activates the platform specific Not supported accelerator key combination for a select all operation or selects 'Select All' from the text context menu. Dispatched when the value of the object's tabChildren flag changes. Dispatched when the object's tabEnabled flag changes. Dispatched when the value of the object's tabIndex property changes. Not supported

tabChildrenChange

tabEnabledChange tabIndexChange

Not supported Not supported

Keyboard class
The Keyboard class is used to build an interface that can be controlled by a user with a standard keyboard. You can use the methods and properties of the Keyboard class without using a constructor. The properties of the Keyboard class are constants representing the keys that are most commonly used to control games.

Method summary
The following table lists the methods of the Keyboard class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method isAccessible() Description Specifies whether the last key pressed is accessible by other SWF files. Support Not supported

KeyboardEvent class
Flash Player dispatches KeyboardEvent objects in response to user input through a keyboard. There are two types of keyboard events: KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP.

Method summary
The following table lists the methods of the KeyboardEvent class that are not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

149

Method updateAfterEvent()

Description Instructs Flash Player to render after processing of this event completes, if the display list has been modified .

Support Not supported

Property summary
The following table lists the properties of the KeyboardEvent class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property altKey ctrlKey Description Indicates whether the Alt key is active (true) or inactive (false). Indicates whether the Control key is active (true) or inactive (false). Indicates whether the Shift key modifier is active (true) or inactive (false). Support Not supported Not supported

shiftKey

Not supported

LocalConnection class
The LocalConnection class lets you create a LocalConnection object that can invoke a method in another LocalConnection object.

Property summary
The following table lists the properties of the LocalConnection class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property isPerUser Description Support

Indicates whether the LocalConnection object is scoped to the Not supported current user (true) or is globally accessible to all users on the computer (false).

MouseEvent class
Flash Player dispatches MouseEvent objects into the event flow whenever mouse events occur. A mouse event is usually generated by a user input device, such as a mouse or a trackball, that uses a pointer.

Method summary
The following table lists the methods of the MouseEvent class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method updateAfterEvent() Description Instructs Flash Player to render after processing of this event completes, if the display list has been modified. Support Not supported

Event summary
The following table lists the event of the MouseEvent class that is not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

150

Event MOUSE_WHEEL()

Description Defines the value of the type property of a mouseWheel event object.

Support Not supported

MovieClip class
The MovieClip class inherits from the following classes: Sprite, DisplayObjectContainer, InteractiveObject, DisplayObject, and EventDispatcher.

Property summary
The following table lists the properties of the MovieClip class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property trackAsMenu Description Indicates whether other display objects that are SimpleButton or MovieClip objects can receive mouse release events. Support Not supported

NetConnection class
The NetConnection class creates a bidirectional connection between Flash Player and a Flash Media Server application or between Flash Player and an application server running Flash Remoting. A NetConnection object is like a pipe between the client and the server. Use NetStream objects to send streams through the pipe.

Property summary
The following table lists the properties of the NetConnection class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property farID Description The identifier of the Flash Media Server instance to which this Flash Player or Adobe AIR instance is connected. A value chosen substantially by Flash Media Server, unique to this connection. The total number of inbound and outbound peer connections that this instance of Flash Player or Adobe AIR allows. Support Not supported

farNonce

Not supported

maxPeerConnections

Not supported

nearID

The identifier of this Flash Player or Adobe AIR instance for this Not supported NetConnection instance. A value chosen substantially by this Flash Player or Adobe AIR instance, unique to this connection. The protocol used to establish the connection. An object that holds all of the peer subscriber NetStream objects that are not associated with publishing NetStream objects. Not supported

nearNonce

protocol unconnectedPeerStreams

Not supported Not supported

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

151

NetStream class
The NetStream class opens a one-way streaming connection between Flash Player and Flash Media Server, or between Flash Player and the local file system. A NetStream object is a channel within a NetConnection object. This channel can either publish a stream, using NetStream.publish(), or subscribe to a published stream and receive data, using NetStream.play(). You can publish or play live (real-time) data and previously recorded data. You can also use NetStream objects to send text messages to all subscribed clients (see the NetStream.send() method).

Method summary
The following table lists the methods of the NetStream class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method checkPolicyFile Description Specifies whether Flash Player should try to download a URL policy file from the loaded video file's server before beginning to load the video file. Sends streaming audio, video, and text messages from a client to Flash Media Server, optionally recording the stream during transmission. Sends a message on a published stream to all subscribing clients. Support Not supported

publish()

Not supported

send()

Not supported

Property summary
The following table lists the properties of the NetStream class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property checkPolicyFile Description Specifies whether Flash Player should try to download a URL policy file from the loaded video file's server before beginning to load the video file. Support Not supported

farID

The identifier of the far end that is connected to this NetStream Not supported instance. A value chosen substantially by the other end of this stream, unique to this connection. Not supported

farNonce

peerStreams

An object that holds all of the subscribing NetStream instances Not supported that are listening to this publishing NetStream instance Controls sound in this NetStream object Not supported

soundTransform

SimpleButton class
The SimpleButton class lets you control all instances of button symbols in a SWF file. After you create an instance of a button in the authoring tool, you can use the methods and properties of the SimpleButton class to manipulate buttons with ActionScript.

Property summary
The following table lists the properties of the SimpleButton class that are not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

152

Property soundTransform trackAsMenu

Description The SoundTransform object assigned to this button. Indicates whether other display objects that are SimpleButton or MovieClip objects can receive mouse release events.

Support Not supported Not supported

useHandCursor

A Boolean value that, when set to true, indicates whether Flash Not supported Player displays the hand cursor when the mouse rolls over a button.

Sound class
The Sound class lets you work with sound in an application. The Sound class lets you create a Sound object, load and play an external MP3 file into that object, close the sound stream, and access data about the sound, such as information about the number of bytes in the stream and ID3 metadata. More detailed control of the sound is performed through the sound source the SoundChannel or Microphone object for the sound and through the properties in the SoundTransform class that control the output of the sound to the computer's speakers.

Event summary
The following table lists the events of the Sound class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Event sampleData Description Dispatched when the player requests new audio data. Support Not supported

Method summary
The following table lists the methods of the Sound class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method extract() Description Extracts raw sound data from a Sound object. Support Not supported

Property summary
The following table lists the properties of the Sound class that are partially supported by Flash Lite 4 when using ActionScript 3.0.
Property id3 Description Provides access to the metadata that is part of an MP3 file. Support Partially supported

SoundMixer class
The SoundMixer class contains static properties and methods for global sound control in the application. The SoundMixer class controls embedded and streaming sounds in the application. It does not control dynamically created sounds (that is, sounds generated in response to a Sound object dispatching a sampleData event).

Method summary
The following table lists the methods of the SoundMixer class that are not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

153

Method areSoundsInaccessible()

Description Determines whether any sounds are not accessible due to security restrictions. Takes a snapshot of the current sound wave and places it into the specified ByteArray object.

Support Not supported

computeSpectrum()

Not supported

Sprite class
The Sprite class is a basic display list building block: a display list node that can display graphics and can also contain children.

Property summary
The following table lists the properties of the Sprite class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property useHandCursor Description A Boolean value that indicates whether the pointing hand (hand cursor) appears when the mouse rolls over a sprite in which the buttonMode property is set to true. Support Not supported

Stage class
The Stage class represents the main drawing area. The Stage represents the entire area where Flash content is shown. The Stage object is not globally accessible. You need to access it through the stage property of a DisplayObject instance.

Method summary
The following table lists the methods of the Stage class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method assignFocus() Description Sets keyboard focus to the interactive object specified by objectToFocus, with the focus direction specified by the direction parameter. Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. Support Not supported

willTrigger()

Not supported

Property summary
The following table lists the properties of the Stage class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property colorCorrection colorCorrectionSupport Description Controls Flash Player color correction for displays. Specifies whether Flash Player is running on an operating system that supports color correction and whether the color profile of the main (primary) monitor can be read and understood by Flash Player. Support Not supported Not supported

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

154

Property

Description

Support

showDefaultContextMenu Specifies whether to show or hide the default items in the Flash Not supported Player context menu. tabChildren textSnapshot Determines whether the children of the object are tab enabled. Not supported Returns a TextSnapshot object for this DisplayObjectContainer Not supported instance.

System class
The System class contains properties related to certain operations that take place on the user's computer, such as operations with shared objects, local settings for cameras and microphones, and use of the Clipboard.

Method summary
The following table lists the methods of the System class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method exit() setClipboard() Description Closes the Flash Player. Replaces the contents of the Clipboard with a specified text string. Support Not supported Not supported

TextBlock class
The TextBlock class is a factory for the creation of TextLine objects, which you can render by placing them on the display list. The TextBlock class is intended to contain a single paragraph because the Unicode bidirectional and line-break algorithms operate on one paragraph at a time. For applications that compose multiple paragraphs of text, use a markup language, or text analysis to divide the text into paragraphs and create one TextBlock per paragraph.

Method summary
The following table lists the methods of the TextBlock class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method dump() Description Dumps the underlying contents of the TextBlock as an XML string. Support Not supported

TextField class
The TextField class is used to create display objects for text display and input. All dynamic and input text fields in a SWF file are instances of the TextField class. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField class to manipulate it with ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert Target Path dialog box in the Actions panel.

Property summary
The following table lists the properties of the TextField class that are not supported by Flash Lite 4 when using ActionScript 3.0.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

155

Property antiAliasType gridFitType mouseWheelEnabled

Description The type of anti-aliasing used for this text field. The type of grid fitting used for this text field.

Support Not supported Not supported

A Boolean value that indicates whether Flash Player Not supported automatically scrolls multiline text fields when the user clicks a text field and rolls the mouse wheel. The sharpness of the glyph edges in this text field. The thickness of the glyph edges in this text field. Specifies whether to copy and paste the text formatting along with the text. Not supported Not supported Not supported

sharpness thickness useRichTextClipboard

TextFormat class
The TextFormat class represents character formatting information. Use the TextFormat class to create specific text formatting for text fields. You can apply text formatting to both static and dynamic text fields. The properties of the TextFormat class apply to device and embedded fonts. However, for embedded fonts, bold and italic text actually require specific fonts. If you want to display bold or italic text with an embedded font, you need to embed the bold and italic variations of that font.

Property summary
The following table lists the properties of the TextFormat class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property kerning Description A Boolean value that indicates whether kerning is enabled (true) or disabled (false). A number representing the amount of space that is uniformly distributed between all characters. Support Not supported

letterSpacing

Not supported

TextLine class
The TextLine class is used to display text on the display list. You cannot create a TextLine object directly from ActionScript code. If you call new TextLine(), an exception is thrown. To create a TextLine object, call the createTextLine() method of a TextBlock object.

Method summary
The following table lists the methods of the TextLine class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method dump() Description Dumps the underlying contents of the TextLine as an XML string. Support Not supported

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

156

Transform class
The Transform class provides access to color adjustment properties and two- or three-dimensional transformation objects that can be applied to a display object. During the transformation, the color or the orientation and position of a display object is adjusted (offset) from the current values or coordinates to new values or coordinates. The Transform class also collects data about color and two-dimensional matrix transformations that are applied to a display object and all of its parent objects. You can access these combined transformations through the concatenatedColorTransform and concatenatedMatrix properties.

Method summary
The following table lists the methods of the Transform class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method getRelativeMatrix3D() Description Returns a Matrix3D object, which can transform the space of a specified display object in relation to the current display object's space. Support Not supported

Property summary
The following table lists the properties of the Transform class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Property matrix3D Description Provides access to the Matrix3D object of a three-dimensional display object. Provides access to the PerspectiveProjection object of a threedimensional display object Support Not supported

perspectiveProjection

Not supported

Video class
The Video class displays live or recorded video in an application without embedding the video in your SWF file. This class creates a Video object in an Adobe Flash or Adobe Flex interface that plays either of the following kinds of video:

recorded FLV files stored on a server or locally live video captured from a user's computer
A Video object is a display object on the application's display list and represents the visual space in which the video runs in a user interface.

Method summary
The following table lists the methods of the Video class that are not supported by Flash Lite 4 when using ActionScript 3.0.
Method attachCamera() Description Specifies a video stream from a camera to be displayed within the boundaries of the Video object in the application. Support Not supported

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

157

Unsupported ActionScript elements: details


A few ActionScript 3.0 classes are not supported by ActionScript 3.0 for Flash Lite 4. These classes are segregated based on the packages they belong to. For details about these classes, see Adobe ActionScript 3.0 Reference for the Adobe Flash Platform.

adobe.utils
The adobe.utils package contains functions and classes used by Flash authoring tool developers. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

CustomActions XMLUI

flash.accessibility
The flash.accessibility package contains classes for supporting accessibility in Flash content and applications. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

Accessibility AccessibilityProperties

flash.desktop
The flash.desktop package contains classes used for copy-and-paste and drag-and-drop operations, as well as the Icon class, used to define system icons used by a file. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

Clipboard ClipboardFormats ClipboardTransferMode

flash.display
The flash.display package contains classes used for copy-and-paste and drag-and-drop operations, as well as the Icon class, used to define system icons used by a file. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

BlendMode CapsStyle ColorCorrection ColorCorrectionSupport FocusDirection GraphicsBitmapFill GraphicsEndFill

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

158

GraphicsGradientFill GraphicsPath GraphicsPathCommand GraphicsPathWinding GraphicsShaderFill GraphicsSolidFill GraphicsStroke GraphicsTrianglePath IGraphicsData IGraphicsFill IGraphicsPath IGraphicsStroke InterpolationMethod JointStyle LineScaleMode NativeMenu NativeMenuItem NativeWindow NativeWindowDisplayState NativeWindowInitOptions NativeWindowResize NativeWindowSystemChrome NativeWindowType Screen Shader ShaderData ShaderInput ShaderJob ShaderParameter ShaderParameterType ShaderPrecision SpreadMethod TriangleCulling

flash.errors
The flash.errors package contains error classes that are part of the Flash Player Application Programming Interface (API), rather than part of the ActionScript core language.

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

159

The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

DRMManagerError SQLError SQLErrorOperation

flash.events
The flash.events package supports the new DOM event model and includes the EventDispatcher base class. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

ActivityEvent BrowserInvokeEvent DRMAuthenticateEvent DRMAuthenticationCompleteEvent DRMAuthenticationErrorEvent DRMErrorEvent DRMStatusEvent FileListEvent HTMLUncaughtScriptExceptionEvent InvokeEvent NativeDragEvent NativeWindowBoundsEvent NativeWindowDisplayStateEvent OutputProgressEvent SampleDataEvent ScreenMouseEvent ShaderEvent SQLErrorEvent SQLEvent SQLUpdateEvent

flash.filters
The flash.filters package contains classes for bitmap filter effects. Filters let you apply rich visual effects, such as blur, bevel, glow, and drop shadows, to display objects. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

BevelFilter BitmapFilter BitmapFilterQuality BitmapFilterType

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

160

BlurFilter ColorMatrixFilter ConvolutionFilter DisplacementMapFilter DisplacementMapFilterMode DropShadowFilter GlowFilter GradientBevelFilter GradientGlowFilter ShaderFilter

flash.geom
The flash.geom package contains geometry classes, such as points, rectangles and transformation matrixes, to support the BitmapData class and the bitmap caching feature. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

Matrix3D Orientation3D PerspectiveProjection Utils3D Vector3D

flash.media
The flash.media package contains classes for working with multimedia assets such as sound and video. It also contains the video and audio classes available in Flash Media Server. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

Camera Microphone scanHardware SoundCodec

flash.net
The flash.net package contains classes for sending and receiving from the network, such as URL downloading and Flash Remoting. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

FileFilter FileReference FileReferenceList

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

161

flash.printing
The flash.printing package contains classes for printing Flash-based content. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

PrintJob PrintJobOptions PrintJobOrientation

flash.profiler
The flash.profiler package contains functions used for debugging and profiling ActionScript code. The ShowRedrawRegions class is not supported by ActionScript 3.0 for Flash Lite 4.

flash.sampler
The flash.sampler package contains methods and classes for tracking procedure calls so that you can profile memory usage and optimize applications. This package is used by the profiling agent distributed with Adobe Flex Builder, and is provided for your use for customizing the profiling agent or building your own memory tests. After you know where an application uses the most memory, you can focus your optimization effort and speed up the application's performance.. The StackFrame class is not supported by ActionScript 3.0 for Flash Lite 4.

flash.system
The flash.system package contains classes for accessing system-level functionality, such as security, garbage collection, etc. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

IME IMEConversionMode

flash.text
The flash.text package contains classes for working with text fields, text formatting, text metrics, style sheets, and layout. Advanced anti-aliasing is available in Flash Player 8 and later through the flash.text.TextFormat and flash.text.TextRenderer classes. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

AntiAliasType CSMSettings FontStyle GridFitType TextColorType TextDisplayMode TextExtent TextRenderer

Last updated 3/22/2011

DEVELOPING FLASH LITE 4 APPLICATIONS


Introduction to Flash Lite 4 ActionScript

162

flash.ui
The flash.ui package contains user interface classes, such as classes for interacting with the mouse and keyboard. The following classes are not supported by ActionScript 3.0 for Flash Lite 4.

ContextMenu ContextMenuBuiltInItems ContextMenuClipboardItems ContextMenuItem KeyLocation Mouse MouseCursor

Last updated 3/22/2011

You might also like