fozail
11-04-2006, 12:01 AM
Hi, I'm trying to use FScommand in Flash.On a button I have the following action script:
on(rollOver)
{
fscommand("about","");
}
on(rollOut) {
fscommand("home","");
}
whereas the javascript code that Flash generated for me is as follows:
<script language="JavaScript">
<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function NAV_DoFSCommand(command, args) {
var NAVObj = isInternetExplorer ? document.all.NAV : document.NAV;
//
// Place your code here.
if (command=="about") {
document.header.src="_images/header_about.jpg";
}
if (command=="home") {
document.header.src="_images/header.jpg";
}
// 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 NAV_FSCommand(ByVal command, ByVal args)\n');
document.write(' Call NAV_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
//-->
</script>
This does not seem to work.Please tell me what am i doin wrong.
Thanks!
on(rollOver)
{
fscommand("about","");
}
on(rollOut) {
fscommand("home","");
}
whereas the javascript code that Flash generated for me is as follows:
<script language="JavaScript">
<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function NAV_DoFSCommand(command, args) {
var NAVObj = isInternetExplorer ? document.all.NAV : document.NAV;
//
// Place your code here.
if (command=="about") {
document.header.src="_images/header_about.jpg";
}
if (command=="home") {
document.header.src="_images/header.jpg";
}
// 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 NAV_FSCommand(ByVal command, ByVal args)\n');
document.write(' Call NAV_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
//-->
</script>
This does not seem to work.Please tell me what am i doin wrong.
Thanks!