dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: getURL x2

Hybrid View

  1. #1
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289

    getURL x2

    Gotta small problem and need any opinions. This isn't really FlashMX exclusive, but figured there might be good answers from experience here.
    When I launch a popup from a Flash Web Page or even a script intensive page (Java, whatever), my .swf in the popup tends to run a little slower unless I close that specific originating page behind. And of course you can't close an originating page automatically without the alert window. With that in mind my question is:

    Can you launch two windows (1 _self & 1 popup) from the same button using onPress AND onRelease. Actually, I know it can be done cause I did it here locally on my computer, but will it cause problems on some computers out there or do you foresee problems doing this? The _self page would just be a "thanks for visiting" type page with no scripts or swf's embedded. Or would you have another suggestion to maybe fix my prob. Any comments appreciated.
    Regards,

    Ron

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Try this to close the opener window... Without a prompt:

    getURL("javascript:window.opener=self; window.close()");

    Seems it doesn't work on every browser or OS, though!

  3. #3
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    You should be okay with this approach...
    Code:
    _btn.onRelease = function() {
    	getURL("thankyou.html", "_self");
    	getURL("popup.html", "newWindow");
    }

  4. #4
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289
    oldnewbie, Nah, IE refuses to let that happen (latest versions anyway), especially with all their security SP's out today. Netscape doesn't care and WILL close the origin. I tried many JS functions and you get that stupid alert window (which scares most people). And they'd probably say, "heck with this, I'm outta here" half the time. And I don't think there's a classic way to open a window fullscreen or even customized without having that mother window behind. If there's a way, sure would like to know it.

    gsolo, may go with that to 'ensure' a double launch. Because sometimes onPress AND onRelease doesn't play nice depending on how fast it's done.
    Last edited by rhosk; 02-14-2003 at 11:24 AM.
    Regards,

    Ron

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Works on IE 5.5.

  6. #6
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289
    I know, but >v6 no-go.

    gsolo, double function doesn't work because I need the javascript function in one of the getURL's (fullscreen, custom window, etc). It DOES work with generic getURL's like _self and _blank, no problem. Is there a way I can delay the second getURL?, cause that may be the problem...too much info to pass at once. By the time the first window object's created, it's too late to pass the second getURL (guessing). If I can delay the second say 2 secs, it may work, but now it's getting deep.
    Regards,

    Ron

  7. #7
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    have thankyou.html create the popup instead of flash...

  8. #8
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289
    That was my plan b, you hit it. Do an onload= function. May have to modify the generic "thank you" message to something else though. Don't want to thank 'em before they even enter.
    Regards,

    Ron

  9. #9
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    Code:
    on (press) {
    	getURL("thankyou.html", "get");
    	getURL("JavaScript: window.close();");
    }
    this will open the the Thankyou page, & will close the flash movie...

    but make sure javascript it one word...for some reason FK breaks it into 2 words in here...

  10. #10
    muvipix.com
    Join Date
    May 2001
    Location
    Maine
    Posts
    289
    Nah, that didn't work either. But for some reason it strips the flash coding out of the html file (just a plain white screen with no "back button" capability?)?? Never seen that, weird. Anyway, thanks for trying.
    Regards,

    Ron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center