DEVELOPING CONTENT


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:

  • Pause button

  • Volume control dialog

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.

Screen Size

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.

graphics/apafig02.gif

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.

graphics/apafig03.gif

Sound

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

graphics/apafig04.gif

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.

graphics/apafig05.gif

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:

  1. Create sound object in ActionScript.

  2. Open audio device for playback (if it is not already open).

  3. Play audio.

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:

  1. Make sure that the movie has fully loaded and initialized before allowing any sound events to be triggered.

  2. Constantly play a silent sound object in the background of the movie. This step will ensure that the audio device is kept open and eliminates one of the preceding steps necessary to play a sound.

Fonts

Flash Player for Nokia 9200 Communicator Series includes two built-in device fonts:

  • _sans (_serif is mapped to _sans)(proportionally-spaced font)

  • _typewriter (standard-spaced font)

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

graphics/apafig06.gif

Input Methods/Keyboard

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.

graphics/apafig07.gif

A number of hot keys exist in the Flash Player that have changed to conform to the Nokia 9200 Communicator Series standard:

  • Exit has been changed from Ctrl+Q on the desktop projector to Ctrl+E on the Nokia 9200 Communicator.

  • Full Screen has been changed from Ctrl+F on the desktop projector to Ctrl+T on the Nokia 9200 Communicator.

In addition, a number of new hot keys have been added to the Flash Player on the Nokia 9200 Communicator:

  • Cut Ctrl+X

  • Paste Ctrl+V

  • Copy Ctrl+C

  • Select All Ctrl+A

  • Toggle Cursor Ctrl+Q

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:

  • Move the virtual pointer to the beginning of the text string to be selected and then press down the spacebar to toggle from mouse-up to mouse-down state. At this point moving the arrow keys will cause the text string to be highlighted to the point of the position of the cursor. The user must press the spacebar once more to toggle from mouse-down to mouse-up state to complete the selection.

  • While holding the Shift key, use the arrow key buttons to move the cursor and highlight the text you would like to select.

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.

Navigation

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.

graphics/apafig08.gif

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:

  • When each control is in focus, a yellow rectangular highlight will appear on the boundary of the control to indicate the focus.

  • When a button is in focus, it will enter into the rollover state.

  • Drag events are not possible (because there is no way to simulate a click-drag interface).

  • When in Zoom-in view, the next "tab" selected item will always be partially visible in the viewing area, which means the page might be auto-scrolled to make the focus item visible.

  • The Enter key will execute the onPress event of a button or enter into edit mode for an editable text field.

  • Once an editable text field is in edit mode, the user may use the Esc key to leave edit mode, or use the Tab key to move focus to other control (thus reverting to focus navigation mode).

  • Enter and Esc have no effect on the visibility of the cursor when in Tab key mode. Rather, the user has instant text-editing control in a highlighted text field.

Mouse Events/Buttons

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

Table A.1. Button Action Behavior Matrix

Desktop Behavior (Persistent Mouse)

Touchscreen Behavior (Stylus)

Nokia 9200 Behavior (Tab Key)

Nokia 9200 Behavior (Virtual Pointer)

Roll Over handler is triggered when the mouse is moved into a button without being pressed. Button left in Over state.

N/A

Roll Over handler is triggered when the control is in focus after user pressing the Tab key button [please check Tab key button.] left in Over state.

Roll Over handler is triggered when the cursor is moved into a button using the arrow keys while the mouse button state is up. Button left in Over state.

Press handler is triggered when the mouse is clicked inside of a button. Button left in Down state.

When the stylus is pressed inside of a button, it first triggers Roll Over handler, followed by Press handler. Button left in Down state.

When the control is already in focus and Enter key is pressed, Press handler is triggered. Button left in Down state.

When the cursor is already inside a button and the Enter key is pressed (or use spacebar to toggle from mouse-up to mouse-down state), Press handler is triggered. Button left in Down state.

Release handler is triggered when the mouse is released from a click while in the button. Button left in Over state.

When the stylus is released, Release handler is triggered followed by a Roll Out handler. Button left in Up state.

When the button is in focus and the Enter key is released, Release handler is triggered. Button left in Over state.

When the cursor is inside the button and the Enter key is released (or use spacebar to toggle from mouse-down to mouse-up state), Release handler is triggered. Button left in Over state.

Roll Out is triggered when mouse is dragged out of button with mouse up. Button left in Up state.

N/A

Roll Out is triggered when the button loses focus after the user presses the Tab key. Button left in Up state.

Roll Out is triggered when the cursor is moved out of button using the arrow keys while the mouse-state is up. Button left in Up state.

Drag Down is triggered when mouse is dragged out of button with mouse down. Button left in Over state.

Drag Down is triggered when stylus is dragged out of button with pressure. Button left in Down state.

N/A

Drag Down is triggered only after the spacebar is used to toggle from mouse-up to mouse-down state inside a button; subsequently, the cursor is moved outside of the button. Button left in Over state.

Release Outside is triggered when mouse is dragged out of button with mouse down and then released outside of the button. Button left in Up state.

Release Outside is triggered when mouse is dragged out of button with mouse down and then released outside of the button. Button left in Up state.

N/A

Release Outside is triggered when pointer is "dragged out" of button (see above) with mouse-down state and then the space bar is pressed to toggle from mouse-down to up state outside of the button. Button left in Up state.

Drag Over is triggered when the mouse is dragged back into a button after first being down in the button, then dragged out. Button left in Down state.

Triggers Drag Over when the mouse is dragged back into a button after first being down in the button, then dragged out. Button left in Down state.

N/A

Triggers Drag Over when the mouse is "dragged back" into a button by moving the cursor while in mouse down state after first being "dragged" outside the button. (see Drag Down) Button left in Down state.

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.

Animation

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:

  • When determining the frame rate of your movie, keep in mind the processor limitation of the device. In general, we recommend a frame rate of 12 frames per second.

  • If you need to provide intense or complex animation, experiment with dynamically changing the movie's quality settings. This change may noticeably affect the visual quality of the movie, so be sure to thoroughly test it.

  • Limit the number of simultaneous tweens.

  • Alpha effects on symbols are very CPU intensive, and they should be used judiciously. In particular, it is generally not a good idea to tween symbols that also have their alpha level adjusted.

  • Avoid intensive visual effects. These effects include large masks, extensive motion, alpha blending, and complex vectors such as extensive gradients.

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

graphics/apafig09.gif

  • In some cases, animating via ActionScript may produce more desirable results, however, you should avoid intense ActionScript. (See the "ActionScript" section later in this appendix for more information.)

  • Experiment with combinations of tweens, key frame animations, and ActionScript-driven movement to produce the most desirable results.

  • Most importantly, test frequently on your target devices under a number of configurations and situations (that is, Flash Player running at the same time as web browser).



Macromedia Flash Enabled. Flash Design and Development for Devices
Macromedia Flash Enabled. Flash Design and Development for Devices
ISBN: 735711771
EAN: N/A
Year: 2002
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net