I've found that sometimes the Stage.onResize won't fire at load so in the first or second frame I trigger it manually with a function call.