Hey there, I’m basically doing this tutorial, but in AS 2.0. I’ve got it working great, but I’m missing something really stupid: how do I call the re-size action at the first frame? It works great once you resize, but isn’t called at the beginning. I’ve tried a few things, but I’m shooting in the dark at this point.
Thanks homies!
sizeListener = new Object();
sizeListener.onResize = function() {
if((Stage.width > 1920) || (Stage.height >1200)){
trace("stage bigger than 1920x1200");
bkg_home._width = Stage.width;
bkg_home._height = Stage.height;
} else {
trace("stage smaller than 1920x1200");
}
}
Stage.addListener(sizeListener);
I’ll get into AS3.0 once I have time, don’t want to rewrite a bunch of sites right now for something so small!