Category Archives: FlashLite 2

FlashLite 2, Flash Lite 2

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

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.

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

    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

    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

    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.

    Detecting Screen Rotation in Nokia N95 Browser

    Continuing my work with Web Development for Mobile Phones and other Devices I updated my very simple early FlashLite 2 tests that I showed on in screen shots on my N95.

    In those posts I discussed the problem of detecting screen rotation detection on the Nokia N95. I could not get the FlashLite player to register a change in Stage size when switching from portrait to landscape viewing modes. I have since added a little JavaScript function that I thought might be able to detect this change in lieu of the FlashPlayer not working.

    Unfortunately all methods I have attempted so far to register a change in orientation have failed. The browser does not seem to support the onResize event which I assumed would provide the answer. This limitation appears similar to information I have found from iPhone web developers that have encountered similar issues.

    SmugBlog Makes Reference to it on there site. There is also a couple of links to a Framework that provides a work around of sorts using an interval.

    joehewitt, the developer responsible for the facebook I belive, has published the iUI as a google code project.

    In addition to the resize problem it seems that the FlashLite 2 player within the browser does not offer support for the FlashVars parameter of the Embed and Object tags, it also does not appear to support appending variables on the SWF path name. These limitations would not allow values to be passed into the SWF file at run time.

    A final test I performed was to export my test movie not as FlashLite content, but rather as Flash Player 6 and Flash Player 7 content with ActionScript 2 support. The thinking behind this was that this would offer me some lowest common denominator for publishing mobile flash content on a broad range of devices. Sony’s PSP of course uses the Flash Player 6 as its platform while Nintendo’s Wii uses the Flash Player 7. Both versions of the file ran within the FlashLite 2 Player. Although no the IDE did complain about using FlashLite specific FSCommand2 functions. In addition there was some issues with the image loader in the Flash Player 6 version of the swf when loaded by the FlashLite 2 player, the image was rotated through -90 degrees for some reason.

    Nokia N95 FlashLite 2 Browser Support Screen Shots

    Following my initial post last night detailing some of the player information of the FlashLite 2 support in the N95 web browser, and also one of the issues. I thought I would take a quick look at the files from last night with fresh eyes over lunch. I have included a couple of screen shots to show the rotate issue more clearly. The page that is in these screen shots is at the following location.

    http://www.bittube.com/flashlite/index.html

    In the file I am simply reporting to screen the Player version, the stage width and height, and then also loadin an image thumbnail from my new gallery of animal themed photography

    The bottom 2 fields are reporting the FlashLite players fscommand2("GetFreePlayerMemory") and fscommand2("GetTotalPlayerMemory")

    In the first screen the FlashLite movie from this URL loads has loaded in the Vertical page format at a resolution of 240×320 (wxh).

    Nokia N95 FlashLite 2 Browser Support

    In the second screen shot below the browser has been rotated into its horizontal format. This operation does not seem to cause the Stage.onResize event to fire, and the flash movie still reports a resolution of 240×320 (wxh).

    Nokia N95 FlashLite 2 Horizontal Browser Support

    A side effect of this rotation of the flash movie is that it seems to get scaled down in order to view it in the new format. This means the text becomes unreadable. Very frustrating.

    The N95 does support JavaScript in its browser, next step i suppose is to see if that can be used to detect the change in format.

    FlashLite2 Development for the Nokia N95 Browser

    I took delivery of a new Nokia 95 a few days ago, and I must confess I am very, very happy. One thing that attracted me to the device was the IN BROWSER FlashLite 2 support, this offers a way to build web experiences into the browser that owners of the new Nokia smartphone will be see. Of course this Assumes that the developers of the content stick to the usual limitations of developing for FlashLite, and other limited performance devices.

    So I have spent a little time getting to the usual nitty gritty that us flash developers require in order to produce to the Nokia N95. I.E.

    The FlashLite Player on the N95 reports the following from the System.capabilities.version command.

    FL 7,1,90,0

    When using html that sets the swf files width and height to 100% I get the following information from the N95 browser.

    Stage.width == 240
    Stage.height == 320

    Here comes the but……

    When I make use of the rotate screen functionality that the N95 offers to view the SWF in landscape format, and measure the width and height. I get the following.

    Stage.width == 240
    Stage.height == 320

    I extended my movie to make use of the Stage.onResize event. But at no point could I see that event fire through my event handler. As a result I have not been able to see the expected result in landscape format of

    Stage.width == 320
    Stage.height == 240

    Maybe I have made a simple mistake.

    The N95 does seem to be a very capable device. The battery is pretty short lived, but the functionality it offers is great. From a development point of view I will be looking to see what I can do in the Browser and out, It would be wonderful if the Browser offers FlashLite 3 once that is available, maybe a later firmware patch. We shall see.

    my first example is (very basic) available to view at this location. bittube.com/flashlitehome/index.html

    I will package the source, what there is and post it later on.