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.> {
if( i >= (waitTime*fps) )
{
executeYourFunction();
delete this.onEnterFrame;
}
i++;
}

hope this solves your problem,

cheers,

Rinde


On 24/10/05, Chris Norris <[EMAIL PROTECTED] > 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 < [EMAIL PROTECTED]> wrote:
hi
 
 if you wait for a 1/2 second or so, the stage size will be reported correctly in ie...
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 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.height are 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
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org




_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org



_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to