New “Device” ActionScript Object for Nokia FL3.1 Devices

Recently Nokia released an update to the Flash Lite 3 player on their 5800 XpressMusic device (S60 5th Edition), upgrading it to 3.1 via their “App Update” mechanism. While there’s been a few bugs found with the new 3.1 update that gets installed, it did signal a departure from the firmware upgrade path for updating on-device software, and certainly makes it a lot easier for device owners to stay up to date.

Nokia have also just added to their ActionScript API (S60 Platform Services) a new Device object , for use only with the FL3.1 runtime on S60 5th Ed (and selected S60 3rd Ed FP2) devices. This is in addition to the Service object, which opens access to APIs such as Location, Contacts and Messaging through native ActionScript 2.0 classes.

The new Device object has two methods, one of which solves a problem that myself and may other Flash developers have had hassles with on Nokia S60 5th Ed touch devices – auto rotation. The methods are

  • DisableAutoRotation - Disables automatic screen rotation on the device (woo!)
  • ExpediteConnection - Starts the network connection setup process for the Flash Lite application

Before you can create Flash Lite applications that use the Device object you must install the corresponding ActionScript 2.0 class files for your Flash IDE:

  1. Download the S60 ActionScript API library package (ZIP) to your computer by clicking the following link: S60_ActionScript_API_library_1_0.zip
  2. Extract the package to the class path folder of your Flash IDE. For example, if you are using Adobe Flash CS4 on Microsoft Windows XP, extract the package to:%USERPROFILE%\Local Settings\Application Data\Adobe\Flash CS4\en\Configuration\Classes\
  3. Make sure that the extracted ActionScript class files (.as) are located in:<classpath>\com\nokia\lib\

Once that’s done, here’s how to use the new Device object:

import com.nokia.lib.Device;
var deviceObject:Object = new Device();
deviceObject.DisableAutoRotation(true);
deviceObject.ExpediteConnection();

Pretty simple huh!? You can get all the info, plus other very useful documentation on the Service object (for access Contacts, Messaging, Location, etc), in Forum Nokia Flash Lite Developer’s Library (1.4) now.


4 Comments

  1. Yay! Now if only it were possible to make the upgrade to 3.1 mandatory!

  2. Ciao Dale,

    those API are really useful but the issue with 3.1 is that there is now way to know if a user installed.
    Alessandro

  3. It would be cool if there could be some kind of UI or notification that instructed a user visually on how decrypted their device install was … cobwebs would appear if they had FL 2.0 for example, lol … making them aware of when to upgrade a device either OTA or bringing it to a service center for someone to do it for them … just an idea. The more out of date a device the more visuals to get the user to upgrade. :)

  4. Maybe a rating scale on device “fresh”-ness. A 5 out of 10, means your device is “stale”, and 10 means you’re an earlier adopter, device geek. :)


1 Trackbacks/Pingbacks

  1. Ludicrous Software: Blog » Blog Archive » Quirks with the Device object 10 07 09

Add Your Comment

Spam Protection by WP-SpamFree