Tag Archives: Flash Lite

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.

Fantastic Networking and Learning opportunities at Adobe Max

adobe max08 thumbnail
With Adobe Max San Francisco now only 2 weeks away its important to make sure you have organized your schedule, if you haven’t already. This year Adobe hosting 2 events which aim to bring developers together with some of the industry leaders in the mobile market place. So if you are a developer interested in mobile or you already have content or existing applications that you think might work as a mobile application or service, Adobe Max should offer some great opportunities to get information from the experts.

Mobile Summit
November 16, 2008 at the Marriott from 1pm-6pm

Join Adobe and our partners — Nokia, Qualcomm®, Verizon, Sony Ericsson, GetJar, Thumbplay®, and Zed — to learn about new opportunities for mobile developers this year. Get a sneak peak at what you will see and hear at MAX before anyone else does! Hear from Adobe partners and key industry players as they present the newest mobile solutions, technologies, and distribution opportunities for mobile developers. To learn more and RSVP for this event go to: http://www.eventsadobe.com/mobilesummitmax08/invite.html

Mobile Fast Pitch Networking Party
November 19, 2008 at the Thirsty Bear from 6:16pm-9:30pm

Adobe is hosting a special Mobile Networking Party to allow developers to showcase their mobile applications using our Adobe® Flash® mobile technologies. If you already have a web-based application and are thinking of going mobile, you can also present your idea and get feedback from our industry leaders. Join us to support fellow developers or to present your ideas. For more RSVP and presentation information for this event go to: http://www.eventsadobe.com/mobilenetworkingparty/invite.html

In addition to these 2 events there are also a number of great sessions on at the conference tailored to Mobile:

  • Open Screen Project: Delivering Rich Internet Experiences Across Devices
  • Creating Mobile Applications: A Real-World Example
  • Mobile Workflows with Creative Suite® 4 and Adobe Device Central CS4
  • Flash Lite 3: Learn How to Package and Distribute Mobile Content
  • Spotlight on Finetune and Teknision™: Building a Multiscreen Application
  • Create Unique Browsing Experiences on Nokia Phones
  • How to Build a Mobile Business
  • Developing the Ultimate Flash Cast™ Channels
  • Project Capuchin – Bridging Adobe Flash Lite and Java ME™

Remember the most popular MAX sessions fill very early, so be sure to register today to secure seats in your preferred sessions. You’ll be surprised by what real live Adobe Flash Lite applications exist today.

Adobe Release Device Central Device Update 7

Mark Doherty over at Flash Mobile Blog has just posted the news that Adobe have release the seventh update to device profiles for Adobe Device Central CS3.

Headline Numbers for this update:

261 profiles included
57 new devices
updates to 204 existing profiles
In total that makes 525 device profiles for you to create content with

Download Adobe Device Central Update 7 from here.

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.

The Real Reason Flash Isn’t on Apple’s iPhone?

Recently Wired posted an interview with The Mozilla CEO John Lilly. Towards the end of the interview Wired asks the question.

Wired: Are you going to develop a version of Firefox for the iPhone?

and the response?

Lilly: No. Apple makes it too hard. They say it’s because of technical issues — they don’t want outsiders to disrupt the user experience. That’s a business argument masquerading as a technological argument.

After dwelling on this I thought, this response could be applied to any number of technologies and applications. Not just Fire Fox. Everyone is now familiar with Apple’s response to the Flash Player going on the Apple iPhone. What if that response was also nothing but “a business argument masquerading as a technological argument”?

On the flip side if Apple were to make it easy for any such ‘outsiders’, as Lilly puts it, to get on its beloved new device then it could be the thin end of the wedge. For arguments sake if Apple were to allow Fire Fox with its XULRunner offline runtime engine on to the iPhone, then surely there is room for Adobe (Flash Player), Sun (Java Runtime) and even Microsoft (Silverlight) to all call foul play?

I dont know the technical capabilities or requirements to each of these runtime technologies. But making it diffiicult, or saying it technically cant be done does make for an easy way to keep a platform closed. I am not sure the advantage to Apple to shut these other technologies out? Is Apple acting in the best interest of its iPhone users and the user experience they receive? Or is something more sinister going on? Is it an attempt to lay claim to the mobile web, blocking out the competition while pulling those lovely user experiences and interfaces over our eyes?

What ever the reason, currently the message seems clear, with Apple and their iPhone, regardless who you are. Its do it Apple’s way or not at all. Maybe iPhone doesn’t need flash, but as a flash platform developer and an Apple user, it seems a shame that its missing to me.

Free Flash Lite Components Bonanza!

I you are a Flash developer producing mobile content for Flash Lite then this week end you really hit pay dirt. First Nokia announced a set of Components for Flash Lite 2. Next Adobe also release a set of Components, for use with Flash Lite 1 and also Flash Lite 2, courtesy of Mark Doherty. Finally Scott Janousek resurrected the google code links for Shuriken, a set of open source Flash Lite2 components from last year.

So with all these ‘new’ flash lite components available what can you expect from each component set?

Nokia Flash Lite 2 Components
Nokia have provided their Flash Lite 2 Component set as an MXP file for simple installation into Flash CS3, the components are easily accessible from the components panel once the MXP has been installed. Included in the zip file you download is a full readme.txt explaining how to install the MXP file through Adobe Extension Manager. The components also include full usage instructions in the form of flash help files and usage examples. Flash Lite Components that are included in the distribution are:

  • Signal Level display, including network generation.
  • Battery level display.
  • Dynamic List Component.

The Signal and Battery indicator components react to softkey placement/screen orientation. All three of the components have easily accessible skin components in the library, and also allow limited visual control from the properties panel. Mark Doherty noted that the components appear to be quite memory hungry. The Signal and Battery Indicators seem to use in the region of 600k according to Adobe Device Central, the Dynamic List Example reports around 800k although the actual memory usage of the list without a demo data set is closer to 700k.

Download the Nokia Flash Lite 2 Components

Adobe Flash Lite 1 & 2 Components and UI Examples
Over at flashmobileblog Mark Doherty has released some UI components as well. These are provided for both Flash Lite 1 and Flash Lite 2 projects. There is limited documentations for the examples, the Flash Lite 2 examples look like they should be easy to integrate as long as you intend to use them ‘as is’ in this case they would simply require the addition of key listeners to control them. If you needed the components to be used in a more dynamic fashion, there would probably be some work to do. Included in the Flash Lite 2 component examples are:

  • List, this offers similar functionality to the Dynamic list in the Nokia Component set.
  • Slider, This offers a horizontally scrolling icon menu.
  • Gapper, This is a vertical variation of the slider.
  • TileGrid, Shows a gridded icon menu with scrolling screen control.
  • NavModel, this demonstrates a full application screen control system, also included are working Signal and Battery indicators and a list components.

The examples in this file are certainly easy on the memory, all of them use less than 500k, this is particularly impressive of the Nav Model example given the amount of interactivity and feedback that is demonstrated.

As with any Flash Lite 1 work, making use of the earlier versions will be a little more fiddly than the Flash Lite 2 counter parts. But the code in each of the examples is clearly identified and if you know your way around ActionScript 1 you should find incorporating the ‘components’ easy enough. Included in the examples are the following Flash Lite 1.1 components.

  • Carousel, A full screen horizontal slider.
  • Displays, demonstrates the various device stats you can access from Flash Lite 1, also included are battery and signal indicators.
  • IconMenu, offers a FlashLite 1 version of the Slider component in the Flash Lite 2 set, this is similar to the functionality produced in the tutorial here.
  • Menu, actually seems to be a Flash Lite 2 example, an alternative dynamic list example.
  • Story, This is an example of scrolling text in flash Lite 1, similar to the scrolling text component I have released.

Agin the Flash Lite 11 components are very efficient when it comes to memory usage. None used more than 400k when published, and most were below 300k. The trade of with both these example sets from Adobe seem to be the slight increase in the amount of work you would need to do to integrate them. The other thing to note, is that these examples do offer examples of far more compelling UI methods than simple lists.

Download the Adobe Flash Lite 1 & 2 Components and UI Examples

Shuriken Open Source Flash Lite 2 Components
The last set of Flash Lite components are those that

  • Scott mentioned, the Shuriken Components. I stumbled upon these components some time ago, I am not sure if the project is still live or has fallen dormant. The project offers a fairly comprehensive attempt at providing a full component framework to Flash Lite 2 developers. Included in the distribution zip are source class files, and example .fla’s for each component in the library.
    • Button
    • Calendar
    • CheckBox
    • ComboBox
    • DateEditor
    • LinkButton
    • List
    • Loader
    • NumericStepper
    • RadioButton
    • RadioButtonGroup
    • ScrollableList
    • SimpleButton
    • TextArea

    While the examples are good they do seem to be quite heavy in terms of memory usage, and they are not without issues. The scrolling list example for instance takes around 700k to display, but more concerning is that this memory usage raises during operation, implying the component has a memory leak somewhere. The complexity of this initiative while making development easier, may be its problem. Complex class structures in Flash Lite tend to give rise to cross references and memory leaks quite quickly.

    Download the Shuriken Open Source Flash Lite 2 Components

    So there we have it 3 sets of components, all certainly have there advantages and disadvantages. The Nokia Flash Lite components are great for Plug and Play development, I would say the Adobe UI examples are great for producing engaging canned demos as they stand, but with a bit of work could be converted for very memory efficient project use, and the shuriken component frame work may be a little heavy at the moment, but keep a watch on them, they could certainly offer a great, familiar framework for Flash Lite development, when they can solve the memory issues.

    Also worth a note is that Mark Doherty has put a shout out at the end of his post regarding a shelved component framework that he could release from Adobe if interest is great enough. Mark has asked the FlashLite comunity to provide some support if it were released, to document and update the project, but this could offer a great opertunity to unify the current state of disperate component solutions emerging.

    Credit where its due:

  • 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

    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. 😀

    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.

    Bill Perry presentation availible for download, Creating and Selling Your Mobile Flash Content

    Bill Perry has posted a very interesting presentation, the subject is Creating and Selling Your Mobile Flash Content. You can down load the presentation from Bills Site.

    Creating and Selling Your Mobile Flash Content

    I also noticed Bill has a document linked at the very top of his site, under the banner “Addressable devices for developers“.