This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > March 2006 > getURL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| 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/>
| |
| dsartain18 2006-03-26, 10:29 pm |
| 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/JavaS...opUp.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!
| |
| Wolf van Ween 2006-03-27, 6:44 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.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|