Category Archives: FlashLite 3

FlashLite 3, Flash Lite 3

Catalogue Of 30+ Flash Lite Development Tips

Rien Verbrugghe has done a great job of cataloging a huge number of Flash Lite development, testing and packaging tips from a number of conference sessions and also the various Flash Lite development blogs. If you want a handy quick reference of Flash Lite development tricks and common gotchas this is worth book marking or printing out.

blog.rive.be

Memory Management in Flash Lite and ActionScript 2 using ASUnit

In my new position the team I have joined and me are carying out some in depth testing of an Action Script 2 code base for Flash Lite 3 using, among other things, ASUnit based unit and acceptance tests. The early stage of development means it is too soon to leverage the new automated testing features of Adobe Device Central CS4. One of the most important aspects of our testing has been to check memory use over the lifetime of the applications we are developing. We are interested in tracking any memory leaks in our code and also any memory space fragmentation as the Flash Lite player creates or destroys objects and classes.

This memory information is viewable from Adobe Device Central in the Memory Panel, where device central provides a graph showing memory usage over time, separating Static Heap and Dynamic Heap consumption of the player as your Flash Lite application runs.

MemoryPanel.png

Testing for memory use, loss and leaks is currently not present as standard in ASUnit for ActionScript 2. In order to include this form of testing at a basic level we have employed a trick I picked up at Max San Francisco this year (If you are the person that explained the trick, please leave a comment so I can credit you). The technique makes use of the FlashLite SharedObject as a way of measuring the file size of objects and classes before and after you think you have destroyed them in your code.

The premiss is a simple one. In your test as part of the test setup create a local SharedObject create an empty data property and save the SharedObject to disk, then call the SharedObject.getSize() method and store the size of your empty SharedObject. The code should look something like this.

// size variation threshold for the SharedObject
private static var SIZEVARIANCE:Number = 5;
private var iS:SharedObject;
private var iSSize:Number;
// standard ASUnit test setup
private function setUp():Void
{
instance = new TestableClassObject();
iS = SharedObject.getLocal("iS");
iS.clear();
iS.data.iS = undefined;
iS.flush();
iSSize = iS.getSize();
}

Some things to keep in mind are the following. The length of the SharedObject name and the length of the data property name will have an impact on the result of SharedObject.getSize(). In the above example I have limited both these values to 2 characters (‘iS’). All that remains is to link the value obtained from this setup function into a standard ASUnit test which looks something like this:

public function testDestroy():Void
{
instance.destroy();
iS.data.iS = instance;
assertTrue("testDestroy : test that the TestableClassObject 'instance' is destroyed successfully by checking size variation (" + SIZEVARIANCE + ") in SharedObject", ((iS.getSize() - iSSize) < SIZEVARIANCE));
}

In this test I am simply calling the target class instance’s destroy method, which should manage the removal of any stored references, arrays and object present in the class. I then save the locally stored instance back to the existing shared object, re-call SharedObject.getSize() and compare the size difference to the value of our initial empty SharedObject (iSSize) from the test setup method.

If the file size of the SharedObject is greater than the SIZEVARIANCE threshold then the test will fail. If that is the case then you have the ability to inspect the shared object using a SharedObject viewer (I use the free Solve by Darron Schall). In the viewer you will be able to see what items are not being properly removed from your class instance oronject. A common issue I have seen is the failure to destroy arrays that are prpperties of my classes for example. Some time over the holiday break I will put together a full example for download.

Forum Nokia launches Flash Lite Developer’s Library

I missed this yesterday. Nokia have released the Flash Lite Flash Lite Developer’s Library 1.1 . One of the important aspects of this launch is the inclusion of documentation for using the new Nokia S60 Platform Services.

The Platform Services enable flash application to access Device Capabilities and services that were previously only possible through third party solutions Such as Kuneri lite.

Here is a list taken from the Using Platform Services section of the new Flash Lite Developers Library.

The S60 platform allows Flash Lite applications installed on S60 mobile devices to:

  • Access and launch applications on a device using the AppManager Service API
  • Access and manage calendar information using the Calendar Service API
  • Access and manage information about contacts using the Contacts Service API
  • Access and manage information about landmarks using the Landmarks Service API
  • Access device logging events using the Logging Service API
  • Access device location information and perform location-based calculations using the Location Service API
  • Access information about media files stored on a device using the Media Management Service API
  • Send, retrieve, and manage messages such as SMS and MMS using the Messaging Service API
  • Access data from the physical sensors of a device using the Sensor Service API
  • Access and modify system information on a device using the SystemInfo Service API

These new API’s are supported through FlashLite 3.x on Series 60 5th edition devices. Flash Lite applications use the S60 Platform Services through Service APIs. The Service APIs are supported through a Nokia-proprietary ActionScript 2.0 library. Before you can create Flash Lite applications that use platform services, you must install the library for use in your Flash Lite applications.

Here is a run down of updates from the Change History section of the Flash Lite Developers Library.

Change history Flash Lite Developer’s Library 1.1

  • Added information on the S60 Platform Services, the corresponding ActionScript Service APIs, and the ActionScript Service object required to access the APIs.
  • Added section “Flash Lite API reference”. This section describes the ActionScript APIs provided by the S60 platform for use with Flash Lite applications.
  • Added section “Flash Lite authoring and optimization tips”. This section provides tips and guidelines for authoring Flash Lite applications and optimizing their performance.
  • Added section “Flash Lite with S60 touch”. This section briefly introduces the touch UI and Flash Lite touch keypad of S60 5th Edition devices and provides instructions for disabling the touch keypad.
  • Added section “Flash Lite example applications”. This section contains links to example Flash Lite applications that you can download to your computer and then to a mobile device or emulator.

Check out the Flash Lite Developer’s Library Here.

Using MTASC to compile Flash Lite (FSCommand2) on OSX


For some time I have used Eclipse, FDT and MTASC as my preferred weapon of choice when doing AS2 development, I switch to Flex Builder for AS3 , Flex or AIR. One spanner in these works when using Mac OSX had been when producing mobile content for FlashLite 2+. Flash Lite 2 and FLash Lite 3 can both use ActionScript 2 and so as MTASC should be able to compile FLash Lite content. However on OS X MTASC still appears to have an issue compiling the FSCommand2() function, this was fixed in teh 1.13 version of the win32 version of the compiler but It seems the OS X version does not include the same fix for FSCommand2(). The FSCommand2() function used in Flash Lite development to control things like the SoftKeys or forcing an application to display at full screen on mobiles or devices.

Last week I took the time to find a way to work around this issue in order to get back to my development tool chain when developing Flash Lite content. For those users that are more experienced with this form of development the only answer seems to be to create a symbol in the library of your fla associate any classes that make use of the FSCommand2 to the new symbol. Make sure the Clip is exported in some fashion, either by physically placing it on the stage, or setting it to export for ActionScript. Next export a stub SWF from the fla. In eclipse, or when using MTASC you will need to use the ‘-keep’ switch on the command line when you run MTASC to compile your Flash Lite content, this will also make sure the Flash Lite swf header will remain in tact as well. This forces MTASC to keep any assets that are already in the target output swf.

It is also worth mentioning that in your application code you will not be able to refer to the class that contains functionality using the FSCommand2. So applications like FDT will think there is an error as you will be unable to define the ‘type’ of your class. A second note is that MTASC will flag that there is a movie clip associated with a class, but that is has not been compiled.


Warning : The MovieClip KeyController needs the class { Class path containing FSCommand2() function } which was not compiled :
Please force compilation of this class by adding it to the commandline.

I have not been able to completely remove the FLA or the Flash IDE completely from my tool chain, but in all honesty I think there are alot of use cases in Flash Lite development that still require a level of timeline usage, so I happy with this compromise.

I have created an example package of files that you can download from here or in the download area.

Flash Lite 3 Training est Bonne!

This week I took 3 days to attend a Flash Lite 3 training course being provided by Adobe software that was presented by Dale Rankine from Moket . It was a fantastic training course, very well presented and chock full of useful information. Thanks to Dale, Suzanne and Adobe for arranging, organizing and presenting the training course.

The training course was held in Paris which meant a broad mix of different european mobile developers were attended. Its the first training course I have attended and I was surprised at the breadth of experience of the other attendees. A range of backgrounds from designers, lectures, flash developers, service operators and also mobile Java developers.

The wide range of knowledge and experience made for great discussions regarding development practices, the future of mobile, and also the part that Flash, Flash Lite or Flash Platform might play in the emerging mobile data and services market place. I imagine it also made for a real challenge to present to us at times!

These are exciting times to be involved in Flash Lite and mobile development in general. Battle lines still seem to be being drawn between a number of companies, technologies, services and a whole mix of different mobile phones and other devices. Training courses and conferences and gatherings like this and LFPUG which bring together such mixed skill sets offer a great chance to get under the marketing hype and speak to the people actually involved.

Very enjoyable and informative, thanks everyone involved.

NEC Demos Adobe Flash Lite Intellectual Property

Following the announcement from Adobe of the open screen project, news comes from the Embedded Systems Expo that NEC is showing what sounds like it might be an alternative to Adobe’s Flash Lite Player.

Its a little hard to make complete sense of the post from EETimes.com. But some interesting quotes from the short, slightly cryptic article:

By using our new IP, one can design a portable device capable of processing Adobe Flash Lite several times faster, when compared with using a processor.

Also in the announcement is a hint of better video quality as well.

After reducing the number of gates required for an IC and further tuning the video quality output by Adobe Flash Lite, NEC will start offering its IP in August this year.

One thing that does seem to be missing is an explanation of which Flash Lite version they are supporting, although the mention of video implies this is based around the FlashLite 3 player.

You can read the full (breif) announcement of NEC’s new Flash Lite IP over at EETimes.com.

One further interesting thing is that I could find no mention of NEC being involved with the Open Screen Project from its press release.

Credit where its due: EETimes.com

RIA + OSP = RAA || REA && And how to detect an Open Screen Device

Keeping with the algebraic/code functions as titles from my Last post I thought I would put some thoughts down regarding the news from Adobe earlier this week of their Open Screen Project (OSP). Anyone working in the Web/Internet industry at the moment will be well aware of the Rich Internet/Interactive Application (RIA) moniker. What Adobe is committing to is much larger though this is about true cross platform convergence. Its about Rich Anywhere Applications (RAA) or Rich Everywhere Applications (REA) if you will. You see what I did there 😉 .

Interestingly this is a concept I began to scratched the surface of with my presentation at Flash On the Beach Last Year, and over the last few months has been a subject I have continued to keep close to hand both in my day job and my personal development projects. At the moment the Flash Player Fragmentation offers a considerable challenge to any developer wanting to design and or develop for multiple devices and multiple screens.

Articles like the one posted over at ADC on adaptive screen layouts offer a great foot up. But before we get to visual display we need to know what player version we are targeting. And to do that, we have to hit the time machine button and roll back all the way to Flash 4…..

Continue reading RIA + OSP = RAA || REA && And how to detect an Open Screen Device

BitTube Goes Over the Air

Thats right, its all very last minute but I will be presenting a session at the upcoming Over the Air event in London this week.

My session is scheduled for Friday afternoon.

Flash Video Nokia Masterclass – Dave Williamson (Adobe)Learn how to create live video applications with the most popular online video format on Nokia devices.

Over the Air is all sold out now, but you can find all the information about the event over at the Over the Air Blog

I look forward to catching up with you if you are there.

Nokia N95 Firmware Update to 21.0.016 and adds FlashLite 3 Support

As many people will have seen yesterday Nokia release a fairly major update to the N95 firmware. One of the major bonuses for flash developers is the inclusion of FlashLite 3 as standard onto the device, both as a standalone player and within the browser. For those using detection scripts the player version reported in the browser is:

PlayerVersion: FL 8,1,55,0

You can see a FlashLite version test movie here..

Related to this I found myself in the situation where the Nokia Software Updater would not allow me to install the new firm ware, my t-mobile branded phone was just such a device. A quick search and it seems that devices on certain service providers are locked from the update. However there are always round such restrictions. Below is how to modify your Nokia N95 product code so that it is unlocked for applying new firmware updates.

WARNING THIS PROCESS MAY BRICK YOUR PHONE, VOID YOUR WARRANTY AND ANY NUMBER OF OTHER TERRIBLE THINGS. DO NOT DO THIS IF YOU ARE IN ANYWAY UNSURE OF THE CONSEQUENCES. I ACCEPT NO RESPONSIBILITY FOR ANY NASTY THINGS THAT HAPPEN TO YOU, YOUR DEVICE OR ANY ACTION YOUR SERVICE PROVIDER TAKES AFTER FOLLOWING THESE LINKS AND INSTRUCTIONS

That said, I only had one minor hiccup in the whole process, and it seems I am not the only one to have experienced it. I for got to mention that to Mike on MSN 😀

Right with that out the way, on to the fun.

1. First off BACK UP YOUR DEVICE! make sure you have a back up of the memory card and also the device memory.
2. In order to install the new 21.0.016 firmware you will also want to make sure you have the following software.

* Download the latest version of Nokia PC Suite.
* Download the Nemesis Service Suite.

3. Next read this post, it provides a list of the available product codes for the N95.
4. Finally you should make sure you read this post, it covers how to update the product code on the N95.

As I began to progress through the steps outlined on changing the product code of my Nokia N95 mobile phone there were a couple of items where I was left to ‘take a leap of faith’.

  1. When installing Nemesis Service Suite I left the device connection as the default virtual USB device. And that seemed to be the right thing to do.
  2. When deciding on a new product code for the device I chose the one for EURO1 Plum, this appears to have worked fine for my location and device. I have a silver/grey Nokia N95 and am based in the UK.

Once the product code was updated on the mobile phone the Nokia Software Updater worked fine to allow me to upgrade to the latest 21.0.016 firmware.

Curse my slow blogging skills, beat to the post. 😀

Microsoft has licensed Flash Lite 3 and Reader LE for future Windows Mobile based devices

More exciting news on the future of FlashLite 3 proliferation. Bill Perry has a great explanation of how the news that Microsoft has licensed Flash Lite 3 and Reader LE for future Windows Mobile based devices will affect FlashLite 3 content developers.

Read the Full Press Release here

Flash Lite 3 Update

I have still getting people sending me the IMEI numbers asking me to send them the Adobe FlashLite 3 player. For those that missed the announcement FlashLite 3 is freely availible as a Developer Edition on Symbian based mobile devices. The release notes on the Adobe Labs site explain that the player has only been tested on the Nokia N95.

So why you waiting? download FlashLite 3 for N95 Already 😀

I hope that clears up the confusion.

Nokia N96 Specifications leaked by German Webmasters

Last week it looks like the German webmasters of Nokia’s website managed to post the specifications for their latest update in the N series line of phones, the N96. This week I had the chance to lay my hands on the 8gig edition of the N95 and was impressed enough that it was going to be my new device. I think I may wait a little now 😀 .

The specs say the N96 will ship with FlashLite 3 built into the browser.

Unlike the 8 gig N95 you also get your microSD memory card expansion back and 16 Gig of internal memory and DVB-H video support as well!

The full specs of the leaked device and even a photo can be found over on the NokiaBlog

FlashLite Helper Classes for Download. Pt 2. NetworkBroadcaster

Following on from the simple BatteryBroadcaster class posted last week I have put together a second helper class for FlashLite, again built in ActionScript 2, so it should work for any FlashLite 2 or FlashLite 3 project. The NetworkBroadcaster class centralises all network and signal related events, and broadcasts any changes to listeners on 2 separate intervals. One for general signal levels, the other for “other” network status events, for example changes in network generation support.
Continue reading FlashLite Helper Classes for Download. Pt 2. NetworkBroadcaster

FlashLite 2 Helper Classes for Download. Pt 1. BatteryBroadcaster

I have been sorting through some of my old code, commenting up some bits and generally refreshing the grey matter on some of the things I have been working on. I thought I would put some of the helper classes I use out into the wild. First up is a simple class that I used for monitoring battery status of mobile phones or other mobile devices in FlashLite 2, or FlashLite 3, I would think (not tested yet) .

Flash Lite Battery Broadcaster

Continue reading FlashLite 2 Helper Classes for Download. Pt 1. BatteryBroadcaster

FlashLite 3 Player available for Nokia N95

If you are interested in testing your new FlashLite 3 content on device, as all good developers should be, the there is an interim build of FlashLite 3 availible that has been certified only for Nokia N95.

You must submit your IMEI number by Noon Eastern Time on the 16th of October. Details of the email and how to get your IMEI Number can be found at the following location.


FlashLite 3 Developer Edition for Nokia N95

Adobe Provide FlashLite Side by Side Comparisons

Along with the news of updates for CS3 and Device Central to support FlashLite 3 Authoring from within the CS 3 suite of products. The FlashLite product website has a side by side comparison of various Flash player specifications that are currently being used in Mobiles and other devices.

see the Flash Version Comparison Chart

Some Points of interest for me were the following:

  • The FlashLite 3 player is actually smaller than the FlashLite 2.1 player
  • The minimum memory requirements for the FlashLite 3 player is un-altered
  • The recommended memory is un-altered for for the FlashLite 3 Player
  • There is no improvement in the worst case memory usage of FlashLite 3 content over FlashLite 2.1
  • Added support for meta data in FlashLite 3 Content

Also I see that the FlashLite 3 player has “External API for browser scripting”, assuming there is a mechanism to update the players within device web browsers this may well offer a clean interface for the detection of screen orientation I have been experimenting with lately.

Another interesting point FlashLite 2.1 and FlashLite 3 seem to both offer support for “Complex languages (Thai, Arabic, Hebrew, etc.)”. Yet this is still not supported by the desktop player? Yet.

FlashLite 3 update availible for Flash CS3 & FlashLite 3 update for Device Central

Following the press release announcing FlashLite 3 I proceeded to do some more digging. Wondering how I can start producing this new fangled FlashLite 3 Content, I followed some links through from the new Nokia Mobile Developers Site mentioned in the previous post and found new downloads for updates to Flash CS3 and Device Central at the Adobe Developer Connection Web Site

FlashLite 3.0 Update for Device Central

Flash Lite 3.0 Update for Flash CS3

Interestingly the download for Flash CS3 is rather cryptically called “RobRoy_9_0_0_d156_patch.dmg“? or “RobRoy_9_0_0_d156_patch.exe” for windows?

Adobe Announces FlashLite 3 at MAX Chicago

Adobe have posted a press release today, it seems that they announced the release of FlashLite 3 at Max in Chicago. Included in the release is the well know news from a previous press release that the new Mobile FlashLite player will support the Flash Streaming Video Format .FLV.

Also mentioned in the release is the news the new “community for creative professional” from Nokia. This looks like it could offer a great resource for developers looking to deploy to mobile handsets, and devices.

The Full Press Release can be Found on the Adobe press release site.

Adobe Announces FlashLite 3

The full press release from Nokia covering their support for FlashLite 3 can be found on the Nokia Press Release Site:

Nokia Announce Support for FlashLite 3