need help coding a pop-up window in flash w/Actionscript 2

Discussion in 'Web Design and Development' started by sk3pt1c, Nov 4, 2010.

  1. macrumors 6502a

    sk3pt1c

    Joined:
    Nov 29, 2005
    Location:
    a simulacrum
    #1
    hey there boys and girls! :)
    so, a friend is making a website in flash using actionscript 2.
    he has a splash page in flash with a button on it that he wants, when clicked, to open the main website in a new window without the toolbar.
    the code we found is the following:

    Code:
    on (release) {
    getURL ("javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,
    toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');  NewWindow.focus();
    void(0);");
    }
    he added that to his button but he got a syntax error out of it...

    any ideas on how to make this work?

    i suggested a simple html page cause his splash page doesn't really do much but he has to do it in flash...

    thank you!
     
  2. Ride9650, Nov 4, 2010
    Last edited: Nov 4, 2010

    macrumors 6502

    Joined:
    Jun 29, 2007
    #2
    Whats the error?
    The only thing that looks wrong is the event handler code, but then again, I haven't used AS2 in quite some time so I can't say for certain.


    EDIT:
    Found this great adobe article.
    Quick summary:
    Turn the javascript starting from "window.open" into a string, and pass that into the getURL function after the "javascript:" line.

    http://kb2.adobe.com/cps/141/tn_14192.html
     
  3. thread starter macrumors 6502a

    sk3pt1c

    Joined:
    Nov 29, 2005
    Location:
    a simulacrum
    #3
    Awesome, thanks mate!!!:)
     

Share This Page