Workaround to Flash plugin IE Microsoft


Microsoft lost his case with its Flash plugin in Internet Explorer.
A workaround has been written by Adobe, so that a flash movie could run in the more recent Internet Explorer.
Get file here ⇒

Because updating my pages 'd be boring I wrote a PHP script to get easy but it's still a little bit long.
A call to a PHP function 'd be made instead of the Object code.

PHP Script

Open your favourite editor and write the following text. Save it as : flash.php

Goal : loading a flash movie calling javascript
Input :
$movie : filename (without swf extension)
$w : scene width
$h : scene height
$bgcolor : background color (no needed if transparent mode)
$version : flash version in use ( default = 7,0,19,0 )
$transpa : transparency (default : transparent either use opaque)
function flash($movie, $w, $h, $bgcolor, $version = "7,0,19,0", $transpa = "transparent" )
"<script type='text/javascript'>
AC_FL_RunContent( 'codebase','$version',
'menu', 'false',
'devicefont', 'true',
'scale', 'exactfit',
'wmode', '$transpa',
'allowscriptaccess', 'samedomain');

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
width='$w' height='$h'>
<param name='bgcolor' value='$bgcolor'>
<param name='movie' value='$movie.swf'>
<param name='quality' value='high'>
<param name='menu' value='false'>
<param name='devicefont' value='true'>
<param name='scale' value='exactfit'>
<param name='wmode' value='$transpa'>
<param name='allowscriptaccess' value='samedomain'>
<embed name='$movie' src='$movie.swf'
quality='high' menu='false' devicefont='true' scale='exactfit' wmode='$transpa' allowscriptaccess='samedomain' swLiveConnect='true'
pluginspage='' type='application/x-shockwave-flash'
width='$w' height='$h' bgcolor='$bgcolor'></embed></object></noscript>
<script type='text/javascript'>
AC_AX_RunContent( 'width','1','height','1' );
</script><noscript><object width='1' height='1'></object></noscript>";



I suppose your site is as it follows :
      -- js
      -- foo
- set flash.php in the ROOT directory.
- set the files AC_RunActiveContent.js and AC_ActiveX.js in fs directory.

I suppose, in foo directory, there 'll be a PHP file which 'd run a flash movie.
Then in that file :
- Between tags <HEAD> et </HEAD>
<script src="../js/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="../js/AC_ActiveX.js" type="text/javascript"></script>

- Where you want to run the flash movie, put ( values are for example )
include ("../flash.php");
flash("vortex", 320, 240, "#007000", "6,0,79,0" );

Notice :
If you agree with the default values ( version and transparency) so enter flash("vortex", 320, 240, "#007000" );
In fact in that case the background color doesn't matter 'cause of transparency.
Another example : flash("vortex", 320, 240, "#007000" , "6,0,79,0", "opaque");
Warning , if you agree with the default value of $version but not with $transpa, you have to set a value to $version. (default value of course!)
The line code must appear only once.

If you understood the script, it's up to you to add another options.


Si vous aimez le site


Select a language if you need :

Page chargée en 0.004 sec.

Dernière Modification : Ven 9 Fevrier 2018 19:59
Copyright © 1999-2018 Jean-Paul Molina Tous droits réservés.

to Google