Chapter 3: Images, Audio, and Video
123
<head>
<title>Adding an MP3 player using Flash</title>
<script type=”text/javascript” src=”swfobject.
js”></script>
<script type=”text/javascript”>
swfobject.
embedSWF(“flash/xspf_player....
More
Chapter 3: Images, Audio, and Video
123
<head>
<title>Adding an MP3 player using Flash</title>
<script type=”text/javascript” src=”swfobject.
js”></script>
<script type=”text/javascript”>
swfobject.
embedSWF(“flash/xspf_player.
swf?playlist_url=flash/playlist.
xspf”,
“flash_mp3_player”, “400”, “170”, “8.
0.
0”);
</script>
</head>
<body>
<div id=”flash_mp3_player”>Here is where the Flash MP3 Player goes.
</div>
</body>
Automatically Playing Audio and Video
When a Page Loads
Having seen several techniques that allow you to add audio and video to your page, it is important to
consider the issue of whether the audio or video should play automatically when the page loads.
More people are likely to watch or listen to a file if it starts up automatically than if they are
forced to interact with a player.
However, some visitors to your site might leave the page very
quickly if the browser starts to play audio when they were not expecting it to (particularly if
they are browsing your site at
Less