[osflash] refreshing swf in IE resets my stage dimensions to zero
Rinde van Lon
rindevanlon at gmail.com
Mon Oct 24 12:58:48 PDT 2005
the only way i know to wait some time is this:
var waitTime:Number = 30;
var fps:Number = 31; // fill in your frame per sec
var i:Number = 0;
this.onEnterFrame = function()
{
if( i >= (waitTime*fps) )
{
executeYourFunction();
delete this.onEnterFrame;
}
i++;
}
hope this solves your problem,
cheers,
Rinde
On 24/10/05, Chris Norris <thechrisproject.lists at gmail.com> wrote:
>
> What's the best way to wait a 1/2 second or so? And apparently the
> solution I found, which was to wait until onEnterFrame to get the stage
> size, isn't working so well either. Well, it was working a little too well
> and getting called every time I did anything, so I added a line like so:
>
> delete this.onEnterFrame
>
> at the end of the method that was handling it. Now it doesn't work again.
> I'm a little confused. Should I be moving this over to the Flash noob list
> on chattyfig?
>
> thanks,
> Chris
>
> Man, I thought using Flash meant the end of dealing with silly browser
> quirks like this...
>
> On 10/24/05, David Karam < david at posttool.com> wrote:
>
> > hi
> > if you wait for a 1/2 second or so, the stage size will be reported
> > correctly in ie...
> >
> > ------------------------------
> > *From:* osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org]
> > *On Behalf Of *Chris Norris
> > *Sent:* Monday, October 24, 2005 10:03 AM
> > *To:* Open Source Flash Mailing List
> > *Subject:* [osflash] refreshing swf in IE resets my stage dimensions to
> > zero
> >
> > Brief overview of what this swf does: First it draws a box whose size is
> > relative to the stage size. It takes a URL provided through the flashvars
> > parameter and loads it (it is a JPEG). The JPEG appears inside the box that
> > is drawn. There are some controls for zooming in/out, resizeing, dragging,
> > etc.
> >
> > I have the swf embedded in an html page. I've been developing and
> > testing mainly in Firefox. Someone noticed the other day that when they
> > tried it in IE, it only worked the first time they viewed the page.
> > Subsequent views resulted in no box being drawn and no JPEG being loaded. If
> > you clear IE's cache and refresh the page, it will work one time again.
> > After some investigating, I've found that Stage.width and Stage.heightare both returning zero any time you reload the page after the initial load.
> > Any ideas on what's causing this, and why it only happens in IE?
> >
> > _______________________________________________
> > osflash mailing list
> > osflash at osflash.org
> > http://osflash.org/mailman/listinfo/osflash_osflash.org
> >
> >
> >
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20051024/cc451651/attachment.htm
More information about the osflash
mailing list