Hi! My name is eyezaer and JS make my head want to explode!
I was trying to get the status bar to change when buttons in flash are moused over. I went on over to Macromedia and they said that It can be done for windows or for macs, I dont really believe that, but I dont care that much... It is just the status bar... So, after 3 buttons, is there a way to make this code any smaller? I have three buttons and each uses a slightly different version of the code... 
 
quote:
<SCRIPT LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function cp_DoFSCommand(command, args) {
  var cpObj = InternetExplorer ? cp : document.cp;
if (command=="setStatus") {
   window.status = args;
}
}
// 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 cp_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call cp_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function wd_DoFSCommand(command, args) {
  var wdObj = InternetExplorer ? wd : document.wd;
if (command=="setStatus") {
   window.status = args;
}
}
// 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 wd_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call wd_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function sg_DoFSCommand(command, args) {
  var sgObj = InternetExplorer ? sg : document.sg;
if (command=="setStatus") {
   window.status = args;
}
}
// 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 sg_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call sg_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>
It works, and is on my page at http://cerebralboy.com 
*looks at Rets -- this is harder than I thought it would be*