I got my site pretty much complete and I’m having one problem. When the site first loads, the objects aren’t in their correct position.
After I resize it and resize it back it’s fine, but it’s not putting everything in the correct place on the initial loading of the page. I’m not sure why it’s happening, but I’ve been staring at it for days trying to figure it out.
My AS is:
Stage.align = "TL";
Stage.scaleMode = "noScale";
navbar._width = Stage.width;
title_mc._x=201;
bg._y = Stage.height;
tag._x = (Stage.width - 2);
tag._y = (Stage.height - 2);
piero_logo._x = Stage.width;
progressBar._x = (Stage.width - 10);
progressBar._y = (Stage.height - 10);
news_mc._x = (Stage.width - 200);
contact_mc._x = Stage.width/2;
contact_mc._y = Stage.height/2;
about_mc._x = Stage.width/2;
about_mc._y = Stage.height/2;
services_mc._x = Stage.width/2;
services_mc._y = Stage.height/2;
// end initial position setting
sizeListener = new Object();
sizeListener.onResize = function() {
navbar._width = Stage.width;
bg._y = Stage.height;
tag._x = (Stage.width - 2);
tag._y = (Stage.height - 2);
piero_logo._x = Stage.width;
news_mc._x = (Stage.width - 200);
contact_mc._x = Stage.width/2;
contact_mc._y = Stage.height/2;
about_mc._x = Stage.width/2;
about_mc._y = Stage.height/2;
services_mc._x = Stage.width/2;
services_mc._y = Stage.height/2;
};
Stage.addListener(sizeListener);
If you can let me know where I went wrong that would be incredibly helpful. Thanks for your help.
Sam