The Flash Player has a 12-bit display (thousands of colors) with no alpha support. Bitmaps higher than 16 bits within a Flash movie will be resampled by the Flash Player when deployed. Because of this, whenever possible you should optimize your bitmaps to 16 bits before they are imported into the Flash authoring environment. This guideline will give you more control over the final output as well as help ensure optimum performance.
Bitmap Versus Vector
Because Flash uses vectors to display content in the Flash Player, the processor of the device can be taxed when rendering graphics and animations. In general, the more vector curves being manipulated on stage, the more processing power is required. This fact also holds true for Flash content delivered on desktop machines. However, Nokia 9200 Communicator series devices are far less powerful than desktop machines, and even more care than normal should be given to avoid straining the processor.
When creating content for the Nokia 9200 Communicator series it is sometimes better to use bitmaps as opposed to vectors because vectors can be animated with less processor strain. For example, a vector-based road map of a large city would have too many complex shapes to scroll and animate well on a Nokia 9200 Communicator. A bitmap would work much better in this case.
Using bitmaps will produce larger files, however, so be sure to find the right balance of processor and memory requirements versus file size for the particular project. The current optimization caveats and limitations that exist for designing any Flash application also exist on the Nokia 9200 Communicator series. But on devices, the importance of dealing with these caveats becomes amplified. Because of the smaller screen, slower data transmission speeds, limited memory, and processing power, developers should take extra care in planning and testing.
Setting Bitmap Properties
Two important guidelines to consider when using bitmaps in Flash movies for display on the Nokia 9200 Communicator are as follows:
To select bitmap properties, use the Bitmap Properties dialog box by right-clicking on the image in the library and selecting Properties.
Select a bitmap in the Library window and in the Bitmap Properties dialog box (see Figure A.10), select Allow Smoothing to smooth the edges of the bitmap with anti-aliasing.
Figure A.10. Bitmap Properties window.
For Compression, choose one of the following options:
Developers can also adjust the compression settings globally in the Publish Settings window (File, Publish Settings). To control bitmap compression in the Publish Settings, Flash tab, adjust the JPEG Quality slider or enter a value. As with the compression settings previously described, lower image quality produces smaller files; higher image quality produces larger files. Try different settings to determine the best trade-off between size and quality; 100 provides the highest quality and least compression.
The Flash Player for the Nokia 9200 Communicator Series contains complete support for Flash 5 ActionScript with the following exceptions:
Any nonsupported ActionScript commands encountered by the Flash Player when processing a movie will be ignored.
Figure A.11. L.E.D. Football for the Nokia 9200 Communicator series (created by Orange Design).
Because of processing speed limitations, complex ActionScript can severely tax the CPU. If an element of a movie is taking too long to process, a dialog box will appear to users informing them of the problem (see Figure A.12). Users will have the option to disable the processing of ActionScript in the movie. This step will effectively disable the entire movie.
Figure A.12. Error dialog appears when Flash movie takes too long to process.
Because of CPU limitations, developers should keep the following general guidelines in mind when developing ActionScript for Flash movies that will be deployed on the Nokia 9200 Communicator:
Using the following ActionScript library created by the Flash community can result in significant performance increases:
String.as is an ActionScript library that rewrites some of the built-in String functions, resulting in performance increases. In particular, the String.split() method has a significant performance increase. You can download the String.as library from: http://chattyfig.figleaf.com/~bhall/code/string.as.
The ActionScript XML object for Flash Player 5 has been optimized specifically for the Nokia 9200 Communicator. However, because of the memory and processor limitations of the device, thoroughly test any content that manipulates XML data. This step is particularly important when manipulating large or complex XML documents.