Because many mobile terminals do not support Flash, many colorful flash effects cannot be released. If you can judge the type of access to the web webpage (PC or mobile terminal). You can get the right medicine and find out the solution!
The type of access is the mobile terminal we use .gif instead of the Flash (.sWF suffix) animation, and the PC side did not change. This is perfect!
As shown below, the function Flashchecker () is the type used to detect access.
Copy code code as follows:
<script language = "javascript" type = "text/javascript">
/*
*Used to detect whether it is PC or mobile terminal
*Return: Flashchecker (). F == True PC terminal
* On the contrary, the mobile terminal
*/
function flashchecker () {
var hasflash = 0;
var flashversion = 0;
var isie = /*@cc_on!@* /0;
if (ISIE) {
var SWF = New Activexobject ("Shockwaveflash.shockwaveflash");
if (SWF) {
Hasflash = 1;
Vswf = SWF.GetVariable ("$ Version");
Flashversion = Parseint (vswf.split ("") [1] .split (",");
}
}
else {
if (if (navigator.plugins && navigator.plugins.length> 0) {{
var swf = navigator.plugins ["shockWave Flash"];
if (SWF) {
Hasflash = 1;
var Words = SWF.Description.split ("");
for (var I = 0; I <word.length; ++ i) {{
if (Isnan (PARSEINT (Words [i]))) {
continue;
}
Flashversion = Parseint (words [i]);
}
}
}
}
Return {
F: Hasflash, V: FlashVersion
};
}
</script>
expansion:
Copy code code as follows:
<script language = "javascript" type = "text/javascript">
/*
* Output SWF animation according to the parameter
* URL: Click the jump address after the SWF animation
* SWFLINK: * .swf material address
*/
Function Getswfhtml (url, SWFLINK) {
html = "<a style = 'position: absolute; Top: 0; left: 0; bottom: 0; right: 0; diss: block;" +
"Width: 100%; Height: Expression (this.parentNode.scrollheight); Filter: Alpha (OPACITY = 0);" +); " +);" +); " +);" +); " +);" +); " +);" +); " +);
"OPACITY: 0; Background: #fff; 'HREF ='" + URL + "'Target =' _ Blank '>" +
"</a>" +
"<object width = '590' height = '55 'align =' middle '>" +
"<Param Name = 'AllowScriptaccess' Value = 'NEVER' />" +
"<Param Name = 'Quality' Value = 'High' />" +
"<PARAM NAME = 'WMODE' VALUE = 'Transparent' />" +
"<Param Name = 'Movie' Value = '" + SWFLINK + "' />" +
"<embed wmode = 'transparent' src = '" + swflink + "' question = 'high'" +
"Width = '590' Height = '55 'Align =' MIDDLE 'AllowScriptaccess =' NEVER 'Type =' Application/X-SHOCKWAVE-FLASH '" + "
"pluginspage = '" + url + "' />" +
"</object>";;
Return html;
}
</script>