MACROMEDIA FLASH MX PROFESSIONAL 2004 - FLASH LITE 1.1 AUTHORING Manuallines
Summary of FLASH MX PROFESSIONAL 2004 - FLASH LITE 1.1 AUTHORING
Page 1
Macromedia flash lite 1.1 authoring guidelines.
Page 2
Trademarks add life to the web, afterburner, aftershock, andromedia, allaire, animation powerpack, aria, attain, authorware, authorware star, backstage, bright tiger, clustercats, coldfusion, contribute, design in motion, director, dream templates, dreamweaver, drumbeat 2000, edje, ejipt, extreme 3d...
Page 3: Contents
3 contents chapter 1: introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 using macromedia flash lite 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 getting started . . . . . . . . . . . . . . . . . . . . . . . ....
Page 4
4 contents adding a sound bundle file to a flash document . . . . . . . . . . . . . . . . . . . . . . . . . 23 chapter 4: actionscript enhancements for flash lite 1.1 . . . . . . . . . . . . . . . . . 25 new actionscript functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Page 5
Contents 5 chapter 7: testing content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 testing considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 using the optional configuration file . . . . . . . . . . . ....
Page 6
6 contents.
Page 7: Chapter 1
7 chapter 1 introduction macromedia flash lite authoring guidelines for covers tips, techniques, and sample code for developing 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...
Page 8
8 chapter 1: introduction 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....
Page 9
Supported devices 9 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/ ..
Page 10
10 chapter 1: introduction.
Page 11: Chapter 2
11 chapter 2 optimizing content this chapter describes considerations for creating macromedia flash lite content that runs on mobile phones, from general functionality to performance and size constraints. Navigation and key events macromedia flash lite 1.1 for mobile uses three keys for navigation: ...
Page 12
12 chapter 2: optimizing content 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 ...
Page 13
Actionscript and properties 13 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 add operator instead o...
Page 14
14 chapter 2: optimizing content • a button action can be assigned to launch an e-mail composition window with the address, subject, and body text fields already populated. There are two ways to do this: method 1 can be used for either shift-jis or english character encoding, while method 2 supports...
Page 15
Performance optimization 15 sound using audio in flash content helps to create a richer user experience that goes beyond a typical mobile phone application. For more information about embedding sound into flash lite content for mobile phones, see chapter 3, “working with sound” . Network access it’s...
Page 16
16 chapter 2: optimizing content animation when creating animated content for a mobile phone, it is important to keep in mind the phone’s cpu limitations. The following guidelines can help prevent your flash lite content from running slowly: • if you need to provide intense or complex animation, exp...
Page 17
Performance optimization 17 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 a...
Page 18
18 chapter 2: optimizing content 5. 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 d...
Page 19
Development checklist 19 vector graphics whenever possible, do not use borders in your vector graphics as this greatly diminishes the number of rendered lines. Optimizing actionscript because of cpu limitations, you should follow these general guidelines when developing actionscript for flash lite c...
Page 20
20 chapter 2: optimizing content.
Page 21: Chapter 3
21 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. Event sound ev...
Page 22
22 chapter 3: working with 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 f...
Page 23
Adding a sound bundle file to a flash document 23 note: right click on this window to trigger the exit button. 3. Flash lite 1.1 compound information window will launch. 4. Drag and drop the rest of the sound files to be bundled. 5. Click on save bundle to save your sound bundle file in a specific l...
Page 24
24 chapter 3: working with sound 7. Select flash lite 1.1 from the version menu. 8. The swf file now contains the linked sound bundle file. 9. Select control > test movie to test your flash application. 10. Select file > publish to save the swf file that contains the sound bundle file created earlie...
Page 25: Chapter 4
25 chapter 4 actionscript enhancements for flash lite 1.1 macromedia flash lite 1.1 supports two new actionscript functions: fscommand() and fscommand2() . Many new fscommand and fscommand2 commands have been introduced in flash lite 1.1 for a complete list of actionscript expressions supported on m...
Page 26
26 chapter 4: actionscript enhancements for flash lite 1.1 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 the _capcompoundsound variable ind...
Page 27
Platform capabilities and variables 27 $version the $version variable contains the version number of flash lite. It contains a major number, 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...
Page 28
28 chapter 4: actionscript enhancements for flash lite 1.1 _cap4waykeyas the _cap4waykeyas variable indicates whether flash player executes actionscript expressions 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 wh...
Page 29: Chapter 5
29 chapter 5 new fscommand and fscommand2 commands this chapter discusses the new fscommand() and fscommand2() commands in macromedia flash lite 1.1. These new commands fall into these categories: general commands, commands controlling flash playback, and platform integration commands. General comma...
Page 30
30 chapter 5: new fscommand and fscommand2 commands unescape the unescape function decodes an arbitrary encoded string that is safe for network transfer into its normal form. All characters that are in hexadecimal format, that is, a percent character (%) followed by two hexadecimal digits, are conve...
Page 31
Controlling flash playback 31 syntax status = fscommand2( "setinputtexttype", variablename, type ) in the preceding example, variablename is the name of the variable associated with the input text field and type is one of the following values: numeric : sets the fep to numbers only mode [0-9]. Alpha...
Page 32
32 chapter 5: new fscommand and fscommand2 commands supported applications this feature is not supported in all mobile phones. Setquality() the setquality() function sets the quality of the rendering of the animation. The value of the quality argument must be high , medium , or low . The setquality(...
Page 33
Player operation commands 33 resetsoftkeys() the resetsoftkeys() function resets the soft keys to their original settings. It is executed immediately upon invocation. If this function is not supported, a value of -1 is returned. The resetsoftkeys() function is supported only when flash lite is runni...
Page 34
34 chapter 5: new fscommand and fscommand2 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. ...
Page 35
Platform integration commands 35 the getdateday() function is executed immediately upon invocation. If this function is not 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, return...
Page 36
36 chapter 5: new fscommand and fscommand2 commands 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() the getlocalelongdate() function sets a parameter to...
Page 37
Platform integration commands 37 getlocaletime() the getlocaletime() function sets a parameter to a string representing the current time, 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 a...
Page 38
38 chapter 5: new fscommand and fscommand2 commands gettimeseconds() the gettimeseconds() function returns the second of the current time of day. It is a numeric value (without a leading zero). Valid seconds are 0–59. The gettimeseconds() function is executed immediately upon invocation. If this fun...
Page 39
Platform integration commands 39 return value a value of -1 if the function is not supported; otherwise, the maximum volume level, returned as a number. Getvolumelevel() the getvolumelevel() function returns the current volume level of the mobile phone. It is a numeric value, in the range of 0 to th...
Page 40
40 chapter 5: new fscommand and fscommand2 commands stopvibrate() the stopvibrate() function stops the current vibration, if any. This function is executed immediately upon invocation. If this function is not supported, a value of -1 is returned. Syntax status = fscommand2( "stopvibrate” ) return va...
Page 41
Platform integration commands 41 getpowersource() the getpowersource() function returns a value indicating whether the power source is currently supplied a battery or externally supplied. This function is executed immediately upon invocation. If the getpowersource() function is not supported, a valu...
Page 42
42 chapter 5: new fscommand and fscommand2 commands 2 : there is currently no active network connection. 3 : network connection is in a suspended state. 4 : the network connection is in an indeterminable state. Getnetworkname() the getnetworkname() function sets a parameter to the name of the curren...
Page 43
Platform integration commands 43 1 : there is a pending request, and a network connection is being established. 2 : there is a pending request, but a network connection has not yet been established. 3 : there is a pending request, a network connection has been established, and the server’s host name...
Page 44
44 chapter 5: new fscommand and fscommand2 commands return value a value of -1 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 pho...
Page 45
Platform integration commands 45 sv : swedish. Tr : turkish. Xu : the language cannot be determined. Zh-cn : simplified chinese. Zh-tw : traditional chinese. Device and player identification the commands in this section provide the mobile phone’s id and platform information to flash content on the m...
Page 46
46 chapter 5: new fscommand and fscommand2 commands 506i indicates that the device is a 506i phone. Foma1 indicates that the device is a foma1 phone. Getdevice() the getdevice() function identifies the mobile phone on which flash is running. This identifier is typically the model name. The name of t...
Page 47: Chapter 6
47 chapter 6 creating content this document contains numerous code examples and detailed reference information. With all of this information available to you for creating macromedia flash lite 1.1 content for mobile phones, it’s important to understand how to publish your flash lite content. This ch...
Page 48
48 chapter 6: creating content creating a publish profile another way of reusing specific publish settings for multiple files and projects is to save them as a publishing profile. When you export your publish settings using a publishing profile, all of the selected options for all of the enabled tab...
Page 49
Adding sound to your flash lite 1.1 application 49 7. To simulate the user input of a mobile phone, you must disable the keyboard shortcuts (from the test movie window, select control > disable keyboard shortcuts). Use the enter and tab keys to interact with the swf file. You can now interact with t...
Page 50
50 chapter 6: creating content 10. 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 pro...
Page 51: Chapter 7
51 chapter 7 testing content anyone can make mistakes while developing content, and it’s a good idea to test your macromedia flash content frequently as you progress. Consider asking someone who is not familiar with your application to look at it and provide feedback. Testing considerations test you...
Page 52
52 chapter 7: testing content using the optional configuration file the flash lite 1.1 external (test movie) player provides the user the ability to customize the features that are supported in the flash lite 1.1 player. The user can also add their platform specific strings in the configuration file...
Page 53
Using the optional configuration file 53 midi on midi sound format is allowed smaf on all the smaf sound format is allowed. Capsmaf is set to 1; this is a generic tag for all smaf sound formats. Smaf ma2 on ma2 smaf sound format is allowed this is set to “on” when the “smaf” tag is set to “on” smaf ...
Page 54
54 chapter 7: testing content loadvarsoneperkeyor frame on loadvars call does not have to be associated with a key press, but only one call is allowed per key and per frame. Loadmovieoneperkey off when turned on, only loadmovie calls associated with a key press are allowed loadmovieoneperkeyo rframe...
Page 55
Using the optional configuration file 55 note: the default value in the table is the value that the test movie player uses for the feature when there is no corresponding feature line specified in the configuration file. Email off when turned on, _capemail is set to 1; otherwise, it is set to 0. Sms ...
Page 56
56 chapter 7: testing content.
Page 57: Chapter 8
57 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 cap...
Page 58
58 chapter 8: development kit examples.
Page 59: Chapter 9
59 chapter 9 resources and support as you develop flash content for mobile phones, it’s important to use all of the resources available throughout the community. Websites, books, tutorials, articles, and discussion groups are great ways to enhance and share your knowledge with others. Let us know ab...
Page 60
60 chapter 9: resources and support books there are many books about flash, but currently only two specifically address the development of flash applications for mobile devices. Both of these books offer insight into real-world scenarios and complement each other well. Flash enabled: flash design & ...
Page 61: Appendix A
61 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. Any characters that appear between the comment delimiter // and the end-of-line character a...
Page 62
62 appendix a: supported actionscript (–) subtract operator (arithmetic); used for negating or subtracting. 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 expression2...
Page 63
63 (less than) operator (comparison); compares two expressions and determines whether expression1 is less than expression2 ( true ), or whether expression1 is greater than or equal to expression2 ( false ). In flash lite (and flash 4), expressions and not strings. The following examples illustrate t...
Page 64
64 appendix a: supported actionscript (inequality) operator (equality); tests the opposite of the equality operator. If expression1 is equal to expression2 , the result is false . The following examples illustrate true and false returns for the operator. 3 10; // true 3 3; // false fully supported %...
Page 65
65 && (logical and ) operator (logical); evaluates expression1 and, if expression1 is true , evaluates expression2 . The result is true if both expressions evaluate to true ; the result is false if either expression evaluates to false . The following example uses the && operator in an if statement. ...
Page 66
66 appendix a: supported actionscript else action; specifies the actions, clauses, arguments, or other conditional to run if the initial if statement returns false . Fully supported else if action; evaluates a condition and specifies the statements to run if the condition in the initial if statement...
Page 67
67 geturl() action; loads a document from a specific url into a window or passes variables to another application at a defined url. When sending variables, specify whether to load variables using a get or post method. Get appends the variables to the end of the url, and is used for small numbers of ...
Page 68
68 appendix a: supported actionscript loadmovie() action; plays additional movies without closing flash 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 ...
Page 69
69 nextframe() action; sends the playhead to the next frame and stops it. Fully supported nextscene() action; sends the playhead to frame 1 of the next scene and stops it. Fully supported number() function; converts the argument x to a number and returns a value as follows: if x is a number, the ret...
Page 70
70 appendix a: supported actionscript stop() action; stops the swf file that is currently playing. Fully supported stopallsounds() action; stops all sounds currently playing in a movie without stopping the playhead. Fully supported stopdrag() action; stops the current drag operation. Not supported s...
Page 71: Appendix B
71 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 swf file timeline. Functionality provided ...
Page 72
72 appendix b: supported actionscript properties _framesloaded property (read-only); the number of frames that have 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 locall...
Page 73
73 _visible property; determines whether the specified movie clip is visible. Movie clips that are not visible (when the property is set to false ) are disabled. Fully supported _width property (read-only); retrieves the width of the space occupied by a movie’s content. In flash lite, _width is a re...
Page 74
74 appendix b: supported actionscript properties.
Page 75: Appendix C
75 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 detected lo...
Page 76
76 appendix c: warning and error messages swfs021 _droptarget property not supported. Flash player detected that the swf file contains a getproperty() or setproperty() actionscript command referring to the droptarget property, which flash lite does not support. No modifications are made to the devic...
Page 77
Flash authoring tool warning and error messages 77 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 ...
Page 78
78 appendix c: warning and error messages ftpa009 startdrag() and stopdrag() are not supported. While testing a movie clip, a startdrag() or stopdrag() actionscript command was encountered. Flash lite does not support these commands and ignores them. Ftps011 only a single sound can be played at a ti...
Page 79
Flash authoring tool warning and error messages 79 ftps032 a call to geturl url found, limitation might apply. Flash player detected a geturl () call. Different limitations might apply on different devices. Ftps033 a call to loadvariables url found, limitation might apply. Flash player detected a lo...
Page 80
80 appendix c: warning and error messages ftps042 smaf sound found, not supported on these platforms: platform name flash player detected a smaf sound. Smaf sound playback is not supported on certain platforms. This message is shown only when platform strings are specified in corresponding flags in ...
Page 81
Flash authoring tool warning and error messages 81 ftps053 pcm sound found, not supported on these platforms: platform name. Flash player detected a pcm sound. Pcm sound playback is not supported on certain platforms. This message is shown only when platform strings are specified in corresponding fl...
Page 82
82 appendix c: warning and error messages ftps062 a call to geturl found, might not be supported on these platforms: platform name. Flash player detected a geturl call. It will be executed, but it is not supported on certain platforms. This message is shown only when platform strings are specified i...
Page 83
Flash authoring tool warning and error messages 83 ftps075 mfi sounds with sony extension not supported. Flash player detected an mfi sound with the sony extension. It is not supported in the current configuration. Ftps076 mfi sounds with fujitsu extension not supported on these platforms: platform ...
Page 84
84 appendix c: warning and error messages ftps085 loadvariables requests are allowed only when associated with a keypress, not supported on these platforms: platform name. Flash player detected a loadvariables call associated with a keypress. It will be executed, but it is not supported on certain p...
Page 85
Flash authoring tool warning and error messages 85 ftps093 all the keys are allowed, this feature is not supported on these platforms: platform name. Flash player supports the full key set in the current configuration. This feature is not supported on certain platforms. This message is shown only wh...
Page 86
86 appendix c: warning and error messages ftps102 smaf sound playback not supported in the test movie player. A smaf format device sound has been detected in the flash player, while it is supported in the real device, it is not supported in the test movie player used in the authoring tool. Ftps103 i...