PDA

View Full Version : 1119:Access of possibly undefined property window through a reference with static typ


eliddell
01-28-2009, 04:01 AM
i just watched a video tutorial online..
and used their exact code and watched it work for them but it doesn't work for me..
the code:

bg.addEventListener(MouseEvent.MOUSE_DOWN, doDrag);

function doDrag(e:MouseEvent):void{
stage.window.startMove();
}

the tutorial:
http://www.gotoandlearn.com/play?id=41#

the error i get :
"1119:Access of possibly undefined property window through a reference with static type flash.display:Stage.

senocular
01-28-2009, 04:12 AM
Are you publishing for AIR (i.e. as specified in your publish settings)?

eliddell
01-28-2009, 03:43 PM
yes indeed.. i figured it out.. apparently somewhere down the line ".window" was changed to ".nativeWindow" this is my biggest gripe with adobe, ever since AS3.0 the roboHelp files have been so dodgy and inconsistent.. half the AS3.0 commands bring you to a "page not found" in the help menu, or in this case, are out dated...

senocular
01-28-2009, 04:17 PM
Ah, right - AIR went through a lot of late API changes like that. Usually the docs on adobe.com/go/AS3LR are the most up to date

Mikersson
08-04-2009, 11:38 PM
Are you publishing for AIR (i.e. as specified in your publish settings)?

And where must say that in PUBLISH SETTINGS?=?
Im using Flash 10 and I cant see where I need to set up the Air app...
Im also getting same error:
"1119: Access of possibly undefined property nativeWindow through a reference with static type flash.display:Stage."

Thanks