# Building OOP Air application with Flash CS4

**URL:** <https://forum.kirupa.com/t/building-oop-air-application-with-flash-cs4/301246>\
**Category:** Uncategorized\
**Created:** [December 5, 2009, 11:23pm UTC](https://forum.kirupa.com/t/building-oop-air-application-with-flash-cs4/301246 "2009-12-05T23:23:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artheus](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@artheus](https://forum.kirupa.com/u/artheus)\
**Post date:** [December 5, 2009, 11:23pm UTC](https://forum.kirupa.com/t/building-oop-air-application-with-flash-cs4/301246/1 "2009-12-05T23:23:02Z")

</div>

Hey!

To me, right now, this seems like a totally impossible thing to do.  
Are there any ways to call the methods of the NativeWindow class in a Document Class, using Flash CS4?

I’ve been trying this out for a couple of hours now… And I’ve been searching the internet for this, but the only things I can find there is CS3 examples and tutorials. Which does not work at all with what I’m trying to do.

What I’m trying to do is to make a small simple OOP Air application, which I, for starters, want to be able to move and close.

I’ve been trying to write the code

```auto
stage.window.close()

```

and

```auto
stage.window.startMove()

```

In the Document Class… But no luck… It gives me this Error

```auto
1119: Access of possibly undefined property window through a reference with static type flash.display:Stage.

```

What is it I’m doing wrong? And what is the solution to my problem?

Thanks you!  
//Artheus
