| Flash
MX VideoControl Custom Component |
 |
 |
Introduction
This brief tutorial is meant to accompany
the mxp file above, a Flash MX component
that can be used to add play controls
to an imported video file in Flash MX.
(Note: when you install the mxp file,
the video control component will be available
in the component panel in Flash MX, just
like the built in Flash UI Components.
So, there is no need to open the fla
as a library.)
Contents
|
 |
 |
| What
it Does |
- play/pause: plays or stops the video.
- fast forward and rewind: moves video
forward or rewinds video when pressed.
- sound volume: adjusts the volume
of the video with a slider.
- indicator: indicates the current
position of the video playback. This
knob/button can be dragged and moved
along the indicator bar.
- indicator bar: when clicked, video
moves to that location.
- progress loading bar: the indicator
bar acts as a loading bar, when the
video is not fully loaded.
|
|
|
 |
 |
| How
it Works |
- Open the movie, that you want to
add the controller to.
- Open the VideoControl.fla as a library
in that movie [File > Open as Library...].
Insert the video object into your movie
(on the stage).
- Make sure the video object has an
instance name.
- Once the video object is on the stage,
drag and drop the VideoController symbol
from the library onto the stage. This
symbol can be found in the Video Control
Component folder.
- If you drop the VideoControl component
onto the video object itself, it should
snap to the top right corner of the
video object and the instance name
of the video object will be filled
in as 'Video Instance' in the properties
panel of the Video Control Component.
Note: You do not have to scale or position
the Video Control Component. This will
be done automatically when the movie is
published or previewed. When published
or previewed, the Component will be placed
at the bottom of the video object and scaled
to match the width of the video object. |
 |
|
|
 |
 |
| Parameters |
- Video Instance:
Instance name of the video object -
this will be filled in automatically
when the component is dropped onto
video object.
- Movie Frame Rate:
Set this to the fps of your movie.
Default = 18.
- Loop Video:
Boolean value indicating if the video
should loop or not. True will loop
the video, false will play only once.
Default = false
- Auto Start:
Boolean value indicating if the video
should start playing as soon as it
is viewed. True will start the video
immediately - false will start video
when the play button is pressed.
Default = false.
|
|
|
 |
 |
| Properties |
These properties can be used to get information
or set control options of the video object.
Replace 'instanceName' with the instance
name of the video controller component
on stage.
- Duration (getter): Returns
length of the video in seconds - format
xx.x
useage: instanceName.duration
- Elapsed (getter): Returns
the elapsed time of the video in seconds
- format xx.x
useage: instanceName.elapsed
- Remaining (getter): Returns
the remaining time of the video in
seconds - format xx.x
useage: instanceName.remaining
- Play (setter): Starts video
playback
useage: instanceName.play
- Stop(setter): Stops video
playback
useage: instanceName.stop
|
|
|
 |
 |
| Notes |
The Video Control Component must be in
the same timeline as the video object it
will be controlling.
The timeline length must be the length
of the video playback. When you place a
video object on the stage, you will be
asked to insert frames for the length of
the video - click yes. The timeline length
may NOT exceed the length of the video.
Do not insert extra frames at the end of
the video.
Enjoy! |
 |
|
|
 |
| This tutorial was written by Muzak. |
 |