A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: open window??

Hybrid View

  1. #1
    Member
    Join Date
    Apr 2001
    Posts
    60
    anyone know a bit of javascript that could help me here:

    I've got a html page on which I need to have a button to open another page with my .swf on it, trouble is the movie is 800x600 and I've been asked to make it work on 640x480 aswell. How do I detect screen size? I'd really like to have a pop-up window with no browser buttons.menus, just a plain window.

    I'm not a coder so be gentle, I appreciate that this is not really a flash problem, but...

    ???

  2. #2
    Member
    Join Date
    Apr 2001
    Posts
    60
    bump

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Posts
    9
    Hi sickmindz,

    Look at this script and see if it helps you.

    <html>
    <head>
    <title>PopUp ;o)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <script>
    var Resul = (screen.width);
    var PopUpX800 = (screen.width/2)-365;
    var PopUpY800 = (screen.height/2)-215;
    var PopUpX640 = (screen.width/2)-290;
    var PopUpY640 = (screen.height/2)-160;
    var pos800 = "left="+PopUpX800+",top="+PopUpY800;
    var pos640 = "left="+PopUpX640+",top="+PopUpY640;

    function PopUP(){

    if (Resul >= 800){
    window.open("index800.htm","PopUp","resible=no,wid th=729,height=430,"+pos800)
    }

    if (Resul <= 640){
    window.open("index600.htm","PopUP","resible=no,wid th=580,height=320,"+pos640)
    }

    }

    </script>

    </head>

    <body bgcolor="#FFFFFF" onload="PopUP()">

    </body>
    </html>

    See you!!

    Fernando Boniotti

  4. #4
    Member
    Join Date
    Apr 2001
    Posts
    60
    Fernando thanks!

    how would i put this if the popup was to be triggered by a button, as I need the user to 'enter' if they have flash?

    thanks again

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