spicymango
Programmer
Hi,
I have flash that is been working for last five years. Now I have put the same code on new apache server and my flash does not show up while
all the other flash application are working fine. I checke the MIME it does have application/x-shockwave-flash entery. How can envirmonet can cause following code not to work?
which call the following
I notied if for all the variables like swfPath, swfWidth, swfHeigh etc instead I hardcode the values like
document.write("<param name=movie value='/pages/accounts/Cash_Optimizer.swf' />"); instead of
document.write("<param name=movie value='" + swfPath + "' />");
then it works. Its not that these variables value are not coming to this function. If I do alert I see that the variables have values in them, it is just when I write
with document.write looks like variables are not working.
But on my other apacahe server exactly 100% same code works fine
I have flash that is been working for last five years. Now I have put the same code on new apache server and my flash does not show up while
all the other flash application are working fine. I checke the MIME it does have application/x-shockwave-flash entery. How can envirmonet can cause following code not to work?
Code:
showSWF(6, "/pages/accounts/Cash_Optimizer.swf", "100%", "100%", "cash_optimizer", "tl", "#FFFFFF",
"accountList=Cash - 9KQ6R1 C CAD -109&visitorURL=https://www.mysite.com&tradingURL=https://s[URL unfurl="true"]www.mysite.com");[/URL]
which call the following
Code:
var flashVers = 8;
function showSWF(reqdPlayer, swfPath, swfWidth, swfHeight, swfID, salign, bgColor, swfVars)
{
var undefined;
if (flashVers >= reqdPlayer) {
if (salign == undefined || salign == '')
{
salign = "TL";
}
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='[URL unfurl="true"]https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'[/URL] width='" + swfWidth + "' height='" + swfHeight + "' id='" + swfID + "' align='' />");
document.write("<param name=movie value='" + swfPath + "' />");
document.write("<param name=flashvars value='" + swfVars + "' />");
document.write("<param name=salign value='" + salign + "' />");
document.write("<param name=menu value='false' />");
document.write("<param name=quality value='high' />");
document.write("<param name=scale value='noscale' />");
if (bgColor != undefined && bgColor != '')
{
document.write("<param name=bgcolor value='" + bgColor + "' />");
}
document.write("<embed src='" + swfPath + "' flashvars='" + swfVars + "' quality=high scale=noscale " +
" width='" + swfWidth + "' height='" + swfHeight + "' name='" + swfID + "' salign='" + salign +
"' menu='false' type='application/x-shockwave-flash' pluginspage='[URL unfurl="true"]https://www.macromedia.com/go/getflashplayer'[/URL] ");
if (bgColor != undefined && bgColor != '')
{
document.write("bgcolor='" + bgColor +"' ");
}
document.write(">");
document.write("</embed>");
document.write("</object>");
}
}
I notied if for all the variables like swfPath, swfWidth, swfHeigh etc instead I hardcode the values like
document.write("<param name=movie value='/pages/accounts/Cash_Optimizer.swf' />"); instead of
document.write("<param name=movie value='" + swfPath + "' />");
then it works. Its not that these variables value are not coming to this function. If I do alert I see that the variables have values in them, it is just when I write
with document.write looks like variables are not working.
But on my other apacahe server exactly 100% same code works fine