Flash Lite Quick Start
From Symbian Developer Community
- Comes with Code: File:Hello Symbian Flash Lite.swf
- Comes with Code: File:Hello Symbian Flash Lite.sis
This article presents the information necessary to get started creating Flash Lite applications for the Symbian platform. It gives a summary of the tools necessary and a basic example, adapted from Adobe's documentation. If you are new to Flash or Flash Lite development, once you've worked through this page, we recommend that you visit Adobe's getting started documentation as a guide to the creation of further, more sophisticated, applications.
Contents |
Getting Started With Flash Lite Development
Tools
Adobe supplies the industry-standard Flash Professional CS4 authoring tool for use in creating Flash/Flash Lite content, allowing designers to prepare anything from simple animations through to complex multi-component ActionScript-driven applications. It is available for download and installation as a 30 day trial.
The Flash Lite product home page is here.
While the authoring tool is all that you need for developing Flash applications for the desktop, developing for mobiles brings in a number of complications. The range of mobile devices that support Flash Lite is both continually expanding and extremely varied, which introduces a problem for developers trying to determine which version of Flash to target or which devices support a particular Flash Lite feature. Devices can vary considerably in the display resolutions, content types and system features they provide. A subset of the one billion devices shipped with Flash Lite pre-installed (as of October 2008) is shown in this document from Adobe.
Adobe's Device Central tool can be used to emulate the numerous Symbian devices that support Flash Lite, so you can verify your code on the target devices you select. Device Central is found in every version of Adobe CS4, so you can test your first application on a range of emulated devices.
Device Central provides an automatically updated device profile library. You can examine particular handsets for compatibility with major Flash features, device-specific APIs and Flash Lite content types, so it’s possible to know in advance the capabilities of the particular device you’re targeting or which devices will support your content if installing to them. Targeting earlier versions of Flash Lite maximizes compatibility with older devices; there is still a large installed base of devices that support Flash Lite 1.x or 2.x.
Device Central’s support for automated testing is documented here. Test sequences carried out by interacting with the emulator can be recorded and played back later as an automated test script. There is support for playback of multiple scripts on multiple emulated devices.
When you create a new project in Flash Professional and select Flash Lite for the project type, it will automatically open Device Central for you to choose the content type and target device set before the project is created.
A Hello World Application in Flash Lite
The Flash Professional documentation supplies a Hello World example to get you started. The following text is based on that example.
How to configure and create a simple Flash Lite application
- Start Adobe Flash CS4.
- On the main Flash screen, select Create New', Flash File (Mobile). This will open Adobe Device Central and display the New Document view.
- Select Flash Lite 2.0 in the Player Version box, Adobe ActionScript™ 2.0 in the ActionScript Version' box, and Standalone Player in the Content Type box.
- Select Custom Size for All Selected Devices at the bottom of the screen so that you can create content for the stand-alone Flash Lite player
- Select Create. You are returned to Flash, which creates a new document with preset publish settings.
- Select the text tool from the Tools panel and drag it onto the blank Stage to create a text box.
- Enter some text and customize it as you wish by adjusting the font, alignment, colour and size (we've used a centered Symbian font)
- Select Control, Test Movie to export the application to Adobe Device Central and view it in the emulator. At this point, you can change the device and content type to try the application out. To do this, double-click a device in the Online Library panel and select a new content type from Content Type.
- To return to Flash, select File, Return to Flash. Flash remembers the settings you last used in the Device Central emulator.
- To build a SWF file, select File, Export and select a filesystem location to save the file.
- You can then deploy this to a real device to test it. That's the subject of the following subsection...
Packaging and Distribution
To prepare your content for installation to a user’s Symbian-based phone, you currently have two options:
- You can distribute your Flash Lite content as an SWF file or files. The user copies the SWF file(s) to the device and opens them in the device’s Flash Lite player or browser. This can be inconvenient or unintuitive for the user.
Forum Nokia’s Flash Lite Developer’s Library describes direct deployment of Flash Lite content to a phone. A user can open content in the phone’s own file manager or run the Flash Lite player and browse to and open the file from within it. If your content is split across multiple SWF files, it becomes even less convenient for the user to install them all and start the correct one. SWF files distributed in this way will be severely restricted by the security model in Flash Lite 3.0, to protect the device when browsing the Web.
- To improve the user experience when launching installed Flash applications, you can create a native application 'wrapper' around your Flash application. Once wrapped, your Flash application appears with the other native applications in the phone’s application launcher and both its caption and icon can be fully customized. One way to do this is to use the Adobe Mobile Packager (which runs only on Windows).
- The Adobe wrapper can download the latest standalone Flash Lite 3.1 player for the user if it is not already installed on the device.
- Note that some packaged applications have to be digitally signed in order to be run on an unrestricted set of phones. Signing can involve some expense, depending on how the application is to be licensed and distributed.
Once you have packaged your content, there are a number of channels available for distribution. Adobe’s distributable player includes distribution options for most major markets. Adobe has agreements with major mobile content portals for distribution accessible directly from the Adobe Mobile Packager, and also maintains a list of companies interested in distributing Flash Lite content.
An alternative approach is to use Nokia's online packaging tool, which runs on any desktop platform. Further information is available in the Packaging and signing a Flash Lite application section of the Flash Lite developer's library. The Hello World example created earlier in the article was packaged into a SIS file using the packager (using a Mozilla-based browser on a Mac). The SIS file can be downloaded from here
Summary
This Quick Start gets you up and running with a basic Hello World example and provides links to further information, guides and examples.
Related Info and Useful Links
On this wiki
Provided by Adobe
- Adobe's Flash developer centre have some nice articles about getting started, including a tutorial on how to create a simple document. The tutorial explains how to use Flash CS4 Professional to create a .fla file, add graphics and animation, and then publish it.
- For developers new to Flash Lite on Symbian-based devices, the Flash Lite home page on Adobe’s Developer Network offers continually updated articles on a variety of topics of interest to developers, as well as ‘getting started’ resources such as
- tutorials and introductory articles
- a knowledgebase
- a user-to-user (in other words, unofficial) forum
- collected documentation.
- Adobe sample projects
Provided by others
- Nokia offers useful resources for Flash Lite development on its handsets, including a quick-start guide. The Flash Lite Developer’s Library introduces Flash Lite on S60 and discusses the platform-specific services available to Flash Lite applications running there. Forum Nokia also maintains a collection of wiki articles on working with Flash Lite on S60-based devices.
- Sony Ericsson offers Flash Lite documentation and tutorials for its Symbian-based devices, some of which are relevant to all mobile developers.
Example code
Comments
Sign in to comment…





