MACROMEDIA FLASH MX PROFESSIONAL 2004 - FLASH LITE 1.1 AUTHORING Manuallines

Flash lite 1.1 authoring guidelines
Table of Contents

Advertisement

Quick Links

Macromedia Flash Lite 1.1 Authoring Guidelines

Advertisement

Table of Contents
loading

Summary of Contents for MACROMEDIA FLASH MX PROFESSIONAL 2004 - FLASH LITE 1.1 AUTHORING

  • Page 1 Macromedia Flash Lite 1.1 Authoring Guidelines...
  • Page 2 Open Sesame!, Roundtrip, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and 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, service marks, or trade names of Macromedia, Inc.
  • Page 3: Table Of Contents

    Using Macromedia Flash Lite 1.1 ........
  • Page 4 Adding a Sound Bundle File to a Flash document ......23 ....25 CHAPTER 4: ActionScript Enhancements for Flash Lite 1.1 New ActionScript functions .
  • Page 5 ........51 CHAPTER 7: Testing Content Testing considerations .
  • Page 6 Contents...
  • Page 7: Chapter 1: Introduction

    Macromedia Flash content for mobile phones using Macromedia Flash Lite 1.1. Running Macromedia Flash Lite 1.1 on mobile phones allows users to view and interact with a wide range of Flash content, such as games, informational guides, and dynamically updated applications.
  • Page 8: Installing The Flash Mx Professional 2004 7.0.1 Update

    Installing the Flash MX Professional 2004 7.0.1 update To export Flash Lite 1.1 contents for mobile phones correctly, you need to have the latest version of Macromedia Flash MX Professional 2004 (7.0.1). You can download the updater program from the Macromedia website: www.macromedia.com/support/flash/downloads.html.
  • Page 9: Supported Devices

    Supported Devices For details about mobile phones that support Flash Lite functionality, see the Macromedia Developer Center web site at www.macromedia.com/devnet/devices/. Supported Devices...
  • Page 10 Chapter 1: Introduction...
  • Page 11: Chapter 2 Optimizing Content

    Navigation and key events Macromedia Flash Lite 1.1 for mobile uses three keys for navigation: Up, Down, and Select. These three keys correspond to the Shift+Tab, Tab, and Enter keys on the Windows versions of Macromedia Flash Player.
  • Page 12: Alias Text Support

    Supported mobile phones support multiple system fonts, which can be accessed in a SWF file by setting the associated font style and selecting the Device Fonts check box. Some mobile phones support multiple fonts. For more details, see the Macromedia Developer Center web site at www.macromedia.com/devnet/devices/.
  • Page 13: Actionscript And Properties

    For more information about pixel fonts, see: www.miniml.com, www.fontsforflash.com, and www.ultrafonts.com. ActionScript and properties Flash Lite 1.1 supports most Flash 4 ActionScript commands. The following are notable exceptions: • Use the operator instead of the command to concatenate strings. & •...
  • Page 14 Number() String() Note: Flash 4 ActionScript does not support arrays. However, they can be emulated using the function. For more information, see Macromedia TechNote 14219, “How to use Eval to eval() emulate an array,” at www.macromedia.com/go/flash_support (English) or www.macromedia.com/go/flash_support_jp...
  • Page 15: Sound

    Generally, for mobile phones, this limit is not less than 1 MB. Because Flash MX Professional 2004 does not provide a mechanism for checking a phone’s runtime memory consumption, Macromedia strongly recommends that you test all content on actual mobile phones.
  • Page 16: Animation

    If possible, test animations frequently on your target phones. Bitmap graphics Macromedia recommends optimizing bitmap graphics 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.
  • Page 17: Bitmap Versus Vector Graphics

    Bitmap versus vector graphics Flash Lite generally uses vector graphics 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 computers.
  • Page 18 In the Compression pop-up menu, select one of the following options: Select Photo (JPEG) for images with complex color or tonal variations, such as photographs ■ or images with gradient fills. This option produces a JPEG format file. Select the Use Imported JPEG Data check box to use the default compression quality specified for the imported image.
  • Page 19: Vector Graphics

    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 function. For more information, see Macromedia TechNote 14219, “How to use Eval to eval() emulate an array,”...
  • Page 20 Chapter 2: Optimizing Content...
  • Page 21: Chapter 3: Working With Sound

    CHAPTER 3 Working with Sound This section describes the various aspects of sound in relationship to Macromedia Flash Lite 1.1 for the mobile phones. Audio formats Flash Lite 1.1 supports MIDI, MFi, SMAF, uncompressed PCM (or WAV), compressed ADPCM, and compressed MP3 audio formats.
  • Page 22: Embedding Sound

    Embedding sound Because Flash MX Professional 2004 does not natively support certain audio formats such as MIDI or SMAF, you must temporarily substitute a proxy sound in a recognized format such as MP3. You can use options in the Sound Properties dialog box and the Flash Publish Settings dialog box to link the proxy sound file to a MIDI file.
  • Page 23: Adding A Sound Bundle File To A Flash Document

    The general process is described in this section. For detailed information on authoring for mobile devices, see the Content Development Kits on the Mobile and Devices Development Center at www.macromedia.com/devnet/devices. Flash does not support sound file formats used for mobile devices (such as MIDI and others);...
  • Page 24 Select Flash Lite 1.1 from the version menu. The SWF file now contains the linked Sound Bundle File. Select Control > Test Movie to test your Flash application. Select File > Publish to save the SWF file that contains the Sound Bundle File created earlier. Chapter 3: Working with Sound...
  • Page 25: Chapter 4: Actionscript Enhancements For Flash Lite

    Flash Lite 1.1 supports the function, which enables Flash Lite content to FSCommand() communicate with Macromedia Flash Player, the host application, and the device hosting the player. FSCommand2() function is a new ActionScript function that is supported in Flash Lite 1.1 FSCommand2() but is not yet supported in the standard desktop version of Flash Player.
  • Page 26: Platform Capabilities And Variables

    Platform capabilities and variables The following variables are used to specify whether certain capabilities are available in Flash Lite, the device, the host application, or Flash Player. _capCompoundSound variable indicates whether Flash Lite can process compound sound _capCompoundSound data. If so, this variable is defined and has a value of 1; if not, this variable is undefined. Example mVarValue = _capCompoundSound;...
  • Page 27: Version

    $version variable contains the version number of Flash Lite. It contains a major number, $version minor number, build number, and an internal build number, which is generally 0 in all released versions (for example, 5,2,1,141). Example myVarValue = $version; _capMFi variable indicates whether the device can play sound data in the MFi audio format.
  • Page 28: Cap4Waykeyas

    _cap4WayKeyAS variable indicates whether Flash Player executes ActionScript expressions _cap4WayKeyAS attached to key event handlers associated with the Right, Left, Up and Down keys. This variable is defined and has a value of 1 only when the host application uses four-way key navigation mode to navigate between Flash controls (buttons and input text fields).
  • Page 29: Chapter 5: New Fscommand And Fscommand2 Commands

    CHAPTER 5 New FSCommand and FSCommand2 commands This chapter discusses the new commands in Macromedia FSCommand() FSCommand2() Flash Lite 1.1. These new commands fall into these categories: general commands, commands controlling Flash playback, and platform integration commands. General commands The commands in this section provide general control of Flash Lite content on mobile phones.
  • Page 30: Unescape

    Unescape function decodes an arbitrary encoded string that is safe for network transfer into Unescape its normal form. All characters that are in hexadecimal format, that is, a percent character (%) followed by two hexadecimal digits, are converted into their decoded form. The decoded string is returned in a variable that is passed in by name.
  • Page 31: Controlling Flash Playback

    Syntax status = FSCommand2( "SetInputTextType", variableName, type ) In the preceding example, is the name of the variable associated with the input variableName text field and is one of the following values: type : sets the FEP to numbers only mode [0-9]. Numeric : sets the FEP to alpha characters only mode [A-Z, a-z].
  • Page 32: Key Configuration

    Supported applications This feature is not supported in all mobile phones. SetQuality() function sets the quality of the rendering of the animation. The value of the SetQuality() argument must be , or quality high medium function is executed immediately upon invocation. If this function is not SetQuality() supported, a value of -1 is returned.
  • Page 33: Player Operation Commands

    ResetSoftKeys() function resets the soft keys to their original settings. It is executed ResetSoftKeys() immediately upon invocation. If this function is not supported, a value of -1 is returned. function is supported only when Flash Lite is running in stand-alone ResetSoftKeys() mode.
  • Page 34: Platform Integration Commands

    Launch() This function starts another application on the mobile phone. The name of the application being launched and the parameters to it, separated by commas, are passed in as a single parameter. Note: This feature is operating-system dependent. function is supported only when Flash Lite is running in stand-alone mode. It is launch() not supported when the player is running in the context of another application (for example, as a plug-in to a browser).
  • Page 35 function is executed immediately upon invocation. If this function is not GetDateDay() supported, a value of -1 is returned. Syntax status = FSCommand2( "GetDateDay” ) Return value A value of -1 if the function is not supported; otherwise, the current day, returned as a number (1-31).
  • Page 36 Syntax status = FSCommand2( "GetDateYear” ) Return value A value of -1 if the function is not supported; otherwise, the current year, returned as a number (for example, 2004). GetLocaleLongDate() function sets a parameter to a string representing the current date, in GetLocaleLongDate() long form, formatted according to the currently defined locale.
  • Page 37 GetLocaleTime() function sets a parameter to a string representing the current time, GetLocaleTime() formatted according to the currently defined locale. The parameter is passed in by name. The value returned is a multiple-character, variable-length string. The actual formatting depends on the mobile phone and the locale.
  • Page 38: Volume

    GetTimeSeconds() function returns the second of the current time of day. It is a numeric GetTimeSeconds() value (without a leading zero). Valid seconds are 0–59. function is executed immediately upon invocation. If this function is GetTimeSeconds() not supported, a value of -1 is returned. Syntax status = FSCommand2( "GetTimeSeconds”...
  • Page 39: Vibrate

    Return value A value of -1 if the function is not supported; otherwise, the maximum volume level, returned as a number. GetVolumeLevel() function returns the current volume level of the mobile phone. It is a GetVolumeLevel() numeric value, in the range of 0 to the maximum value returned by GetMaxVolumeLevel function is executed immediately upon invocation.
  • Page 40: Power

    StopVibrate() function stops the current vibration, if any. StopVibrate() This function is executed immediately upon invocation. If this function is not supported, a value of -1 is returned. Syntax status = FSCommand2( "StopVibrate” ) Return value A value of -1 if the function is not supported; 0 if the vibration is stopped. Power The commands in this section provide the mobile phone’s power information to Flash content on the mobile phone.
  • Page 41: Network Information

    GetPowerSource() function returns a value indicating whether the power source is currently GetPowerSource() supplied a battery or externally supplied. This function is executed immediately upon invocation. If the function is GetPowerSource() not supported, a value of -1 is returned. Syntax status = FSCommand2( "GetPowerSource”...
  • Page 42 : There is currently no active network connection. : Network connection is in a suspended state. : The network connection is in an indeterminable state. GetNetworkName() function sets a parameter to the name of the current network. The GetNetworkName() parameter is passed in by name. The value returned is a string representing the network name. If no network is registered, the parameter containing the name is set to a zero-length string, and a value of is returned.
  • Page 43 : There is a pending request, and a network connection is being established. : There is a pending request, but a network connection has not yet been established. : There is a pending request, a network connection has been established, and the server’s host name is being resolved.
  • Page 44: Device User Settings

    Return value A value of if the function is not supported; otherwise, the current signal level, returned as a number. Device user settings The commands in this section provide the mobile phone’s language setting to Flash content on the mobile phone. GetLanguage() function sets a parameter that identifies the language currently used by the GetLanguage()
  • Page 45: Device And Player Identification

    : Swedish. : Turkish. : The language cannot be determined. : Simplified Chinese. zh-CN : Traditional Chinese. zh-TW Device and player identification The commands in this section provide the mobile phone’s ID and platform information to Flash content on the mobile phone. GetDeviceID() function sets a parameter that represents the unique identifier of the mobile GetDeviceID()
  • Page 46 indicates that the device is a 506i phone. 506i indicates that the device is a FOMA1 phone. FOMA1 GetDevice() function identifies the mobile phone on which Flash is running. This GetDevice() identifier is typically the model name. The name of the mobile phone is returned in a variable that is passed in by name. The device identifier is a string.
  • Page 47: Chapter 6: Creating Content

    It also describes how to embed sound into your Flash applications. Flash Lite 1.1 publish settings When you open a new Flash document in Macromedia Flash MX Professional 2004, the Flash Player export settings are set to Flash Player 7 by default. When authoring content for mobile phones, you need to make sure the Flash export settings are set to Flash Lite 1.1 before you start...
  • Page 48: Creating A Publish Profile

    If the button is not selected on the Stage, click it once to select it. Open the Actions panel if it is not already open (Window > Development Panels > Actions) and enter the following: on (press, keyPress "<Enter>") { getURL(“http://www.macromedia.com”, _top); Select Control > Test Movie. Flash MX Professional 2004 executes the Test Movie command.
  • Page 49: Adding Sound To Your Flash Lite 1.1 Application

    SWF file. You can now interact with the Flash application. When you click the button in the SWF file, a browser opens at www.macromedia.com. Select File > Publish to save the SWF file as FlashLiteTest.swf.
  • Page 50 Associate the proxy sound with the birdChirp.mmf file by doing the following: Select Window > Library and find the sound that you added in step 9. Select the sound and ■ right-click it to open the context menu. Select Properties from the context menu. The Sound Properties dialog box appears: In the Device sound text box, use the file browser to find and select birdChirp.mmf.
  • Page 51: Chapter 7 Testing Content

    Testing considerations Test your Macromedia Flash Lite 1.1 SWF content frequently on actual mobile phones. This step may seem obvious, but it is often overlooked. It is especially important when you develop Flash Lite 1.1 SWF files for mobile phones.
  • Page 52: Using The Optional Configuration File

    The steps to install the configuration file are: For Windows: Copy and paste DeviceMsg.cfg to the Flash MX 2004 configuration folder which usually is C:\Documents and Settings\<user name>\Local Settings\Application Data\Macromedia\ Flash MX 2004\language\Configuration\ For Macintosh: Copy and paste DeviceMsg.cfg to Macintosh HD::Users:<user name>:Library: Application Support:Macromedia:Flash MX 2004:language:Configuration: The configuration consists of multiple feature lines.
  • Page 53 Tag name Default Value(note) Tag Usages Notes MIDI MIDI sound format is allowed SMAF All the SMAF sound format This is a generic tag is allowed. capSMAF is set for all SMAF sound to 1; formats. SMAF MA2 MA2 SMAF sound format is This is set to “On”...
  • Page 54 Tag name Default Value(note) Tag Usages Notes LoadVarsOnePerKeyOr loadVars call does not have Frame to be associated with a key press, but only one call is allowed per key and per frame. LoadMovieOnePerKey When turned on, only loadMovie calls associated with a key press are allowed LoadMovieOnePerKeyO loadMovie call does not have...
  • Page 55 Tag name Default Value(note) Tag Usages Notes Email When turned on, _capEmail is set to 1; otherwise, it is set to 0. When turned on, _capSMS is set to 1; otherwise, it is set to 0. When turned on, _capMMSis set to 1; otherwise, it is set to 0.
  • Page 56 Chapter 7: Testing Content...
  • Page 57: Chapter 8: Development Kit Examples

    CHAPTER 8 Development Kit Examples The development kit includes a variety of sample files (FLA and SWF files) that demonstrate many of the concepts and applications that are described in this document. These examples are included to help you create content for mobile phones. The files include capabilities examples, processor detectors, and data-driven examples.
  • Page 58 Chapter 8: Development Kit Examples...
  • Page 59: Chapter 9: Resources And Support

    Let us know about your application If you have created a Flash Lite 1.1 application for a mobile phone, Macromedia would like to hear more about it. Send e-mail to mobile-applications@macromedia.com.
  • Page 60: Books

    Phillip Torrone, Branden Hall, Bill Perry, et al. New Riders Publishing ISBN: 0735711771 Flash: The Future by Jon Warren Lentz, Ian Chia, Bill Turner, et al. No Starch Press ISBN: 1886411964 Discussion groups • Macromedia Flash Support Forums – Flash Handhelds webforums.macromedia.com/flash/categories.cfm?catid=195 Chapter 9: Resources and Support...
  • Page 61: Appendix A: Supported Actionscript

    APPENDIX A Supported ActionScript This appendix lists the Macromedia Flash Lite 1.1 ActionScript commands. Action name Description Support (comment) Comment; indicates the beginning of a script comment. Fully supported Any characters that appear between the comment delimiter // and the end-of-line character are interpreted as a comment.
  • Page 62 Action name Description Support subtract Operator (arithmetic); used for negating or subtracting. Fully supported (–) When used for negating, it reverses the sign of the numerical expression. When used for subtracting, it performs an arithmetic subtraction on two numerical expressions, subtracting from expression2 expression1...
  • Page 63 Action name Description Support (less than) Operator (comparison); compares two expressions and Fully supported < determines whether is less than expression1 ), or whether is greater expression2 true expression1 than or equal to ). In Flash Lite (and expression2 false Flash 4), <...
  • Page 64 Action name Description Support (inequality) Operator (equality); tests the opposite of the equality Fully supported <> operator. If is equal to , the expression1 expression2 result is false The following examples illustrate returns true false for the operator. <> 3 < > 10; // true 3 <>...
  • Page 65 Action name Description Support (logical Operator (logical); evaluates and, if Fully supported && expression1 , evaluates . The result is expression1 true expression2 if both expressions evaluate to ; the result is true true if either expression evaluates to false false The following example uses the operator in an...
  • Page 66 Action name Description Support Action; specifies the actions, clauses, arguments, or Fully supported else other conditional to run if the initial statement returns false Action; evaluates a condition and specifies the Fully supported else if statements to run if the condition in the initial statement returns false (string equal)
  • Page 67 Action name Description Support Action; loads a document from a specific URL into a Partially getURL() window or passes variables to another application at a supported (The defined URL. When sending variables, specify whether URL protocols to load variables using a method.
  • Page 68 Action name Description Support Action; plays additional movies without closing Flash Fully supported loadMovie() Lite. Normally, Flash Lite displays a single Flash application (SWF file) and then closes. The loadMovie() action lets you display several SWF files at once or switch between them without loading another HTML document.
  • Page 69 Action name Description Support Action; sends the playhead to the next frame and stops it. Fully supported nextFrame() Action; sends the playhead to frame 1 of the next scene Fully supported nextScene() and stops it. Function; converts the argument to a number and Not supported Number() returns a value as follows:...
  • Page 70 Action name Description Support Action; stops the SWF file that is currently playing. Fully supported stop() Action; stops all sounds currently playing in a movie Fully supported stopAllSounds() without stopping the playhead. Action; stops the current drag operation. Not supported stopDrag() Function;...
  • Page 71: Appendix B: Supported Actionscript Properties

    APPENDIX B Supported ActionScript Properties This appendix lists the Macromedia Flash Lite 1.1 ActionScript properties and points out any exceptions. Properties Description Support (slash notation) Property; specifies or returns a reference to the root Fully supported SWF file Timeline. Functionality provided by this...
  • Page 72 Properties Description Support _framesloaded Property (read-only); the number of frames that have Fully supported been loaded from a streaming movie. This property is useful for determining whether the contents of a specific frame, and all the frames before it, have loaded and are available locally in a user’s browser.
  • Page 73 Properties Description Support _visible Property; determines whether the specified movie Fully supported clip is visible. Movie clips that are not visible (when the property is set to ) are disabled. false Property (read-only); retrieves the width of the space Fully supported _width occupied by a movie’s content.
  • Page 74 Appendix B: Supported ActionScript Properties...
  • Page 75: Appendix C: Warning And Error Messages

    APPENDIX C Warning and Error Messages This appendix lists the possible information and warning messages you might encounter when creating Macromedia Flash Lite 1.1 content for mobile phones. Flash authoring tool warning and error messages Message Identifier Message Explanation SWFS016...
  • Page 76 Message Identifier Message Explanation SWFS021 property not Flash Player detected that the SWF file contains a _droptarget supported. ActionScript getProperty() setProperty() command referring to the property, droptarget which Flash Lite does not support. No modifications are made to the device-specific SWF file—this is just a warning.
  • Page 77 Message Identifier Message Explanation SWFS043 MP3 sound found. Flash Player detected that the SWF file contains MP3 sound, which is not supported by the specified device’s Flash Player. No modifications are made to the device-specific SWF file—this is just a warning. SWFS044 Export tag subst:sound Flash Player detected that the SWF file contains a...
  • Page 78 Message Identifier Message Explanation FTPA009 While testing a movie clip, a startDrag() startDrag() are not ActionScript command was stopDrag() stopDrag() supported. encountered. Flash Lite does not support these commands and ignores them. FTPS011 Only a single sound can While testing a movie clip, a sound was started be played at a time (no while another sound was already playing.
  • Page 79 Message Identifier Message Explanation FTPS032 A call to Flash Player detected a () call. Different getURL getURL found, limitation might limitations might apply on different devices. apply. FTPS033 A call to Flash Player detected a call. loadVariables loadVariables() URL found, limitation Different limitations might apply on different might apply.
  • Page 80 Message Identifier Message Explanation FTPS042 SMAF sound found, not Flash Player detected a SMAF sound. SMAF supported on these sound playback is not supported on certain platforms: platform name platforms. This message is shown only when platform strings are specified in corresponding flags in the configuration file.
  • Page 81 Message Identifier Message Explanation FTPS053 PCM sound found, not Flash Player detected a PCM sound. PCM sound supported on these playback is not supported on certain platforms. platforms: platform name. This message is shown only when platform strings are specified in corresponding flags in the configuration file.
  • Page 82 Message Identifier Message Explanation FTPS062 A call to found, Flash Player detected a call. getURL getURL might not be supported It will be executed, but it is not supported on certain on these platforms: platforms. This message is shown only when platform name.
  • Page 83 Message Identifier Message Explanation FTPS075 MFI sounds with Sony Flash Player detected an MFI sound with the Sony extension not supported. extension. It is not supported in the current configuration. FTPS076 MFI sounds with Fujitsu Flash Player detected an MFI sound with Fujitsu extension not supported extension.
  • Page 84 Message Identifier Message Explanation FTPS085 requests Flash Player detected a call loadVariables loadVariables are allowed only when associated with a keypress. associated with a It will be executed, but it is not supported on certain keypress, not supported platforms. This message is shown only when on these platforms: platform strings are specified in corresponding platform name.
  • Page 85 Message Identifier Message Explanation FTPS093 All the keys are allowed, Flash Player supports the full key set in the current this feature is not configuration. This feature is not supported on supported on these certain platforms. This message is shown only platforms: platform name.
  • Page 86 Message Identifier Message Explanation FTPS102 SMAF sound playback A SMAF format device sound has been detected not supported in the test in the Flash Player, while it is supported in the real movie player. device, it is not supported in the test movie player used in the authoring tool.

This manual is also suitable for:

Flash mx professional 2004

Table of Contents