jpmad4it Posted July 13, 2007 Share Posted July 13, 2007 Hey people! I have a PHP variable named flash, and within it I have the <object> element which creates the flash output. So whenever i call the variable i get the flash. Now the problem is that I am getting the "click to activate and use this control" box which I want to get rid of. So to do this I want to add the AC_RunActiveContent.js script to this variable. Is this possible? If so how do I write the code? This is the code I have already: $flash = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"157\" height=\"198\"> <param name=\"movie\" value=\"http://www.mysite.com/scroller.swf\"> <param name=\"quality\" value=\"high\"> <embed src=\"http://www.mysite.com/scroller.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"157\" height=\"198\"></embed></object>"; Now here is the code I require to put in the $flash variable: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script language="javascript" type="text/javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript" type="text/javascript"></script> </head> <body> <script language="javascript" type="text/javascript"> if (AC_FL_RunContent == 0) { alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder."); } else { AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0', 'src', 'http://www.mysite.com/scroller', 'quality', 'high', 'pluginspage', 'https://www.macromedia.com/go/getflashplayer', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'devicefont', 'false', 'bgcolor', '#ffffff', 'menu', 'true', 'allowScriptAccess','sameDomain', 'movie', 'http://www.mysite.com/scroller', 'class', '', 'salign', '' ); //end AC code } </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" class="Flash" title="team"> <param name="movie" value="http://www.mysite.com/scroller.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="allowScriptAccess" value="sameDomain" /> <embed src="http://www.mysite.com/scroller.swf" class="Flash" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowScriptAccess="sameDomain"></embed> </object> </noscript> </body> </html> I'm not sure if I have to put all the <Html> tags etc in, but I do know that these 2 lines are required in the <head> tag: <script language="javascript" type="text/javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript" type="text/javascript"></script> Any help would be grrrrreeeeeeaaaaat!! Kind regards Jonathan :thumbsup: Link to comment https://forums.phpfreaks.com/topic/59781-adding-flash-javascript-to-a-php-variable/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.