Using the Flash Media Components
Flash MX Professional 2004 includes a set of media components that makes it easy to add a Flash movie or an MP3 to a pre-configured playback window. You can also add the components of the playback window separately—for example, you can add just the display window using the MediaDisplay component, or just the playback controller using the MediaPlayback controller.
To demonstrate how easy this is, we’ll add a MediaPlayback component:
- Create a new Flash document, or clear the Stage in your existing document.
- To export a video from the library to an external FLV file, right-click the embedded video and select Properties from the shortcut menu. In the Embedded Video Properties dialog, click the Export button:
In the Export FLV dialog, navigate to the folder containing your Flash document and save the file. This makes it easy to link the file without including a path.
- From the Components panel, drag the MediaPlayback component onto the Stage:
- Resize the component as necessary using the Free Transform tool:
- In the Property Inspector, enter a name for the component instance.
- Next, open the Component Inspector to define the MediaPlayback component’s settings:
- Keep FLV selected to play your Flash movie.
- In the URL field, enter the location of the movie—if it’s in the same location as your Flash document, you can enter just the file name, such as “movie.flv”. To stream a movie from a web site, enter the file’s URL.
- To define the length of the playbar, enter the video’s length into the Video Length fields. Checking Milliseconds causes the playbar to use milliseconds, rather than frames. Unchecking this box enables a frames per second field.
- Set Automatically Play and any other options to customize how the control appears and functions.
- Test the movie. When you move your mouse over the bottom of the playback window, the controls appear, letting you play, pause, stop and adjust the volume:
Macromedia Flash MX 2004 Part 2: Section 2
In this section, you learned about:
- Importing sounds
- Using behaviors to load sounds
- Adding videos
- Using the Flash Media Components