Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sk3pt1c

macrumors 6502a
Original poster
Nov 29, 2005
918
6
a simulacrum
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!
 
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
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.