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

by Peter deHaan on December 20, 2008

in FLVPlayback

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… read them below or add one }

1 Garrett 04.01.09 at 2:13 pm

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

2 Peter deHaan 04.01.09 at 6:23 pm

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

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: