Tài liệu Flash Lite Authoring Guidelines for the i-mode Service by NTT DoCoMo - Pdf 87

Flash Lite Authoring Guidelines
for the i-mode Service by NTT DoCoMo
Trademarks
Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware,
Authorware Star, Backstage, Bright Tiger, Clustercats, ColdFusion, Design In Motion, Director, Dream Templates,
Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, Generator, HomeSite,
JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live
Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Flash, Macromedia M Logo and
Design, Macromedia Spectra , Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with
Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame! , Roundtrip, Roundtrip
HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, Xtra are either
registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions
including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be
trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions
including internationally.
This guide contains links to third-party Web sites that are not under the control of Macromedia, and Macromedia is not
responsible for the content on any linked site. If you access a third-party Web site mentioned in this guide, then you do so at your
own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia
endorses or accepts any responsibility for the content on those third-party sites.
i-mode, the i-mode logo, NTT DoCoMo, and DoCoMo are trademarks or registered trademarks of NTT DoCoMo, Inc.
NTT DoCoMo and Other Third-Party Information
Apple Disclaimer
APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE
ENCLOSED COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY
PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES.
THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC
LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO
STATE.
Copyright © 2003 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced,
translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of
Macromedia, Inc.

MFi sound substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Associating an MFi sound file with an ActionScript sound symbol . . . . . . . . . . 16
Accessing sound on main and movie clip Timelines . . . . . . . . . . . . . . . . . . . . . 18
CHAPTER 4: Testing Content
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
DoCoMo’s i-mode HTML Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
APPENDIX A: Supported ActionScript
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
APPENDIX B: Supported Properties
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
APPENDIX C: Warning and Error Messages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
APPENDIX D: References
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Macromedia websites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4 Contents
5
CHAPTER 1
Introduction
Macromedia has created a new profile of the Flash Player called Macromedia
®
Flash

Lite,
designed for consumer mobile devices, including phones for the i-mode service by NTT
DoCoMo. This format is designed to run optimally on devices with limited memory, processor
speed, and display area. Content created for Flash Lite is most similar to Flash Player 4 content.
The Macromedia Flash MX Professional 2004 User Guide for Flash Lite describes, in general, tools
and guidelines for authors creating Flash Lite movies. This document contains authoring
information specific to creating movies for i-mode phones.

exceptions to the standard Flash Lite specification. To review the standard specification, see the
Macromedia Flash MX Professional 2004 User Guide for Flash Lite. The exceptions to the standard
are detailed in this document.
Navigation and key events
Flash Lite for i-mode uses three keys for navigation: Up, Down, and Select. The Left and Right
keys are reserved for the i-mode browser. These three keys correspond to the Shift+Tab, Tab, and
Enter keys on the desktop versions of the Flash Player.
The keys 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, and # are also available. These correspond to the same keys
on the desktop versions of the Flash Player. You can attach ActionScript to these keys and the
Enter key as you would normally in Flash. ActionScript attached to other keys is ignored.
Text and fonts
Flash Lite includes support for both device and embedded fonts. You can use embedded fonts to
give you more control over the design of your movie, but doing so increases the SWF file size.
Using the device font for text limits you to a single font, but helps keep your file size small.
When using device fonts, Flash Lite limits special text formatting for dynamic text fields to
justification (left, center, right) and color. Formatting options such as superscript, subscript,
kerning, bold, and italic are not supported.
Flash Lite does not support input text fields—input text fields are not selectable and cannot be
used to enter text.
8 Chapter 2: Developing Content
Emoji
i-mode phones support special pictographic characters called Emoji. The following characters are
examples of Emoji:
These are encoded by replacing characters in the standard Shift-JIS table. As long as the phone’s
font supports Emoji encoded as standard Shift-JIS characters, Flash Lite can display them.
When authoring using Flash, you first need to ensure that you have Shift-JIS fonts installed on
your desktop authoring system. You also need to select a Shift-JIS font for the text fields in which
you want to display Emoji characters.
Note: The phone’s font set controls the color and appearance of Emoji characters.
For further information about Emoji, see Appendix D, “References,” on page 47.

release
,
rollOver
, and
rollOut
can be used to trigger ActionScript when attached
to buttons and accessed through key-based navigation.

Draggable movie clip functions and properties (for example:
startDrag
,
stopDrag
, and
_dropTarget
properties) are not supported.

Use the
eq
operator to compare strings and the
==
operator for numeric comparison.

URL encoding must be done manually using ActionScript. The
escape()
ActionScript
function is not a Flash 4 function and is not available in Flash Lite.

The
fscommand()
function is not supported.

subject = "email subject";
body = "email body";
getURL("mailto:[email protected]", "", "GET");
}
Method 2

Define each parameter within the getURL action, for example:
on (release, keyPress "#"){
getURL("mailto:[email protected]?subject=email subject&body=email
body");
}

Key events can only be attached to the keys 0-9, #, *, and the Enter key.

The
loadMovie()
,
loadVariables()
,
loadMovieNum()
,

and
loadVariablesNum()
functions are not supported.

The
MaxScroll
and
Scroll

Math.tan()
.

The
_url
property is not supported.

The
Number()
and
String()
functions are not supported.
Note: Flash 4 ActionScript does not support arrays. However, they can be emulated using the
eval() function. For more information, see Macromedia TechNote 14219, “How to use Eval to
emulate an array,” at www.macromedia.com/go/flash_support (English) or
www.macromedia.com/go/flash_support_jp (Japanese).
ActionScript commands that are not recognized are ignored. For a detailed listing of supported
ActionScript and properties, see Appendix A: “Supported ActionScript” on page 25 and
Appendix B: “Supported Properties” on page 37.
10 Chapter 2: Developing Content
Sound
Flash Lite for 505i phones does not support the standard Flash Player audio formats—Raw,
ADPCM or MP3. Instead, only MFi (Melody Format for i-mode) is supported. In addition, each
manufacturer’s 505i phone supports the standard MFi format, plus its own proprietary
extensions.
Flash Lite does not support streaming sound, sound mixing, or looping of sound. Only event
sound is supported and only one sound can be played at a time.
For detailed information about embedding sound into Flash Lite movies for i-mode phones, see
Chapter 3, “Sound,” on page 15.
Network access

phones, a resolution of 240x240 is recommended. The screen area available to Flash Lite in the
My Picture and Standby Screen applications varies depending on the specific 505i phone.
Detailed information on the screen area available to Flash Lite on i-mode phones is available on
the DoCoMo website. (See Appendix D, “References,” on page 47).
Movie size
There are limitations on file size and run-time memory usage for Flash Lite movies running on i-
mode phones. There is a prescribed limit on how large a web page can be, whether it includes
Flash Lite movies or not. For 505i phones, this limit is 20KB. Full details can be found at the
DoCoMo website (see Appendix D, “References,” on page 47). This limit applies to an i-mode
page’s HTML, SWF content, and all graphic images combined. Web pages larger than this limit
cannot be downloaded to an i-mode phone and no error message appears. This limitation also
applies to Flash Lite movies played directly in the browser without being embedded in an i-mode
compatible HTML file.
The run-time memory available to Flash Lite movies running on i-mode phones is limited and
may vary from model to model. Generally, for the 505i phones, this limit is not less than
200KB. Because Flash MX Professional 2004 does not provide a mechanism for checking a
phone’s run-time memory consumption, Macromedia strongly recommends that you test all
content on actual i-mode phones.
Performance Optimization 11
Performance Optimization
CPU speed in i-mode phones varies from model to model, and is typically much slower than
current desktop computers. Therefore, it is extremely important to consider movie performance
and optimization from the beginning of each project. The optimization recommendations for
creating any Flash movie also apply to Flash Lite movies created for i-mode phones. For the latter,
their importance is amplified.
Note: In Flash MX Professional 2004, you can find tips on optimizing Flash movies—select Help >
Using Flash -> Search and enter optimizing movies in the keyword search text box.
If you follow some simple guidelines, as described in this document, to author your movies, you
can create rich and compelling content despite CPU limitations.
Sound

Test animations frequently on your target phones whenever possible.
12 Chapter 2: Developing Content
Using bitmaps
Although some i-mode phones may have more than 16 bits of color resolution, Macromedia
recommends optimizing bitmaps to 16 bits before importing them into Flash MX Professional
2004. Doing so reduces Flash Lite movie size and gives you more control over the final output.
Also, make sure that bitmaps are imported at the size they need to be in the Flash Lite movie.
Using larger than required bitmaps results in higher run-time memory requirements.
Bitmaps versus vectors
Flash Lite generally uses vectors to define content, which can tax a phone’s CPU when rendering
complex graphics and animations. In general, the more vectors that are manipulated on the stage,
the more CPU power is required. This is also true for Flash movies delivered on desktop
machines. However, i-mode phones are far less powerful than desktop machines and more care
should be taken to avoid taxing the CPU.
When creating content for i-mode phones, it is sometimes better to use bitmaps instead of vectors
because they require less CPU power to animate. For example, a road map of a large city would
have too many complex shapes to scroll and animate well on an i-mode phone if it were created as
a vector graphic; a bitmap would work much better.
Using bitmaps produces larger files, so take care during development to find the right balance of
CPU versus file size and run-time memory requirements. Because of mobile phones’ smaller
screens, slower data transmission speeds, limited memory and CPU speeds, developers should
take extra care in planning and testing.
If you are using bitmaps, you can set image compression options that will reduce your SWF
file size.
To set bitmap image compression:
1
Select a bitmap in the Library window.
2
Right-click (Windows) or Control-click (Macintosh) the bitmap’s icon in the Library window.
3

produces a larger SWF file. Try different settings to determine the best trade-off between size
and quality.
Vector graphics
Whenever possible do not use borders in your vector graphics; this will greatly diminish the
number of rendered lines.
14 Chapter 2: Developing Content
Using ActionScript
Because of CPU limitations, you should adhere to the following general guidelines when
developing ActionScript for Flash Lite movies deployed on i-mode phones:

Keep the ActionScript as simple as possible.

Limit the number of loops that you use and the amount of code that each loop contains.

Stop frame-based looping as soon as it is no longer needed.

Avoid string and emulated array processing—it can be extremely CPU intensive.
Note: Flash 4 ActionScript does not support arrays. However, they can be emulated using the
eval()
function. For more information, see Macromedia TechNote 14219, “How to use Eval to
emulate an array,” at www.macromedia.com/go/flash_support.
Interactive versus Inline content
Flash Lite movies can be viewed in the i-mode browser in one of two modes: Interactive or Inline.
The browser determines the mode used.
In Interactive mode, the user can view and interact with the Flash Lite movie. Generally, this
occurs when a Flash Lite movie is loaded directly into the browser without being embedded in
an i-mode compatible HTML web page or mixed with any other type of content. The browser
then sends all supported key events to Flash Lite, allowing content to access the network and
play sound.
If the movie’s display area is not the same as the browser’s display area, the browser re-sizes the

basics of sound substitution. The examples and tutorials in the user guide use MIDI (Musical
Instrument Digital Interface)

sound files, but the same principles apply for MFi files.
The following procedure is specific to i-mode phones.
16 Chapter 3: Sound
Associating an MFi sound file with an ActionScript sound symbol
This procedure illustrates a simple case of associating an MFi sound file with an ActionScript
sound symbol so the Flash MX Professional 2004 test movie player can recognize and play it.
To associate an MFi file with an ActionScript symbol:
1
In your sound authoring program, create an MFi sound file and save it as MySound.mld.
2
In Flash MX Professional 2004, create a new file and name it FlashLiteSound.fla. Save it in the
same directory as MySound.mld.
3
Select File > Publish Settings > Flash tab. The Publish Settings dialog box appears:

In the Version pop-up list, select Flash Lite 1.0.

Click OK.
4
Select Window > Other Panels > Common Libraries > Buttons. Select a button and drag it to
the Stage.
5
Double-click the new button. The Timeline should change to edit the button and display
frames named Up, Over, Down, and Hit.
6
Select Insert > Timeline > Layer to create a new layer. Select Modify > Timeline > Layer
Properties and change the name of the layer to Sound.

method the frame on the main or movie clip Timeline that contains the sound symbol must be
called using the
gotoAndPlay
action within the
keyPress
event statement.
This procedure illustrates a simple case of associating an MFi sound file with an ActionScript
sound symbol on the main or movie clip Timeline so the Flash Lite test movie player can
recognize and play it.
To associate an MFi file with an ActionScript symbol on a main or movie clip Timeline:
1
In your sound authoring program, create an MFi sound file and save it as MySound.mld.
2
In Flash MX Professional 2004, create a new file and name it FlashLiteSound.fla. Save it in the
same directory as MySound.mld.
3
Select File > Publish Settings > Flash tab.

In the Version pop-up menu, select Flash Lite 1.0 and click OK.

Click OK.
4
Select Window > Other Panels > Common Libraries > Buttons. Select a button and drag it to
the Stage.
5
Select Insert > Timeline > Layer to create a new layer on the main Timeline. Select Modify >
Timeline > Layer Properties and change the name of the layer to Sound.
6
Click on the new Sound layer in the main Timeline and select Insert > Keyframe to add a new
Keyframe to the Sound layer.

14
Click on the first Keyframe on the Actions layer and in the Actions window enter the following
script:
stop();
Note: If the Actions window is not already open you will need to select Window > Development
Panels > Actions
15
Click on the button you added to the stage and in the Actions window add the following script:
on(keyPress “1”){
gotoAndPlay(2);
}
16
Insert a Keyframe in the Actions layer where you would like the sound to stop playing. For
example: 200. Select this Keyframe and in the Actions window add the following script:
stop();
stopAllSounds();
17
Select Control > Test Movie to start the test movie player.
18
Click in the test movie player window and press the “1” key. (You may need to select Control
> Disable Keyboard Shortcuts before you can execute
keyPress
actions.) You should hear the
sound from the MFi file you created in step 1.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status