Estoy intentando configurar scaleMode en mi aplicación AIR. que se establece a través de stage.scaleMode. Sin embargo, cuando intento hacer referencia a la etapa, vuelve a ser nulo. ¿No se por que?AIR: ¿Por qué stage == null?
Aquí es la aplicación completa:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.display.StageDisplayState;
private function init():void
{
var s:Stage = this.stage; //<<-- this.stage == null...why??
s.scaleMode = StageScaleMode.EXACT_FIT;
}
]]>
</mx:Script>
</mx:WindowedApplication>
Creo que te refieres applicationComplete en lugar de windowComplete? – xastor