A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Close window option

  1. #1
    How do i get my page to close down after you hit a button to open another page. If the main page opens up (which is in flash) and then you click on of the flash buttons to open either the html site or the flash site how do i have it close down the main page once the user clicks to open the new window?

    Thx

  2. #2
    Senior Member
    Join Date
    May 2002
    Location
    Seattle WA
    Posts
    171
    on (release) {
    javascript:self.close();
    }
    something like this maybe

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Posts
    29
    You'll need to make a call to javascript function which is in the child window that will close down the parent window.

    But you need to know that when you try to close down the main browser, it will prompt the user for confirmation before closing the window which can be very annoying and not worth the trouble.

    I can get you the code if you still want.

  4. #4
    yea please send the code thx

  5. #5
    Member
    Join Date
    Feb 2001
    Location
    the land of oz
    Posts
    51

    javascript close window

    in flash put this script on your button
    -------------
    on (release) {
    getURL ("www.galvindesign.biz", "_blank");
    getURL ("javascript:self.close();");
    }
    the first ilne opens a window the second closes the current one

    sorry if you only got half of this before i crased my computer $@^
    [Edited by kyle1600 on 07-02-2002 at 10:18 PM]

  6. #6
    That did not work?

  7. #7
    Member
    Join Date
    Feb 2001
    Location
    the land of oz
    Posts
    51

    sorry try this

    Sorry i think you need to add http:// before the url as below, ive got it to work in F5 and MX


    on (release) {
    getURL ("http://www.galvindesign.biz", "_blank");
    getURL ("javascript:self.close();");
    }


    hope that works

  8. #8
    Kyle1600 this is what i have

    on (release) {
    getURL("javascriptpenIT4FLASH('http://www.indesignmedia.com/broadband/main.htm',650,660,null,null,'mywinname01',true,tru e,true,true);");
    getURL("javascript:self.close();");
    }

  9. #9
    Senior Member
    Join Date
    May 2002
    Location
    Seattle WA
    Posts
    171
    are you opening a pop up
    -----------------
    on (release) {
    getURL("javascript:newwindow=window.open('http://www.mysite.com/mypage.htm','title','width=650,height=660,left=nul l,top=null,scrollbars=yes,resizable=no');newwindow .focus();void(0);");
    getURL("javascript:self.close();");
    }

  10. #10
    Thx for the help fellas.. i got it working

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