Hi,
Flash and Javascript work quite well together. In fact, Actionscript and Javascript are very similar languages. Is the Javascript function defined in the correct place in the HTML page?
You can use Javascript in conjunction with the getURL method to open a customized window directly from flash...
Basic getURL from a button event....object code...
Code:
on (release) {
getURL("javascript:NewWindow=window.open('http://msn.com','newWin','width=400,height=300,left=200,top=200,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No'); NewWindow.focus(); void(0);");
}
Custom Actionscript function for Javascript pop up windows ... bonus...also centers the window on screen...
Code:
function launchNewWin(url, wdth, hdth, windowNewName) {
if (windowNewName == undefined) {
var windowNewName = "newWin";
}
//End if
getURL("javascript:window.open(\""+url+"\",\""+windowNewName+"\",\"width="+wdth+",height="+hdth+",top=\"+((screen.availHeight/2)-("+hdth/2+"))+\",left=\"+((screen.availWidth/2)-("+wdth/2+"))); void(0);");
}
_root.launchNewWin("http://flashadvisor.com", 700, 380, "myNewWindow");
Regards
NTD
Bookmarks