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

flash actionscript : using java in actionscript


rfan622
6/22/2004 8:16:07 PM
behived
6/23/2004 7:23:28 AM
yes i'll give you an example for a simple popup window:

this code goes on an action frame in the timeline:

_global.openWinCentre = function(url, winName, w, h, toolbar, location,
directories, status, menubar, scrollbars, resizable) {

getURL("javascript:window.open('"+url+"','"+winName+"','"+"width="+w+",height="+
h+",toolbar="+toolbar+",location="+location+",directories="+directories+",status
="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+
",top='+((screen.height/2)-("+h/2+"))+',left='+((screen.width/2)-("+w/2+"))+'"+"
');void(0);");
};

this placed on the button:

on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "http://www.derouck.com/maplink/maplink.asp?id=13732&console=2";
target_winName = "stratenplan";
width = 530;
height = 530;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location,
directories, status, menubar, scrollbars, resizable);
}


it is also possible to put a javascript in your html page where the swf is
nested and call that javascript from the swf...

hope this can help, maybe you can be a little more specific on what you want
to do...
AddThis Social Bookmark Button