Skip to content
Dec 20 / Peter deHaan

Automatically hiding the skin on an FLVPlayback control in Flash using ActionScript 3.0

The following example shows how you can automatically hide the skin on a Flash ActionScript 3.0 FLVPlayback control when the cursor isn’t over the FLVPlayback instance by setting the Boolean skinAutoHide property to true. Setting the skinAutoHide property to false (default) causes the skin to always be visible.

Full code after the jump.

// ActionScript 3.0
/* Requires
 * - FLVPlayback control in Flash library
 * - CheckBox control in Flash library
 */
import fl.controls.CheckBox;
import fl.video.FLVPlayback;
 
var checkBox:CheckBox = new CheckBox();
checkBox.label = "skinAutoHide";
checkBox.selected = false;
checkBox.addEventListener(Event.CHANGE, checkBox_change);
checkBox.move(10, 10);
addChild(checkBox);
 
var flvPlayback:FLVPlayback = new FLVPlayback();
flvPlayback.autoPlay = false;
flvPlayback.skinAutoHide = checkBox.selected;
flvPlayback.source = "http://www.helpexamples.com/flash/video/cuepoints.flv";
flvPlayback.skin = "SkinOverPlaySeekMute.swf";
flvPlayback.x = 10;
flvPlayback.y = 30;
addChild(flvPlayback);
 
function checkBox_change(evt:Event):void {
    flvPlayback.skinAutoHide = checkBox.selected;
}

2 Comments

leave a comment
  1. Garrett / Apr 1 2009

    Is there a way I can time it to hide after 10-15 seconds?

  2. Peter deHaan / Apr 1 2009

    Garrett,

    You could try setting the skinAutoHide property to false when the user mouses over the FLVPlackback component and then use a non-repeating Timer to hide the skin after 10-15 seconds by setting the skinAutoHide property to true.

    Peter

Leave a Comment