# Toggle fullscreen mode on movieclip from parent

**URL:** https://forum.kirupa.com/t/toggle-fullscreen-mode-on-movieclip-from-parent/266223
**Category:** flash
**Created:** [July 17, 2008, 11:20am UTC](https://forum.kirupa.com/t/toggle-fullscreen-mode-on-movieclip-from-parent/266223 "2008-07-17T11:20:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![erlendbv](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@erlendbv](https://forum.kirupa.com/u/erlendbv)
#### Post date: [July 17, 2008, 11:20am UTC](https://forum.kirupa.com/t/toggle-fullscreen-mode-on-movieclip-from-parent/266223/1 "2008-07-17T11:20:18Z")

</div>

I’m trying to work out how to trigger a fullscreen on a movieclip from a button/AS-code in the parent. In the parent, I have a button that calls the function toggleFullScreen(), and here is the AS-code;

```auto
// Scale to fit the screen, but keep aspect ratio.
Stage.scaleMode= StageScaleMode.EXACT_FIT;
//Align the stage to the top center.
Stage.align = StageAlign.TOP;

//Function to toggle between fullscreen and normal size
//the toggle fullscreen button calls this function when pressed
function toggleFullScreen(){
    //if normal size, go to fullscreen, else go to normal size
    if(Stage["displayState"]=="normal"){
        Stage["displayState"]="fullScreen";
    }else{
        Stage["displayState"]="normal";
    }
}

//Create a listener for each time the Stage is resized
var resizeListener:Object = new Object();

//Called each time the stage is resized
resizeListener.onResize = function () {
}

//Add the listener to Stage
Stage.addListener(resizeListener);

```

How can I modify this to set the fullscreen - not on the entire SWF, but only the selected child-mc?

I’m sure this is very simple, but I’m completely blank.

Thanks in advance!

PS: This is heavily inspired by the method described here; [http://www.bezzmedia.com/swfspot/tutorials/intermediate/True\_Fullscreen\_Flash\_Mode](http://www.bezzmedia.com/swfspot/tutorials/intermediate/True_Fullscreen_Flash_Mode)  
(similar method explained [here](http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html))

PPS: If someone wants to tell me how to post AS-code to get the fancy colors, I’ll be happy. 🙂
