# Stage.width changes after first frame

**URL:** https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921
**Category:** Uncategorized
**Created:** [July 17, 2004, 8:46pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921 "2004-07-17T20:46:59Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)
#### Post date: [July 17, 2004, 8:46pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/1 "2004-07-17T20:46:59Z")

</div>

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?

SWF:  
[http://bombingpixels.com/kirupa/resize\_help.swf](http://bombingpixels.com/kirupa/resize_help.swf)

FLA:  
[http://bombingpixels.com/kirupa/resize\_help.fla](http://bombingpixels.com/kirupa/resize_help.fla)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 17, 2004, 9:56pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/2 "2004-07-17T21:56:38Z")

</div>

anybody?

edit: for exact numbers, it goes from 546 to 1276 ☹

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 7:01am UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/3 "2004-07-18T07:01:04Z")

</div>

anybody?

for exact numbers, it goes from 546 to 1276 ☹

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 7:19pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/4 "2004-07-18T19:19:14Z")

</div>

anybody?

for exact numbers, it goes from 546 to 1276 ☹

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:14pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/5 "2004-07-18T20:14:09Z")

</div>

Here it stays 550…  
Are you loading this swf in another?

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:21pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/6 "2004-07-18T20:21:18Z")

</div>

nope, it says 550 on the first frame, but try echoing it again in a loop in onenterframe, it doubles immediately

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:25pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/7 "2004-07-18T20:25:07Z")

</div>

In the onEnterFrame it traces 550, endlessly;)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:29pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/8 "2004-07-18T20:29:20Z")

</div>

that’s odd, is your window 550? try putting the trace at the end of the function and see if it changes then

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:33pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/9 "2004-07-18T20:33:25Z")

</div>

The results of the trace at the end of the function

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:35pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/10 "2004-07-18T20:35:34Z")

</div>

that’s crazy, but 550 is still not the actual size for you is it? if not then it’s wrong, and I have no idea why it’s confused, and if so, then is it centering? if that made any sense I’m impressed

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:48pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/11 "2004-07-18T20:48:11Z")

</div>

LOL, I’m starting to get confused too:lol:  
I d/l your file, it’s dimensions are 550/400. mc “box” scales and eases to the middle of the stage (x position)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 8:54pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/12 "2004-07-18T20:54:40Z")

</div>

but when I resize it it doesn’t go to the middle for me? let me try to check outside of flash’s preview…

ain’t that something, it does go to the center, but when I preview in flash it goes way over to the edge? intersting, oh well… it seems to be centered so I don’t care :P, thanks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 18, 2004, 9:03pm UTC](https://forum.kirupa.com/t/stage-width-changes-after-first-frame/57921/13 "2004-07-18T21:03:12Z")

</div>

:thumb:
