# Hiding cursor on full screen video

**URL:** <https://forum.kirupa.com/t/hiding-cursor-on-full-screen-video/297657>\
**Category:** flash\
**Created:** [October 6, 2009, 6:26pm UTC](https://forum.kirupa.com/t/hiding-cursor-on-full-screen-video/297657 "2009-10-06T18:26:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)\
**Post date:** [October 6, 2009, 6:26pm UTC](https://forum.kirupa.com/t/hiding-cursor-on-full-screen-video/297657/1 "2009-10-06T18:26:21Z")

</div>

I’ve seen this on other video site and would like to apply it to the video player I made. I want the cursor to fade out when the video is popped into full screen and conversely fade back in if the user moves the mouse.

I’ve tried a few things but couldn’t get anything to work. Here’s my full screen code.

```auto

function fullscreenOnClicked(e:MouseEvent):void {
    // go to fullscreen mode
    stage.displayState = StageDisplayState.FULL_SCREEN;    
}

function fullscreenOffClicked(e:MouseEvent):void {
    // go to back to normal mode
    stage.displayState = StageDisplayState.NORMAL;
}

function onFullscreen(e:FullScreenEvent):void {
    // check if we're entering or leaving fullscreen mode
    if (e.fullScreen) {
        // switch fullscreen buttons
        mcVideoControls.btnFullscreenOn.visible = false;
        mcVideoControls.btnFullscreenOff.visible = true;        
        
        //size up hitter for fullscreen
        hitter.height = (Capabilities.screenResolutionY);
        hitter.width = (Capabilities.screenResolutionX);        
        
        // size up video display
        vidDisplay.height = (Capabilities.screenResolutionY - 30);
        vidDisplay.width = vidDisplay.height * 16 / 9;
        vidDisplay.x= (Capabilities.screenResolutionX - vidDisplay.width) / 2;
        
        // size up teaser if movie ends in fullscreen mode
        teaser.height = (Capabilities.screenResolutionY);
        teaser.width = vidDisplay.height * 16 / 9;
        
        // bottom center align controls        
        mcVideoControls.x = (Capabilities.screenResolutionX - 560) / 2;
        mcVideoControls.y = (Capabilities.screenResolutionY);        
        
        // fades cursor out    
        var fadeMouse:Tween = new Tween(Mouse, "alpha", Strong.easeOut, 1, 0, 1, true);
        
    } else {
        // switch fullscreen buttons
        mcVideoControls.btnFullscreenOn.visible = true;
        mcVideoControls.btnFullscreenOff.visible = false;

        // hide controls for the time being
        mcVideoControls.visible = true;
        
        // reset controls position
        mcVideoControls.x = 0;
        mcVideoControls.y = 315;

        // reset video display
        vidDisplay.y = 0;
        vidDisplay.x = 0;
        vidDisplay.height = 315;
        vidDisplay.width = 560;        
        
        // reset teaser size
        teaser.height = 315;
        teaser.width = 560;
    }
}

```
