Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : problems with opening browser window


buck love
5/25/2004 9:42:11 PM
when my preloader decides that the movie is loaded and it is ready to go to the
second scene i have a little code:

getURL("javascript:open()"); //where open() is a function defined in the
javascript on the page containing the flash

just before it switches to the next scene.

what then happens is it goes to the next scene and my window pops up as it
should but on the initial page with the flash, the flash is gone and it just
says:
[object]

does anyone know how i can fix this?
ryder1212
5/25/2004 9:50:43 PM
ryder1212
5/25/2004 9:56:42 PM
Try something like this to launch a new browser window from flash:

getURL("javascript:window.open('filename', '_blank')void(0);");

The "void(0)" should prevent the [object] from showing and replacing your HTML
file
buck love
5/25/2004 10:07:02 PM
i put the void(0) in there and it got rid of the [object] but the window didn't
pop up anymore
here's my html:
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE>vp2</TITLE>
<script language="javascript" type="text/javascript">
function open(){
var myWin = window.open("intropal.html","topmost","height=300,width=400");
}
</script>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--LOADINGCommunity NewsCommunity News<P
ALIGN="LEFT"></P>MessengerRadioWeatherRecreationEmailCalendarCommunity
NewsCommunity News<P
ALIGN="LEFT"></P>MessengerRadioWeatherRecreationEmailCalendar--><OBJECT
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,0,0"
WIDTH="600" HEIGHT="500" id="vp2" ALIGN="">
<PARAM NAME=movie VALUE="vp2.swf"> <PARAM NAME=quality VALUE=high> <PARAM
NAME=bgcolor VALUE=#FFFFFF> <EMBED src="vp2.swf" quality=high bgcolor=#FFFFFF
WIDTH="600" HEIGHT="500" NAME="vp2" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</BODY>
</HTML>
buck love
5/25/2004 10:16:12 PM
AddThis Social Bookmark Button