nucleous
03-01-2005, 11:50 AM
Hi I'm a beginner, as you can see below, I am stuck with something that I got a feeling there probably is a workaround for.
This is the link:
on (release){
getURL("./demofolder1/demofolder2/demo.html" onclick="NewWindow(this.href,'anyname','500','585','no','ce nter');return false" onfocus="this.blur()");
}
This is the code that goes in the html doc (inside the head tags):
<script language="javascript" type="text/javascript">
<!--
/************************************************** **
popup window
************************************************** **/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.rand om()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+',scrollbars='+scroll+',l ocation=no,directories=no,status=no,menubar=no,too lbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
What am I doing wrong?? The above is supposed to open demo.html in a popup window. It works fine in html but when I put it inside getURL (Flash)it doesn't.
:(
How can I make the link work inside flash? anyone? :(
This is the link:
on (release){
getURL("./demofolder1/demofolder2/demo.html" onclick="NewWindow(this.href,'anyname','500','585','no','ce nter');return false" onfocus="this.blur()");
}
This is the code that goes in the html doc (inside the head tags):
<script language="javascript" type="text/javascript">
<!--
/************************************************** **
popup window
************************************************** **/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.rand om()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+',scrollbars='+scroll+',l ocation=no,directories=no,status=no,menubar=no,too lbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
What am I doing wrong?? The above is supposed to open demo.html in a popup window. It works fine in html but when I put it inside getURL (Flash)it doesn't.
:(
How can I make the link work inside flash? anyone? :(