flashlite 4 developing
TRANSCRIPT
DevelopingFLASH® LITE™ 4 Applications
Last updated 3/22/2011
Copyright© 2010 Adobe Systems Incorporated and its licensors. All rights reserved.
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.
iii
Last updated 3/22/2011
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Workflow for authoring Flash Lite applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About Flash Lite content types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Handling mouse and key events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Multi-touch support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 5: Working with text and fonts
Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Text input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Flash text engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Font rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Scrolling text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Chapter 6: Working with sound
Device sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Native sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Chapter 7: Working with video
Working with FLV files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
RTMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
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 . . . . . . . . . . . . . . . . . . . . . . . . . 53
Partially supported ActionScript classes: details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Unsupported ActionScript elements: details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
1
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
you’re 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.
2DEVELOPING FLASH LITE 4 APPLICATIONS
Flash Lite 4 overview
Last updated 3/22/2011
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.
3DEVELOPING FLASH LITE 4 APPLICATIONS
Flash Lite 4 overview
Last updated 3/22/2011
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 device’s 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.
4DEVELOPING FLASH LITE 4 APPLICATIONS
Flash Lite 4 overview
Last updated 3/22/2011
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.
5
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 you’re 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.
6DEVELOPING FLASH LITE 4 APPLICATIONS
Getting started with Flash Lite
Last updated 3/22/2011
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 application’s
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 doesn’t 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 can’t 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 application’s design
in the Flash authoring tool.
The following illustration shows the iterative development and testing process:
7DEVELOPING FLASH LITE 4 APPLICATIONS
Getting started with Flash Lite
Last updated 3/22/2011
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.
A
B
C
8
Last updated 3/22/2011
Chapter 3: Tutorial: Creating a Flash Lite application
In this tutorial, you’ll 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();
9DEVELOPING FLASH LITE 4 APPLICATIONS
Tutorial: Creating a Flash Lite application
Last updated 3/22/2011
5 Define global variables for use throughout the application:
var myNews:Array; var visi:Number=0; var selectedNews=0; var newsshowing:Sprite; var isSet:Boolean=false;
Note: The following three steps don’t 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:
10DEVELOPING FLASH LITE 4 APPLICATIONS
Tutorial: Creating a Flash Lite application
Last updated 3/22/2011
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.
11DEVELOPING FLASH LITE 4 APPLICATIONS
Tutorial: Creating a Flash Lite application
Last updated 3/22/2011
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; }
12DEVELOPING FLASH LITE 4 APPLICATIONS
Tutorial: Creating a Flash Lite application
Last updated 3/22/2011
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:
13DEVELOPING FLASH LITE 4 APPLICATIONS
Tutorial: Creating a Flash Lite application
Last updated 3/22/2011
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.
14
Last updated 3/22/2011
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 device’s 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 device’s 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 don’t support the left and right navigation keys.
Flash Lite supports the following keys on mobile devices:
15DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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 device’s 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 device’s 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.
Description Keys Availability
Numeric, *, # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, # All devices
Five-way keypad Select, up, and down All devices
Left and right Devices that support four-way navigation only
(see “Keyboard navigation modes” on page 15)
Keyboard keys !, “, #, $, %, &, ‘, (, ), *, +, ,, -, ., /, 0, 1, 2,
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
Devices that have a QWERTY keyboard
16DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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 computer’s keyboard to navigate
among objects on the screen. The device’s up, down, left, and right navigation keys correspond to the four arrow keys
on a computer’s 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 device’s
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.
1 2 3
4 5 6
7 8 9
B
A
17DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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 emulator’s 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 button’s “over” state. The “over” state is that part of a button
object’s timeline that’s 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 can’t 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.
18DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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 device’s
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 rectangle’s bounding box is determined by the object’s 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 field’s dimensions determine the focus rectangle’s 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
object’s 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;
19DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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 emulator’s 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, it’s
not possible to set tab order using the tabIndex property for four-way navigation.
20DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
To control tab order in two-way navigation, you assign each interactive object’s tabIndex property a number that
specifies the object’s 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:
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.
Mouse event Description
CLICK Defines the value of the type property of a click event object.
DOUBLE_CLICK Defines the value of the type property of a doubleClick event object.
MOUSE_DOWN Defines the value of the type property of a mouseDown event object.
MOUSE_MOVE Defines the value of the type property of a mouseMove event object.
MOUSE_OUT Defines the value of the type property of a mouseOut event object.
MOUSE_OVER Defines the value of the type property of a mouseOver event object.
MOUSE_UP Defines the value of the type property of a mouseUp event object.
MOUSE_WHEEL Defines the value of the type property of a mouseWheel event object.
ROLL_OUT Defines the value of the type property of a rollOut event object.
ROLL_OVER Defines the value of the type property of a rollOver event object.
21DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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);
22DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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.
23DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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" }
}
24DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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:
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:
Keyboard event Description
KEY_DOWN Defines the value of the type property of a keyDown event
object.
KEY_UP Defines the value of the type property of a keyUp event
object.
25DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
//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 emulator’s 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.
26DEVELOPING FLASH LITE 4 APPLICATIONS
Creating interactivity and navigation
Last updated 3/22/2011
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.
27
Last updated 3/22/2011
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 can’t 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 device’s 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.
28DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
• 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.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.
AB
29DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 device’s 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 device’s 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 device’s 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.
A
B
30DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
The following figure shows the different states of an input text field: not selected, selected (but not activated), and
activated:
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 Impact
ActionScript ActionScript processing continues when the text field is active and
text entry occurs.
Events 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.
Animations Both motion and shape tweens continue regardless of the state of the
input text field.
text text
unselectedselected selectedselected andfocused
TextFieldTextField
onSetFocusonSetFocus
flash.text.TextField.setSelection()flash.text.TextField.setSelection()
ButtonButton
textex text text
onKillFocusonKillFocus
flash.text.TextField.selectionBeginIndexflash.text.TextField.caretIndex
flash.text.TextField.selectionEndIndexflash.display.Stage.focus
unselected
31DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 pointer’s
location within the text field using the device’s 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 field’s flashing pointer or insertion indicator. For this reason, it’s 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 device’s 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 class’s focus property along with the TextField
class’s 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.
Video 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.
Audio Sound playback continues despite inline text entry.
Network 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.
Flash Lite Components Impact
32DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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. 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 device’s text input dialog box (Flash Lite 4)
To open the device’s input dialog box, you first give focus to an input text field, and then press the device’s Select key.
The text input dialog box is modal, which means that you can’t 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:
A
B
A
33DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 field’s 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 device’s input text dialog box when a user
edits the text field.
For example, when a user edits a single-line input text field, the device’s 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 device’s input text dialog box for a single-line input text field in a Flash Lite 4 application:
34DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
When you edit a multiline input text field, the device’s 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 device’s 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.
35DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 field’s 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 emulator’s Select key to open the text input dialog box and enter some text using
your computer’s 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.
36DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 you’re 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 you’re using
an input text field to capture a user’s 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 you’re 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 player’s
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.)
37DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
• Select Anti-Alias for Animation to have Flash Lite anti-alias the text field’s 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 object’s 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 field’s 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 field’s 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 field’s 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 can’t 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 can’t 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.
38DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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 field’s 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 user’s 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.
39DEVELOPING FLASH LITE 4 APPLICATIONS
Working with text and fonts
Last updated 3/22/2011
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.
40
Last updated 3/22/2011
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 device’s 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 class’s 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();
}
41DEVELOPING FLASH LITE 4 APPLICATIONS
Working with sound
Last updated 3/22/2011
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 don’t 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 device’s 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 application’s 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.
42DEVELOPING FLASH LITE 4 APPLICATIONS
Working with sound
Last updated 3/22/2011
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.
43
Last updated 3/22/2011
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.
44DEVELOPING FLASH LITE 4 APPLICATIONS
Working with video
Last updated 3/22/2011
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 don’t 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 don’t see the video file listed (or if you can see it but can’t 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:
45DEVELOPING FLASH LITE 4 APPLICATIONS
Working with video
Last updated 3/22/2011
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. It’s 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:
46DEVELOPING FLASH LITE 4 APPLICATIONS
Working with video
Last updated 3/22/2011
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:
47DEVELOPING FLASH LITE 4 APPLICATIONS
Working with video
Last updated 3/22/2011
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
48DEVELOPING FLASH LITE 4 APPLICATIONS
Working with video
Last updated 3/22/2011
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 can’t 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.
49
Last updated 3/22/2011
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 device’s 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 device’s 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 device’s 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 device’s 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.
50DEVELOPING FLASH LITE 4 APPLICATIONS
Working with device APIs
Last updated 3/22/2011
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 device’s motion sensor.
51DEVELOPING FLASH LITE 4 APPLICATIONS
Working with device APIs
Last updated 3/22/2011
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.
A. Axis orientation in portrait mode
A. Axis orientation in landscape mode
The acceleration along the axes is defined in the following manner:
• Acceleration along the X axis—The 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 axis—The 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 axis—The 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.
AA
+Y
+Z
+X
-Y
-Z
-X
AA
+Y
+Z
+X
-Y
-Z
-X
52DEVELOPING FLASH LITE 4 APPLICATIONS
Working with device APIs
Last updated 3/22/2011
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.
53
Last updated 3/22/2011
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.
AccelerometerEvent
The following table shows those members of the AccelerometerEvent class that ActionScript 3.0 and Flash Lite 4
support.
Member Name ActionScript 3.0 Flash Lite 4
Accelerometer() Yes Yes
isSupported : Boolean Yes Yes
muted : Boolean Yes No
setRequestedUpdateInterval(interval:Number):void Yes Yes
update Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
accelerationX : Number Yes Yes
accelerationY : Number Yes Yes
accelerationZ : Number Yes Yes
AccelerometerEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, timestamp:Number = 0,
accelerationX:Number = 0, accelerationY:Number = 0,
accelerationZ:Number = 0)
Yes Yes
timestamp : Number Yes Yes
clone():Event Yes No
toString():String Yes No
UPDATE : String = “accelerometerUpdate” Yes Yes
54DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
ActionGenerator
The following table shows those members of the ActionGenerator class that ActionScript 3.0 and Flash Lite 4 support.
ActionScriptVersion
The following table shows those members of the ActionScriptVersion class that ActionScript 3.0 and Flash Lite 4
support.
ApplicationDomain
The following table shows those members of the ApplicationDomain class that ActionScript 3.0 and Flash Lite 4
support.
ArgumentError
The following table shows those members of the ArgumentError class that ActionScript 3.0 and Flash Lite 4 support.
arguments
The following table shows those members of the arguments class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ActionGenerator() Yes Yes
generateAction(a:AutomationAction):void Yes Yes
generateActions(actionList:Array):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ACTIONSCRIPT3 : uint = 3 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
currentDomain : ApplicationDomain Yes Yes
domainMemory : ByteArray Yes Yes
MIN_DOMAIN_MEMORY_LENGTH : uint Yes Yes
parentDomain : ApplicationDomain Yes Yes
ApplicationDomain(parentDomain:ApplicationDomain = null) Yes Yes
constructApplicationDomainObject(parentDomain:Application
Domain = null):*
Yes Yes
getDefinition(name:String):Object Yes Yes
hasDefinition(name:String):Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ArgumentError(message:String = "") Yes Yes
55DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Array
The following table shows those members of the Array class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
callee : Function Yes Yes
length : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
length : uint Yes Yes
Array(... values) Yes Yes
Array(numElements:int = 0) Yes Yes
concat(... args):Array Yes Yes
every(callback:Function, thisObject:* = null):Boolean Yes Yes
filter(callback:Function, thisObject:* = null):Array Yes Yes
forEach(callback:Function, thisObject:* = null):void Yes Yes
indexOf(searchElement:*, fromIndex:int = 0):int Yes Yes
join(sep:*):String Yes Yes
lastIndexOf(searchElement:*, fromIndex:int =
0x7fffffff):int
Yes Yes
map(callback:Function, thisObject:* = null):Array Yes Yes
pop():* Yes Yes
push(... args):uint Yes Yes
reverse():Array Yes Yes
shift():* Yes Yes
slice(startIndex:int = 0, endIndex:int = 16777215):Array Yes Yes
some(callback:Function, thisObject:* = null):Boolean Yes Yes
sort(... args):Array Yes Yes
sortOn(fieldName:Object, options:Object = null):Array Yes Yes
splice(startIndex:int, deleteCount:uint, ... values):Array Yes Yes
toLocaleString():String Yes Yes
toString():String Yes Yes
unshift(... args):uint Yes Yes
CASEINSENSITIVE : uint = 1 Yes Yes
DESCENDING : uint = 2 Yes Yes
56DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
AsyncErrorEvent
The following table shows those members of the AsyncErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
AutomationAction
The following table shows those members of the AutomationAction class that ActionScript 3.0 and Flash Lite 4
support.
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.
NUMERIC : uint = 16 Yes Yes
RETURNINDEXEDARRAY : uint = 8 Yes Yes
UNIQUESORT : uint = 4 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
AsyncErrorEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "", error:Error = null)
Yes Yes
clone():Event Yes Yes
toString():String Yes Yes
ASYNC_ERROR : String = "asyncError" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
type : String Yes Yes
AutomationAction(type:String) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bitmapData : BitmapData Yes Yes
pixelSnapping : String Yes Yes
smoothing : Boolean Yes Yes
Bitmap(bitmapData:BitmapData = null,
pixelSnapping:String = "auto", smoothing:Boolean =
false)
Yes Yes
constructBitmapObject(bitmapData:BitmapData =
null, pixelSnapping:String = "auto",
smoothing:Boolean = false):void
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
57DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
BitmapData
The following table shows those members of the BitmapData class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
height : int Yes Yes
rect : Rectangle Yes Yes
transparent : Boolean Yes Yes
width : int Yes Yes
BitmapData(width:int, height:int, transparent:Boolean = true,
fillColor:uint = 0xFFFFFFFF)
Yes Yes
applyFilter(sourceBitmapData:BitmapData,
sourceRect:Rectangle, destPoint:Point, filter:BitmapFilter):void
Yes No
clone():BitmapData Yes Yes
colorTransform(rect:Rectangle,
colorTransform:flash.geom:ColorTransform):void
Yes Yes
compare(otherBitmapData:BitmapData):Object Yes Yes
constructBitmapDataObject(width:int, height:int,
transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF):void
Yes Yes
copyChannel(sourceBitmapData:BitmapData,
sourceRect:Rectangle, destPoint:Point, sourceChannel:uint,
destChannel:uint):void
Yes Yes
copyPixels(sourceBitmapData:BitmapData,
sourceRect:Rectangle, destPoint:Point,
alphaBitmapData:BitmapData = null, alphaPoint:Point = null,
mergeAlpha:Boolean = false):void
Yes Yes
dispose():void Yes Yes
draw(source:IBitmapDrawable, matrix:Matrix = null,
colorTransform:flash.geom:ColorTransform = null,
blendMode:String = null, clipRect:Rectangle = null,
smoothing:Boolean = false):void
Yes Yes
fillRect(rect:Rectangle, color:uint):void Yes Yes
floodFill(x:int, y:int, color:uint):void Yes Yes
generateFilterRect(sourceRect:Rectangle,
filter:BitmapFilter):Rectangle
Yes No
getColorBoundsRect(mask:uint, color:uint, findColor:Boolean =
true):Rectangle
Yes Yes
getPixel(x:int, y:int):uint Yes Yes
getPixel32(x:int, y:int):uint Yes Yes
getPixels(rect:Rectangle):ByteArray Yes Yes
getVector(rect:Rectangle):Vector.<uint> Yes Yes
histogram(hRect:Rectangle = null):Vector.<Vector.<Number>> Yes Yes
58DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
BitmapDataChannel
The following table shows those members of the BitmapDataChannel class that ActionScript 3.0 and Flash Lite 4
support.
Boolean
The following table shows those members of the Boolean class that ActionScript 3.0 and Flash Lite 4 support.
hitTest(firstPoint:Point, firstAlphaThreshold:uint,
secondObject:Object, secondBitmapDataPoint:Point = null,
secondAlphaThreshold:uint = 1):Boolean
Yes Yes
lock():void Yes No
merge(sourceBitmapData:BitmapData, sourceRect:Rectangle,
destPoint:Point, redMultiplier:uint, greenMultiplier:uint,
blueMultiplier:uint, alphaMultiplier:uint):void
Yes Yes
noise(randomSeed:int, low:uint = 0, high:uint = 255,
channelOptions:uint = 7, grayScale:Boolean = false):void
Yes No
paletteMap(sourceBitmapData:BitmapData,
sourceRect:Rectangle, destPoint:Point, redArray:Array = null,
greenArray:Array = null, blueArray:Array = null, alphaArray:Array
= null):void
Yes Yes
perlinNoise(baseX:Number, baseY:Number, numOctaves:uint,
randomSeed:int, stitch:Boolean, fractalNoise:Boolean,
channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array
= null):void
Yes No
pixelDissolve(sourceBitmapData:BitmapData,
sourceRect:Rectangle, destPoint:Point, randomSeed:int = 0,
numPixels:int = 0, fillColor:uint = 0):int
Yes No
scroll(x:int, y:int):void Yes No
setPixel(x:int, y:int, color:uint):void Yes Yes
setPixel32(x:int, y:int, color:uint):void Yes Yes
setPixels(rect:Rectangle, inputByteArray:ByteArray):void Yes Yes
setVector(rect:Rectangle, inputVector:Vector.<uint>):void Yes Yes
threshold(sourceBitmapData:BitmapData, sourceRect:Rectangle,
destPoint:Point, operation:String, threshold:uint, color:uint = 0,
mask:uint = 0xFFFFFFFF, copySource:Boolean = false):uint
Yes No
unlock(changeRect:Rectangle = null):void Yes No
Member Name ActionScript 3.0 Flash Lite 4
ALPHA : uint = 8 Yes Yes
BLUE : uint = 4 Yes Yes
GREEN : uint = 2 Yes Yes
RED : uint = 1 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
59DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
BreakOpportunity
The following table shows those members of the BreakOpportunity class that ActionScript 3.0 and Flash Lite 4
support.
ByteArray
The following table shows those members of the ByteArray class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
Boolean(expression:Object = false) Yes Yes
toString():String Yes Yes
valueOf():Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ALL : String = "all" Yes Yes
ANY : String = "any" Yes Yes
AUTO : String = "auto" Yes Yes
NONE : String = "none" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ByteArray() Yes Yes
bytesAvailable : uint Yes Yes
clear():void Yes Yes
compress():void Yes No
defaultObjectEncoding : uint Yes Yes
deflate():void Yes Yes
endian : String Yes Yes
inflate():void Yes No
length : uint Yes Yes
objectEncoding : uint Yes Yes
position : uint Yes Yes
readBoolean():Boolean Yes Yes
readByte():int Yes Yes
readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void Yes Yes
readDouble():Number Yes Yes
readFloat():Number Yes Yes
readInt():int Yes Yes
readMultiByte(length:uint, charSet:String):String Yes Yes
60DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Capabilities
The following table shows those members of the Capabilities class that ActionScript 3.0 and Flash Lite 4 support.
readObject():* Yes Yes
readShort():int Yes Yes
readUnsignedByte():uint Yes Yes
readUnsignedInt():uint Yes Yes
readUnsignedShort():uint Yes Yes
readUTF():String Yes Yes
readUTFBytes(length:uint):String Yes Yes
toString():String Yes Yes
uncompress():void Yes Yes
writeBoolean(value:Boolean):void Yes Yes
writeByte(value:int):void Yes Yes
writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void Yes Yes
writeDouble(value:Number):void Yes Yes
writeFloat(value:Number):void Yes Yes
writeInt(value:int):void Yes Yes
writeMultiByte(value:String, charSet:String):void Yes Yes
writeObject(object:*):void Yes Yes
writeShort(value:int):void Yes Yes
writeUnsignedInt(value:uint):void Yes Yes
writeUTF(value:String):void Yes Yes
writeUTFBytes(value:String):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
avHardwareDisable : Boolean Yes Yes
cpuArchitecture Yes No
hasAccessibility : Boolean Yes Yes
hasAudio : Boolean Yes Yes
hasAudioEncoder : Boolean Yes Yes
hasEmbeddedVideo : Boolean Yes Yes
hasIME : Boolean Yes Yes
hasMP3 : Boolean Yes Yes
hasPrinting : Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
61DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
CFFHinting
The following table shows those members of the CFFHinting class that ActionScript 3.0 and Flash Lite 4 support.
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.
hasScreenBroadcast : Boolean Yes Yes
hasScreenPlayback : Boolean Yes Yes
hasStreamingAudio : Boolean Yes Yes
hasStreamingVideo : Boolean Yes Yes
hasTLS : Boolean Yes Yes
hasVideoEncoder : Boolean Yes Yes
isDebugger : Boolean Yes Yes
isEmbeddedInAcrobat : Boolean Yes Yes
language : String Yes Yes
localFileReadDisable : Boolean Yes Yes
manufacturer : String Yes Yes
maxLevelIDC : String Yes Yes
os : String Yes Yes
pixelAspectRatio : Number Yes Yes
playerType : String Yes Yes
screenColor : String Yes Yes
screenDPI : Number Yes Yes
screenResolutionX : Number Yes Yes
screenResolutionY : Number Yes Yes
serverString : String Yes Yes
supports32BitProcesses : Boolean Yes No
supports64BitProcesses : Boolean Yes No
touchscreenType : String Yes No
version : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
HORIZONTAL_STEM : String = "horizontalStem" Yes Yes
NONE : String = "none" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
62DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
ColorTransform
The following table shows those members of the ColorTransform class that ActionScript 3.0 and Flash Lite 4 support.
ContentElement
The following table shows those members of the ContentElement class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
alphaMultiplier : Number Yes Yes
alphaOffset : Number Yes Yes
blueMultiplier : Number Yes Yes
blueOffset : Number Yes Yes
color : uint Yes Yes
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)
Yes Yes
concat(second:flash.geom:ColorTransform):void Yes Yes
greenMultiplier : Number Yes Yes
greenOffset : Number Yes Yes
redMultiplier : Number Yes Yes
redOffset : Number Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ContentElement(elementFormat:ElementFormat = null,
eventMirror:EventDispatcher = null, textRotation:String =
"rotate0")
Yes Yes
elementFormat : ElementFormat Yes Yes
eventMirror : EventDispatcher Yes Yes
GRAPHIC_ELEMENT : uint = 0xFDEF Yes Yes
groupElement : GroupElement Yes Yes
rawText : String Yes Yes
text : String Yes Yes
textBlock : flash.text.engine:TextBlock Yes Yes
textBlockBeginIndex : int Yes Yes
textRotation : String Yes Yes
userData : * Yes Yes
63DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
DataEvent
The following table shows those members of the DataEvent class that ActionScript 3.0 and Flash Lite 4 support.
Date
The following table shows those members of the Date class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
data : String Yes Yes
DATA : String = "data" Yes Yes
DataEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, data:String = "")
Yes Yes
toString():String Yes Yes
UPLOAD_COMPLETE_DATA : String =
"uploadCompleteData"
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
date : Number Yes Yes
Date(yearOrTimevalue:Object, month:Number, date:Number = 1,
hour:Number = 0, minute:Number = 0, second:Number = 0,
millisecond:Number = 0)
Yes Yes
dateUTC : Number Yes Yes
day : Number Yes Yes
dayUTC : Number Yes Yes
fullYear : Number Yes Yes
fullYearUTC : Number Yes Yes
getDate():Number Yes Yes
getDay():Number Yes Yes
getFullYear():Number Yes Yes
getHours():Number Yes Yes
getMilliseconds():Number Yes Yes
getMinutes():Number Yes Yes
getMonth():Number Yes Yes
getSeconds():Number Yes Yes
getTime():Number Yes Yes
getTimezoneOffset():Number Yes Yes
getUTCDate():Number Yes Yes
getUTCDay():Number Yes Yes
getUTCFullYear():Number Yes Yes
64DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
getUTCHours():Number Yes Yes
getUTCMilliseconds():Number Yes Yes
getUTCMinutes():Number Yes Yes
getUTCMonth():Number Yes Yes
getUTCSeconds():Number Yes Yes
hours : Number Yes Yes
hoursUTC : Number Yes Yes
milliseconds : Number Yes Yes
millisecondsUTC : Number Yes Yes
minutes : Number Yes Yes
minutesUTC : Number Yes Yes
month : Number Yes Yes
monthUTC : Number Yes Yes
parse(date:String):Number Yes Yes
seconds : Number Yes Yes
secondsUTC : Number Yes Yes
setDate(day:Number):Number Yes Yes
setFullYear(year:Number, month:Number, day:Number):Number Yes Yes
setHours(hour:Number, minute:Number, second:Number,
millisecond:Number):Number
Yes Yes
setMilliseconds(millisecond:Number):Number Yes Yes
setMinutes(minute:Number, second:Number,
millisecond:Number):Number
Yes Yes
setMonth(month:Number, day:Number):Number Yes Yes
setSeconds(second:Number, millisecond:Number):Number Yes Yes
setTime(millisecond:Number):Number Yes Yes
setUTCDate(day:Number):Number Yes Yes
setUTCFullYear(year:Number, month:Number,
day:Number):Number
Yes Yes
setUTCHours(hour:Number, minute:Number, second:Number,
millisecond:Number):Number
Yes Yes
setUTCMilliseconds(millisecond:Number):Number Yes Yes
setUTCMinutes(minute:Number, [second:Number],
[millisecond:Number]) : Number
Yes Yes
setUTCMinutes(minute:Number, second:Number,
millisecond:Number):Number
Yes Yes
setUTCMonth(month:Number, day:Number):Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
65DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
DefinitionError
The following table shows those members of the DefinitionError class that ActionScript 3.0 and Flash Lite 4 support.
Dictionary
The following table shows those members of the Dictionary class that ActionScript 3.0 and Flash Lite 4 support.
DigitCase
The following table shows those members of the DigitCase class that ActionScript 3.0 and Flash Lite 4 support.
DigitWidth
The following table shows those members of the DigitWidth class that ActionScript 3.0 and Flash Lite 4 support.
setUTCSeconds(second:Number, millisecond:Number):Number Yes Yes
setYear(year:Number) : Number Yes Yes
time : Number Yes Yes
timezoneOffset : Number Yes Yes
toDateString():String Yes Yes
toLocaleDateString():String Yes Yes
toLocaleString():String Yes Yes
toLocaleTimeString():String Yes Yes
toString():String Yes Yes
toTimeString():String Yes Yes
toUTCString():String Yes Yes
UTC(year:Number, month:Number, date:Number = 1,
hour:Number = 0, minute:Number = 0, second:Number = 0,
millisecond:Number = 0):Number
Yes Yes
valueOf():Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DefinitionError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
Dictionary(weakKeys:Boolean = false) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DEFAULT : String = "default" Yes Yes
LINING : String = "lining" Yes Yes
OLD_STYLE : String = "oldStyle" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
66DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
DisplayObject
The following table shows those members of the DisplayObject class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
DEFAULT : String = "default" Yes Yes
PROPORTIONAL : String = "proportional" Yes Yes
TABULAR : String = "tabular" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
accessibilityProperties : AccessibilityProperties Yes No
added Yes Yes
addedToStage Yes Yes
alpha : Number Yes Yes
blendMode : String Yes No
blendShader : Shader Yes No
cacheAsBitmap : Boolean Yes Yes
enterFrame Yes Yes
exitFrame Yes Yes
filters : Array Yes No
frameConstructed Yes Yes
getBounds(targetCoordinateSpace:DisplayObject):Rectangle Yes Yes
getRect(targetCoordinateSpace:DisplayObject):Rectangle Yes Yes
globalToLocal(point:Point):Point Yes Yes
globalToLocal3D(point:Point):Vector3D Yes Yes
height : Number Yes Yes
hitTestObject(obj:DisplayObject):Boolean Yes Yes
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean =
false):Boolean
Yes Yes
loaderInfo : LoaderInfo Yes Yes
local3DToGlobal(point3d:Vector3D):Point Yes Yes
localToGlobal(point:Point):Point Yes Yes
mask : DisplayObject Yes Yes
modified : Boolean Yes Yes
mouseX : Number Yes Yes
mouseY : Number Yes Yes
name : String Yes Yes
67DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
DisplayObjectContainer
The following table shows those members of the DisplayObjectContainer class that ActionScript 3.0 and Flash Lite 4
support.
opaqueBackground : Object Yes Yes
parent : DisplayObjectContainer Yes Yes
removed Yes Yes
removedFromStage Yes Yes
render Yes Yes
root : DisplayObject Yes Yes
rotation : Number Yes Yes
rotationX : Number Yes Yes
rotationY : Number Yes Yes
rotationZ : Number Yes Yes
scale9Grid : Rectangle Yes Yes
scaleX : Number Yes Yes
scaleY : Number Yes Yes
scaleZ : Number Yes No
scrollRect : Rectangle Yes No
stage : Stage Yes Yes
transform : flash.geom:Transform Yes Yes
visible : Boolean Yes Yes
width : Number Yes Yes
x : Number Yes Yes
y : Number Yes Yes
z : Number Yes No
Member Name ActionScript 3.0 Flash Lite 4
addChild(child:DisplayObject):DisplayObject Yes Yes
addChildAt(child:DisplayObject, index:int):DisplayObject Yes Yes
areInaccessibleObjectsUnderPoint(point:Point):Boolean Yes Yes
contains(child:DisplayObject):Boolean Yes Yes
getChildAt(index:int):DisplayObject Yes Yes
getChildByName(name:String):DisplayObject Yes Yes
getChildIndex(child:DisplayObject):int Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
68DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
EastAsianJustifier
The following table shows those members of the EastAsianJustifier class that ActionScript 3.0 and Flash Lite 4 support.
ElementFormat
The following table shows those members of the ElementFormat class that ActionScript 3.0 and Flash Lite 4 support.
getObjectsUnderPoint(point:Point):Array Yes Yes
mouseChildren : Boolean Yes Yes
numChildren : int Yes Yes
removeChild(child:DisplayObject):DisplayObject Yes Yes
removeChildAt(index:int):DisplayObject Yes Yes
setChildIndex(child:DisplayObject, index:int):void Yes Yes
swapChildren(child1:DisplayObject, child2:DisplayObject):void Yes Yes
swapChildrenAt(index1:int, index2:int):void Yes Yes
tabChildren : Boolean Yes Yes
textSnapshot : flash.text:TextSnapshot Yes No
Member Name ActionScript 3.0 Flash Lite 4
clone():flash.text.engine:TextJustifier Yes Yes
EastAsianJustifier(locale:String = "ja", lineJustification:String =
"allButLast", justificationStyle:String = "pushInKinsoku")
Yes Yes
justificationStyle : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
alignmentBaseline : String Yes Yes
alpha : Number Yes Yes
baselineShift : Number Yes Yes
breakOpportunity : String Yes Yes
clone():ElementFormat Yes Yes
color : uint Yes Yes
digitCase : String Yes Yes
digitWidth : String Yes Yes
dominantBaseline : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
69DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Endian
The following table shows those members of the Endian class that ActionScript 3.0 and Flash Lite 4 support.
EOFError
The following table shows those members of the EOFError class that ActionScript 3.0 and Flash Lite 4 support.
Error
The following table shows those members of the Error class that ActionScript 3.0 and Flash Lite 4 support.
ElementFormat(fontDescription:FontDescription = null, fontSize:Number =
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")
Yes Yes
fontDescription : FontDescription Yes Yes
fontSize : Number Yes Yes
getFontMetrics():FontMetrics Yes Yes
kerning : String Yes Yes
ligatureLevel : String Yes Yes
locale : String Yes Yes
locked : Boolean Yes Yes
textRotation : String Yes Yes
trackingLeft : Number Yes Yes
trackingRight : Number Yes Yes
typographicCase : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
BIG_ENDIAN : String = "bigEndian" Yes Yes
LITTLE_ENDIAN : String = "littleEndian" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
EOFError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
Error(message:String = "", id:int = 0) Yes Yes
errorID : int Yes Yes
getStackTrace():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
70DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
ErrorEvent
The following table shows those members of the ErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
EvalError
The following table shows those members of the EvalError class that ActionScript 3.0 and Flash Lite 4 support.
Event
The following table shows those members of the Event class that ActionScript 3.0 and Flash Lite 4 support.
message : String Yes Yes
name : String Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
ERROR : String = "error" Yes Yes
ErrorEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
errorID : int Yes No
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
EvalError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ACTIVATE : String = "activate" Yes Yes
ADDED : String = "added" Yes Yes
ADDED_TO_STAGE : String = "addedToStage" Yes Yes
bubbles : Boolean Yes Yes
CANCEL : String = "cancel" Yes Yes
cancelable : Boolean Yes Yes
CHANGE : String = "change" Yes Yes
CLEAR : String = "clear" Yes Yes
clone():Event Yes Yes
CLOSE : String = "close" Yes Yes
COMPLETE : String = "complete" Yes Yes
CONNECT : String = "connect" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
71DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
COPY : String = "copy" Yes Yes
currentTarget : Object Yes Yes
CUT : String = "cut" Yes Yes
DEACTIVATE : String = "deactivate" Yes Yes
ENTER_FRAME : String = "enterFrame" Yes Yes
Event(type:String, bubbles:Boolean = false, cancelable:Boolean =
false)
Yes Yes
eventPhase : uint Yes Yes
EXIT_FRAME : String = "exitFrame" Yes Yes
formatToString(className:String, ... arguments):String Yes Yes
FRAME_CONSTRUCTED : String = "frameConstructed" Yes Yes
FULLSCREEN : String = "fullScreen" Yes Yes
ID3 : String = "id3" Yes Yes
INIT : String = "init" Yes Yes
isDefaultPrevented():Boolean Yes Yes
MOUSE_LEAVE : String = "mouseLeave" Yes Yes
OPEN : String = "open" Yes Yes
PASTE : String = "paste" Yes Yes
preventDefault():void Yes Yes
REMOVED : String = "removed" Yes Yes
REMOVED_FROM_STAGE : String = "removedFromStage" Yes Yes
RENDER : String = "render" Yes Yes
RESIZE : String = "resize" Yes Yes
SCROLL : String = "scroll" Yes Yes
SELECT : String = "select" Yes Yes
SELECT_ALL : String = "selectAll" Yes Yes
SOUND_COMPLETE : String = "soundComplete" Yes Yes
stopImmediatePropagation():void Yes Yes
stopPropagation():void Yes Yes
TAB_CHILDREN_CHANGE : String = "tabChildrenChange" Yes Yes
TAB_ENABLED_CHANGE : String = "tabEnabledChange" Yes Yes
TAB_INDEX_CHANGE : String = "tabIndexChange" Yes Yes
target : Object Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
72DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
EventDispatcher
The following table shows those members of the EventDispatcher class that ActionScript 3.0 and Flash Lite 4 support.
EventPhase
The following table shows those members of the EventPhase class that ActionScript 3.0 and Flash Lite 4 support.
Extension
The following table shows those members of the Extension class that ActionScript 3.0 and Flash Lite 4 support.
ExternalInterface
The following table shows those members of the ExternalInterface class that ActionScript 3.0 and Flash Lite 4 support.
toString():String Yes Yes
type : String Yes Yes
UNLOAD : String = "unload" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
activate Yes Yes
addEventListener(type:String, listener:Function, useCapture:Boolean =
false, priority:int = 0, useWeakReference:Boolean = false):void
Yes Yes
deactivate Yes Yes
dispatchEvent(event:Event):Boolean Yes Yes
EventDispatcher(target:IEventDispatcher = null) Yes Yes
hasEventListener(type:String):Boolean Yes Yes
removeEventListener(type:String, listener:Function, useCapture:Boolean
= false):void
Yes Yes
willTrigger(type:String):Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
AT_TARGET : uint = 2 Yes Yes
BUBBLING_PHASE : uint = 3 Yes Yes
CAPTURING_PHASE : uint = 1 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
callMethod(methodName:String, ... rest):* Yes Yes
Extension(extensionName:String, ... rest) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
73DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
FocusDirection
The following table shows those members of the FocusEvent class that ActionScript 3.0 and Flash Lite 4 support.
FocusEvent
The following table shows those members of the FocusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Font
The following table shows those members of the Font class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
addCallback(functionName:String, closure:Function):void Yes Yes
available : Boolean Yes Yes
call(functionName:String, ... arguments):* Yes Yes
marshallExceptions : Boolean = false Yes Yes
objectID : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
BOTTOM : String = "bottom" Yes No
NONE : String = "none" Yes No
TOP : String = "top" Yes No
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
FocusEvent(type:String, bubbles:Boolean = true,
cancelable:Boolean = false, relatedObject:InteractiveObject = null,
shiftKey:Boolean = false, keyCode:uint = 0)
Yes Yes
FOCUS_IN : String = "focusIn" Yes Yes
FOCUS_OUT : String = "focusOut" Yes Yes
isRelatedObjectInaccessible : Boolean Yes Yes
keyCode : uint Yes Yes
KEY_FOCUS_CHANGE : String = "keyFocusChange" Yes Yes
MOUSE_FOCUS_CHANGE : String = "mouseFocusChange" Yes Yes
relatedObject : InteractiveObject Yes Yes
shiftKey : Boolean Yes Yes
toString():String Yes Yes
74DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
FontDescription
The following table shows those members of the FontDescription class that ActionScript 3.0 and Flash Lite 4 support.
FontLookup
The following table shows those members of the FontLookup class that ActionScript 3.0 and Flash Lite 4 support.
FontMetrics
The following table shows those members of the FontMetrics class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
enumerateFonts(enumerateDeviceFonts:Boolean = false):Array Yes Partial
fontName : String Yes Yes
fontStyle : String Yes Yes
fontType : String Yes Yes
hasGlyphs(str:String):Boolean Yes Yes
registerFont(font:Class):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
cffHinting : String Yes Yes
clone():FontDescription Yes Yes
FontDescription(fontName:String = "_serif", fontWeight:String =
"normal", fontPosture:String = "normal", fontLookup:String =
"device", renderingMode:String = "cff", cffHinting:String =
"horizontalStem")
Yes Yes
fontLookup : String Yes Yes
fontName : String Yes Yes
fontPosture : String Yes Yes
fontWeight : String Yes Yes
isFontCompatible(fontName:String, fontWeight:String,
fontPosture:String):Boolean
Yes Yes
relatedObject : InteractiveObject Yes Yes
locked : Boolean Yes Yes
renderingMode : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DEVICE : String = "device" Yes Yes
EMBEDDED_CFF : String = "embeddedCFF" Yes Yes
75DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
FontPosture
The following table shows those members of the FontPosture class that ActionScript 3.0 and Flash Lite 4 support.
FontType
The following table shows those members of the FontType class that ActionScript 3.0 and Flash Lite 4 support.
FontWeight
The following table shows those members of the FontWeight class that ActionScript 3.0 and Flash Lite 4 support.
FrameLabel
The following table shows those members of the FrameLabel class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
emBox : Rectangle Yes Yes
FontMetrics(emBox:Rectangle, strikethroughOffset:Number,
strikethroughThickness:Number, underlineOffset:Number,
underlineThickness:Number, subscriptOffset:Number,
subscriptScale:Number, superscriptOffset:Number,
superscriptScale:Number)
Yes Yes
strikethroughOffset : Number Yes Yes
strikethroughThickness : Number Yes Yes
subscriptOffset : Number Yes Yes
subscriptScale : Number Yes Yes
superscriptOffset : Number Yes Yes
superscriptScale : Number Yes Yes
underlineOffset : Number Yes Yes
underlineThickness : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ITALIC : String = "italic" Yes Yes
NORMAL : String = "normal" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DEVICE : String = "device" Yes Yes
EMBEDDED : String = "embedded" Yes Yes
EMBEDDED_CFF : String = "embeddedCFF" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
BOLD : String = "bold" Yes Yes
NORMAL : String = "normal" Yes Yes
76DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
FullScreenEvent
The following table shows those members of the FullScreenEvent class that ActionScript 3.0 and Flash Lite 4 support.
Function
The following table shows those members of the Function class that ActionScript 3.0 and Flash Lite 4 support.
Geolocation
The following table shows those members of the Geolocation class that ActionScript 3.0 and Flash Lite 4 support.
GeolocationEvent
The following table shows those members of the GeolocationEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
frame : int Yes Yes
name : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
fullScreen : Boolean Yes Yes
FullScreenEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, fullScreen:Boolean = false)
Yes Yes
FULL_SCREEN : String = "fullScreen" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
apply(thisArg:*, argArray:*):* Yes Yes
call(thisArg:*, ... args):* Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
Geolocation() Yes Yes
muted : Boolean Yes No
update Yes Yes
isSupported : Boolean Yes Yes
setRequestedUpdateInterval(time:Number):* Yes Yes
status Yes Yes
77DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
GestureEvent
The following table shows those members of the GestureEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
altitude : Number Yes Yes
GeolocationEvent(type:String, bubbles:Boolean = false,
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)
Yes Yes
heading : Number Yes Yes
horizontalAccuracy : Number Yes Yes
latitude : Number Yes Yes
longitude : Number Yes Yes
speed : Number Yes Yes
timestamp : Number Yes Yes
verticalAccuracy : Number Yes Yes
clone() : Event Yes No
toString() : String Yes No
UPDATE : String = "geolocationUpdate" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
altKey : Boolean Yes No
clone():Event Yes Yes
commandKey : Boolean Yes No
controlKey : Boolean Yes No
ctrlKey : Boolean Yes No
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)
Yes Yes
GESTURE_TWO_FINGER_TAP : String = "gestureTwoFingerTap" Yes Yes
localX : Number Yes Yes
localY : Number Yes Yes
phase : String Yes Yes
shiftKey : Boolean Yes No
stageX : Number Yes Yes
stageY : Number Yes Yes
toString():String Yes Yes
updateAfterEvent():void Yes Yes
78DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
GesturePhase
The following table shows those members of the GesturePhase class that ActionScript 3.0 and Flash Lite 4 support.
GradientType
The following table shows those members of the GradientType class that ActionScript 3.0 and Flash Lite 4 support.
GraphicElement
The following table shows those members of the GraphicElement class that ActionScript 3.0 and Flash Lite 4 support.
Graphics
The following table shows those members of the Graphics class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ALL : String = "all" Yes No
BEGIN : String = "begin" Yes Yes
END : String = "end" Yes Yes
UPDATE : String = "update" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
LINEAR : String = "linear" Yes Yes
RADIAL : String = "radial" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
elementHeight : Number Yes Yes
elementWidth : Number Yes Yes
graphic : DisplayObject Yes Yes
GraphicElement(graphic:DisplayObject = null,
elementWidth:Number = 15.0, elementHeight:Number = 15.0,
elementFormat:ElementFormat = null, eventMirror:EventDispatcher
= null, textRotation:String = "rotate0")
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null,
repeat:Boolean = true, smooth:Boolean = false):void
Yes Yes
beginFill(color:uint, alpha:Number = 1.0):void Yes Yes
beginGradientFill(type:String, colors:Array, alphas:Array,
ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad",
interpolationMethod:String = "rgb", focalPointRatio:Number =
0):void
Yes Yes
beginShaderFill(shader:Shader, matrix:Matrix = null):void Yes No
clear():void Yes Yes
79DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
GroupElement
The following table shows those members of the GroupElement class that ActionScript 3.0 and Flash Lite 4 support.
copyFrom(sourceGraphics:Graphics):void Yes Yes
curveTo(controlX:Number, controlY:Number, anchorX:Number,
anchorY:Number):void
Yes Yes
drawCircle(x:Number, y:Number, radius:Number):void Yes Yes
drawEllipse(x:Number, y:Number, width:Number,
height:Number):void
Yes Yes
drawGraphicsData(graphicsData:Vector.<IGraphicsData>):void Yes No
drawPath(commands:Vector.<int>, data:Vector.<Number>,
winding:String = "evenOdd"):void
Yes No
drawRect(x:Number, y:Number, width:Number,
height:Number):void
Yes Yes
drawRoundRect(x:Number, y:Number, width:Number,
height:Number, ellipseWidth:Number, ellipseHeight:Number =
NaN):void
Yes Yes
drawTriangles(vertices:Vector.<Number>, indices:Vector.<int> =
null, uvtData:Vector.<Number> = null, culling:String =
"none"):void
Yes No
endFill():void Yes Yes
lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null,
repeat:Boolean = true, smooth:Boolean = false):void
Yes No
lineGradientStyle(type:String, colors:Array, alphas:Array,
ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad",
interpolationMethod:String = "rgb", focalPointRatio:Number =
0):void
Yes No
lineShaderStyle(shader:Shader, matrix:Matrix = null):void Yes No
lineStyle(thickness:Number = NaN, color:uint = 0, alpha:Number =
1.0, pixelHinting:Boolean = false, scaleMode:String = "normal",
caps:String = null, joints:String = null, miterLimit:Number = 3):void
Yes Partial
lineTo(x:Number, y:Number):void Yes Yes
moveTo(x:Number, y:Number):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
elementCount : int Yes Yes
getElementAt(index:int):ContentElement Yes Yes
getElementAtCharIndex(charIndex:int):ContentElement Yes Yes
getElementIndex(element:ContentElement):int Yes Yes
GroupElement(elements:Vector.<ContentElement> = null,
elementFormat:ElementFormat = null, eventMirror:EventDispatcher
= null, textRotation:String = "rotate0")
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
80DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
HTTPStatusEvent
The following table shows those members of the HTTPStatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
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.
groupElements(beginIndex:int, endIndex:int):GroupElement Yes Yes
mergeTextElements(beginIndex:int,
endIndex:int):flash.text.engine:TextElement
Yes Yes
replaceElements(beginIndex:int, endIndex:int,
newElements:Vector.<ContentElement>):Vector.<ContentElement>
Yes Yes
setElements(value:Vector.<ContentElement>):void Yes Yes
splitTextElement(elementIndex:int,
splitIndex:int):flash.text.engine:TextElement
Yes Yes
ungroupElements(groupIndex:int):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
HTTPStatusEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, status:int = 0)
Yes Yes
HTTP_STATUS : String = "httpStatus" Yes Yes
status : int Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
album : String Yes Yes
artist : String Yes Yes
comment : String Yes Yes
genre : String Yes Yes
songName : String Yes Yes
track : String Yes Yes
year : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
81DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
IDataInput
The following table shows those members of the IDataInput interface that ActionScript 3.0 and Flash Lite 4 support.
IDataOutput
The following table shows those members of the IDataOutput interface that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
bytesAvailable : uint Yes Yes
endian : String Yes Yes
objectEncoding : uint Yes Yes
readBoolean():Boolean Yes Yes
readByte():int Yes Yes
readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void Yes Yes
readDouble():Number Yes Yes
readFloat():Number Yes Yes
readInt():int Yes Yes
readMultiByte(length:uint, charSet:String):String Yes Yes
readObject():* Yes Yes
readShort():int Yes Yes
readUnsignedByte():uint Yes Yes
readUnsignedInt():uint Yes Yes
readUnsignedShort():uint Yes Yes
readUTF():String Yes Ye
readUTFBytes(length:uint):String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
endian : String Yes Yes
objectEncoding : uint Yes Yes
writeBoolean(value:Boolean):void Yes Yes
writeByte(value:int):void Yes Yes
writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void Yes Yes
writeDouble(value:Number):void Yes Yes
writeFloat(value:Number):void Yes Yes
writeInt(value:int):void Yes Yes
writeMultiByte(value:String, charSet:String):void Yes Yes
writeObject(object:*):void Yes Yes
writeShort(value:int):void Yes Yes
82DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
IDynamicPropertyOutput
The following table shows those members of the IDynamicPropertyOutput interface that ActionScript 3.0 and Flash
Lite 4 support.
IDynamicPropertyWriter
The following table shows those members of the IDynamicPropertyWriter interface that ActionScript 3.0 and Flash
Lite 4 support.
IEventDispatcher
The following table shows those members of the IEventDispatcher interface that ActionScript 3.0 and Flash Lite 4
support.
IExternalizable
The following table shows those members of the IExternalizable interface that ActionScript 3.0 and Flash Lite 4
support.
writeUnsignedInt(value:uint):void Yes Yes
writeUTF(value:String):void Yes Yes
writeUTFBytes(value:String):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
writeDynamicProperty(name:String,
value:*):void
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
writeDynamicProperties(obj:Object,
output:IDynamicPropertyOutput):voi
d
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
addEventListener(type:String, listener:Function, useCapture:Boolean
= false, priority:int = 0, useWeakReference:Boolean = false):void
Yes Yes
dispatchEvent(event:Event):Boolean Yes Yes
hasEventListener(type:String):Boolean Yes Yes
removeEventListener(type:String, listener:Function,
useCapture:Boolean = false):void
Yes Yes
willTrigger(type:String):Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
83DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
IllegalOperationError
The following table shows those members of the IllegalOperationError class that ActionScript 3.0 and Flash Lite 4
support.
IMEEvent
The following table shows those members of the IMEEvent class that ActionScript 3.0 and Flash Lite 4 support.
int
The following table shows those members of the int class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
readExternal(input:IDataInput):void Yes Yes
writeExternal(output:IDataOutput):vo
id
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
IllegalOperationError(message:String
= "")
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
imeClient : IIMEClient Yes No
IMEEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
IME_COMPOSITION : String = "imeComposition" Yes Yes
IME_START_COMPOSITION : String =
"imeStartComposition"
Yes No
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
int(num:Object) Yes Yes
MAX_VALUE : int = 2147483648 Yes Yes
MIN_VALUE : int = -2147483648 Yes Yes
toExponential(fractionDigits:uint):String Yes Yes
toFixed(fractionDigits:uint):String Yes Yes
toPrecision(precision:uint):String Yes Yes
toString(radix:uint):String Yes Yes
valueOf():int Yes Yes
84DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
InteractiveObject
The following table shows those members of the InteractiveObject class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
clear Yes Yes
click Yes Yes
contextMenu : ContextMenu Yes No
copy Yes No
cut Yes No
doubleClick Yes No
doubleClickEnabled : Boolean Yes No
focusIn Yes Yes
focusOut Yes Yes
focusRect : Object Yes Yes
InteractiveObject() Yes Yes
keyDown Yes Yes
keyFocusChange Yes Yes
keyUp Yes Yes
mouseDown Yes Yes
mouseEnabled : Boolean Yes Yes
mouseFocusChange Yes Yes
mouseMove Yes Yes
mouseOut Yes Yes
mouseOver Yes Yes
mouseUp Yes Yes
mouseWheel Yes No
paste Yes No
rollOut Yes Yes
rollOver Yes Yes
selectAll Yes No
tabChildrenChange Yes No
tabEnabled : Boolean Yes No
tabEnabledChange Yes No
tabIndex : int Yes No
tabIndexChange Yes No
85DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
InvalidSWFError
The following table shows those members of the InvalidSWFError class that ActionScript 3.0 and Flash Lite 4 support.
IOError
The following table shows those members of the IOError class that ActionScript 3.0 and Flash Lite 4 support.
IOErrorEvent
The following table shows those members of the IOErrorEvent class that ActionScript 3.0 and Flash Lite 4 support.
JPEGLoaderContext
The following table shows those members of the JPEGLoaderContext class that ActionScript 3.0 and Flash Lite 4
support.
JustificationStyle
The following table shows those members of the JustificationStyle class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
InvalidSWFError(message:String = "",
id:int = 0)
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
IOError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
IOErrorEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
IO_ERROR : String = "ioError" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
deblockingFilter : Number = 0.0 Yes Yes
JPEGLoaderContext(deblockingFilter:Number = 0.0,
checkPolicyFile:Boolean = false,
applicationDomain:ApplicationDomain = null,
securityDomain:SecurityDomain = null)
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
PRIORITIZE_LEAST_ADJUSTMENT : String =
"prioritizeLeastAdjustment"
Yes Yes
PUSH_IN_KINSOKU : String = "pushInKinsoku" Yes Yes
PUSH_OUT_ONLY : String = "pushOutOnly" Yes Yes
86DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Kerning
The following table shows those members of the Kerning class that ActionScript 3.0 and Flash Lite 4 support.
Keyboard
The following table shows those members of the Keyboard class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
AUTO : String = "auto" Yes Yes
OFF : String = "off" Yes Yes
ON : String = "on" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
BACKSPACE : uint = 8 Yes Yes
capsLock : Boolean Yes Yes
CAPS_LOCK : uint = 20 Yes Yes
CONTROL : uint = 17 Yes Yes
DELETE : uint = 46 Yes Yes
DOWN : uint = 40 Yes Yes
END : uint = 35 Yes Yes
ENTER : uint = 13 Yes Yes
ESCAPE : uint = 27 Yes Yes
F1 : uint = 112 Yes Yes
F10 : uint = 121 Yes Yes
F11 : uint = 122 Yes Yes
F12 : uint = 123 Yes Yes
F13 : uint = 124 Yes Yes
F14 : uint = 125 Yes Yes
F15 : uint = 126 Yes Yes
F2 : uint = 113 Yes Yes
F3 : uint = 114 Yes Yes
F4 : uint = 115 Yes Yes
F5 : uint = 116 Yes Yes
F6 : uint = 117 Yes Yes
F7 : uint = 118 Yes Yes
F8 : uint = 119 Yes Yes
F9 : uint = 120 Yes Yes
hasVirtualKeyboard : Boolean Yes No
87DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
KeyboardAutomationAction
The following table shows those members of the KeyboardAutomationAction class that ActionScript 3.0 and Flash Lite
4 support.
HOME : uint = 36 Yes Yes
INSERT : uint = 45 Yes Yes
isAccessible():Boolean Yes No
LEFT : uint = 37 Yes Yes
numLock : Boolean Yes Yes
NUMPAD_0 : uint = 96 Yes Yes
NUMPAD_1 : uint = 97 Yes Yes
NUMPAD_2 : uint = 98 Yes Yes
NUMPAD_3 : uint = 99 Yes Yes
NUMPAD_4 : uint = 100 Yes Yes
NUMPAD_5 : uint = 101 Yes Yes
NUMPAD_6 : uint = 102 Yes Yes
NUMPAD_7 : uint = 103 Yes Yes
NUMPAD_8 : uint = 104 Yes Yes
NUMPAD_9 : uint = 105 Yes Yes
NUMPAD_ADD : uint = 107 Yes Yes
NUMPAD_DECIMAL : uint = 110 Yes Yes
NUMPAD_DIVIDE : uint = 111 Yes Yes
NUMPAD_ENTER : uint = 108 Yes Yes
NUMPAD_MULTIPLY : uint = 106 Yes Yes
NUMPAD_SUBTRACT : uint = 109 Yes Yes
PAGE_DOWN : uint = 34 Yes Yes
PAGE_UP : uint = 33 Yes Yes
physicalKeyboardType : String Yes No
RIGHT : uint = 39 Yes Yes
SHIFT : uint = 16 Yes Yes
SPACE : uint = 32 Yes Yes
TAB : uint = 9 Yes Yes
UP : uint = 38 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
88DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
KeyboardEvent
The following table shows those members of the KeyboardEvent class that ActionScript 3.0 and Flash Lite 4 support.
LigatureLevel
The following table shows those members of the LigatureLevel class that ActionScript 3.0 and Flash Lite 4 support.
LineJustification
The following table shows those members of the LineJustification class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
KeyboardAutomationAction(type:String, keyCode:uint = 0) Yes Yes
IOErrorEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
IO_ERROR : String = "ioError" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
altKey : Boolean Yes No
charCode : uint Yes Yes
clone():Event Yes Yes
ctrlKey : Boolean Yes No
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)
Yes Yes
keyCode : uint Yes Yes
KEY_DOWN : String = "keyDown" Yes Yes
keyLocation : uint Yes Yes
KEY_UP : String = "keyUp" Yes Yes
shiftKey : Boolean Yes No
toString():String Yes Yes
updateAfterEvent():void Yes No
Member Name ActionScript 3.0 Flash Lite 4
COMMON : String = "common" Yes Yes
EXOTIC : String = "exotic" Yes Yes
MINIMUM : String = "minimum" Yes Yes
NONE : String = "none" Yes Yes
UNCOMMON : String = "uncommon" Yes Yes
89DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Loader
The following table shows those members of the Loader class that ActionScript 3.0 and Flash Lite 4 support.
LoaderContext
The following table shows those members of the LoaderContext class that ActionScript 3.0 and Flash Lite 4 support.
LoaderInfo
The following table shows those members of the LoaderInfo class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ALL_BUT_LAST : String = "allButLast" Yes Yes
ALL_INCLUDING_LAST : String = "allIncludingLast" Yes Yes
UNJUSTIFIED : String = "unjustified" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
close():void Yes Yes
content : DisplayObject Yes Yes
contentLoaderInfo : LoaderInfo Yes Yes
load(request:URLRequest, context:LoaderContext = null):void Yes Yes
loadBytes(bytes:ByteArray, context:LoaderContext = null):void Yes Yes
Loader() Yes Yes
uncaughtErrorEvents : UncaughtErrorEvents Yes No
unload():void Yes Yes
unloadAndStop(gc:Boolean = true):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
applicationDomain : ApplicationDomain = null Yes Yes
checkPolicyFile : Boolean = false Yes Yes
LoaderContext(checkPolicyFile:Boolean = false,
applicationDomain:ApplicationDomain = null,
securityDomain:SecurityDomain = null)
Yes Yes
securityDomain : SecurityDomain = null Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
actionScriptVersion : uint Yes Yes
applicationDomain : ApplicationDomain Yes Yes
bytes : ByteArray Yes Yes
bytesLoaded : uint Yes Yes
90DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
LocalConnection
The following table shows those members of the LocalConnection class that ActionScript 3.0 and Flash Lite 4 support.
bytesTotal : uint Yes Yes
childAllowsParent : Boolean Yes Yes
complete Yes Yes
content : DisplayObject Yes Yes
contentType : String Yes Yes
frameRate : Number Yes Yes
getLoaderInfoByDefinition(object:Object):LoaderInfo Yes Yes
height : int Yes Yes
httpStatus Yes Yes
init Yes Yes
ioError Yes Yes
loader : Loader Yes Yes
loaderURL : String Yes Yes
open Yes Yes
parameters : Object Yes Yes
parentAllowsChild : Boolean Yes Yes
progress Yes Yes
sameDomain : Boolean Yes Yes
sharedEvents : EventDispatcher Yes Yes
swfVersion : uint Yes Yes
uncaughtErrorEvents : UncaughtErrorEvents Yes No
unload Yes Yes
url : String Yes Yes
width : int Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
allowDomain(... domains):void Yes Yes
allowInsecureDomain(... domains):void Yes Yes
asyncError Yes Yes
client : Object Yes Yes
close():void Yes Yes
connect(connectionName:String):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
91DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Math
The following table shows those members of the Math class that ActionScript 3.0 and Flash Lite 4 support.
domain : String Yes Yes
isPerUser : Boolean Yes No
isSupported : Boolean Yes No
LocalConnection() Yes Yes
securityError Yes Yes
send(connectionName:String, methodName:String, ...
arguments):void
Yes Yes
status Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
abs(val:Number):Number Yes Yes
acos(val:Number):Number Yes Yes
asin(val:Number):Number Yes Yes
atan(val:Number):Number Yes Yes
atan2(y:Number, x:Number):Number Yes Yes
ceil(val:Number):Number Yes Yes
cos(angleRadians:Number):Number Yes Yes
E : Number = 2.71828182845905 Yes Yes
exp(val:Number):Number Yes Yes
floor(val:Number):Number Yes Yes
LN10 : Number = 2.302585092994046 Yes Yes
LN2 : Number = 0.6931471805599453 Yes Yes
log(val:Number):Number Yes Yes
LOG10E : Number = 0.4342944819032518 Yes Yes
LOG2E : Number = 1.442695040888963387 Yes Yes
max(val1:Number, val2:Number, ... rest):Number Yes Yes
min(val1:Number, val2:Number, ... rest):Number Yes Yes
PI : Number = 3.141592653589793 Yes Yes
pow(base:Number, pow:Number):Number Yes Yes
random():Number Yes Yes
round(val:Number):Number Yes Yes
sin(angleRadians:Number):Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
92DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Matrix
The following table shows those members of the Matrix class that ActionScript 3.0 and Flash Lite 4 support.
MemoryError
The following table shows those members of the MemoryError class that ActionScript 3.0 and Flash Lite 4 support.
sqrt(val:Number):Number Yes Yes
SQRT1_2 : Number = 0.7071067811865476 Yes Yes
SQRT2 : Number = 1.4142135623730951 Yes Yes
tan(angleRadians:Number):Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
a : Number Yes Yes
b : Number Yes Yes
c : Number Yes Yes
clone():Matrix Yes Yes
concat(m:Matrix):void Yes Yes
createBox(scaleX:Number, scaleY:Number, rotation:Number = 0,
tx:Number = 0, ty:Number = 0):void
Yes Yes
createGradientBox(width:Number, height:Number,
[rotation:Number], [tx:Number], [ty:Number]) : Void
Yes Yes
d : Number Yes Yes
deltaTransformPoint(point:Point):Point Yes Yes
identity():void Yes Yes
invert():void Yes Yes
Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1,
tx:Number = 0, ty:Number = 0)
Yes Yes
rotate(angle:Number):void Yes Yes
scale(sx:Number, sy:Number):void Yes Yes
toString():String Yes Yes
transformPoint(point:Point):Point Yes Yes
translate(dx:Number, dy:Number):void Yes Yes
tx : Number Yes Yes
ty : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
MemoryError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
93DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
MouseEvent
The following table shows those members of the MouseEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
delta : int Yes Yes
MIDDLE_MOUSE_DOWN : String = "middleMouseDown" Yes Yes
MIDDLE_MOUSE_UP : String = "middleMouseUp" Yes Yes
MouseAutomationAction(type:String, stageX:Number = 0,
stageY:Number = 0, delta:int = 0)
Yes Yes
MOUSE_DOWN : String = "mouseDown" Yes Yes
MOUSE_MOVE : String = "mouseMove" Yes Yes
MOUSE_UP : String = "mouseUp" Yes Yes
MOUSE_WHEEL : String = "mouseWheel" Yes Yes
RIGHT_MOUSE_DOWN : String = "rightMouseDown" Yes Yes
RIGHT_MOUSE_UP : String = "rightMouseUp" Yes Yes
stageX : Number Yes Yes
stageY : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
altKey : Boolean Yes Yes
buttonDown : Boolean Yes Yes
CLICK : String = "click" Yes Yes
clone():Event Yes Yes
ctrlKey : Boolean Yes Yes
delta : int Yes Yes
DOUBLE_CLICK : String = "doubleClick" Yes Yes
isRelatedObjectInaccessible : Boolean Yes Yes
localX : Number Yes Yes
localY : Number Yes Yes
94DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
MovieClip
The following table shows those members of the MovieClip class that ActionScript 3.0 and Flash Lite 4 support.
MouseEvent(type:String, bubbles:Boolean = true, cancelable:Boolean
= 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)
Yes Yes
MOUSE_DOWN : String = "mouseDown" Yes Yes
MOUSE_MOVE : String = "mouseMove" Yes Yes
MOUSE_OUT : String = "mouseOut" Yes Yes
MOUSE_OVER : String = "mouseOver" Yes Yes
MOUSE_UP : String = "mouseUp" Yes Yes
MOUSE_WHEEL : String = "mouseWheel" Yes No
relatedObject : InteractiveObject Yes Yes
ROLL_OUT : String = "rollOut" Yes Yes
ROLL_OVER : String = "rollOver" Yes Yes
shiftKey : Boolean Yes Yes
stageX : Number Yes Yes
stageY : Number Yes Yes
toString():String Yes Yes
updateAfterEvent():void Yes No
Member Name ActionScript 3.0 Flash Lite 4
currentFrame : int Yes Yes
currentFrameLabel : String Yes Yes
currentLabel : String Yes Yes
currentLabels : Array Yes Yes
currentScene : Scene Yes Yes
enabled : Boolean Yes Yes
framesLoaded : int Yes Yes
gotoAndPlay(frame:Object, scene:String = null):void Yes Yes
gotoAndStop(frame:Object, scene:String = null):void Yes Yes
MovieClip() Yes Yes
nextFrame():void Yes Yes
nextScene():void Yes Yes
play():void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
95DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Multitouch
The following table shows those members of the Multitouch class that ActionScript 3.0 and Flash Lite 4 support.
MultitouchInputMode
The following table shows those members of the MultitouchInputMode class that ActionScript 3.0 and Flash Lite 4
support.
Namespace
The following table shows those members of the Namespace class that ActionScript 3.0 and Flash Lite 4 support.
prevFrame():void Yes Yes
prevScene():void Yes Yes
scenes : Array Yes Yes
stop():void Yes Yes
totalFrames : int Yes Yes
trackAsMenu : Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
inputMode : String Yes Yes
maxTouchPoints : int Yes Yes
supportedGestures : Vector.<String> Yes Yes
supportsGestureEvents : Boolean Yes Yes
supportsTouchEvents : Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
GESTURE : String = “gesture” Yes Yes
NONE : String = “none” Yes Yes
TOUCH_POINT : String = “touchPoint” Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
Namespace(prefixValue:*, uriValue:*) Yes Yes
Namespace(uriValue:*) Yes Yes
prefix : String Yes Yes
toString():String Yes Yes
uri : String Yes Yes
valueOf():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
96DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetConnection
The following table shows those members of the NetConnection class that ActionScript 3.0 and Flash Lite 4 support.
NetGroup
The following table shows those members of the NetGroup class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
asyncError Yes Yes
addHeader(operation:String, mustUnderstand:Boolean = false,
param:Object = null):void
Yes Yes
call(command:String, responder:Responder, ... arguments):void Yes Yes
client : Object Yes Yes
close():void Yes Yes
connect(command:String, ... arguments):void Yes Yes
connected : Boolean Yes Yes
connectedProxyType : String Yes Yes
defaultObjectEncoding : uint Yes Yes
farID : String Yes No
farNonce : String Yes No
ioError Yes Yes
maxPeerConnections : uint Yes No
nearID : String Yes No
nearNonce : String Yes No
NetConnection() Yes Yes
netStatus Yes Yes
objectEncoding : uint Yes Yes
protocol : String Yes No
proxyType : String Yes Yes
securityError Yes Yes
unconnectedPeerStreams : Array Yes No
uri : String Yes Yes
usingTLS : Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
estimatedMemberCount : Number Yes No
info : NetGroupInfo Yes No
localCoverageFrom : String Yes No
97DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetGroupInfo
The following table shows those members of the NetGroupInfo class that ActionScript 3.0 and Flash Lite 4 support.
localCoverageTo : String Yes No
neighborCount : Number Yes No
receiveMode : String Yes No
replicationStrategy : String Yes No
NetGroup(connection:NetConnection, groupspec:String) Yes No
addHaveObjects(startIndex:Number, endIndex:Number):void Yes No
addMemberHint(peerID:String):Boolean Yes No
addNeighbor(peerID:String):Boolean Yes No
addWantObjects(startIndex:Number, endIndex:Number):void Yes No
close():void Yes No
convertPeerIDToGroupAddress(peerID:String):String Yes No
denyRequestedObject(requestID:int):void Yes No
post(message:Object):String Yes No
removeHaveObjects(startIndex:Number, endIndex:Number):void Yes No
removeWantObjects(startIndex:Number, endIndex:Number):void Yes No
sendToAllNeighbors(message:Object):String Yes No
sendToNearest(message:Object, groupAddress:String):String Yes No
sendToNeighbor(message:Object, sendMode:String):String Yes No
writeRequestedObject(requestID:int, object:Object):void Yes No
Member Name ActionScript 3.0 Flash Lite 4
objectReplicationReceiveBytesPerSecond : Number Yes No
objectReplicationSendBytesPerSecond : Number Yes No
postingReceiveControlBytesPerSecond : Number Yes No
postingReceiveDataBytesPerSecond : Number Yes No
postingSendControlBytesPerSecond : Number Yes No
postingSendDataBytesPerSecond : Number Yes No
routingReceiveBytesPerSecond : Number Yes No
routingSendBytesPerSecond : Number Yes No
toString():String Yes No
Member Name ActionScript 3.0 Flash Lite 4
98DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetGroupReceiveMode
The following table shows those members of the NetGroupReceiveMode class that ActionScript 3.0 and Flash Lite 4
support.
NetGroupReplicationStrategy
The following table shows those members of the NetGroupReplicationStrategy class that ActionScript 3.0 and Flash
Lite 4 support.
NetGroupSendMode
The following table shows those members of the NetGroupSendMode class that ActionScript 3.0 and Flash Lite 4
support.
NetGroupSendResult
The following table shows those members of the NetGroupSendResult class that ActionScript 3.0 and Flash Lite 4
support.
NetStatusEvent
The following table shows those members of the NetStatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
EXACT : String = "exact" Yes No
NEAREST : String = "nearest" Yes No
Member Name ActionScript 3.0 Flash Lite 4
LOWEST_FIRST : String = "lowestFirst" Yes No
RAREST_FIRST : String = "rarestFirst" Yes No
Member Name ActionScript 3.0 Flash Lite 4
NEXT_DECREASING : String = "nextDecreasing" Yes No
NEXT_INCREASING : String = "nextIncreasing" Yes No
Member Name ActionScript 3.0 Flash Lite 4
ERROR : String = "error" Yes No
NO_ROUTE : String = "no route" Yes No
SENT : String = "sent" Yes No
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
info : Object Yes Yes
99DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetStream
The following table shows those members of the NetStream class that ActionScript 3.0 and Flash Lite 4 support.
NetStatusEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, info:Object = null)
Yes Yes
NET_STATUS : String = "netStatus" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
asyncError Yes Yes
attach(connection:NetConnection) : void Yes No
attachAudio Yes No
attachCamera Yes No
audioReliable : Boolean Yes No
audioSampleAccess : Boolean Yes No
backBufferLength : Number Yes No
backBufferTime : Number Yes No
bufferLength : Number Yes Yes
bufferTime : Number Yes Yes
bufferTimeMax : Number Yes No
bytesLoaded : uint Yes Yes
bytesTotal : uint Yes Yes
checkPolicyFile : Boolean Yes No
client : Object Yes Yes
close() : Void Yes Yes
CONNECT_TO_FMS : String = "connectToFMS" Yes Yes
currentFps : Number Yes Yes
dataReliable : Boolean Yes No
DIRECT_CONNECTIONS : String = "directConnections" Yes Yes
farID : String Yes No
farNonce : String Yes No
inBufferSeek : Boolean Yes No
info : NetStreamInfo Yes Yes
ioError Yes Yes
liveDelay : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
100DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
maxPauseBufferTime : Number Yes Yes
multicastAvailabilitySendToAll : Boolean Yes No
multicastAvailabilityUpdatePeriod : Number Yes No
multicastFetchPeriod : Number Yes No
multicastInfo : NetStreamMulticastInfo Yes No
multicastPushNeighborLimit : Number Yes No
multicastRelayMarginDuration : Number Yes No
multicastWindowDuration : Number Yes No
nearNonce : String Yes Yes
netStatus Yes Yes
objectEncoding : uint Yes Yes
onPeerConnect(subscriber:NetStream):Boolean Yes Yes
onCuePoint Yes Yes
onImageData Yes Yes
onMetaData Yes Yes
onPlayStatus Yes Yes
onPlayStatus Yes Yes
onXMPData Yes Yes
pause():void Yes Yes
play(... arguments):void Yes Yes
peerStreams : Array Yes No
play2(param:NetStreamPlayOptions):void Yes Yes
publish(name:String = null, type:String = null):void Yes No
receiveAudio(flag:Boolean):void Yes Yes
receiveVideo(flag:Boolean):void Yes Yes
receiveVideoFPS(FPS:Number):void Yes Yes
resume():void Yes Yes
seek(offset:Number):void Yes Yes
send(handlerName:String, ... arguments):void Yes No
soundTransform : flash.media:SoundTransform Yes No
step(frames:int):void Yes No
time : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
101DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetStreamInfo
The following table shows those members of the NetStreamInfo class that ActionScript 3.0 and Flash Lite 4 support.
togglePause():void Yes Yes
videoReliable : Boolean Yes No
videoSampleAccess : Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
audioBufferByteLength : Number Yes Yes
audioBufferLength : Number Yes Yes
audioByteCount : Number Yes Yes
audioBytesPerSecond : Number Yes Yes
audioLossRate : Number Yes Yes
byteCount : Number Yes Yes
currentBytesPerSecond : Number Yes Yes
dataBufferByteLength : Number Yes Yes
dataBufferLength : Number Yes Yes
dataByteCount : Number Yes Yes
dataBytesPerSecond : Number" Yes Yes
droppedFrames : Number Yes Yes
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)
Yes Yes
maxBytesPerSecond : Number Yes Yes
playbackBytesPerSecond : Number Yes Yes
toString():String Yes Yes
SRTT : Number Yes Yes
videoBufferByteLength : Number Yes Yes
videoBufferLength : Number Yes Yes
videoByteCount : Number Yes Yes
videoBytesPerSecond : Number Yes Yes
videoLossRate : Number Yes No
Member Name ActionScript 3.0 Flash Lite 4
102DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
NetStreamPlayOptions
The following table shows those members of the NetStreamPlayOptions class that ActionScript 3.0 and Flash Lite 4
support.
NetStreamPlayTransitions
The following table shows those members of the NetStreamPlayTransitions class that ActionScript 3.0 and Flash Lite
4 support.
Number
The following table shows those members of the Number class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
len : Number Yes Yes
NetStreamPlayOptions() Yes Yes
oldStreamName : String Yes Yes
start : Number Yes Yes
streamName : String Yes Yes
transition : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
APPEND : * = append Yes Yes
RESET : * = reset Yes Yes
STOP : * = stop Yes Yes
SWAP : * = swap Yes Yes
SWITCH : * = switch Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
MAX_VALUE : Number Yes Yes
MIN_VALUE : Number Yes Yes
NaN : Number Yes Yes
NEGATIVE_INFINITY : Number Yes Yes
Number(num:Object) Yes Yes
POSITIVE_INFINITY : Number Yes Yes
toExponential(fractionDigits:uint):String Yes Yes
toFixed(fractionDigits:uint):String Yes Yes
toPrecision(precision:uint):String Yes Yes
toString(radix:Number) : String Yes Yes
valueOf() : Number Yes Yes
103DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Object
The following table shows those members of the Object class that ActionScript 3.0 and Flash Lite 4 support.
ObjectEncoding
The following table shows those members of the ObjectEncoding class that ActionScript 3.0 and Flash Lite 4 support.
PixelSnapping
The following table shows those members of the PixelSnapping class that ActionScript 3.0 and Flash Lite 4 support.
Point
The following table shows those members of the Point class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
constructor : Object Yes Yes
hasOwnProperty(name:String):Boolean Yes Yes
isPrototypeOf(theClass:Object):Boolean Yes Yes
Object() Yes Yes
propertyIsEnumerable(name:String):Boolean Yes Yes
prototype : Object Yes Yes
prototype:Object Yes Yes
setPropertyIsEnumerable(name:String, isEnum:Boolean =
true):void
Yes Yes
toLocaleString():String Yes Yes
toString():String Yes Yes
valueOf():Object Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
AMF0 : uint = 0 Yes Yes
AMF3 : uint = 3 Yes Yes
DEFAULT : uint = 3 Yes Yes
dynamicPropertyWriter : IDynamicPropertyWriter Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ALWAYS : String = "always" Yes Yes
AUTO : String = "auto" Yes Yes
NEVER : String = "never" Yes Yes
104DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
PressAndTapGestureEvent
The following table shows those members of the PressAndTapGestureEvent class that ActionScript 3.0 and Flash Lite
4 support.
ProgressEvent
The following table shows those members of the ProgressEvent class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
add(v:Point) : Point Yes Yes
clone() : Point Yes Yes
distance(pt1:Point, pt2:Point):Number Yes Yes
equals(toCompare:Point):Boolean Yes Yes
interpolate(pt1:Point, pt2:Point, f:Number):Point Yes Yes
length : Number Yes Yes
normalize(thickness:Number):void Yes Yes
offset(dx:Number, dy:Number):void Yes Yes
Point(x:Number = 0, y:Number = 0) Yes Yes
polar(len:Number, angle:Number):Point Yes Yes
subtract(v:Point):Point Yes Yes
toString():String Yes Yes
x : Number Yes Yes
y : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
GESTURE_PRESS_AND_TAP : String = "gesturePressAndTap" Yes Yes
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)
Yes Yes
tapLocalX : Number Yes Yes
tapLocalY : Number Yes Yes
tapStageX : Number Yes Yes
tapStageY : Number Yes Yes
toString():String Yes Yes
105DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
QName
The following table shows those members of the QName class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
bytesLoaded : uint Yes Yes
bytesTotal : uint Yes Yes
clone():Event Yes Yes
PROGRESS : String = "progress" Yes Yes
ProgressEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, bytesLoaded:uint = 0, bytesTotal:uint = 0)
Yes Yes
SOCKET_DATA : String = "socketData" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
callProperty(name:*, ... rest):* Yes Yes
deleteProperty(name:*):Boolean Yes Yes
getDescendants(name:*):* Yes Yes
getProperty(name:*):* Yes Yes
hasProperty(name:*):Boolean Yes Yes
isAttribute(name:*):Boolean Yes Yes
nextName(index:int):String Yes Yes
nextNameIndex(index:int):int Yes Yes
nextValue(index:int):* Yes Yes
setProperty(name:*, value:*):void Yes Yes
valueOf():Object Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
localName : String Yes Yes
QName(qname:QName) Yes Yes
QName(uri:Namespace, localName:QName) Yes Yes
toString():String Yes Yes
uri : String Yes Yes
valueOf():QName Yes Yes
106DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
RangeError
The following table shows those members of the RangeError class that ActionScript 3.0 and Flash Lite 4 support.
Rectangle
The following table shows those members of the Rectangle class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
RangeError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bottom : Number Yes Yes
bottomRight : Point Yes Yes
clone():Rectangle Yes Yes
contains(x:Number, y:Number):Boolean Yes Yes
containsPoint(point:Point):Boolean Yes Yes
containsRect(rect:Rectangle):Boolean Yes Yes
equals(toCompare:Rectangle):Boolean Yes Yes
height : Number Yes Yes
inflate(dx:Number, dy:Number):void Yes Yes
inflatePoint(point:Point):void Yes Yes
intersection(toIntersect:Rectangle):Rectangle Yes Yes
intersects(toIntersect:Rectangle):Boolean Yes Yes
isEmpty():Boolean Yes Yes
left : Number Yes Yes
offset(dx:Number, dy:Number):void Yes Yes
offsetPoint(point:Point):void Yes Yes
Rectangle(x:Number = 0, y:Number = 0, width:Number =
0, height:Number = 0)
Yes Yes
right : Number Yes Yes
setEmpty():void Yes Yes
size : Point Yes Yes
top : Number Yes Yes
topLeft : Point Yes Yes
toString():String Yes Yes
union(toUnion:Rectangle):Rectangle Yes Yes
107DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
ReferenceError
The following table shows those members of the ReferenceError class that ActionScript 3.0 and Flash Lite 4 support.
RegExp
The following table shows those members of the RegExp class that ActionScript 3.0 and Flash Lite 4 support.
RenderingMode
The following table shows those members of the RenderingMode class that ActionScript 3.0 and Flash Lite 4 support.
Responder
The following table shows those members of the Responder class that ActionScript 3.0 and Flash Lite 4 support.
width : Number Yes Yes
x : Number Yes Yes
y : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ReferenceError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
dotall : Boolean Yes Yes
exec(str:String):Object Yes Yes
extended : Boolean Yes Yes
global : Boolean Yes Yes
ignoreCase : Boolean Yes Yes
lastIndex : Number Yes Yes
multiline : Boolean Yes Yes
RegExp(re:String, flags:String) Yes Yes
source : String Yes Yes
test(str:String):Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CFF : String = "cff" Yes Yes
NORMAL : String = "normal" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
108DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Scene
The following table shows those members of the Scene class that ActionScript 3.0 and Flash Lite 4 support.
ScriptTimeoutError
The following table shows those members of the ScriptTimeoutError class that ActionScript 3.0 and Flash Lite 4
support.
Security
The following table shows those members of the Security class that ActionScript 3.0 and Flash Lite 4 support.
SecurityDomain
The following table shows those members of the SecurityDomain class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
constructResponderObject(result:Function, status:Function =
null):void
Yes Yes
Responder(result:Function, status:Function = null) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
labels : Array Yes Yes
name : String Yes Yes
numFrames : int Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ScriptTimeoutError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
allowDomain(... domains):void Yes Yes
allowInsecureDomain(... domains):void Yes Yes
exactSettings : Boolean Yes Yes
loadPolicyFile(url:String):void Yes Yes
LOCAL_TRUSTED : String = "localTrusted" Yes Yes
LOCAL_WITH_FILE : String = "localWithFile" Yes Yes
LOCAL_WITH_NETWORK : String = "localWithNetwork" Yes Yes
REMOTE : String = "remote" Yes Yes
sandboxType : String Yes Yes
showSettings(panel:String = "default"):void Yes Yes
109DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
SecurityError
The following table shows those members of the SecurityError class that ActionScript 3.0 and Flash Lite 4 support.
SecurityErrorEvent
The following table shows those members of the SecurityErrorEvent class that ActionScript 3.0 and Flash Lite 4
support.
SecurityPanel
The following table shows those members of the SecurityPanel class that ActionScript 3.0 and Flash Lite 4 support.
Shape
The following table shows those members of the Shape class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
currentDomain : SecurityDomain Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
SecurityError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
SecurityErrorEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
SECURITY_ERROR : String = "securityError" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CAMERA : String = "camera" Yes Yes
DEFAULT : String = "default" Yes Yes
DISPLAY : String = "display" Yes Yes
LOCAL_STORAGE : String = "localStorage" Yes Yes
MICROPHONE : String = "microphone" Yes Yes
PRIVACY : String = "privacy" Yes Yes
SETTINGS_MANAGER : String = "settingsManager" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
graphics : Graphics Yes Yes
Shape() Yes Yes
110DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
SharedObject
The following table shows those members of the SharedObject class that ActionScript 3.0 and Flash Lite 4 support.
SharedObjectFlushStatus
The following table shows those members of the SharedObjectFlushStatus class that ActionScript 3.0 and Flash Lite 4
support.
SimpleButton
The following table shows those members of the SimpleButton class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
asyncError Yes Yes
client : Object Yes Yes
clear():void Yes Yes
close():void Yes Yes
connect(myConnection:NetConnection, params:String = null):void Yes Yes
data : Object Yes Yes
defaultObjectEncoding : uint Yes Yes
flush(minDiskSpace:int = 0):String Yes Yes
fps : Number Yes Yes
getLocal(name:String, localPath:String = null, secure:Boolean =
false):SharedObject
Yes Yes
getRemote(name:String, remotePath:String = null,
persistence:Object = false, secure:Boolean = false):SharedObject
No Yes
netStatus Yes Yes
objectEncoding : uint Yes Yes
send(... arguments):void Yes Yes
setDirty(propertyName:String):void Yes Yes
setProperty(propertyName:String, value:Object = null):void Yes Yes
size : uint Yes Yes
sync Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
FLUSHED : String = "flushed" Yes Yes
PENDING : String = "pending" Yes Yes
111DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Socket
The following table shows those members of the Socket class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
downState : DisplayObject Yes Yes
enabled : Boolean Yes Yes
hitTestState : DisplayObject Yes Yes
overState : DisplayObject Yes Yes
SimpleButton(upState:DisplayObject = null, overState:DisplayObject =
null, downState:DisplayObject = null, hitTestState:DisplayObject = null)
Yes Yes
soundTransform : flash.media:SoundTransform Yes No
trackAsMenu : Boolean Yes No
upState : DisplayObject Yes Yes
useHandCursor : Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
bytesAvailable : uint Yes Yes
close Yes Yes
close():void Yes Yes
connect Yes Yes
connect(host:String, port:int):void Yes Yes
connected : Boolean Yes Yes
endian : String Yes Yes
flush():void Yes Yes
ioError Yes Yes
objectEncoding : uint Yes Yes
readBoolean():Boolean Yes Yes
readByte():int Yes Yes
readBytes(bytes:ByteArray, offset:uint = 0, length:uint =
0):void
Yes Yes
readDouble():Number Yes Yes
readFloat():Number Yes Yes
readInt():int Yes Yes
readMultiByte(length:uint, charSet:String):String Yes Yes
readObject():* Yes Yes
readShort():int Yes Yes
readUnsignedByte():uint Yes Yes
112DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Sound
The following table shows those members of the Sound class that ActionScript 3.0 and Flash Lite 4 support.
readUnsignedInt():uint Yes Yes
readUnsignedShort():uint Yes Yes
readUTF():String Yes Yes
readUTFBytes(length:uint):String Yes Yes
securityError Yes Yes
Socket(host:String = null, port:int = 0) Yes Yes
socketData Yes Yes
timeout : uint Yes Yes
writeBoolean(value:Boolean):void Yes Yes
writeByte(value:int):void Yes Yes
writeBytes(bytes:ByteArray, offset:uint = 0, length:uint =
0):void
Yes Yes
writeDouble(value:Number):void Yes Yes
writeFloat(value:Number):void Yes Yes
writeInt(value:int):void Yes Yes
writeMultiByte(value:String, charSet:String):void Yes Yes
writeObject(object:*):void Yes Yes
writeShort(value:int):void Yes Yes
writeUnsignedInt(value:uint):void Yes Yes
writeUTF(value:String):void Yes Yes
writeUTFBytes(value:String):void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bytesLoaded : uint Yes Yes
bytesTotal : int Yes Yes
close():void Yes Yes
complete Yes Yes
extract(target:ByteArray, length:Number,
startPosition:Number = -1):Number
Yes No
id3 : Event Yes Yes
id3 : ID3Info Partial Partial
isBuffering : Boolean Yes Yes
ioError Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
113DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
SoundChannel
The following table shows those members of the SoundChannel class that ActionScript 3.0 and Flash Lite 4 support.
SoundLoaderContext
The following table shows those members of the SoundLoaderContext class that ActionScript 3.0 and Flash Lite 4
support.
SoundMixer
The following table shows those members of the SoundMixer class that ActionScript 3.0 and Flash Lite 4 support.
length : Number Yes Yes
load(stream:URLRequest, context:SoundLoaderContext =
null):void
Yes Yes
open Yes Yes
play(startTime:Number = 0, loops:int = 0,
sndTransform:flash.media:SoundTransform =
null):SoundChannel
Yes Yes
progress Yes Yes
sampleData Yes No
Sound(stream:URLRequest = null,
context:SoundLoaderContext = null)
Yes Yes
url : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
leftPeak : Number Yes Yes
position : Number Yes Yes
rightPeak : Number Yes Yes
soundComplete Yes Yes
soundTransform : flash.media:SoundTransform Yes Yes
stop():void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bufferTime : Number = 1000 Yes Yes
checkPolicyFile : Boolean = false Yes Yes
SoundLoaderContext(bufferTime:Number = 1000,
checkPolicyFile:Boolean = false)
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
114DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
SoundTransform
The following table shows those members of the SoundTransform class that ActionScript 3.0 and Flash Lite 4 support.
SpaceJustifier
The following table shows those members of the SpaceJustifier class that ActionScript 3.0 and Flash Lite 4 support.
Sprite
The following table shows those members of the Sprite class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
areSoundsInaccessible():Boolean Yes No
bufferTime : int Yes Yes
computeSpectrum(outputArray:ByteArray, FFTMode:Boolean =
false, stretchFactor:int = 0):void
Yes No
stopAll():void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
leftToLeft : Number Yes Yes
leftToRight : Number Yes Yes
pan : Number Yes Yes
rightToLeft : Number Yes Yes
rightToRight : Number Yes Yes
SoundTransform(vol:Number = 1, panning:Number = 0) Yes Yes
volume : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():flash.text.engine:TextJustifier Yes Yes
letterSpacing : Boolean Yes Yes
maximumSpacing : Number Yes No
minimumSpacing : Number Yes No
optimumSpacing : Number Yes No
SpaceJustifier(locale:String = "en", lineJustification:String =
"unjustified", letterSpacing:Boolean = false)
Yes Yes
volume : Number Yes Yes
115DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
StackOverflowError
The following table shows those members of the StackOverflowError class that ActionScript 3.0 and Flash Lite 4
support.
Stage
The following table shows those members of the Stage class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
buttonMode : Boolean Yes Yes
dropTarget : DisplayObject Yes Yes
graphics : Graphics Yes Yes
hitArea : Sprite Yes Yes
soundTransform : flash.media:SoundTransform Yes Yes
Sprite() Yes Yes
startDrag(lockCenter:Boolean = false, bounds:Rectangle =
null):void
Yes Yes
startTouchDrag(touchPointID:int, lockCenter:Boolean =
false, bounds:Rectangle = null):void
Yes Yes
stopDrag():void Yes Yes
stopTouchDrag(touchPointID:int):void Yes Yes
useHandCursor : Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
StackOverflowError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
addChild(child:DisplayObject):DisplayObject Yes Yes
addChildAt(child:DisplayObject, index:int):DisplayObject Yes Yes
addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0,
useWeakReference:Boolean = false):void
Yes Yes
align : String Yes Yes
assignFocus(objectToFocus:InteractiveObject,
direction:String):void
Yes No
colorCorrection : String No
colorCorrectionSupport : String No
dispatchEvent(event:Event):Boolean Yes Yes
displayState : String Yes Yes
focus : InteractiveObject Yes Yes
116DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
StageAlign
The following table shows those members of the StageAlign class that ActionScript 3.0 and Flash Lite 4 support.
frameRate : Number Yes Yes
fullScreen Yes Yes
fullScreenHeight : uint Yes Yes
fullScreenSourceRect : Rectangle Yes Yes
fullScreenWidth : uint Yes Yes
hasEventListener(type:String):Boolean Yes Yes
height : Number Yes Yes
isFocusInaccessible():Boolean Yes Yes
mouseChildren : Boolean Yes Yes
mouseLeave Yes Yes
numChildren : int Yes Yes
quality : String Yes Yes
removeChildAt(index:int):DisplayObject Yes Yes
resize Yes Yes
scaleMode : String Yes Yes
setChildIndex(child:DisplayObject, index:int):void Yes Yes
showDefaultContextMenu : Boolean Yes No
stageFocusRect : Boolean Yes Yes
stageHeight : int Yes Yes
stageWidth : int Yes Yes
swapChildrenAt(index1:int, index2:int):void Yes Yes
tabChildren : Boolean Yes No
textSnapshot : flash.text:TextSnapshot Yes No
width : Number Yes Yes
willTrigger(type:String):Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
BOTTOM : String = "B" Yes Yes
BOTTOM_LEFT : String = "BL" Yes Yes
BOTTOM_RIGHT : String = "BR" Yes Yes
LEFT : String = "L" Yes Yes
RIGHT : String = "R" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
117DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
StageCapture
The following table shows those members of the StageCapture class that ActionScript 3.0 and Flash Lite 4 support.
StageCaptureEvent
The following table shows those members of the StageCaptureEvent class that ActionScript 3.0 and Flash Lite 4
support.
StageDisplayState
The following table shows those members of the StageDisplayState class that ActionScript 3.0 and Flash Lite 4 support.
TOP : String = "T" Yes Yes
TOP_LEFT : String = "TL" Yes Yes
TOP_RIGHT : String = "TR" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0,
useWeakReference:Boolean = false):void
Yes Yes
cancel():void Yes Yes
capture Yes Yes
capture(type:String):void Yes Yes
clipRect : Rectangle Yes Yes
CURRENT : String = "current" Yes Yes
fileNameBase : String Yes Yes
MULTIPLE : String = "multiple" Yes Yes
NEXT : String = "next" Yes Yes
removeEventListener(type:String, listener:Function,
useCapture:Boolean = false):void
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CAPTURE : String = "capture" Yes Yes
checksum : uint Yes Yes
StageCaptureEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, url:String = null, checksum:uint = 0)
Yes Yes
url : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
FULL_SCREEN : String = "fullScreen" Yes Yes
NORMAL : String = "normal" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
118DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
StageQuality
The following table shows those members of the StageQuality class that ActionScript 3.0 and Flash Lite 4 support.
StageScaleMode
The following table shows those members of the StageScaleMode class that ActionScript 3.0 and Flash Lite 4 support.
StaticText
The following table shows those members of the StaticText class that ActionScript 3.0 and Flash Lite 4 support.
StatusEvent
The following table shows those members of the StatusEvent class that ActionScript 3.0 and Flash Lite 4 support.
String
The following table shows those members of the String class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
BEST : String = "best" Yes Yes
HIGH : String = "high" Yes Yes
LOW : String = "low" Yes Yes
MEDIUM : String = "medium" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
EXACT_FIT : String = "exactFit" Yes Yes
NO_BORDER : String = "noBorder" Yes Yes
NO_SCALE : String = "noScale" Yes Yes
SHOW_ALL : String = "showAll" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
text : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
code : String Yes Yes
level : String Yes Yes
STATUS : String = "status" Yes Yes
StatusEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, code:String = "", level:String = "")
Yes Yes
toString():String Yes Yes
119DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
StyleSheet
The following table shows those members of the StyleSheet class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
charAt(index:Number = 0):String Yes Yes
charCodeAt(index:Number = 0):Number Yes Yes
concat(... args):String Yes Yes
fromCharCode(... charCodes):String Yes Yes
indexOf(val:String, startIndex:Number = 0):int Yes Yes
lastIndexOf(val:String, startIndex:Number =
0x7FFFFFFF):int
Yes Yes
length : int Yes Yes
localeCompare(other:String, ... values):int Yes Yes
match(pattern:*):Array Yes Yes
replace(pattern:*, repl:Object):String Yes Yes
search(pattern:*):int Yes Yes
slice(startIndex:Number = 0, endIndex:Number =
0x7fffffff):String
Yes Yes
split(delimiter:*, limit:Number = 0x7fffffff):Array Yes Yes
String(val:String) Yes Yes
substr(startIndex:Number = 0, len:Number =
0x7fffffff):String
Yes Yes
substring(startIndex:Number = 0, endIndex:Number =
0x7fffffff):String
Yes Yes
toLocaleLowerCase():String Yes Yes
toLocaleUpperCase():String Yes Yes
toLowerCase():String Yes Yes
toUpperCase():String Yes Yes
valueOf():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clear():void Yes Yes
getStyle(styleName:String):Object Yes Yes
parseCSS(CSSText:String):void Yes Yes
setStyle(styleName:String, styleObject:Object):void Yes Yes
styleNames : Array Yes Yes
transform(formatObject:Object):flash.text:TextFormat Yes Yes
120DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
SWFVersion
The following table shows those members of the SWFVersion class that ActionScript 3.0 and Flash Lite 4 support.
SyncEvent
The following table shows those members of the SyncEvent class that ActionScript 3.0 and Flash Lite 4 support.
SyntaxError
The following table shows those members of the SyntaxError class that ActionScript 3.0 and Flash Lite 4 support.
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
FLASH1 : uint = 1 Yes Yes
FLASH10 : uint = 10 Yes Yes
FLASH2 : uint = 2 Yes Yes
FLASH3 : uint = 3 Yes Yes
FLASH4 : uint = 4 Yes Yes
FLASH5 : uint = 5 Yes Yes
FLASH6 : uint = 6 Yes Yes
FLASH7 : uint = 7 Yes Yes
FLASH8 : uint = 8 Yes Yes
FLASH9 : uint = 9 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
changeList : Array Yes Yes
clone():Event Yes Yes
SYNC : String = "sync" Yes Yes
SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean
= false, changeList:Array = null)
Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
SyntaxError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
disposeXML Yes No
exit(code:uint):void Yes No
121DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TabAlignment
The following table shows those members of the TabAlignment class that ActionScript 3.0 and Flash Lite 4 support.
TabStop
The following table shows those members of the TabStop class that ActionScript 3.0 and Flash Lite 4 support.
TextBaseline
The following table shows those members of the TextBaseline class that ActionScript 3.0 and Flash Lite 4 support.
freeMemory : Number Yes No
gc():void Yes Yes
ime : IME Yes Yes
pause():void Yes Yes
privateMemory : Number Yes No
resume():void Yes Yes
setClipboard(string:String):void Yes No
totalMemory : uint Yes Yes
totalMemoryNumber : Number Yes No
useCodePage : Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CENTER : String = "center" Yes Yes
DECIMAL : String = "decimal" Yes Yes
END : String = "end" Yes Yes
START : String = "start" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
alignment : String Yes Yes
decimalAlignmentToken : String Yes Yes
position : Number Yes Yes
TabStop(alignment:String = "start", position:Number = 0.0,
decimalAlignmentToken:String = "")
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
122DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextBlock
The following table shows those members of the TextBlock class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ASCENT : String = "ascent" Yes Yes
DESCENT : String = "descent" Yes Yes
IDEOGRAPHIC_BOTTOM : String = "ideographicBottom" Yes Yes
IDEOGRAPHIC_CENTER : String = "ideographicCenter" Yes Yes
IDEOGRAPHIC_TOP : String = "ideographicTop" Yes Yes
ROMAN : String = "roman" Yes Yes
USE_DOMINANT_BASELINE : String =
"useDominantBaseline"
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
applyNonLinearFontScaling : Boolean Yes Yes
baselineFontDescription : FontDescription Yes Yes
baselineFontSize : Number Yes Yes
baselineZero : String Yes Yes
bidiLevel : int Yes Yes
content : ContentElement Yes Yes
createTextLine(previousLine:flash.text.engine:TextLine = null,
width:Number = 1000000, lineOffset:Number = 0.0,
fitSomething:Boolean = false):flash.text.engine:TextLine
Yes Yes
dump():String Yes No
findNextAtomBoundary(afterCharIndex:int):int Yes Yes
findNextWordBoundary(afterCharIndex:int):int Yes Yes
findPreviousAtomBoundary(beforeCharIndex:int):int Yes Yes
findPreviousWordBoundary(beforeCharIndex:int):int Yes Yes
firstInvalidLine : flash.text.engine:TextLine Yes Yes
firstLine : flash.text.engine:TextLine Yes Yes
getTextLineAtCharIndex(charIndex:int):flash.text.engine:TextLine Yes Yes
lastLine : flash.text.engine:TextLine Yes Yes
lineRotation : String Yes Yes
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
Yes Yes
releaseLineCreationData():void Yes Yes
123DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextElement
The following table shows those members of the TextElement class that ActionScript 3.0 and Flash Lite 4 support.
TextEvent
The following table shows those members of the TextEvent class that ActionScript 3.0 and Flash Lite 4 support.
TextField
The following table shows those members of the TextField class that ActionScript 3.0 and Flash Lite 4 support.
releaseLines(firstLine:flash.text.engine:TextLine,
lastLine:flash.text.engine:TextLine):void
Yes Yes
tabStops : Vector.<flash.text.engine:TabStop> Yes Yes
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)
Yes Yes
textJustifier : flash.text.engine:TextJustifier Yes Yes
textLineCreationResult : String Yes Yes
userData : * Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
replaceText(beginIndex:int, endIndex:int, newText:String):void Yes Yes
text : String Yes Yes
TextElement(text:String = null, elementFormat:ElementFormat =
null, eventMirror:EventDispatcher = null, textRotation:String =
"rotate0")
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
LINK : String = "link" Yes Yes
text : String Yes Yes
TextEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false, text:String = "")
Yes Yes
TEXT_INPUT : String = "textInput" Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
124DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Member Name ActionScript 3.0 Flash Lite 4
alwaysShowSelection : Boolean Yes Yes
antiAliasType : String Yes No
appendText(newText:String):void Yes Yes
autoSize : String Yes Yes
background : Boolean Yes Yes
backgroundColor : uint Yes Yes
border : Boolean Yes Yes
borderColor : uint Yes Yes
bottomScrollV : int Yes Yes
caretIndex : int Yes Yes
change Yes Yes
condenseWhite : Boolean Yes Yes
defaultTextFormat : flash.text:TextFormat Yes Yes
displayAsPassword : Boolean Yes Yes
embedFonts : Boolean Yes Yes
getCharBoundaries(charIndex:int):Rectangle Yes Yes
getCharIndexAtPoint(x:Number, y:Number):int Yes Yes
getFirstCharInParagraph(charIndex:int):int Yes Yes
getImageReference(id:String):DisplayObject Yes Yes
getLineIndexAtPoint(x:Number, y:Number):int Yes Yes
getLineIndexOfChar(charIndex:int):int Yes Yes
getLineLength(lineIndex:int):int Yes Yes
getLineMetrics(lineIndex:int):flash.text:TextLineMetrics Yes Yes
getLineOffset(lineIndex:int):int Yes Yes
getLineText(lineIndex:int):String Yes Yes
getParagraphLength(charIndex:int):int Yes Yes
getTextFormat(beginIndex:int = -1, endIndex:int = -
1):flash.text:TextFormat
Yes Yes
gridFitType : String Yes No
htmlText : String Yes Yes
isFontCompatible(fontName:String, fontStyle:String):Boolean Yes Yes
length : int Yes Yes
link Yes Yes
maxChars : int Yes Yes
maxScrollH : int Yes Yes
125DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextFieldAutoSize
The following table shows those members of the TextFieldAutoSize class that ActionScript 3.0 and Flash Lite 4
support.
maxScrollV : int Yes Yes
mouseWheelEnabled : Boolean Yes No
multiline : Boolean Yes Yes
numLines : int Yes Yes
replaceSelectedText(value:String):void Yes Yes
replaceText(beginIndex:int, endIndex:int, newText:String):void Yes Yes
restrict : String Yes Yes
scroll Yes Yes
scrollH : int Yes Yes
scrollV : int Yes Yes
selectable : Boolean Yes Yes
selectionBeginIndex : int Yes Yes
selectionEndIndex : int Yes Yes
setSelection(beginIndex:int, endIndex:int):void Yes Yes
setTextFormat(format:flash.text:TextFormat, beginIndex:int = -1,
endIndex:int = -1):void
Yes Yes
sharpness : Number Yes No
styleSheet : StyleSheet Yes Yes
text : String Yes Yes
textColor : uint Yes Yes
TextField() Yes Yes
textHeight : Number Yes Yes
textInput Yes Yes
textWidth : Number Yes Yes
thickness : Number Yes No
type : String Yes Yes
useRichTextClipboard : Boolean Yes No
wordWrap : Boolean Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
126DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextFieldType
The following table shows those members of the TextFieldType class that ActionScript 3.0 and Flash Lite 4 support.
TextFormat
The following table shows those members of the TextFormat class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
CENTER : String = "center" Yes Yes
LEFT : String = "left" Yes Yes
NONE : String = "none" Yes Yes
RIGHT : String = "right" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DYNAMIC : String = "dynamic" Yes Yes
INPUT : String = "input" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
align : String Yes Yes
blockIndent : Object Yes Yes
bold : Object Yes Yes
bullet : Object Yes Yes
color : Object Yes Yes
font : String Yes Yes
indent : Object Yes Yes
italic : Object Yes Yes
kerning : Object Yes No
leading : Object Yes Yes
leftMargin : Object Yes Yes
letterSpacing : Object Yes No
rightMargin : Object Yes Yes
size : Object Yes Yes
tabStops : Array Yes Yes
target : String Yes Yes
127DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextFormatAlign
The following table shows those members of the TextFormatAlign class that ActionScript 3.0 and Flash Lite 4 support.
TextJustifier
The following table shows those members of the TextJustifier class that ActionScript 3.0 and Flash Lite 4 support.
TextLine
The following table shows those members of the TextLine class that ActionScript 3.0 and Flash Lite 4 support.
TextFormat(font:String = null, size:Object = null, color:Object = null,
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)
Yes Yes
underline : Object Yes Yes
url : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CENTER : String = "center" Yes Yes
JUSTIFY : String = "justify" Yes Yes
LEFT : String = "left"NONE : String = "none" Yes Yes
RIGHT : String = "right" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():flash.text.engine:TextJustifier Yes Yes
getJustifierForLocale(locale:String):flash.text.engine:TextJustifier Yes Yes
lineJustification : String Yes Yes
locale : String Yes Yes
TextJustifier(locale:String, lineJustification:String) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
ascent : Number Yes Yes
atomCount : int Yes Yes
descent : Number Yes Yes
dump():String Yes No
flushAtomData():void Yes Yes
getAtomBidiLevel(atomIndex:int):int Yes Yes
getAtomBounds(atomIndex:int):Rectangle Yes Yes
getAtomCenter(atomIndex:int):Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
128DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextLineCreationResult
The following table shows those members of the TextLineCreationResult class that ActionScript 3.0 and Flash Lite 4
support.
getAtomGraphic(atomIndex:int):DisplayObject Yes Yes
getAtomIndexAtCharIndex(charIndex:int):int Yes Yes
getAtomIndexAtPoint(stageX:Number, stageY:Number):int Yes Yes
getAtomTextBlockBeginIndex(atomIndex:int):int Yes Yes
getAtomTextBlockEndIndex(atomIndex:int):int Yes Yes
getAtomTextRotation(atomIndex:int):String Yes Yes
getAtomWordBoundaryOnLeft(atomIndex:int):Boolean Yes Yes
getBaselinePosition(baseline:String):Number Yes Yes
getMirrorRegion(mirror:EventDispatcher):flash.text.engine:TextLine
MirrorRegion
Yes Yes
hasGraphicElement : Boolean Yes Yes
hasTabs : Boolean Yes No
MAX_LINE_WIDTH : int = 1000000 Yes Yes
mirrorRegions : Vector.<flash.text.engine:TextLineMirrorRegion> Yes Yes
nextLine : flash.text.engine:TextLine Yes Yes
previousLine : flash.text.engine:TextLine Yes Yes
rawTextLength : int Yes Yes
specifiedWidth : Number Yes Yes
textBlock : flash.text.engine:TextBlock Yes Yes
textBlockBeginIndex : int Yes Yes
textHeight : Number Yes Yes
textWidth : Number Yes Yes
unjustifiedTextWidth : Number Yes Yes
userData : * Yes Yes
validity : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
COMPLETE : String = "complete" Yes Yes
EMERGENCY : String = "emergency" Yes Yes
INSUFFICIENT_WIDTH : String = "insufficientWidth" Yes Yes
SUCCESS : String = "success" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
129DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextLineMetrics
The following table shows those members of the TextLineMetrics class that ActionScript 3.0 and Flash Lite 4 support.
TextLineMirrorRegion
The following table shows those members of the TextLineMirrorRegion class that ActionScript 3.0 and Flash Lite 4
support.
TextLineValidity
The following table shows those members of the TextLineValidity class that ActionScript 3.0 and Flash Lite 4 support.
TextRotation
The following table shows those members of the TextRotation class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ascent : Number Yes Yes
descent : Number Yes Yes
height : Number Yes Yes
leading : Number Yes Yes
TextLineMetrics(x:Number, width:Number, height:Number,
ascent:Number, descent:Number, leading:Number)
Yes Yes
width : Number Yes Yes
x : Number Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bounds : Rectangle Yes Yes
element : ContentElement Yes Yes
mirror : EventDispatcher Yes Yes
nextRegion : flash.text.engine:TextLineMirrorRegion Yes Yes
previousRegion : flash.text.engine:TextLineMirrorRegion Yes Yes
textLine : flash.text.engine:TextLine Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
INVALID : String = "invalid" Yes Yes
POSSIBLY_INVALID : String = "possiblyInvalid" Yes Yes
STATIC : String = "static" Yes Yes
VALID : String = "valid" Yes Yes
130DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TextSnapshot
The following table shows those members of the TextSnapshot class that ActionScript 3.0 and Flash Lite 4 support.
Timer
The following table shows those members of the Timer class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
AUTO : String = "auto" Yes Yes
ROTATE_0 : String = "rotate0" Yes Yes
ROTATE_180 : String = "rotate180" Yes Yes
ROTATE_270 : String = "rotate270" Yes Yes
ROTATE_90 : String = "rotate90" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
charCount : int Yes Yes
findText(beginIndex:int, textToFind:String,
caseSensitive:Boolean):int
Yes Yes
getSelected(beginIndex:int, endIndex:int):Boolean Yes Yes
getSelectedText(includeLineEndings:Boolean =
false):String
Yes Yes
getText(beginIndex:int, endIndex:int,
includeLineEndings:Boolean = false):String
Yes Yes
getTextRunInfo(beginIndex:int, endIndex:int):Array Yes Yes
hitTestTextNearPos(x:Number, y:Number,
maxDistance:Number = 0):Number
Yes Yes
setSelectColor(hexColor:uint = 0xFFFF00):void Yes Yes
setSelected(beginIndex:int, endIndex:int,
select:Boolean):void
Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
currentCount : int Yes Yes
delay : Number Yes Yes
repeatCount : int Yes Yes
reset():void Yes Yes
running : Boolean Yes Yes
start():void Yes Yes
stop():void Yes Yes
131DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TimerEvent
The following table shows those members of the TimerEvent class that ActionScript 3.0 and Flash Lite 4 support.
TouchEvent
The following table shows those members of the TouchEvent class that ActionScript 3.0 and Flash Lite 4 support.
timer Yes Yes
Timer(delay:Number, repeatCount:int = 0) Yes Yes
timerComplete Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
TIMER : String = "timer" Yes Yes
TimerEvent(type:String, bubbles:Boolean = false,
cancelable:Boolean = false)
Yes Yes
TIMER_COMPLETE : String = "timerComplete" Yes Yes
toString():String Yes Yes
updateAfterEvent():void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
altKey : Boolean Yes No
clone():Event Yes Yes
ctrlKey : Boolean Yes No
isPrimaryTouchPoint : Boolean Yes Yes
isRelatedObjectInaccessible : Boolean Yes Yes
localX : Number Yes Yes
localY : Number Yes Yes
pressure : Number Yes Yes
relatedObject : InteractiveObject Yes Yes
shiftKey : Boolean Yes No
sizeX : Number Yes Yes
sizeY : Number Yes Yes
stageX : Number Yes Yes
stageY : Number Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
132DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Transform
The following table shows those members of the Transform class that ActionScript 3.0 and Flash Lite 4 support.
TransformGestureEvent
The following table shows those members of the TransformGestureEvent class that ActionScript 3.0 and Flash Lite 4
support.
TouchEvent(type:String, bubbles:Boolean = true, cancelable:Boolean
= 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)
Yes Yes
touchPointID : int Yes Yes
TOUCH_BEGIN : String = "touchBegin" Yes Yes
TOUCH_END : String = "touchEnd" Yes Yes
TOUCH_MOVE : String = "touchMove" Yes Yes
TOUCH_OUT : String = "touchOut" Yes Yes
TOUCH_OVER : String = "touchOver" Yes Yes
TOUCH_ROLL_OUT : String = "touchRollOut" Yes Yes
TOUCH_ROLL_OVER : String = "touchRollOver" Yes Yes
TOUCH_TAP : String = "touchTap" Yes Yes
updateAfterEvent():void Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
colorTransform : flash.geom:ColorTransform Yes Yes
concatenatedColorTransform : flash.geom:ColorTransform Yes Yes
concatenatedMatrix : Matrix Yes Yes
getRelativeMatrix3D(relativeTo:DisplayObject):Matrix3D Yes No
matrix : Matrix Yes Yes
matrix3D : Matrix3D Yes No
perspectiveProjection : PerspectiveProjection Yes No
pixelBounds : Rectangle Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
clone():Event Yes Yes
GESTURE_PAN : String = "gesturePan" Yes Yes
GESTURE_ROTATE : String = "gestureRotate" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
133DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
TypeError
The following table shows those members of theTypeError class that ActionScript 3.0 and Flash Lite 4 support.
TypographicCase
The following table shows those members of the TypographicCase class that ActionScript 3.0 and Flash Lite 4 support.
uint
The following table shows those members of the uint class that ActionScript 3.0 and Flash Lite 4 support.
GESTURE_SWIPE : String = "gestureSwipe" Yes Yes
GESTURE_ZOOM : String = "gestureZoom" Yes Yes
offsetX : Number Yes Yes
offsetY : Number Yes Yes
rotation : Number Yes Yes
scaleX : Number Yes Yes
scaleY : Number Yes Yes
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)
Yes Yes
toString():String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
TypeError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
CAPS : String = "caps" Yes Yes
CAPS_AND_SMALL_CAPS : String = "capsAndSmallCaps" Yes Yes
DEFAULT : String = "default" Yes Yes
LOWERCASE : String = "lowercase" Yes Yes
SMALL_CAPS : String = "smallCaps" Yes Yes
TITLE : String = "title" Yes Yes
UPPERCASE : String = "uppercase" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
134DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
URIError
The following table shows those members of URIError class that ActionScript 3.0 and Flash Lite 4 support.
URLLoader
The following table shows those members of the URLLoader class that ActionScript 3.0 and Flash Lite 4 support.
URLLoaderDataFormat
The following table shows those members of the URLLoaderDataFormat class that ActionScript 3.0 and Flash Lite 4
support.
Member Name ActionScript 3.0 Flash Lite 4
MAX_VALUE : uint = 4294967295 Yes Yes
MIN_VALUE : uint = 0 Yes Yes
uint(num:Object) Yes Yes
toExponential(fractionDigits:uint):String Yes Yes
toFixed(fractionDigits:uint):String Yes Yes
toPrecision(precision:uint):String Yes Yes
toString(radix:uint):String Yes Yes
valueOf():uint Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
URIError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
bytesLoaded : uint = 0 Yes Yes
bytesTotal : uint = 0 Yes Yes
close():void Yes Yes
complete Yes Yes
data : * Yes Yes
dataFormat : String = "text" Yes Yes
httpStatus Yes Yes
ioError Yes Yes
load(request:URLRequest):void Yes Yes
open Yes Yes
progress Yes Yes
securityError Yes Yes
135DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
URLRequest
The following table shows those members of the URLRequest class that ActionScript 3.0 and Flash Lite 4 support.
URLRequestHeader
The following table shows those members of the URLRequestHeader class that ActionScript 3.0 and Flash Lite 4
support.
URLRequestMethod
The following table shows those members of the URLRequestMethod class that ActionScript 3.0 and Flash Lite 4
support.
Member Name ActionScript 3.0 Flash Lite 4
BINARY : String = "binary" Yes Yes
TEXT : String = "text" Yes Yes
VARIABLES : String = "variables" Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
authenticate : Boolean Yes No
cacheResponse : Boolean Yes No
contentType : String Yes Yes
data : Object Yes Yes
digest : String Yes Yes
manageCookies : Boolean Yes No
method : String Yes Yes
requestHeaders : Array Yes Yes
url : String Yes Yes
URLRequest(url:String = null) Yes Yes
useCache : Boolean Yes No
Member Name ActionScript 3.0 Flash Lite 4
name : String Yes Yes
URLRequestHeader(name:String = "", value:String = "") Yes Yes
value : String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
DELETE : String = “DELETE” Yes No
GET : String = "GET" Yes Yes
HEAD : String = “HEAD” Yes No
136DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
URLStream
The following table shows those members of the URLStream class that ActionScript 3.0 and Flash Lite 4 support.
OPTIONS : String = “OPTIONS” Yes No
POST : String = "POST" Yes Yes
PUT : String = “PUT” Yes No
Member Name ActionScript 3.0 Flash Lite 4
bytesAvailable : uint Yes Yes
close():void Yes Yes
complete Yes Yes
connected : Boolean Yes Yes
endian : String Yes Yes
httpStatus Yes Yes
ioError Yes Yes
load(request:URLRequest):void Yes Yes
objectEncoding : uint Yes Yes
open Yes Yes
progress Yes Yes
readBoolean():Boolean Yes Yes
readByte():int Yes Yes
readBytes(bytes:ByteArray, offset:uint = 0, length:uint =
0):void
Yes Yes
readDouble():Number Yes Yes
readFloat():Number Yes Yes
readInt():int Yes Yes
readMultiByte(length:uint, charSet:String):String Yes Yes
readObject():* Yes Yes
readShort():int Yes Yes
readUnsignedByte():uint Yes Yes
readUnsignedInt():uint Yes Yes
readUnsignedShort():uint Yes Yes
readUTF():String Yes Yes
readUTFBytes(length:uint):String Yes Yes
securityError Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
137DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
URLVariables
The following table shows those members of the URLVariables class that ActionScript 3.0 and Flash Lite 4 support.
Vector
The following table shows those members of the Vector class that ActionScript 3.0 and Flash Lite 4 support.
VerifyError
The following table shows those members of VerifyError class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
decode(source:String):void Yes Yes
toString():String Yes Yes
URLVariables(source:String = null) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
concat(... args):Vector.<T> Yes Yes
every(callback:Function, thisObject:Object = null):Boolean Yes Yes
filter(callback:Function, thisObject:Object = null):Vector.<T> Yes Yes
fixed : Boolean Yes Yes
forEach(callback:Function, thisObject:Object = null):void Yes Yes
indexOf(searchElement:T, fromIndex:int = 0):int Yes Yes
join(sep:String = ","):String Yes Yes
lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int Yes Yes
length : uint Yes Yes
map(callback:Function, thisObject:Object = null):Vector.<T> Yes Yes
pop():T Yes Yes
push(... args):uint Yes Yes
reverse():Vector.<T> Yes Yes
shift():T Yes Yes
slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T> Yes Yes
some(callback:Function, thisObject:Object = null):Boolean No Yes
sort(compareFunction:Function):Vector.<T> Yes Yes
splice(startIndex:int, deleteCount:uint = 4294967295, ...
items):Vector.<T>
Yes Yes
toLocaleString():String No Yes
toString():String No Yes
unshift(... args):uint No Yes
138DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Video
The following table shows those members of the Video class that ActionScript 3.0 and Flash Lite 4 support.
XML
The following table shows those members of the XML class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
VerifyError(message:String = "") Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
attachCamera(camera:Camera):void Yes No
attachNetStream(netStream:NetStream):void Yes Yes
clear():void Yes Yes
constructVideoObject(width:int = 320, height:int =
240):void
Yes Yes
deblocking : int Yes Yes
smoothing : Boolean Yes Yes
Video(width:int = 320, height:int = 240) Yes Yes
videoHeight : int Yes Yes
videoWidth : int Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
addNamespace(ns:Object):XML Yes Yes
appendChild(child:Object):XML Yes Yes
attribute(attributeName:*):XMLList Yes Yes
attributes():XMLList Yes Yes
child(propertyName:Object):XMLList Yes Yes
childIndex():int Yes Yes
children():XMLList Yes Yes
comments():XMLList Yes Yes
contains(value:XML):Boolean Yes Yes
copy():XML Yes Yes
defaultSettings():Object Yes
descendants(name:Object = *):XMLList Yes Yes
elements(name:Object = *):XMLList Yes Yes
hasComplexContent():Boolean Yes Yes
hasOwnProperty(p:String):Boolean Yes Yes
139DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
XMLDocument
The following table shows those members of the XMLDocument class that ActionScript 3.0 and Flash Lite 4 support.
hasSimpleContent():Boolean Yes Yes
ignoreComments : Boolean Yes Yes
ignoreProcessingInstructions : Boolean Yes Yes
ignoreWhitespace : Boolean Yes Yes
inScopeNamespaces():Array Yes Yes
insertChildAfter(child1:Object, child2:Object):* Yes Yes
insertChildBefore(child1:Object, child2:Object):* Yes Yes
length():int Yes Yes
localName():Object Yes Yes
name():Object Yes Yes
namespace(prefix:String = null):* Yes Yes
namespaceDeclarations():Array Yes Yes
nodeKind():String Yes Yes
normalize():XML Yes Yes
parent():* Yes Yes
prependChild(value:Object):XML Yes Yes
prettyIndent : int Yes Yes
prettyPrinting : Boolean Yes Yes
processingInstructions(name:String = "*"):XMLList Yes Yes
propertyIsEnumerable(p:String):Boolean Yes Yes
removeNamespace(ns:Namespace):XML Yes Yes
replace(propertyName:Object, value:XML):XML Yes Yes
setChildren(value:Object):XML Yes Yes
setLocalName(name:String):void Yes Yes
setName(name:String):void Yes Yes
setNamespace(ns:Namespace):void Yes Yes
setSettings(... rest):void Yes Yes
settings():Object Yes Yes
text():XMLList Yes Yes
toString():String Yes Yes
toXMLString():String Yes Yes
valueOf():XML Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
140DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
XMLList
The following table shows those members of the XMLList class that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
createElement(name:String):XMLNode Yes Yes
createTextNode(text:String):XMLNode Yes Yes
docTypeDecl : Object = null Yes Yes
idMap : Object Yes Yes
ignoreWhite : Boolean = false Yes Yes
parseXML(source:String):void Yes Yes
toString():String Yes Yes
xmlDecl : Object = null Yes Yes
XMLDocument(source:String = null) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
attribute(attributeName:*):XMLList Yes Yes
attributes():XMLList Yes Yes
child(propertyName:Object):XMLList Yes Yes
children():XMLList Yes Yes
comments():XMLList Yes Yes
comments():XMLList Yes Yes
contains(value:XML):Boolean Yes Yes
copy():XML Yes Yes
descendants(name:Object = *):XMLList Yes Yes
elements(name:Object = *):XMLList Yes Yes
hasComplexContent():Boolean Yes Yes
hasOwnProperty(p:String):Boolean Yes Yes
hasSimpleContent():Boolean Yes Yes
length():int Yes Yes
normalize():XMLList Yes Yes
parent():Object Yes Yes
processingInstructions(name:String = "*"):XMLList Yes Yes
propertyIsEnumerable(p:String):Boolean Yes Yes
text():XMLList Yes Yes
141DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
XMLNode
The following table shows those members of the XMLNode class that ActionScript 3.0 and Flash Lite 4 support.
XMLNodeType
The following table shows those members of the XMLNodeType class that ActionScript 3.0 and Flash Lite 4 support.
toString():String Yes Yes
toXMLString():String Yes Yes
valueOf():XMLList Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
appendChild(node:XMLNode):void Yes Yes
attributes : Object Yes Yes
childNodes : Array Yes Yes
cloneNode(deep:Boolean):XMLNode Yes Yes
firstChild : XMLNode Yes Yes
getNamespaceForPrefix(prefix:String):String Yes Yes
getPrefixForNamespace(ns:String):String Yes Yes
hasChildNodes():Boolean Yes Yes
insertBefore(node:XMLNode, before:XMLNode):void Yes Yes
lastChild : XMLNode Yes Yes
localName : String Yes Yes
namespaceURI : String Yes Yes
nextSibling : XMLNode Yes Yes
nodeName : String Yes Yes
nodeType : uint Yes Yes
nodeValue : String Yes Yes
parentNode : XMLNode Yes Yes
prefix : String Yes Yes
previousSibling : XMLNode Yes Yes
removeNode():void Yes Yes
toString():String Yes Yes
XMLNode(type:uint, value:String) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
142DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
XMLSocket
The following table shows those members of the XMLSocket class that ActionScript 3.0 and Flash Lite 4 support.
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.
flash.utils
The following table shows the global functions of the flash.utils package that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
ELEMENT_NODE : uint = 1 Yes Yes
TEXT_NODE : uint = 3 Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
close Yes Yes
close():void Yes Yes
connect Yes Yes
connect(host:String, port:int):void Yes Yes
connected : Boolean Yes Yes
data Yes Yes
ioError Yes Yes
securityError Yes Yes
send(object:*):void Yes Yes
timeout : int Yes Yes
XMLSocket(host:String = null, port:int = 0) Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
getClassByAlias(aliasName:String):Class Yes Yes
navigateToURL(request:URLRequest, window:String =
null):void
Yes Yes
registerClassAlias(aliasName:String,
classObject:Class):void
Yes Yes
sendToURL(request:URLRequest):void Yes Yes
143DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
Top level
The following table shows the top level global functions that ActionScript 3.0 and Flash Lite 4 support.
Member Name ActionScript 3.0 Flash Lite 4
clearInterval(id:uint):void Yes Yes
clearTimeout(id:uint):void Yes Yes
describeType(value:*):XML Yes Yes
escapeMultiByte(value:String):String Yes Yes
getAliasName(value:*):String Yes Yes
getDefinitionByName(name:String):Object Yes Yes
getQualifiedClassName(value:*):String Yes Yes
getQualifiedSuperclassName(value:*):String Yes Yes
getTimer():int Yes Yes
setInterval(closure:Function, delay:Number, ...
arguments):uint
Yes Yes
setTimeout(closure:Function, delay:Number, ...
arguments):uint
Yes Yes
unescapeMultiByte(value:String):String Yes Yes
Member Name ActionScript 3.0 Flash Lite 4
Array(... args):Array Yes Yes
Boolean(expression:Object):Boolean Yes Yes
decodeURI(uri:String):String Yes Yes
decodeURIComponent(uri:String):String Yes Yes
encodeURI(uri:String):String Yes Yes
encodeURIComponent(uri:String):String Yes Yes
escape(str:String):String Yes Yes
int(value:Number):int Yes Yes
isFinite(num:Number):Boolean Yes Yes
isNaN(num:Number):Boolean Yes Yes
isXMLName(str:String):Boolean Yes Yes
Number(expression:Object):Number Yes Yes
Object(value:Object):Object Yes Yes
parseFloat(str:String):Number Yes Yes
parseInt(str:String, radix:uint = 0):Number Yes Yes
String(expression:Object):String Yes Yes
trace(... arguments):void Yes Yes
144DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
uint(value:Number):uint Yes Yes
unescape(str:String):String Yes Yes
Vector(sourceArray:Object):Vector.<T> Yes Yes
XML(expression:Object):XML Yes Yes
XMLList(expression:Object):XMLList Yes Yes
Method Description Support
applyFilter() Takes a source image and a filter object and generates the
filtered image.
Not supported
generateFilterRect() Determines the destination rectangle that the applyFilter()
method call affects, given a BitmapData object, a source
rectangle, and a filter object.
Not supported
lock() Locks an image so that any objects that reference the
BitmapData object, such as Bitmap objects, are not updated
when this BitmapData object changes.
Not supported
noise() Fills an image with pixels representing random noise. Not supported
perlinNoise() Generates a Perlin noise image. Not supported
pixelDissolve() Performs a pixel dissolve either from a source image to a
destination image or by using the same image.
Not supported
scroll() Scrolls an image by a certain (x, y) pixel amount. Not supported
threshold() Tests pixel values in an image against a specified threshold and
sets pixels that pass the test to new color values.
Not supported
unlock() 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
Member Name ActionScript 3.0 Flash Lite 4
145DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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 Description Support
compress Compresses the byte array using the zlib compressed data
format.
Not supported
inflate Decompresses the byte array. Not supported
Property Description Support
supports32BitProcesses Specifies whether the system supports running 32-bit
processes.
Not supported
supports64BitProcesses Specifies whether the system supports running 64-bit
processes.
Not supported
Property Description Support
accessibilityProperties The current accessibility options for this display object. Not supported
blendMode A value from the BlendMode class that specifies which blend
mode to use.
Not supported
blendShader Sets a shader that is used for blending the foreground and
background.
Not supported
filters An indexed array that contains each filter object currently
associated with the display object.
Not supported
146DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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().
scaleZ Indicates the depth scale (percentage) of an object as applied
from the registration point of the object.
Not supported
scrollRect The scroll rectangle bounds of the display object. Not supported
z Indicates the z coordinate position along the z-axis of the
DisplayObject instance relative to the 3D parent container.
Not supported
Property Description Support
textSnapshot Returns a TextSnapshot object for this DisplayObjectContainer
instance.
Not supported
Method Description Support
enumerateFonts() Specifies whether to provide a list of the currently available
embedded fonts.
Partially supported
Property Description Support
147DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
Method Description Support
beginShaderFill() Specifies a shader fill that Flash Player uses for subsequent calls
to other Graphics methods (such as lineTo() or drawCircle()) for
the object.
Not supported
drawGraphicsData() Submits a series of IGraphicsData instances for drawing. Not supported
drawPath() Submits a series of commands for drawing. Not supported
drawTriangles() Renders a set of triangles, typically to distort bitmaps and give
them a three-dimensional appearance.
Not supported
lineBitmapStyle() Specifies a bitmap to use for the line stroke when drawing lines. Not supported
lineGradientStyle() Specifies a gradient to use for the stroke when drawing lines. Not supported
lineShaderStyle() Specifies a shader to use for the line stroke when drawing lines. Not supported
lineStyle() Specifies a line style used for subsequent calls to Graphics
methods such as the lineTo() method or the drawCircle()
method.
Partially supported
Property Description Support
contextMenu Specifies the context menu associated with this object. Not supported
doubleClickEnabled Specifies whether the object receives doubleClick events. Not supported
tabEnabled Specifies whether this object is in the tab order. Not supported
tabIndex Specifies the tab ordering of objects in a SWF file. Not supported
148DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
Event Description Support
copy Dispatched when the user activates the platform specific
accelerator key combination for a copy operation or selects
'Copy' from the text context menu.
Not supported
cut Dispatched when the user activates the platform specific
accelerator key combination for a cut operation or selects 'Cut'
from the text context menu.
Not supported
doubleClick Dispatched when a user presses and releases the main button
of a pointing device twice in rapid succession over the same
InteractiveObject when that object's doubleClickEnabled flag is
set to true.
Not supported
mouseWheel Dispatched when a mouse wheel is spun over an
InteractiveObject instance in the Flash Player window.
Not supported
paste 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
selectAll Dispatched when the user activates the platform specific
accelerator key combination for a select all operation or selects
'Select All' from the text context menu.
Not supported
tabChildrenChange Dispatched when the value of the object's tabChildren flag
changes.
Not supported
tabEnabledChange Dispatched when the object's tabEnabled flag changes. Not supported
tabIndexChange Dispatched when the value of the object's tabIndex property
changes.
Not supported
Method Description Support
isAccessible() Specifies whether the last key pressed is accessible by other
SWF files.
Not supported
149DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
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.
Method Description Support
updateAfterEvent() Instructs Flash Player to render after processing of this event
completes, if the display list has been modified .
Not supported
Property Description Support
altKey Indicates whether the Alt key is active (true) or inactive (false). Not supported
ctrlKey Indicates whether the Control key is active (true) or inactive
(false).
Not supported
shiftKey Indicates whether the Shift key modifier is active (true) or
inactive (false).
Not supported
Property Description Support
isPerUser Indicates whether the LocalConnection object is scoped to the
current user (true) or is globally accessible to all users on the
computer (false).
Not supported
Method Description Support
updateAfterEvent() Instructs Flash Player to render after processing of this event
completes, if the display list has been modified.
Not supported
150DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
Event Description Support
MOUSE_WHEEL() Defines the value of the type property of a mouseWheel event
object.
Not supported
Property Description Support
trackAsMenu Indicates whether other display objects that are SimpleButton
or MovieClip objects can receive mouse release events.
Not supported
Property Description Support
farID The identifier of the Flash Media Server instance to which this
Flash Player or Adobe AIR instance is connected.
Not supported
farNonce A value chosen substantially by Flash Media Server, unique to
this connection.
Not supported
maxPeerConnections The total number of inbound and outbound peer connections
that this instance of Flash Player or Adobe AIR allows.
Not supported
nearID The identifier of this Flash Player or Adobe AIR instance for this
NetConnection instance.
Not supported
nearNonce A value chosen substantially by this Flash Player or Adobe AIR
instance, unique to this connection.
Not supported
protocol The protocol used to establish the connection. Not supported
unconnectedPeerStreams An object that holds all of the peer subscriber NetStream
objects that are not associated with publishing NetStream
objects.
Not supported
151DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
Method Description Support
checkPolicyFile 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.
Not supported
publish() Sends streaming audio, video, and text messages from a client
to Flash Media Server, optionally recording the stream during
transmission.
Not supported
send() Sends a message on a published stream to all subscribing
clients.
Not supported
Property Description Support
checkPolicyFile 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.
Not supported
farID The identifier of the far end that is connected to this NetStream
instance.
Not supported
farNonce A value chosen substantially by the other end of this stream,
unique to this connection.
Not supported
peerStreams An object that holds all of the subscribing NetStream instances
that are listening to this publishing NetStream instance
Not supported
soundTransform Controls sound in this NetStream object Not supported
152DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
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.
Property Description Support
soundTransform The SoundTransform object assigned to this button. Not supported
trackAsMenu Indicates whether other display objects that are SimpleButton
or MovieClip objects can receive mouse release events.
Not supported
useHandCursor A Boolean value that, when set to true, indicates whether Flash
Player displays the hand cursor when the mouse rolls over a
button.
Not supported
Event Description Support
sampleData Dispatched when the player requests new audio data. Not supported
Method Description Support
extract() Extracts raw sound data from a Sound object. Not supported
Property Description Support
id3 Provides access to the metadata that is part of an MP3 file. Partially supported
153DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
Method Description Support
areSoundsInaccessible() Determines whether any sounds are not accessible due to
security restrictions.
Not supported
computeSpectrum() Takes a snapshot of the current sound wave and places it into
the specified ByteArray object.
Not supported
Property Description Support
useHandCursor 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.
Not supported
Method Description Support
assignFocus() Sets keyboard focus to the interactive object specified by
objectToFocus, with the focus direction specified by the
direction parameter.
Not supported
willTrigger() Checks whether an event listener is registered with this
EventDispatcher object or any of its ancestors for the specified
event type.
Not supported
Property Description Support
colorCorrection Controls Flash Player color correction for displays. Not supported
colorCorrectionSupport 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.
Not supported
154DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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.
showDefaultContextMenu Specifies whether to show or hide the default items in the Flash
Player context menu.
Not supported
tabChildren Determines whether the children of the object are tab enabled. Not supported
textSnapshot Returns a TextSnapshot object for this DisplayObjectContainer
instance.
Not supported
Method Description Support
exit() Closes the Flash Player. Not supported
setClipboard() Replaces the contents of the Clipboard with a specified text
string.
Not supported
Method Description Support
dump() Dumps the underlying contents of the TextBlock as an XML
string.
Not supported
Property Description Support
155DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
Property Description Support
antiAliasType The type of anti-aliasing used for this text field. Not supported
gridFitType The type of grid fitting used for this text field. Not supported
mouseWheelEnabled A Boolean value that indicates whether Flash Player
automatically scrolls multiline text fields when the user clicks a
text field and rolls the mouse wheel.
Not supported
sharpness The sharpness of the glyph edges in this text field. Not supported
thickness The thickness of the glyph edges in this text field. Not supported
useRichTextClipboard Specifies whether to copy and paste the text formatting along
with the text.
Not supported
Property Description Support
kerning A Boolean value that indicates whether kerning is enabled
(true) or disabled (false).
Not supported
letterSpacing A number representing the amount of space that is uniformly
distributed between all characters.
Not supported
Method Description Support
dump() Dumps the underlying contents of the TextLine as an XML
string.
Not supported
156DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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.
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.
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 Description Support
getRelativeMatrix3D() Returns a Matrix3D object, which can transform the space of a
specified display object in relation to the current display
object's space.
Not supported
Property Description Support
matrix3D Provides access to the Matrix3D object of a three-dimensional
display object.
Not supported
perspectiveProjection Provides access to the PerspectiveProjection object of a three-
dimensional display object
Not supported
Method Description Support
attachCamera() Specifies a video stream from a camera to be displayed within
the boundaries of the Video object in the application.
Not supported
157DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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
158DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
• 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.
159DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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
160DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
• 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
161DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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
162DEVELOPING FLASH LITE 4 APPLICATIONS
Introduction to Flash Lite 4 ActionScript
Last updated 3/22/2011
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