A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [Resolved] [Resolved] [Resolved] anyone know how to do this?

  1. #1

    Join Date
    Aug 2002
    Posts
    1,245

    anyone know how to do this?

    hi,

    help me here guys.. im looking for a tut. which can help me open
    multible pop up windows at the same time i know its a javascript
    thing..but can't figure it out.


    thanx in advance
    B

  2. #2
    Junior Member scudsucker's Avatar
    Join Date
    Feb 2003
    Location
    Cape Town, RSA
    Posts
    1,509
    I tried to write a script to pop 8 windows at once- it often broke, depending on processor load.

    So I decided to get the flash to open them one at a time very quickly, over 8 frames, which seems to work.

    In theory you could write a js function to do it, and then call the function... but I think that you will still run into problems.

    But anyway...

    Code:
    for(var i=1; i<=8; i++) {
    getURL("javascript:NewWindowM" + i + "=window.open('Mwin" + i + ".html','Mwin" + i + "','width=50,height=50,left=100,top=200,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');void(0);");
    }
    Hariyemadzisawira nhaka yedu! Down the SCUD and win!
    I'm too lazy to read Private Messages.

  3. #3

    Join Date
    Aug 2002
    Posts
    1,245
    thanx i'll take a look at it..

  4. #4
    Watch Your Head. GooseBump's Avatar
    Join Date
    Apr 2003
    Location
    The Resturant at the end of the Universe
    Posts
    431

    JavaScript Caller

    I always use JavaScript to open my popups. There is no way to actually open several all at the exact same time, however the time between each one opening is computer time, aka milliseconds.


    The function would look something like this:

    <head>
    <script language="JavaScript">

    function newWindow(){

    window.open("popup1.htm","", "width=371 height=241 scrollbars='no'");

    window.open("popup2.htm","", "width=420 height=340 scrollbars='no'");

    window.open("popup3.htm","", "width=320 height=240 scrollbars='no'");
    }
    </script>
    </head>

    Just copy as many of the "window.open(etc..." and change the htm you need. I've had success with this code in nearly every browser and ever instance. You can also control the location of the popup by adding the "top=pixel left=pixel" elements to each one. The line would look like this:

    window.open("popup1.htm","", "width=371 height=241 scrollbars='no', top=252 left=352");

    There is even code to figure out what resolution the user has their monitor set to and contrive a formula to place each popup in the same location on any resolution screen.

    To call the function in flash you add the following code to your button, keyframe:

    getURL ("JavaScript:newWindow()");

    Hope that helps,

    Take it easy,
    - Goosebump

  5. #5

    Join Date
    Aug 2002
    Posts
    1,245
    i thought i would be something like this..


    thanx buddy!

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