12
Jul/09
3

Packaging your Flash Lite content

Back in the early days of Flash Lite, there were very few options for getting your content onto a user’s mobile phone. Pretty much the only option was to put your .swf file directly onto the user’s phone. Luckily for us, now there are a lot of very good alternatives, that allow for a much better user experience. Here are a few options.

WRT Widgets
WRT stands for Web Runtime and is a type of widget supported by a large number of S60 phones (3rd and 5th generation). A WRT widget consists of, at the very least, an .html or .swf file and a .plist file, packed into a .zip file and been renamed to .wgz. For more on WRT widgets, visit Forum Nokia.

The benefits of WRT widgets are that they are easy to develop, easy to package and easy to deploy. The problem with Flash content packaged as a WRT widget however, is that it basically runs Flash Player embedded in a webpage/widget, which means that you lose out on a lot of Flash Lite’s capabilities, like mapping softkeys, going into fullscreen mode or interacting with the accelerometer or sensors in your device. In order to achieve this, you need Javascript to act as a communication layer between flash and the device, which is usually far from ideal.

SWFPack
A far better solution is being offered by the good people at Kuneri, who have created a web service called SWFPack. SWFPack allows you to submit a single .swf or .zip file, and returns a signed .SIS (for Symbian phones), or .NFL (for S40 phones) file (support for .CAB files is in the pipeline). SWFPack is easy to use, cross-platform and doesn’t have the drawbacks of packaging your content as a WRT widget. This makes SWFPack the best option in my opinion.

Others
And last but not least, there are a few other packaging solutions out there that are worth mentioning, but don’t come close to the ease-of-use of SWFPack.

  • Adobe Package Manager – A good effort by Adobe,  unfortunately, it has so many dependencies that it takes a good deal of time just to get the packager installed. On the plus side, this one does support .CAB files.
  • SWF2JAR – Again, not as easy to use as SWFPack, SWF2JAR outputs a .jar file, but unfortunately is not compatible with that many devices.
  • JARPA- Another .JAR packager, unfortunately this project is no longer supported and therefore, does not work with S60 5th generation phones. Thomas Joos did write an excellent getting started guide for it.
11
Jul/09
0

Undocumented FSCommand2

I’ve been working on a small mobile Flash Lite application the last few days and though I’ve made several mobile applications in the past, it amazes me how much has changed in these few years. Not only have possibilities become far more advanced, the community has also grown tremendously. Especially the community over at Forum Nokia. Be sure to check that one out if you’re just getting started with mobile development, it has a lot of valuable resources and a discussion board that will see your questions answered in no time.

softkeys_portrait

But back to my most recent problem; whenever I ran my application in fullscreen mode and slid the phone closed (I was working with Nokia’s N97), I got an incredibly ugly on-screen softkeys emulator. After a lot of searching, I discovered that there is an FSCommand that is not covered in the Flash Lite language reference. The line of code below goes into the first frame of your application and effectively prevents the emulator from popping up.

FSCommand2("DisableKeypadCompatibilityMode");

I hope this saves some people some time searching.