# GoToFullScreen Automaticly

**URL:** <https://forum.kirupa.com/t/gotofullscreen-automaticly/287932>\
**Category:** flash\
**Created:** [May 8, 2009, 1:25am UTC](https://forum.kirupa.com/t/gotofullscreen-automaticly/287932 "2009-05-08T01:25:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [May 8, 2009, 1:25am UTC](https://forum.kirupa.com/t/gotofullscreen-automaticly/287932/1 "2009-05-08T01:25:05Z")

</div>

Hi

I have a code that makes the flash site go to fullscreen. I am trying to do is go to fullscreen without press a button. I have a timer to do that but I am having an error. How can I do this?

full.buttonMode = true; //optional - makes hand-cursor appear when you roll over movie clip  
full.addEventListener(MouseEvent.CLICK, toggleFullscreen);

function toggleFullscreen(event:MouseEvent):void  
{  
trace(“click”);  
goFull();

}

function goFull():void{  
if (stage.displayState == StageDisplayState.NORMAL)  
{  
stage.displayState = StageDisplayState.FULL\_SCREEN;  
[//event.target](https://event.target) is the display object being animated, it is the target of the event - in this case is it toggle\_btn  
}  
else  
{  
stage.displayState = StageDisplayState.NORMAL;  
}  
}

var jumpTimer:Timer = new Timer(500, 1);

jumpTimer.addEventListener(TimerEvent.TIMER, jump);

function jump(event:TimerEvent):void  
{  
goFull();  
trace(“past”);  
}

jumpTimer.start();

Thanks
