Introduction
This tutorial shows how to use Sony Ericsson Flash Lite 2.0 UI Components in developing real mobile applications.
ColorizeMyPhone is an application that displays a simple interface to change the colours of a Sony Ericsson W890i phone. It is also possible to rotate the phone, illustrating how to control an animation using the UI components.
Note: Support for Project Capuchin is required for the application to run on the phone.
A list of phones supporting Project Capuchin can be found at: [COLOR=#3366cc]http://developer.sonyericsson.com/device/ searchDevice.do?defaultSearch=true&attributes=e3b7531a-468c-40c5-9e54-8b1ce192ebb3[/COLOR].
Tutorial sections
[LIST]
[]Skill level.
[]Requirements.
[]Content of the zip file.
[]UI components used in this tutorial.
[]Creating the application.
[]Frame 1 – ColorizeMyPhone application.
[*]Testing
[/LIST]Skill level
Basic – Basic skills in ActionScript 2.0 and Adobe™ Flash™ CS3 or CS4 IDE.
Requirements
The applications and tools required to execute this tutorial are listed below.
[LIST]
[*]Adobe Flash CS3/CS4
A multimedia authoring application used to create web applications, games, movies, and content for embedded devices. It features support for vector and raster graphics and ActionScript. http://www.adobe.com/products/flash/.
[]Adobe Extension Manager
Adobe tool devoted to install new extensions for Adobe Flash CS3/CS4. http://www.adobe.com/exchange/em_download/
[]Java runtime environment (JRE)
The latest version of JRE and installation instructions are available at http://www.java.com/en/download/manual.jsp
[]Sony Ericsson UI Components
The Sony Ericsson UI components are available at http://developer.sonyericsson.com/site/global/docstools/flashlite/p_flashlite.jsp. Install them using the Adobe Extension Manager and read the help documentation for further information on application architecture.
[]Project Capuchin Kit MXP file
Project Capuchin Kit MXP component for Microsoft® Windows® or OS X. The Project Capuchin Kit extends Adobe Flash CS3 and CS4 to support creating and publishing Flash content as a Project Capuchin application. This file can be downloaded from [COLOR=#810081]http://developer.sonyericsson.com/site/global/docstools/projectcapuchin/p_projectcapuchin.jsp[/COLOR].
[/LIST]Zip file content and where to get it
The full package including source code and this tutorial in PDF forma can be dowlonaded from her:
http://developer.sonyericsson.com/site/global/docstools/flashlite/p_flashlite.jsp
When you are there, please look for [COLOR=#0000ff]Sony Ericsson Flash Lite UI Components – Tutorials and Demo Applications. [/COLOR]
The “ColorizeMyPhone.zip” file contains the folder structure and content described below:
[LIST]
[]“Installation Files” folder: “ColorizeMyPhone.jar” and “ColorizeMyPhone.jad”: The installable application (MIDlet) for your Capuchin enabled Sony Ericsson phone.
[]“Source File” folder:
[LIST]
[]“ColorizeMyPhone.fla”: The Flash source of the ColorizeMyPhone application. This tutorial describes how the Flash file was implemented, using the Sony Ericsson UI components beta version.
[]“ccw.png”: Image representing the “Turn CCW” functionality used in the Push Button.
[]“cw.png”: Image representing the “Turn CW” functionality used in the Push Button.
[/LIST]
[]Tutorial folder: Tutorial in PDF format.
[/LIST]UI components used in this tutorial
The following Sony Ericsson Flash Lite UI components are used in this tutorial:
[LIST]
[]PushButton: used to rotate the phone CW (clockwise) or CCW (counterclockwise).
[]Slider: used to modify the colours of the W890i phone. Each Slider represents a specific colour of the RGB format: Red, Green or Blue.
[]SoftKeys: shows the actions available for each PushButton (“Turn CW” or “Turn CCW”) and to the entire application (“Exit”).
[]Text: describes the functionality of the Sliders in the application.
[/LIST]Testing
To publish the ColorizeMyPhone application as a jar file, select Commands > Create Capuchin Application from the menu. A Swf2Jar window opens. (The User guide for the Swf2Jar tool is available at [COLOR=#810081]https://developer.sonyericsson.com/site/global/docstools/projectcapuchin/p_projectcapuchin.jsp[/COLOR].)
See the Swf2Jar User guide. The Security tab is optional and not necessary for this tutorial to work properly. Once the required fields are filled, click the Create button.
By the end you should have a midelt application ready to be installed on a Sony Ericsson phone with Capuchin support.