03 October 2008

Flash Lite will have access to S60 OS !

...Well soon ;)

From Biskero, Nokia released a new document on S60 5th Ed with some API for Flash Lite.
I quickly downloaded the SDK but, unfortunatly, the S60FlashLiteExamples folder is empty.

Wait and see...
With NFL and this, I really start to think SE's Capuchin made Nokia move !

NFL and cache issue

With my new phone and Mocket's SWF2NFL, I tested NFL deployment.

2 ways to do it under Apache :

  1. add 'application/vnd.nokia.flashlite-archive[insert_tab]nfl' on the file 'mime.types' (see TypesConfig in your 'httpd.conf' to know where it is) then restart apache with apachectl restart

  2. create/update a '.htaccess' file on the folder when you uploaded the NFL and add 'AddType application/vnd.nokia.flashlite-archive nfl' inside (works only if .htaccess are authorized via 'AllowOverride All' in the 'httpd.conf')



I uploaded 'test.nfl' on the correct folder of my server and downloaded it to my mobile throught Opera Mini.
After some tests, I found a bug and so updated 'test.nfl'.
I then tried to download the new version to my mobile but I was unable to overwrite the previous one, I so gave it a new name 'test1'.

Problem step 1 :
I don't have 'test' and 'test1' but 2 'test' files.
I so thought it was because I used the same version number.
So I made a new 'test.nfl' with a new icon and a new version number.

Problem step 2:
Download, call it 'test2' and....3 'test' files on the folder with the same icon !

Problem step 3:
Ok...I deleted these 3 files, cleared cache from Opera and restarted download to another folder...Still the old one!
I'm lost : old one was 12ko, new one is 23ko...Opera tell me it is about to download a 23ko file and...I have the old 12ko on my mobile ?!

Answer :
After some googling, I found a link to clear 'nokia cache'
I followed the instructions, restart the download and....finally got my 23ko file !

Conclusion:
I must say I'm a bit disappointed...
1/ an user can't update (overwrite) a file
2/ if cache isn't cleared, user still download the old one

Note, I don't know the life time of the cache but it can be an issue.
I wasn't aware of download caching, it's my first experience : always delete a file and clear cache before downloading the new version.
It still strange for me to have to clear Opera cache AND Nokia cache to download the right file.

I also know why the files kept 'test' as name, it's the FL-Name which is used, not the filename...but I must say it's strange to have 3 differents files with the same name !
Why not use this FL-name and FL-version to update the file, not create a new one ? or use a FL-UID ?

Well, first step to easier deployment....for easier ONE SHOT deployment. Forget about update.

If your phone doesn't work the same way, tell me !

My new phone

Yesterday I finally received my 5310 XpressMusic (the E71 was too expensive for me, hélas).




I choose this one because it's a S40 5ed FP1 of course.


I took a 500mb limit plan so I'll finally be able to test XML feature from Flash Lite on the web.


I like this phone, especially its weight!
But I must say its keyboard is very different from my N70's one : I first thought it was a toy !
We'll see how long I will use it !

01 October 2008

Garbage collector

I was trying to optimizing my MobileCairngorm (more info soon) when I googled to a very useful article on Adobe's Mobile Developer Center : Memory management and optimizations in Flash Lite
So bad I missed this one (from June 2007!)
Of course, others parts of the article are interesting but I was fighting with memory so...

Note some parts of this article can also be found in Flash Lite Help (link to LiveDoc)

The two things I noticed are
  1. GCollector runs every 60secondes...I was unable to see it works on Device Central's memory monitor.
  2. You can delete classes for unloaded SWF.

the point 2 is very interesting so I made some tests

  • delete class B which inherits from class A will only delete class B
  • it seems object of deleted class B will still have class A properties, events, functions (read will become something like an object of class A)
  • article talk about loaded SWF, so I tried with movieclips inside my main swf, to see if it works the same : if I delete a class on movieclip 1 (on unload) and then attach movieClip 2, this new movieclip doesn't reload the class. It seems a deleted class is lost for ever...in the SWF.

18 September 2008

NFL on S40 5th FP1

According yesterday news, NFL is supported on Nokia S40 5th edition FP1 and newer.
I was browsing which phones will be interested to buy and only found ONE with the required MIME type : the Nokia 5220 XpressMusic
I browsed others phones' UAprofile and no vnd.nokia.flashlite-archive.
Perhaps Nokia will release an update for these phones...

EDIT (080922) : From Bill Perry and Biskero, it seems NFL works on more than only the 5220...so it's strange UAProfiles aren't correct.

17 September 2008

Nokia Flash Lite package

From Mariam, it seems Nokia finally released a way to distribute Flash Lite application on Serie 40!
Their NFL (forget football) is no more than a zip file.
Easy to make but a so big step on games/applications releasing!
Of course, this package format is only supported by newly phones (S40 5th FP1+).

From comment on FL-Root, it also seems it handles multiple SWFs...cool!

Can't wait to test it!! I hope Nokia's emulator handles it! I can't buy one phone every month (and SE C905 is already waiting).

I only have the regret they don't use a JAR file (like SE's capuchin). How many times before distributers will add support to .NFL file ? Perhaps we'll see soon a www.getNFL.com !
And you'll also need to make a .NFL for S40 and a .SIS for S60 (using Kuneri online SWFPack?)
Minor points but perhaps Nokia will add .NFL support on S60 one day (my next dream!!)

09 September 2008

Screen sizes

Last week, I finally found some times to look a recorder eSeminar of Dale Rankine (Mocket) : Tips and Tricks for Effective Adobe Flash Lite.

In this cool eSeminar, Dale gave this tips :
Set Stage to minimum screen size, then bleed visual assets around the stage to allow for screen resizing

I'm actually using fsCommand2("FullScreen", true) to avoid problem with screensize but Dale came again with an alert
SE devices will not scale up but will scale down

ouch!
So the first tips is finally a great idea but when you see all the different screen sizes existing....wait a minute...which screen sizes EXACTLY ?

I so jumped to Bill Perry's Flash Lite enable phones sheet
I only develop for FL2.0+, since I'm not an AS1 guy so I looked to all FL2.0+ phones screen size and, well, screen sizes do not change as much as I though.
It seems I kept FL1.x phones enable screen sizes in memory.

Let's see which screen sizes exist

  • 800x352 : 1 phone (Nokia E90)*

  • 320x240 : 1 phone (Nokia E71...my future phone ? to replace my Samsung I320)

  • 320x239 : 2 phones (BREW LG)

  • 240x320 : 73 phones (56 Nokia + 17 SE)

  • 240x300 : 8 phones (BREW)

  • 240x266 : 9 phones (SE Cxxx phones ...even on the C905-capuchin inside)*

  • 176x220 : 1 phone (SE V640i)

  • 176x204 : 9 phones (BREW)

  • 128x160 : 6 phones (only Nokia S40 3rd FP2 phones)


*E90 also has a secondary display which is 240x320

So...what does this mean ? What I see is that a lot of phones are 240x320 (or near)...
Personnaly, I'll try now to make applications in 240x320 with a 240x266 effective view (27 pixels up and down for other phones)
"Wait! you loose 20 phones!"
Well, if you really want to support the others size, just use some math ;)
128x160 is a 240x300 scaled down
176x204 is a 240x278 scaled down
176x220 is a 240x300 scaled down
320x240 is a 240x320 flipped...you'll need to handle that (and the controls!)
320x239 is near a 320x240, no ? ;)
for the E90...I don't know if FL applications could be launched on the secondary display. If so, it's a 240x320!

This post is what I'm actually testing...I don't know if you should do the same.
I just point out some details which could give you some ideas for your futur development. It's up to you and the main goal of your application.

oh...and the Chumby need a 320x240 SWF ;)