User Guide

Media components (Flash Professional only) 501
You can associate the MediaDisplay and MediaController components with each other by using
the
Media.associateDisplay() and Media.associateController() methods. These
methods allow the MediaController instance to update its controls based on events broadcast
from the MediaDisplay instance, and allow the MediaDisplay component to react to user settings
in the MediaController.
Understanding the MediaPlayback component
The MediaPlayback contains the MediaController and MediaDisplay subcomponents. The
MediaController and MediaDisplay portions always scale to fit the size of the overall
MediaPlayback instance.
The MediaPlayback component uses
Media.controlPlacement to determine the layout of the
controls. By setting this property to
top, bottom, left, or right, you can indicate where the
controls are drawn in relation to the display. For example, a value of
right gives a control a
vertical orientation and positions it on the right of the display.
Using media components (Flash Professional only)
With the sharp increase in the use of media to provide information to web users, many developers
want their users to be able to stream media and then control it. You might use media components
in the following kinds of situations:
Showing media that introduces a company
Streaming movies or movie previews
Streaming songs or song snippets
Providing learning material in the form of media
Using the MediaPlayback component
Suppose you must develop a website that allows users to preview DVDs and CDs that you sell in
a rich media environment. The following example shows the steps involves. (It assumes your
website is ready for inserting streaming components.)
To create a Flash document that displays a CD or DVD preview:
1.
Select File > New; then select Flash Document.
2.
Open the Components panel and double-click the MediaPlayback component to place an
instance of it on the Stage.
3.
Select the MediaPlayback component instance and enter the instance name myMedia in the
Property inspector.
4.
In the Component inspector, set your media type according to the type of media that will be
streaming (MP3 or FLV).
5.
If you selected FLV, enter the duration of the video in the Video Length text boxes; use the
format HH:MM:SS.
6.
Enter the location of your preview video in the URL text box. For example, you might enter
http://my.web.com/videopreviews/AMovieName.flv.