# There is no property with the name 'displayState'

**URL:** <https://forum.kirupa.com/t/there-is-no-property-with-the-name-displaystate/313876>\
**Category:** Uncategorized\
**Created:** [September 12, 2010, 9:44pm UTC](https://forum.kirupa.com/t/there-is-no-property-with-the-name-displaystate/313876 "2010-09-12T21:44:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![l34rN](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@l34rN](https://forum.kirupa.com/u/l34rN)\
**Post date:** [September 12, 2010, 9:44pm UTC](https://forum.kirupa.com/t/there-is-no-property-with-the-name-displaystate/313876/1 "2010-09-12T21:44:41Z")

</div>

Hello everyone

I’m having troubles getting **fullscreen** function to work properly. Actually it doesnt work at all.

I’m running Windows 7 with CS4 mastercollection.  
The code is written in AS2 and published with Flash Player 8

My issue is that everytime i try to compile my \*.fla file, i get these errors:

[SIZE=1] **1. Error**  
Description:  
_There is no property with the name ‘displayState’._  
Source:  
_if (Stage.displayState == “normal”)_

**2. Error**  
Description:  
_There is no property with the name ‘displayState’._  
Source:  
_Stage.displayState = “fullScreen”;_

**3. Error**  
Description:  
_There is no property with the name ‘displayState’._  
Source:  
_Stage.displayState = “normal”;_[/SIZE]

I’ve tried to add the line:

```auto
static var displayState:String;

```

Into the file: _C:\Program Files (x86)\Adobe\Adobe Flash CS4\Common\First Run\Classes\FP8\Stage.as_

But it still doenst work. Can anyone please help. Many thanks in advance!

Here’s the **source code** :

```auto
_root.current_pic_number = 1;
function myResizeFunc()
{
    _root.slogan_1._x = Stage.width - 425;
    _root.slogan_1._y = Stage.height - 216;
    _root.main._x = Math.ceil(Stage.width / 2) + 5.000000E-001;
    _root.main._y = Math.ceil(Stage.height / 2 + 24);
    _root.menu2._x = Stage.width - 130;
    _root.fs._y = Stage.height - 22;
    _root.priv._y = Stage.height - 14;
    _root.priv._x = int(Stage.width / 2 + 12);
    _root.snd2._x = Stage.width - 68;
    _root.snd2._y = Stage.height - 11;
    _root.step = Stage.width;
    _root.pic_splash._width = Stage.width;
    _root.pic_splash._height = Stage.height - 129;
    _root.pics_main._x = -Stage.width;
    _root.pics_main._width = Stage.width * 7;
    _root.pics_main._height = Stage.height - 130;
    _root.scroll_my._width = Stage.width - 80;
    _root.scroll_my._x = 40;
    _root.scroll_my._y = Stage.height - 80;
    _root.previous_button._y = Stage.height - 60;
    _root.next_button._y = Stage.height - 60;
    _root.next_button._x = Stage.width - 65;
    load0._x = int(Stage.width / 2) + 0;
    load0._y = int(Stage.height / 2) + 0;
    _root.scroller._x = int(Stage.width / 2) + 2.000000E-001;
    _root.scroller._y = int(Stage.height / 2) + 7.000000E-001;
    if (Stage.height / Stage.width < picHeight)
    {
        ch_photos_mov._width = Stage.width;
        ch_photos_mov._height = picHeight * ch_photos_mov._width;
    }
    else
    {
        ch_photos_mov._height = Stage.height;
        ch_photos_mov._width = picWidth * ch_photos_mov._height;
    } // end else if
    _root.op._width = Stage.width;
    _root.op._height = Stage.height;
    _root.top_bg._width = Stage.width + 1;
    _root.bg_st._width = Stage.width;
    _root.bg_st._y = Stage.height - _root.bg_st.bott_bg.bg._height - 1;
    _root.mov_sm_ph._y = Stage.height - _root.mov_sm_ph.bg._height;
    _root.priv_mov_st._y = Stage.height - _root.priv_mov_st._height;
    _root.full_scr_mov._y = Stage.height - _root.full_scr_mov._height;
    _root.mov_tip1._y = Stage.height - _root.mov_tip1._height;
    _root.mov_sm_ph._x = int(Stage.width / 2) + 0;
    _root.mov_tip1._x = int(Stage.width / 2 - _root.mov_tip1._width / 2) + 0;
    _root.full_scr_mov._x = Stage.width - _root.full_scr_mov._width;
    _root.ss_mov._x = int(Stage.width - 119) + 0;
    _root.pages._x = int(Stage.width - 675) + 0;
    _root.ch_photos_mov._x = Stage.width / 2;
    _root.ch_photos_mov._y = Stage.height / 2;
} // End of the function
Stage.align = "TL";
Stage.scaleMode = "noScale";
load0._x = int(Stage.width / 2) + 0;
load0._y = int(Stage.height / 2) + 0;
sizeListener = new Object();
sizeListener.onResize = myResizeFunc;
Stage.addListener(sizeListener);
_root.fs.btn_mc.onRelease = function ()
{
    if (Stage.displayState == "normal")
    {
        Stage.displayState = "fullScreen";
        _root.fs.btn_mc.txt2.gotoAndStop(2);
    }
    else
    {
        Stage.displayState = "normal";
        _root.fs.btn_mc.txt2.gotoAndStop(1);
    } // end else if
};
var listener = {};
listener.onFullScreen = function (isFullscreen)
{
    if (isFullscreen)
    {
        trace ("entered full-screen mode");
    }
    else
    {
        trace ("exited full-screen mode");
    } // end else if
};
Stage.addListener(listener);

```
