User Guide
Media components (Flash Professional only) 503
Using the MediaDisplay and MediaController components
If you want a lot of control over the look and feel of your media display, you may want to use the
MediaDisplay and MediaController components together. The following example creates a Flash
application that displays your CD and DVD preview media.
To create a Flash document that displays a CD or DVD preview:
1.
In Flash, select File > New; then select Flash Document.
2.
In the Components panel, double-click the MediaController and MediaDisplay components to
place instances on the Stage.
3.
Select the MediaDisplay instance and enter the instance name myDisplay in the
Property inspector.
4.
Select the MediaController instance and enter the instance name myController in the
Property inspector.
5.
Open the Component inspector from the Property inspector and set your media type according
to the type of media that will be streaming (MP3 or FLV).
6.
If you selected FLV, enter the duration of the video in the Video Length text boxes using the
format HH:MM:SS.
7.
Enter the location of your preview video in the URL text box. For example, you might enter
http://my.web.com/videopreviews/AMovieName.flv.
8.
Set the desired options for the Automatically Play, Use Preferred Media Size, and Respect
Aspect Ratio check boxes.
9.
Select the MediaController instance and, in the Component inspector, set your orientation to
vertical by setting the
horizontal property to false.
10.
In the Component inspector, set backgroundStyle to None.
This specifies that the MediaController instance should not draw a background but should
instead fill the media between the controls.
Next, you’ll use a behavior to associate the MediaController and MediaDisplay instances so
that the MediaController instance accurately reflects the playhead movement and other
settings in the MediaDisplay instance, and so that the MediaDisplay instance responds to user
clicks.
11.
Select the MediaDisplay instance and, in the Property inspector, enter the instance name
myMediaDisplay.
12.
Select the MediaController instance that will trigger the behavior. In the Behaviors panel, click
the Add (+) button and select Media > Associate Display.
13.
In the Associate Display window, select myMediaDisplay under _root and click OK.
For more information on using behaviors with media components, see “Controlling media
components by using behaviors” on page 504.