Hello,

I have a problem I hope someone can help me with. I have a database-driven homepage (asp vbscript) and i'm trying to make a swf control the visibility of the layer it's in so a button can trigger the layer's visibility to hidden. Anyway, when I take the fscommand and javascript code and place them in a static html document, the fscommand on my button works fine (in both netscape and ie). However, when I place the same code and layer with the flash movie in my .asp page, I get an error telling me that a script block cannot be placed inside another script block. I know it has something to do with this part of the javascript code:


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 flu_shot_FSCommand(ByVal command, ByVal args)\n');
document.write('Call flu_shot_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}


Is there a way to use fscommand on an asp vbscript page? Any comments would be appreciated.