magroot
07-24-2007, 06:05 AM
hi guys, i'm looking for a script or whatever, that will enable flash animation, if user has FLASH PLAYER, and if he/she doesn't have flash player installed, then load HTML code...
if anyone have seen this before or know how it works, please, respond, thanks.
Jatinder
07-24-2007, 07:11 AM
http://blog.deconcept.com/swfobject/ is precisely what you need.
This also fixes the problem of clicking on Flash movie to enable it in IE7 and Opera.
magroot
07-24-2007, 10:20 AM
http://blog.deconcept.com/swfobject/ is precisely what you need.
This also fixes the problem of clicking on Flash movie to enable it in IE7 and Opera.
thanks for the link...
but, do you have working example of the script...?
Jatinder
07-24-2007, 11:19 AM
Here is a simple example:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Page</title>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashbox">Add your HTML code here!</div>
<script type="text/javascript">
var so = new SWFObject("flash-movie.swf", "flashbox", "730", "113", "8", "#FFFFFF");
so.useExpressInstall('expressinstall.swf');
so.write("flashbox");
</script>
</body>
</html>
The script will insert the Flash movie in the "flashbox" div tag. You can give this div tag any ID you want.
If Flash is not installed on the visitor's browser, the HTML code within the "flashbox" div tags is displayed instead.