EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 674

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
674 Working with External Data
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>ExternalInterface</title>
<script language="JavaScript">
// Use a variable to reference the embedded SWF file.
var flashVideoPlayer;
/* When the HTML page loads (through the onLoad event of the <body>
tag), it calls the initialize() function. */
function initialize() {
/* Check whether the browser is IE. If so, flashVideoPlayer is
window.videoPlayer. Otherwise, it's document.videoPlayer. The
videoPlayer is the ID assigned to the <object> and <embed> tags. */
var isIE = navigator.appName.indexOf("Microsoft") != -1;
flashVideoPlayer = (isIE) ? window['videoPlayer'] :
document['videoPlayer'];
}
/* When the user clicks the play button in the form, update the
videoStatus text area, and call the playVideo() function within the
SWF file, passing it the URL of the FLV file. */
function callFlashPlayVideo() {
var comboBox = document.forms['videoForm'].videos;
var video = comboBox.options[comboBox.selectedIndex].value;
updateStatus("____" + video + "____");
flashVideoPlayer.playVideo("http://www.helpexamples.com/flash/
video/" + video);
}
// Call the pauseResume() function within the SWF file.
function callFlashPlayPauseVideo() {
flashVideoPlayer.pauseResume();
}
/* The updateStatus() function is called from the SWF file from the
onStatus() method of the NetStream object. */
function updateStatus(message) {
document.forms['videoForm'].videoStatus.value += message + "\n";
}
</script>
</head>
<body bgcolor="#ffffff" onLoad="initialize();">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

Table of Contents

Related product manuals