Flash Devices
Wednesday, October 01, 2008
SWF2NFL - AIR Application for Packaging Flash Lite Apps
SWF2NFL
Excellent news for anyone who's been looking for a way to easily package your Flash Lite applications for Nokia Series 40 devices - Dale has released an AIR application that allows you to create .NFL files.  SWF2NFL allows a developer to not have to manually assemble assets and text files but instead use a more intuitive workflow.  You can download the AIR file here, install it and try it out.

SWF2NFL App
Since it's an AIR app you can use it on both PC and mac systems and it's straightforward.  You basically just drag a folder containing your SWF file and any other files into the large area, drag an icon file to the correct location, provide additional information and select "Build".  Then your .NFL file can be made available to anyone to download and install.

SWF2NFL Supported Devices
There's also a cool feature of the AIR app that dynamically pulls in the latest supported Nokia Series 40 devices from their site and presents that info in an HTML window - simply by clicking a link at the bottom of the tool "25 devices supported".

Give it a shot and if you do create a .NFL file post a link to it in the comments here so the community can download them and test them out.  Also if you have any ideas of improving the tool let Dale know.

Labels: , , , , ,

Thursday, September 18, 2008
Flash Lite Packaging for Nokia Series 40 Devices
NFL app on phone
Yesterday Forum Nokia released their "NFL" spec for packaging Flash Lite content for supported Nokia Series 40 devices.  For those of you in the US you may think National Football League which started a few weeks ago but this is not that ;o)

The easiest way to think of the .NFL file format is it's a .ZIP file that's renamed to .NFL and contains at least one .SWF file, a bitmap file for the icon and a descriptor file (.INF). If the Flash Lite content also requires additional .SWF or other media files they can be included in the package as long as the information is listed in the descriptor file.

So I spent some time yesterday (about 30 minutes) and created a simple Flash Lite animation and made my own .NFL package and thought I'd share my experience with you.
I downloaded the NFL spec from the Forum Nokia site and read through it.  All of the information is included in the 7 page PDF and is very easy to follow given they included sample code and it's well written.  Next I went through my drawer of devices and found a supported Series 40 device, 6500 Classic.  It's a 240x320 device that has Flash Lite 2.1 pre-installed - cool.

Device Central CS3
So then I opened up Device Central CS3, found the 6500 Classic, then selected "File > New Document In > Flash" and then selected the Create button.

Flash CS3
Now that I was in Flash CS3 I created a simple bouncing ball animation and specified it to launch fullscreen:  fscommand2("FullScreen",true);   I tested in Device Central, it worked so I then had my SWF file ready to go. 

Photoshop CS3
Next was to create the icon so I opened up Photoshop and created a new document that was 43x43.  Added some random shapes and colors and then exported as a PNG with transparency.  Make sure you have it set to 256 colors in your PNG settings otherwise you may experience an error message when trying to launch the .NFL file on a device.

So the .SWF and .PNG files are ready, now to create the descriptor file:

FL-Version: 1.1
FL-Icon: bouncingBall.png
FL-Name: Bouncing Ball
FL-Root: bouncingBall.swf

 
You can refer to the .NFL spec PDF for specific details but all I did was create a new text file with the above text and saved it as "descriptor.inf".

NFL files
Now to create the .NFL file - this was easy.  I selected my three files (bouncingBall.swf, bouncingBall.png, and descriptor.inf) and made a .ZIP file.  I then renamed the .ZIP file to .NFL.

Last step is to get it on my 6500 Classic so I just transferred it from MacBook Pro via Bluetooth and it showed up in the Received files folder, which is located in the Gallery (Menu > Gallery > Received files).

NFL details
The icon I created shows up, the name of the application that I specified in the descriptor file shows and if I select the app it launches and I see a bouncing yellow ball that's full screen.


Here are some additional details for those of you who are new to Flash Lite development or are interested in Nokia Series 40 devices.

What's "packaging"?
Packaging is a term used in mobile development to describe the process for gathering and compressing files together into a specific file format that's then interpreted by a device.  Once on the device the package can be installed and/or launched.  In the mobile space there are several packaging formats for different mobile platforms:
  • Symbian = .SIS
  • Windows Mobile = .CAB
  • Java applications = .JAR
  • Nokia Series 40 = .NFL
If you're a web developer using Flash or Flex and are thinking about creating AIR applications then it's similar - you're packaging your assets into a .AIR file that then can be downloaded and installed on Windows, Mac or Linux computers.  For Flash developers the workflow is very similar to creating an AIR application:
  • AIR application = Flash > Packaging to .AIR > distribution
  • Flash Lite content (NFL) = Flash > Device Central > Packaging to .NFL > distribution
  • Flash Lite content (SIS) = Flash > Device Central > Packaging to .SIS > distribution
What devices does .NFL support?
The .NFL file format is supported on Nokia Series 40 devices that are 5th edition, Feature Pack 1 and newer.  If the grand scheme of things the Series 40 devices are commonly referred to as "mass market" or "feature phones".  The "high end' or "smart phones" are the S60 devices, like the N95, N82 and others.  To date there are 22 compatible Series 40 devices that have been announced and/or shipping in market.  They include the following models:
  • 3120 Classic
  • 3555
  • 3600 Slide
  • 5220 XpressMusic
  • 5310 XpressMusic
  • 5610 XpressMusic
  • 6212 Classic
  • 6300i
  • 6500 Classic
  • 6500 Slide
  • 6600 Fold
  • 6600 Slide
  • 7210 Supernova
  • 7310 Supernova
  • 7510 Supernova
  • 7610 Supernova
  • 7900 Prism
  • 7900 Crystal Prism
  • 8800 Arte
  • 8800 Saphire Arte
  • 8800 Carbon Arte
Why is this important?
For some time Flash Lite developers have developed content for Series 40 devices but there hasn't been an easy way for them to package their content and distribute it.  With the .NFL spec from Forum Nokia, anyone can create a .NFL package and make it available for end-users to download (OTA, Bluetooth, etc...).  You can also take a Flash Lite application that was developed for Nokia S60 devices and package it for Series 40 devices.  Of course depending on the specific features that the developer used in their Flash Lite application for S60 devices some features may or may not work on a compatible Series 40 device.  This is where using Device Central, testing on actual devices and asking the community to assist in testing can help out.

Now that you have more facts about .NFL and Flash Lite I encourage you to start looking into creating various types of Flash Lite content for these mass market devices.  If you have any additional questions about .NFL leave them here and I'll answer them.

Labels: , , ,