FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Mobility
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
June 08, 2007

Flash Lite: Graphics for Mobile Devices

(Page 2 of 6)

Which Flash Lite Version to Target?

There are a number of different versions of Flash Lite. The most widely deployed version on handsets is Flash Lite 1.1. However, Flash Lite 2.x players have started popping up on some handsets. Table 1 lists the differences between Flash Lite 1.1 and 2.

  Flash Lite 1.1 Flash Lite 2
Based on Flash 4 (ActionScript pre-1.0) Flash 7 (ActionScript 2.0)
Support for device video No Yes
Support for data download Yes (text, value-name pairs only) Yes (XML and name-value pairs)
Support for image download Yes (inside a swf-file only) Yes
Support for saving data on the device No Yes
Support for arrays No (workaround available) Yes
Application types Standalone, wallpaper, screen savers (depending on the device) Standalone, wallpaper, screen savers (depending on the device)

Table 1: Flash Lite 1.1 versus 2.

Flash Lite players running on mobile devices are backward compatible: A Flash Lite 2 player can execute Flash Lite 1.1 animations, but not vice versa. Hence, if you want to address the biggest potential market, you have to use Flash Lite 1 as the development target. Unfortunately, Flash Lite 1.1 is based on older technology, which is missing key features for effective application development. This means that, for some applications, it is better to go with Flash Lite 2.

A big difference is support for external data downloading. XML support is only available for Flash Lite 2 applications. The only way to retrieve text data from a server in Flash Lite 1.1 is to use name-value pairs. If you cannot transcode your structured data to simple flat file, you might need to use Flash Lite 2.

But using name-value pairs isn't that bad. For instance, fewer bytes are transmitted via name-value pairs than with, say, XML formats that add extra bytes in messages. Since users in some countries pay for each byte transmitted over the network, it is a good idea to limit the amount of transmitted data.

Another difference between Flash Lite 1.1 and 2 is support for array data objects. Flash Lite 1.1 is based on Flash 4. Since there is no support for arrays in Flash 4, Flash Lite 1.1 does not support arrays either. Arrays are supported on Flash Lite 2.

However, you can emulate arrays in Flash Lite 1.1 using the eval() function, which takes a name of a variable as a parameter and returns the contents of that variable. For example, if the variables name1,name2, ..., name10 contain names of baseball players, Listing One displays the names of the players.

for (i=1; i<=10; i++) {
    playerName = eval("name" add i);
    trace(playerName);
}
Listing One
Previous Page | 1 Flash Lite | 2 Which Flash Lite Version to Target? | 3 Preparing the Data Service | 4 Getting Started with Client Applications | 5 Testing the Application | 6 Adding the Final Code Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK