Building OOP Air application with Flash CS4

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

stage.window.close()

and

stage.window.startMove()

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

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