HotZat
10-30-2006, 08:52 PM
Hi webdevelopers
I have a page that chooses a video from a list using a button onclick event, writes the avi into object and embed quicktime as a string, and reloads it into a DIV element in the body.
The Problem is that after the avi is completely loaded, if I select the same video again, there is no image, only sound. In other words, as long as it says, "downloading WHATEVER.avi" in the status bar, it plays.
I have tried it on 3 machines to the same effect. All machines used IE6.
This is in the HEAD:
<script>
var video = new Array();
video[0]="powerslave.jpg";
video[1]="AJ1.avi";
video[2]="AJ2.avi";
video[3]="AJ3.avi";
var Title = new Array();
Title[0]="Iron Maiden's Power Slave.";
Title[1]="Aggie n Jason 1";
Title[2]="Aggie n Jason 2";
Title[3]="Aggie n Jason 3";
function changeDiv(aaa)
{
StrBOXX='<p>This is ' + Title[aaa] + '.</p>'
StrBOXX+='<form>'
if (aaa==0)
{StrBOXX+='<p><img src="' + video[aaa] + '" border="2"></p>'}
else
{StrBOXX+='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="255" width="320" id="OCplayer" align="left"></p>'
StrBOXX+=' <param name="autoplay" value="true"></p>'
StrBOXX+=' <param name="controller" value="true"></p>'
StrBOXX+=' <param name="src" value="' + video[aaa] + '"></p>'
StrBOXX+=' <embed id="OCplayer" src="' + video[aaa] + '" height="255" width="320" align="left" autoplay="true" controller="true"></embed></p>'
StrBOXX+='</object></p>'}
StrBOXX+='</form>'
document.getElementById('BOXX').innerHTML=StrBOXX
}
</script>
This is in the Body:
<p>Choices:<br>
<input value="Stop" type="button" onclick="changeDiv(0)">
<input value="AJ1" type="button" onclick="changeDiv(1)">
<input value="AJ2" type="button" onclick="changeDiv(2)">
<input value="AJ3" type="button" onclick="changeDiv(3)">
</p>
<div id="BOXX">
<p>Choose.</p>
<form>
<p><img src="powerslave.jpg" border="2"></p>
</form>
</div>
I have a page that chooses a video from a list using a button onclick event, writes the avi into object and embed quicktime as a string, and reloads it into a DIV element in the body.
The Problem is that after the avi is completely loaded, if I select the same video again, there is no image, only sound. In other words, as long as it says, "downloading WHATEVER.avi" in the status bar, it plays.
I have tried it on 3 machines to the same effect. All machines used IE6.
This is in the HEAD:
<script>
var video = new Array();
video[0]="powerslave.jpg";
video[1]="AJ1.avi";
video[2]="AJ2.avi";
video[3]="AJ3.avi";
var Title = new Array();
Title[0]="Iron Maiden's Power Slave.";
Title[1]="Aggie n Jason 1";
Title[2]="Aggie n Jason 2";
Title[3]="Aggie n Jason 3";
function changeDiv(aaa)
{
StrBOXX='<p>This is ' + Title[aaa] + '.</p>'
StrBOXX+='<form>'
if (aaa==0)
{StrBOXX+='<p><img src="' + video[aaa] + '" border="2"></p>'}
else
{StrBOXX+='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="255" width="320" id="OCplayer" align="left"></p>'
StrBOXX+=' <param name="autoplay" value="true"></p>'
StrBOXX+=' <param name="controller" value="true"></p>'
StrBOXX+=' <param name="src" value="' + video[aaa] + '"></p>'
StrBOXX+=' <embed id="OCplayer" src="' + video[aaa] + '" height="255" width="320" align="left" autoplay="true" controller="true"></embed></p>'
StrBOXX+='</object></p>'}
StrBOXX+='</form>'
document.getElementById('BOXX').innerHTML=StrBOXX
}
</script>
This is in the Body:
<p>Choices:<br>
<input value="Stop" type="button" onclick="changeDiv(0)">
<input value="AJ1" type="button" onclick="changeDiv(1)">
<input value="AJ2" type="button" onclick="changeDiv(2)">
<input value="AJ3" type="button" onclick="changeDiv(3)">
</p>
<div id="BOXX">
<p>Choose.</p>
<form>
<p><img src="powerslave.jpg" border="2"></p>
</form>
</div>