Version Information:

Download:

Like what you see? Want to use the VideoMax class in your own Flash projects? Click the button below to download the most recent version of VideoMax.
Download VideoMax

License:

Creative Commons License

VideoMax is licensed under a Creative Commons Attribution 3.0 United States License, and is free to use with a link back to hesslerdesign.com. Permissions beyond the scope of this license may be available by submitting a Contact Request.

Description:

VideoMax is a very lightweight, fast, flexible, and easy-to-implement custom Flash video player class that can be used in any ActionScript 3.0 file. Some of the key highlights of the VideoMax class are:

Example:

AS3 Code: import com.hd.VideoMax; var vm:VideoMax = new VideoMax({loop:false, playOverlay:true, width:480, height:360, source:"sample.flv"}); addChild(vm);

Parameters & Attributes:

As you can see from the example and accompanying code above, VideoMax only takes 1 parameter, an Object, which is optional. This Object contains the specific (and optional) attributes to set in the VideoMax instance. The available attributes are:

Public Methods:

With VideoMax, you can call a number of public methods from the parent file. These methods are outlined below.

Instructions:

To use VideoMax in your Flash project, you must import the VideoMax class into your file, create a new instance, and add it to the display list. Setting VideoMax attributes can be done in two different ways, as seen in the two examples outlined below.
  1. Setting Object Attributes on Creation (RECOMMENDED):
    import com.hd.VideoMax; var vm:VideoMax = new VideoMax({width:640, height:480, tint:[0x1c1c1c, 0xffffff], source:"sample.flv"}); addChild(vm);
  2. Setting Individual Attributes After Creation:
    import com.hd.VideoMax; var vm:VideoMax = new VideoMax(); vm.setSize(640, 480); vm.setTint(0x1c1c1c, 0xffffff); vm.autoPlay = true; // OR vm.setAutoPlay(true); vm.autoRewind = true; // OR vm.setAutoRewind(true); vm.autoSize = true; // OR vm.setAutoSize(true); vm.buffer = 10; // OR vm.setBuffer(10); vm.loop = true; // OR vm.setLoop(true); vm.playOverlay = true; vm.showControls = true; vm.showFirstFrame = false; vm.showLastFrame = false; vm.showEndFrames = false; vm.source = "sample.flv"; vm.play(); addChild(vm);
NOTE: In Example 2, vm.play() needs to be called AFTER setting the attributes, even if the autoPlay attribute is set to true. This is because the autoPlay attribute's default value is set to 'false'. So when the VideoMax object is set, it will NOT play the video until instructed. Also, since you are setting attributes after creating the VideoMax instance, the attributes need to be recalculated, which happens when the 'play()' function is called. Lastly, if using Example 2, you do not have the ability to add 'onStart' and 'onComplete' commands, along with their accompanying parameters, unless you pass them as part of the attributes when creating the VideoMax instance.

Share the News:

Do you like VideoMax? Share the news by clicking on one of the buttons below.
Share on Facebook Share on Twitter

Feedback:

Did you notice a bug? Have suggestions, questions, or need clarification? Please let me know. Add a comment below, or submit a Contact Request. I appreciate any and all feedback.