Flash: FLVPlayback.skinAutoHide issues, wierdness and Workaround

by troy on November 4, 2008

If your not familiar with it, FLVPlayback.skinAutoHide is a neat feature to fade in/out the prebuilt FLVPlayback skins in Flash CS3, in particular the semi-transparent ghosted ones that float above the video.

We've been having issues with the FLVPlayback.skinAutoHide where the controls won't show consistently regardless of what mouse movement is done over the FLVPLayblack video area. Trying to debug, It's hard to pin down, different browsers do different things, it is more consistently doesn't work when video is playing, on mac, and firefox. Oddly the left side of the controls tends to detect the mouse, when the right side (e.g. where the seek bar is) does not at all! I tried different skins to see if that might have been it, but no love.

Here's a workaround, detecting when the mouse is over the FLVPlayback manually, when it moves over the video turn off the skinAutoHide, when it's outside turn it back on (so it fades out).

var bnd:Rectangle = vidPlayer1.getBounds(vidPlayer1); //capture dimensions before transport is loaded! as the buffer bar is quite long+invisible.
addEventListener(MouseEvent.MOUSE_MOVE, onMOUSE_MOVE);
function onMOUSE_MOVE(evt:MouseEvent):void {
 
	var pnt:Point = new Point(vidPlayer1.mouseX, vidPlayer1.mouseY);
	var hitMovie:Boolean = bnd.containsPoint(pnt);
	trace("over movie? "+ hitMovie);
	vidPlayer1.skinAutoHide = !hitMovie;
}

{ 2 comments… read them below or add one }

Joeflash November 5, 2008 at 5:08 am

Is this a fix for the CS3 or the CS4 version of the FLVPlayback component? (or both?)

troy November 5, 2008 at 7:17 am

Joe, it’s the one in CS3. Though as mentioned it’s not consistent. We have one that works fine.

Leave a Comment

Previous post:

Next post: