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 }
Is there a way I can time it to hide after 10-15 seconds?
Garrett,
You could try setting the
skinAutoHideproperty tofalsewhen the user mouses over the FLVPlackback component and then use a non-repeating Timer to hide the skin after 10-15 seconds by setting theskinAutoHideproperty totrue.Peter