all groups > macromedia flash sitedesign > march 2006 >
You're in the

macromedia flash sitedesign

group:

getURL


getURL Sno
3/25/2006 11:16:03 PM
macromedia flash sitedesign:
Hi all,
I have some script I need to add to by flash buttons so they will launch
another non flash site.
I can do the getURL stuff to launch the site but this script determines the
window size etc...

I have included the 'HTML' code below... if you want to see what I am trying
to achieve...

Is it possible to ad this code to buttons within Flash?

Any help would be much appreciated...

Cheers,
Sno


<html>
<head>

<script>
<!--Code for LSN Button and LSN Demo Button Version 2.2 31-01-2001

function doOpen2()
{
var height;
var width;
var statusbar;
var s =
"https://www.lsn.com.au/scripts/cgiclnt.dll/LSN/ND000_?EWF_SYS_0=e95654f1-2565-1
1d4-8fa4-00b0d0302a92&EWF_FORM_NAME=0100847&EWF_BUTTON_Submit=Submit";

if ((screen.availHeight <= 600) || (screen.availWidth <= 800)) {
statusbar = 0;
if(screen.availHeight > 600){
height = 600;
}
else{
height = screen.availHeight - 28;
}
if(screen.availWidth > 800){
width = 800;
}
else{
width = screen.availWidth - 10;
}
}
else {
statusbar = 1;
height = 600;
width = 800;
}

if (navigator.appName=="Netscape"){
if (statusbar){
window.open(s, "LSN",
"toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=yes,resi
zable=no,screenX=0,screenY=0,left=0,top=0,width=" + width + ",height=" +
height);
}
else{
window.open(s, "LSN",
"toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=yes,resiz
able=no,screenX=0,screenY=0,left=0,top=0,width=" + width + ",height=" + height);
}
}
else{
if (statusbar){
window.open(s, "LSN",
"toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=yes,resi
zable=yes,screenX=0,screenY=0,left=0,top=0,width=" + width + ",height=" +
height);
}
else{
window.open(s, "LSN",
"toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=yes,resiz
able=yes,screenX=0,screenY=0,left=0,top=0,width=" + width + ",height=" +
height);
}
}
}

function doOpen3()
{
var height;
var width;
var statusbar;
var s = "https://www.lsn.com.au/demo/Introduction.htm";

if ((screen.availHeight <= 600) || (screen.availWidth <= 800)) {
statusbar = 0;
if(screen.availHeight > 600){
height = 600;
}
else{
height = screen.availHeight - 28;
}
if(screen.availWidth > 800){
width = 800;
}
else{
width = screen.availWidth - 10;
}
}
else {
statusbar = 1;
height = 600;
width = 800;
}

if (statusbar){

window.open(s,"LSNdemo","toolbar=no,status=yes,location=no,menubar=no,directorie
s=no,scrollbars=yes,resizable=no,screenX=0,screenY=0,left=0,top=0,width="+width
+ ",height=" + height);
}
else{

window.open(s,"LSNdemo","toolbar=no,status=no,location=no,menubar=no,directories
=no,scrollbars=yes,resizable=no,screenX=0,screenY=0,left=0,top=0,width="+width
+ ",height=" + height);
}
}

-->
</script>

<head/>

<body>




<a href="" onClick="doOpen2();return false;">Loan Service Net</a><BR>
<a href="" onClick="doOpen3();return false;">Demo</a>

<body/>
<html/>
Re: getURL dsartain18
3/27/2006 2:08:59 AM
Hey, I did some digging and found something that may point you in the right
direction... you can go here:
http://www.flash-db.com/PopUp/JavaScriptPopUp.php?page=2

That site shows you how to embed javascript within your actionscript...if you
need the entirety of your JS file (i.e. all the if statements)...look in your
Flash help section (if version 8) for jsfl files...it's a way to link your
flash files to an actual JS page...I'm not the greatest with either JS or AS, I
was just bored...hope it helps!
Re: getURL Wolf van Ween
3/27/2006 7:55:31 PM
no, dsartain, it would be difficult to include such a long javascript function
into a getUrl.
Sno, keep your JS as is, and call the JS functions from within Flash. Have a
look at fscommand() in the help file, you'll find an example for doing just
that.
AddThis Social Bookmark Button