<html> <head> <script language="Javascript" type="text/javascript"> var data; function pingTimeoutData(){ var oRequest = new XMLHttpRequest(); var sURL = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1) + "data.txt"; oRequest.open("GET",sURL,false); oRequest.send(null); data = oRequest.responseText; oRequest.abort(); } </script> <script type="text/javascript"> /**/var i=0; function await_9(){ pingTimeoutData(); /**/document.getElementById('txt').value=++i + "\t\t\t" + data; if (data == 9){ //PLAY document.getElementById('txt').value="PLAY!"; document.movie1.Play(); setTimeout("await_9()", 9000); }else if(data == 8){ // STOP and REWIND document.movie1.Rewind(); document.movie1.Stop(); document.movie1.Rewind(); setTimeout("await_9()", 1000); }else if(data == 7){ // REDIRECT IN CASE OF SERVER FAILURE setTimeout("window.location='http://webspace.utexas.edu/jc3588/www/rtf331/current_rev.html?noCache=' + Math.floor(Math.random()*99999)", 5000); }else{ setTimeout("await_9()",data * 1000);} } </script> <title>RTF 331: Soundscapes Project 1</title> <style> body { background:black; /*overflow:hidden;*/ } table{ margin-left: auto; margin-right: auto; text-align: left; } </style> </head> <body> <table> <tr> <td> <OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="180" height="160" id="movie1" > <PARAM name="scale" value="tofit"> <EMBED width="800" height="600" src="My.mov" name="movie1" autoplay="false" enablejavascript="true" controller="false"> </EMBED> </OBJECT> </td> </tr> </table> <input type="text" id="txt" /> <script type="text/javascript"> await_9(); </script> </body> </html>