andresrangel
08-21-2002, 06:10 PM
Good afertoon to actionscript forum;
I try to make a web in flash that has several buttons with a fscommand that open a pop up window. These buttons works perfectly with Internet Explorer but it does not work in Netscape and Mac. Does anybody know how can I do it?
Thanks
Andrés
Chilton
08-21-2002, 07:27 PM
This is a tricky area. Mind posting your javascript code? I ran into a lot of limitations with this, and have a few workarounds, but I need to see what you're doing to tell you how to make it work like it should.
-Chilton
andresrangel
08-22-2002, 10:25 AM
thanks a lot, Clinton;
Here is the Java Script code:
<script type="text/javascript" language="javascript">
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function botonera_porfolio2_DoFSCommand(command, args) {
var botonera_porfolio2Obj = InternetExplorer ? botonera_porfolio2 : document.botonera_porfolio2;
//
//
if (command == "messagebox") {
alert(args);
}
if (command == "ventana") {
// if (!document.hija)
window.open("./flotante.asp?id="+args,"hija","menubar=no toolbar=no scrollbars=yes width=370 innerwidth=370 height=450 inerheight=450 resizable=no");
// }
}
if (command == "ventanaartistas") {
// if (!document.hija)
// }
if (args ==9 ){
window.open("flotantediseno.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==10 ){
window.open("flotanteweb.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==11 ){
window.open("flotanteartistas.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==12 ){
window.open("flotantejazz.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==13 ){
window.open("flotanteworld.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==14 ){
window.open("flotanteotros.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else if(args ==15 ){
window.open("flotanteexperiencia.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}else{
//window.open("flotanteartistas.htm","","menubar=no toolbar=no width=780 innerwidth=780 height=432 inerheight=432 resizable=no");
}
}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub botonera_porfolio2_FSCommand(ByVal command, ByVal args)\n');
document.write(' call botonera_porfolio2_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>
I hope you can sort it out because I´ve been searching in Macromedia Help and Support and I couldn´t find anything right to make it work.
Andrés
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.