PDA

View Full Version : Tutorial 6 spawning pop up windows


jopop
09-24-2002, 09:04 AM
I am having a problem with tutorial 6 (yes I know it's about the easiest!) I just can't get it to work!! I put in the url eg. "page.htm" and I give it a name right? eg. "page" I put the code in getURL and the other code in the head of the html doc that contains my .swf and nothing?!!?

I am putting two in the same page but this shouldn't be a problem so long as they have different names. What am I missing?

Thanks

Jopop:confused:

tg
09-24-2002, 02:14 PM
post your code so we can see what your doing.

jopop
09-24-2002, 02:25 PM
Here is my code - It is on the html page that contains the my swf file. To see the site please go to www.fabiocalvari.it (the site is in Italian). I got one pop up window to work using tutorial 08 (go to the page Radio) but I can't get the page "television" to work using tutorial 06

<HTML>
<HEAD>
<TITLE>flatv</TITLE>
<script language="JavaScript">
<!--
function spawnWindow(URL,Name,features) {
window.open(URL,Name,features);
}
//-->
</script>
</HEAD>
<BODY bgcolor="#FF0080">
<!-- URL's used in the movie-->
<A HREF=javascript:spawnWindow('tvb.htm','tvb.htm','t oolbar=no,location=no,status=no,menubar=no,scrollb ars=no,resizable=no,width=190,height=140'></A> <A HREF=javascript:spawnWindow('tva.htm','tva.htm','t oolbar=no,location=no,status=no,menubar=no,scrollb ars=no,resizable=no,width=190,height=140'></A> <!-- text used in the movie-->
<!--L LO LOA LOAD LOADI LOADIN LOADING LOADING. LOADING.. LOADING... Televisione VJ --><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=580 HEIGHT=290>
<PARAM NAME=movie VALUE="flatv.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FF0080> <EMBED src="flatv.swf" quality=high bgcolor=#FF0080 WIDTH=580 HEIGHT=290 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</BODY>
</HTML>

tg
09-24-2002, 02:40 PM
so, uhmmm, what's your flash code look like?

jopop
09-24-2002, 02:53 PM
Here's the flash code:

on (release) {
getURL ("javascript:spawnWindow('tva.htm','tva.htm','toolba r=no,location=no,status=no,menubar=no,scrollbars=n o,resizable=no,width=190,height=140'");
}

and

on (release) {
getURL ("javascript:spawnWindow('tvb.htm','tvb.htm','toolba r=no,location=no,status=no,menubar=no,scrollbars=n o,resizable=no,width=190,height=140'");
}

Thanks

Jo

tg
09-24-2002, 05:12 PM
Originally posted by jopop
Here's the flash code:

on (release) {
getURL ("javascript:spawnWindow('tva.htm','tva.htm','toolba r=no,location=no,status=no,menubar=no,scrollbars=n o,resizable=no,width=190,height=140'");
}


change your name arguments.

spawnWindow(url,name,options)
like this:
spawnWindow('tva.htm','tva',...);
notice i dropped the .htm from the name argument. don't know for sure, but that might help.

also, just noticed one more thing.
your dont have parans ('()') around your arguments. look at my code above, i am using parenthasis around my arguments. you'll need these i believe.

jopop
09-25-2002, 08:09 AM
Thanks TG

Got it working and have learnt to always close my parathesis!

Jo