Stage.width changes after first frame

Now I’m utterly lost. Stage.width is changing to the correct value only after one frame. On the first frame it’s like 500 something and on the second it’s around a thousand. I don’t really have any idea what’s causing this, but in my fla my prototype is supposed to resize the box and if the last two parameters aren’t set it centers it in the dead center (thanks css designing as a side).

Well… enough talk, anybody know why it changes?