2

My flex app has a call in it to:

navigateToURL(new URLRequest(_rURL),'_self');

But it takes about 3-5 or even more seconds before it will leave the current page.

If I omit the '_self' the new window opens immediately and the page loads immediate...but only when I set it to _self I get a few seconds of a delay before it loads...I have no idea why but it is annoying.. I am wondering if anyone might have any idea why this is happening or anything I can do?

Thanks!

Cheeso
  • 189,189
  • 101
  • 473
  • 713
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
  • I'm not seeing this behavior on my machine (XP, Flash 10), but you're right -- it seems like I've noticed this before on other projects. Good question -- curious to see whether a answer bubbles up. – Christian Nunciato May 29 '09 at 16:30
  • This may be a stupid question, but why use '_self'? Isn't that the default behavior if you omit it? – Brent Jun 10 '09 at 00:57
  • No, _blank is for this, but _self SHOULD be. – JD Isaacks Jun 10 '09 at 13:08

1 Answers1

0

Some browsers process the request before redirecting to the new page. For example, if the URL is a file to be downloaded it will not redirect. You can use the name or ID of the window or frame to get the same effect, "top", "window", "parent", "self" (not _self) etc. More info here, http://www.howtocreate.co.uk/tutorials/javascript/browserinspecific

1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231