muzakdeezign.com
Author:
Created: 2005/5/25
Last modified: 2005/5/25
Generator: Custom Actions Editor
VideoControl Object: VideoControl pattern: _vc
VideoControl: Description Description

Availability

  • Flash Player 6
  • Description

    The Video Control Component can be used to control an imported video object in Flash MX.
    The controls are a copy of the QuickTime controls you see when a QT-movie is played in a web browser.
    There is no need to position or scale the component to match the video object it is attached to. That is done automatically when published.

    NOTES:

  • the component does not work with swf's loaded at runtime, unless the component has been attached to the video in that loaded swf.

  • the component is created for Flash MX (version 6) and allthough it may work in Flash MX2004, some features may be broken.


  • Changes in v1.3:
    * Component will now properly (more accuratly) indictate loading progress, in combination with the progress knob.
    Previous versions preloading was based on getBytesLoaded() and getBytesTotal(), while the progress knob uses the timelines' _currentframe and _totalframes properties.
    The loading bar now uses _framesloaded and _totalframes.
    * Added a prebuffer parameter, which lets you specify the percentage to preload before the target Video
    starts playing when autoplay is set to true.
    The default buffer percentage is 100, which means the Video has to be fully loaded before it's start playing.

    Changes in v1.2:
    * I've been asked to change the name of the FLA to 'Video Control.fla' (note the space between the 2 words) by Macromedia in order to get the component approved for the MM Flash Exchange.
    Even though the component has been on the exchange for about a year now... Go figure...

    * Added Reference Panel documentation: muzakdeezign.com/VideoControl.
    Note that the documentation is Flash MX only.

    Changes in v1.1:
    * Added a keylistener object which allows playback control by pressing the keyboard space bar (toggles play/stop).

    Reference and Actions Panel documentation created with Custom Actions Editor:
    http://www.muzakdeezign.com/cae/

    Properties
    VideoControl.duration duration

    Availability

  • Flash Player 6
  • Usage

    myControl_vc.duration;

    Description

    property; the total time, in xx:xx format, of the video instance the component is attached to.

    Example

    The following will display the duration in a textfield.


    textfield_txt.text = myVideo_vc.duration;

    VideoControl.elapsed elapsed

    Availability

  • Flash Player 6
  • Usage

    myControl_vc.elapsed;

    Returns

    Nothing.

    Description

    property; the elapsed time, in xx:xx format, of the video instance the components is attached to.

    Example

    The following will display the elapsed time in a textfield.


    _root.onEnterFrame = function() {
    textfield_txt.text = myVideo_vc.duration;
    }

    VideoControl.remaining remaining

    Availability

  • Flash Player 6
  • Usage

    myControl_vc.remaining;

    Description

    Property; the remaining time, in xx:xx format, of the Video instance the component is attached to.

    Example

    The following will display the remaining time in a textfield.


    _root.onEnterFrame = function() {
    textfield_txt.text = myVideo_vc.remaining;
    }

    Methods
    VideoControl.playVideo playVideo

    Availability

  • Flash Player 6
  • Usage

    myControl_vc.playVideo();

    Parameters

    None.

    Returns

    Nothing.

    Description

    method; Starts the target video if it is currently not playing.
    This is the same as clicking the play button of the Video Control or pressing the spacebar on the keyboard.

    Example

    The following will start the target video of the Video Control.


    myVideo_vc.playVideo();

    VideoControl.stopVideo stopVideo

    Availability

  • Flash Player 6
  • Usage

    myControl_vc.stopVideo();

    Parameters

    None.

    Returns

    Nothing.

    Description

    method; Stops the target video if it is currently playing.
    This is the same as clicking the pause button of the Video Control or pressing the spacebar on the keyboard.

    Example

    The following will stop the target video of the Video Control.

    myVideo_vc.stopVideo();