Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.2 causing problem to flash application

Status
Not open for further replies.

spicymango

Programmer
May 25, 2008
119
CA
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?


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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top