Developing Flash content for the Nokia Communicator is very similar to developing content for the Pocket PC. They both have slower processors and limited screen size. This section describes guidelines specific to developing content for the Nokia Communicator.
New Flash Player Functionality
Flash Player for the Nokia 9200 Communicator series has new platform-specific functionality:
For more information on these features, see the "Controlling Playback" section.
Optimizing Flash Content for the Nokia 9200 Communicator
Because the processor on the Nokia 9200 Communicator is significantly slower than the processor for the Microsoft Pocket PC Player and desktop player, it is extremely important to take movie performance optimizations into consideration from the beginning of a project.
For tips and tricks on how to optimize Flash content for playback on the Nokia 9200 Communicator, see the individual sections that discuss specific optimizations.
By following some simple guidelines and carefully authoring your content, you can provide rich and compelling applications for the user.
One of the most important factors to keep in mind when developing Flash content for the Nokia 9200 Communicator is the screen size. The full screen resolution is 640x200, which is available when the Flash Player is running full-screen (see Figure A.2).
Figure A.2. Nokia Communicator with screen dimensions.
However, if the Flash Player is not running full-screen, the maximum space available to the Flash movie is 486x200. If the dimensions of the Flash movie are larger than the size that can be displayed fully on the screen, scroll bars will appear to indicate to the user that the entire movie is not visible. Figure A.3 shows an example of a Flash movie running in a player with the menus visible.
Figure A.3. Flash movie running within the Flash Player.
The Flash Player for Nokia Communicator has full support for sound output. However, due to the processor limitations, there are a number of caveats. Figure A.4 shows a sample sound game.
Figure A.4. new order sound memory game (created by Emile Swain, AKQA).
While mono MP3 is the only supported MP3 sound output, other MP3 settings may work. However, the quality of the playback depends primarily on the CPU utilization of your Flash movie at the time that the sound is played. Existing stereo MP3s may sound choppy at times due to their CPU processing requirements. We recommend that when using MP3 sounds, you only use mono sounds exported at 8kbs.
In addition, the Communicator will not play higher than 8KHz. Because of this we recommend that when using ADPCM and RAW sound formats, you sample it at 8KHz. This is because the device will resample anything over 8KHz, and thus sounds over 8KHz will only lead to higher processor utilization without any additional quality in sound.
The sound export settings for a Flash movie can be adjusted in the Flash Publish Settings window by choosing File, Publish Settings, Flash (see Figure A.5).
Figure A.5. Screenshot of setting sound output settings in Flash authoring device.
All other sound output formats available for export from the Flash 5 authoring environment are supported in Flash Player on the Nokia 9200 Communicator.
When processing a sound object in ActionScript, the Flash Player must take the following steps:
It is possible that all three steps will not be processed fast enough and the sound object will not play. This scenario is especially true if the sound is triggered at the beginning of a movie before it has completely initialized.
There are two solutions to this issue:
Flash Player for Nokia 9200 Communicator Series includes two built-in device fonts:
However, you are free to use any other font in your movie as long as it is embedded within the movie. Figure A.6 shows a sample application using fonts.
Figure A.6. Font Viewer showing font output on Flash Player 5 (created by Emile Swain, AKQA).
The Nokia 9200 Communicator contains a small, fully functional QWERTY keyboard, and it is the preferred method for text input (see Figure A.7).
Figure A.7. Nokia 9200 Communicator keyboard.
A number of hot keys exist in the Flash Player that have changed to conform to the Nokia 9200 Communicator Series standard:
In addition, a number of new hot keys have been added to the Flash Player on the Nokia 9200 Communicator:
Editable Text Fields
Flash Player for the Nokia 9200 Communicator Series has full support for text fields.
When the cursor is moved inside the editable text control, pressing and releasing the Enter key or double-clicking the space bar will cause the text control to take focus. When the editable text control is in focus, the virtual pointer will disappear and a beam cursor will appear inside the text control. All the keys (including space bar, Enter key, and arrow keys) will now work inside the context of the editable text. However, the user can select text using the Shift key and the arrows. Text selection is allowed only when the text control is not in focus. The user may use one of two techniques to select text:
Once the text string is selected, you can use the Copy function under the Edit menu (or press Ctrl+C) to operate on the selected string. Cutting and pasting can only be done when the text field is in focus.
The primary means of navigation within the Flash movie is through the use of the cursor, which is controlled by the Nokia 9200 Communicator arrow keypad located on the bottom right of the keyboard (see Figure A.8).
Figure A.8. Arrow keys on the Nokia 9200 Communicator control the cursor in Flash Player.
Tab Key Navigation
To be qualified as a Nokia-compliant application, an application has to be useful without using the pointer tool. This requirement also applies to Flash Player. However, when the pointer tool/cursor is turned off, the Tab key and directional arrows can navigate and change focus within a Flash movie.
The order of tab navigation is based on a left-to-right, top-to-bottom order. Tabbing is halted at the boundary (sides) of the Flash movie, which means that off-the-screen movie elements might not be directly accessible to the user. However, a user can tab to an off-screen element and Flash Player will bring focus to the element on screen.
The following rules apply when using the Tab key for navigation within a Flash movie:
The Flash Player was designed as a primarily mouse-based system, and a lot of Flash content relies on mouse-based events to drive the user interface. For example, developers may attach ActionScript to different states of a button that are triggered, depending on how the user interacts with it.
Although the Nokia 9200 Communicator provides a virtual pointer interface, it is not the equivalent of a mouse. Because of this, there are a number of limitations that the user and developer must be aware of.
As discussed previously, the four directional arrow keys control the movement of the virtual pointer. The Enter key is used as a left mouse button and there is no emulation of the right mouse button. The virtual pointer also uses the spacebar as a convenient way to momentarily toggle the mouse button up or down. (Note: After the user has momentarily changed to the mouse-down state by using the spacebar, the Enter key will act illogically and generate a button-up and -down key press sequence instead of a down-up sequence).
Table A.1 shows the current behavior on the desktop and specifies new "Nokia friendly" behavior (please note that we also include the pen-based behavior for another point of reference).
To visually distinguish between the mouse-down and mouse-up toggle states, the appearance of the pointer changes from white (up state) to black (down state).
In addition, because virtual pointer navigation uses the spacebar, Enter key, and arrow keys, it is likely to interfere with some Flash content that relies heavily on processing such key events (for example, game contents). As a result, it is important to thoroughly test any existing content that you are porting to the Nokia 9200 Communicator series.
When animating content, keep in mind the CPU limitations of the device in order to prevent the movie from slowing down from frames being dropped. Here are some general guidelines to keep in mind when animating content:
Figure A.9 shows a sample animation for the Nokia 9200 Communicator.
Figure A.9. Animation on the Nokia 9200 Communicator. Used with permission of Team SmartyPants, Inc. Game design and development: Team SmartyPants! Inc. and Gridbloc, Inc. Lead illustrator: Miki Kohlyama for Team SmartyPants! Inc. Gameplay patent pending