New Features for Mobile and Devices Developers in Macromedia Flash MX Professional 2004
Bill Perry
Macromedia
With the release of Macromedia Flash MX Professional 2004, Macromedia has significantly improved and enhanced the mobile development environment, making it easy for developers to create Flash content for a wide range of platforms, including mobile phones and PDAs.
One area of improvement is in the mobile and devices support; you can now easily develop content for a wider range of mobile devices, including several types of mobile phones and PDAs. Some of the new features which I'm really excited about are the built-in templates for mobile devices, the ability to embed MIDI, WAV, and MP3 sounds into content, and the ability to publish content for the Macromedia Flash Lite profile directly from the authoring environment.
In this article is I want to spend some time explaining these new features as well as describing some best practices for creating content for these mobile devices.
Requirements
Macromedia Flash MX 2004 Professional
Macromedia Flash MX Professional 2004 and Mobile and Devices Developers
Two New and Different Versions

Figure 1. Macromedia Flash MX Professional 2004 authoring
environment
With the new release of Macromedia Flash, Macromedia has released two different versions, Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004. Basically, Flash MX 2004 is for people who don’t need a full developer feature set while Flash MX Professional 2004 is for those of you who create rich applications, including those for mobile devices.
For a complete description, take a look at the list of improvements and new features of Flash MX Professional 2004. Or read Phillip Kerman's article, Macromedia Flash MX 2004: Putting the "Application" in RIA.
New Features for Mobile and Devices Developers
Both products offer the new mobile devices templates, however, only Macromedia Flash MX Professional 2004 provides functionality specific to mobile device development:
- Mobile devices templates
- MIDI ring tone support
- Test device emulators
- Alias text support
In the following section, I'll give you a little more information about these new features and what they mean to you.
Authoring Content for Devices
Exporting Content for Various Versions of Macromedia Flash Player
When authoring for mobile devices, you need to use the correct Macromedia Flash publish settings based on the Macromedia Flash Player requirements of your target device. For more information on some of the devices that play Macromedia Flash content, refer to the Mobile and Devices Developer Center for a list of devices and content development kits for each.
To customize your Macromedia Flash publish settings, you can select an option from the Flash tab of the Publish Settings window. You can access this window in three different ways:
- Select File > Publish Settings.
- Press the Settings button on the Property inspector with the Stage selected.
- Use a keyboard shortcut: Control-Shift-F12.
Figure 2. Macromedia Flash publish settings.
If you're using the built-in templates for devices, then Flash presets the Flash Player publish settings for each device. However, if you're not using the templates, then you'll need to be ensure that you customize the settings for your device.
The only setting you need to change is the Version setting. Select the proper version of Macromedia Flash Player in the pop-up menu. The rest of the settings are optional and you can refer to the Flash MX Professional 2004 Help panel for additional information on them.
Internal/External Player for Flash Lite 1.0
Macromedia Flash Lite is a new Macromedia Flash profile developed specifically for mobile phones. This profile requires fewer device resources so it can operate in most mass-market phones currently shipping. The Macromedia Flash Lite profile uses Macromedia Flash 5 objects and Macromedia Flash 4 ActionScript. Beginning with the NTT DoCoMo 505i series mobile phones, every i-mode handset has the Macromedia Flash profile embedded so it can play screen savers and Macromedia Flash movies.
Internal Testing
In Macromedia Flash MX Professional 2004 you can test Flash Lite content in the authoring environment. Select Flash Lite 1.0 in the Version pop-up menu in the Publish Settings dialog box and test your movie.
Figure 3. Disable Keyboard Shortcuts option.
To emulate the functionality of the phone keypad on a numeric keypad, select Control > Disable Keyboard Shortcuts.
External Testing
To test Flash Lite content outside the authoring environment, use the external Standalone Flash Player (SAFlashLite.exe). It installs with Macromedia Flash; you can find it at the following locations:
Windows: C:\Program Files\Macromedia\Flash MX 2004\Players\Release\FlashLite1.0
Macintosh:
To use the player, you need to specify a SWF file to view. Double-click the SAFlashLite.exe to open it and select File > Open.
Figure 4. Standalone Flash Player file open dialog box.
In the Open dialog box (see Figure 4), click the Browse button to locate a file and hit OK. Your Flash Lite content plays in the window. It's important to note that while you're testing you're trying to emulate the phone's input methods, so use the Tab, Enter and 0-9 keys on your keyboard.
Refer to the Macromedia Flash Content Development Kit for the NTT DoCoMo 505i Series and the Flash MX Professional 2004 Help panel for additional information.
Device Sound Support
You can include device event sounds in Macromedia Flash documents that you author for playback on mobile devices. However, Flash doesn't directly import some of the common sound file formats used for mobile phones, such as MIDI.
Here's a workaround that you can use to import these sounds. To summarize, when you author sound files in Flash documents for playback on mobile phones, use a placeholder. Set up the placeholder to use any supported import file format, such as MP3, WAV, or AIFF. Link the sound placeholder in the document to an external mobile phone sound, such as a MIDI file. During the publishing process, Flash replaces the sound in the document with the linked external sound. The published SWF contains the external sound and will use it for playback on a mobile phone.
Here are the exact steps to add an event sound to a Macromedia Flash document for playback on a mobile device:
- Open a mobile devices template in Macromedia Flash. To do this, select File > New. In the New from Template dialog box, click the Template tab and select Mobile Devices in the Category pane. Select the NTT DoCoMo Fujitsu 505i template.
- Select File > Publish Settings. In the Publish Settings dialog box click the Flash tab. (See Figure 2.) In the Version pop-up menu, verify that Flash Lite 1.0 is selected. Click OK to close the Publish Settings dialog box.
- Select Window > Other Panels > Common Libraries > Buttons. Select a button and drag it to the Stage. Close the buttons library.
- Double-click the new button. The Timeline changes so that you can edit the button, displaying frames named Up, Over, Down, and Hit.
- Select Insert > Timeline > Layer to create a new layer.
- Select Modify > Timeline > Layer Properties and change the name of the layer to "Sound."
- Select the Down frame in the Sound layer and insert a keyframe.
- Select Window > Other Panels > Common Libraries > Sounds.
- Select a sound in the sounds library and drag it to the main document Library panel. Close the sounds library.
- Associate the sound with the keyframe. In the Library panel, right-click the sound and select Properties to open the Sound Properties dialog box. (See Figure 5.)
Figure 5. Sound Properties panel.
- In the Device sound text box, type a path or click the folder icon and browse to the location where the mobile device sound file (MID) is located. Click OK.
- Be sure the down keyframe in the Sound layer is selected and drag the sound from the Library panel onto the Stage to add the sound to the current layer.
- Test your movie by pressing Control-Enter. Make sure that you have enabled the Disable Keyboard Shortcuts option.
- Press Tab on your keyboard. A yellow rectangle appears over the button. Press Enter and hear your MIDI sound play—pretty cool!
You can publish your movie (Shift-F12) to generate a SWF so you can test it. Test Flash documents that contain MIDI sound data by playing them with Standalone Flash Lite Player (SAFlashLite.exe). If you select the Flash Lite 1.0 option in the Version pop-up menu on the Publish Settings dialog box, the Test Movie command plays the SWF using the internal player.
Keep in mind the following:
- This feature works with event sounds only.
- Mobile devices do not support the Effect, Sync, Edit, and Loop options.
- You must specify an external device sound file for each sound in a document if you want the sound to play on a mobile device.
- As with all external files, the device sound file must be available during the Publish process, but the SWF does not need the file for playback.
Device Templates
New to Macromedia Flash MX Professional 2004 and Macromedia Flash MX 2004 are 22 templates you can use to create content for all of the currently supported mobile devices. You can access them from the Flash start page or by selecting File > New. Click the Template tab in the New from Template dialog box (Figure 6) and select Mobile Devices in the Category pane.
Figure 6. Mobile Devices templates.
These templates take the guess work out of developing Macromedia Flash content for specific platforms. They set the correct stage size, load a full-size image of the specific device in a guide layer, and preset the correct Flash publishing settings. All you need to do is to create the content based on the development kit recommendations for each platform. You can find content development kits for each platform in the Macromedia Mobile and Devices Developer Center.
For example, if you open up the iPAQ 5440 Full Screen template, here's what you will see:
Figure 7. iPAQ 5440 Full Screen template opened in the authoring environment.
Be sure to use these templates when creating content for mobile devices—they'll definitely save you time.
Alias Text Support
Because of the limited screen size of mobile devices, such as mobile phones and PDAs, it's important to use small font sizes that are legible. With Macromedia Flash MX Professional 2004, Macromedia has added a new option for rendering text: the Alias Text button.
Figure 8. The Alias Text button in the Property inspector.
The Alias Text button in the Property inspector lets you render text so that it is legible at small sizes (12 point and below). Macromedia Flash Player 7 supports this option for static, dynamic, and input text, however, you can only use Alias Text for static text when developing for mobile devices. This is because mobile devices play Flash content using either Flash Lite 1.0 for NTT DoCoMo 505i series phones, Flash Player 6 for Pocket PC, or Flash Player 5 for the Sony CLIÉ and Nokia 9200 Communicator.
The Alias Text option makes small text legible by aligning text outlines along pixel boundaries. This makes the text appear aliased, even when you've enabled anti-aliasing. For information on anti-aliasing text, see the "Speeding up document display" section of Using Flash in the Macromedia Flash MX Professional 2004 Help panel.
Figure 9. Twelve-point Arial text rendered in Macromedia Flash MX Professional 2004.
Another solution for fonts on small screens is to use pixel fonts. These are fonts that are built on pixels—they don't anti-alias, so they remain crisp and clear. There are a few sites that sell these fonts. They show up well on small device screens.
Refer to the Macromedia Flash MX Professional 2004 Help panel in the "About aliasing text" section of Using Flash for more information.
Testing Mobile and Devices Content
Most developers do not have access to all supported devices for testing; that's why it's important to know your options when you need to test your mobile an devices content.
Generally speaking, one easy way to test your content is to ask other developers who have the devices to test your content for you. You can do this by posting a request in a discussion group such as the Macromedia Flash Handhelds Online Forum. Usually other developers are happy to test content and provide valuable feedback regarding what works and what areas can use improvement.
If you plan to develop more than one application for a device, if you are under NDA with a company, or if you're working on a medium-to-large-scale project, then definitely consider purchasing a device for testing purposes. For mobile phones it's a little trickier because you usually need to sign up for service with a provider if you don't already have the specific phone model. For PDAs it's a bit easier because they don't require any type of service activation and they're readily available. Being able to test your content and see how it works on hardware is always the best-case scenario. This will let you make necessary changes quickly to ensure the content works properly.
More Information
Macromedia Flash MX Professional 2004
For a complete list, take a look at the list of improvements and new features of Flash MX Professional 2004.
Macromedia Mobile and Devices Software Site
To learn more about solutions for developers, operators and manufacturers, including supported platforms and case studies, visit the Macromedia Mobile and Devices area.
Macromedia Mobile and Devices Developer Center
For articles, tutorials and content development kits for the mobile devices which support Macromedia Flash Player, visit the Mobile and Devices Developer Center.