Setting the skin background color on an FLVPlayback control skin in Flash using ActionScript 3.0

by Peter deHaan on December 20, 2008

in FLVPlayback

The following example shows how you can set the skin background color of a Flash ActionScript 3.0 FLVPlayback component by setting the skinBackgroundColor property.

Full code after the jump.

// ActionScript 3.0
/* Requires
 * - FLVPlayback control in Flash library
 * - ColorPicker control in Flash library
 * - SkinOverPlaySeekMute.swf file in same directory as Flash document
 */
import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import fl.video.FLVPlayback;
 
var colorPicker:ColorPicker = new ColorPicker();
colorPicker.addEventListener(ColorPickerEvent.CHANGE, colorPicker_change);
colorPicker.move(10, 10);
addChild(colorPicker);
 
var flvPlayback:FLVPlayback = new FLVPlayback();
flvPlayback.autoPlay = false;
flvPlayback.source = "http://www.helpexamples.com/flash/video/cuepoints.flv";
flvPlayback.skin = "SkinOverPlaySeekMute.swf";
flvPlayback.x = 10;
flvPlayback.y = 40;
addChild(flvPlayback);
 
function colorPicker_change(evt:ColorPickerEvent):void {
    flvPlayback.skinBackgroundColor = evt.color;
}

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: