<!DOCTYPE html>
<html>
<head>
<title>Adding a Flash Video</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {
movie:"../video/puppy.flv" };
swfobject.embedSWF("flash/osplayer.swf", "snow", "400", "345", "8.0.0", flashvars, params);
</script>
</head>
<body>
<div id="snow">
<p>A video of a puppy playing in the snow</p>
</div>
</body>
</html>
This code is taken from the book HTML & CSS by Jon Duckett . I copied the code as it is from the book and checked that all files are in their correct position in the directory . This does show the video player on my website when i open it directly by double clicking on the html file but it does not PLAY the video when i click on the play button in the video player . I then discovered that when i run this website on a localhost server using XAMPP , it works perfectly fine . Can anyone tell me why is this happening ?