About the External API 675
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=8,0,0,0" width="320" height="240" id="videoPlayer"
align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="video.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="video.swf" quality="high" bgcolor="#ffffff" width="320"
height="240" name="videoPlayer" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<form name="videoForm">
Select a video:<br />
<select name="videos">
<option value="lights_long.flv">lights_long.flv</option>
<option value="clouds.flv">clouds.flv</option>
<option value="typing_long.flv">typing_long.flv</option>
<option value="water.flv">water.flv</option>
</select>
<input type="button" name="selectVideo" value="play"
onClick="callFlashPlayVideo();" />
<br /><br />
Playback <input type="button" name="playPause" value="play/pause"
onClick="callFlashPlayPauseVideo();" />
<br /><br />
Video status messages <br />
<textarea name="videoStatus" cols="50" rows="10"></textarea>
</form>
</body>
</html>
This HTML code defines four JavaScript functions: initialize(),
callFlashPlayVideo(), callFlashPlayPauseVideo(), and updateStatus(). The
initialize() function is called within the body tag in the onLoad event. Both the
callFlashPlayVideo() and callFlashPlayPauseVideo() functions are called when
the user clicks on either the play button or play/pause button within the HTML
document, and trigger the
playVideo() and pauseResume() functions in the SWF file.