Accessibility

Mobile and Devices Developer Center

 

So You're Thinking About Using Flash Instead of J2ME?


Eddie McGreal

Eddie McGreal

www.imilia.com

Table of Contents

Created:
1 March 2006
User Level:
Beginner

As a Java developer, I've often wondered how Flash compares to J2ME as a development tool. After talking to other Flash developers, I decided to give it a try and build a Flash project from scratch, taking my cue from an existing J2ME application. I chose the Stocks application from the example Demos project that comes with the J2ME Wireless Toolkit 2.2 from the Sun Developer Network and set to work on creating a Flash Lite–equivalent application. Although I've had some previous exposure to Flash, I had never attempted to create a Flash or Flash Lite project from scratch, so I decided to document my experience. The results are in this article.

If you're a complete novice to Flash, you will want to run through some tutorials before reading any further because you'll need to become familiar with Flash fundamentals. For a list of helpful tutorials, from within Flash Professional select Help > Getting Started with Flash (also available in the Flash LiveDocs). You'll want to familiarize yourself with some of the key terms and the Flash IDE. Don't set your goals too high before you venture into more complex stuff. I've chosen the Stocks application because it's a freely available J2ME application. It uses the most common controls—including menus, check boxes, and radio buttons—and it makes a request to a server using HTTP.

Now get cracking. Start Flash Professional and follow my lead.

Requirements

To make the most of this article, you need to to install the following software and files:

Flash Professional 8

Flash Lite 2 Update for Flash Professional 8

Download the update in the Support Center.

Note: If you already have Flash Professional 8, download and install the Flash Lite 2 Update to Flash Professional 8. Otherwise, you can download a trial version of Flash Professional 8. The update will install directly into Flash Professional 8, enabling you to test and publish Flash Lite 2 content.

Flash Lite Player 2

Make sure you have the latest version of Flash Lite Player 2 installed on your handset to view the completed SWF files. You can purchase the player from the Online Store. Refer to the Online Store page for a list of supported handsets for development purposes.

Sample file:

  • downloadflashlite_j2me_samples.zip (ZIP, 68K)

    The sample files contain the completed forum web application, the empty files you will use to build the forum web application, and the database script.

Prerequisite Knowledge

Basic programming skills and familiarity with J2ME, Flash, and HTTP.

About the author

Eddie McGreal has more than 15 years' experience working on leading-edge technologies, and a strong background in Java/J2EE, RDBMS, and J2ME. He is the founder and CEO of Imilia (Interactive Mobile Applications GmbH), which focuses on mobile applications. He can be contacted at info@imilia.com.