This could be a difficult one.
Howcome the following embedded WMV
loads, but does not play?
Tristan Laurillard
harlekeyn@gmx.net
=========================================
Howcome the following embedded WMV
loads, but does not play?
Tristan Laurillard
harlekeyn@gmx.net
=========================================
Code:
<html>
<head>
<SCRIPT language="Javascript">
// This function (monitor) is what I use all the time
// to create and change layers. Very handy, use it on
// every site in my file "monitor.js"
///////////////// start what is normally stored in "monitor.js" /////////////////
// monitor.js version 2001.12.16
//
// description:
// creates a dynamic layer for both MSIE and NN
// and includes a few more handy functions:
//
// ===================================
// > > > > > EXAMPLE < < < < < < <
//
// in body: monitor("mymonitor",25,200,150,150);
// if you want the layer to be placed relative to the HTML-
BODY
// or
// in body: monitor("mymonitor",25,200,150,150,'glued');
// if you want the layer to be placed relative to the WINDOW
//
// ---to change its contents---
// changemymonitor("hello");
//
// ---to move the layer--
// movemymonitor(40,40);
//
// ---to place the layer to a certain
point---
// placemymonitor(125,350);
//
// ---to load next.html in the layer--
- [currently only MSIE]
// loadpageinmymonitor
("next.html","scrolling=yes"); or
// loadpageinmymonitor
("next.html","scrolling=no"); or
// loadpageinmymonitor
("next.html","scrolling=auto");
//
// ===================================
//
// this javascript is to be improved
// to receive a new version when updated, or
// to suggest changes, mail to harlekeyn@gmx.net
//
// Tristan Laurillard
// [URL unfurl="true"]www.laurillard.8m.com[/URL]
function monitor(name,left,top,width,height,layerglue)
{
var centerwidth = 800;
var centerheight = 600;
if (document.all)
{
centerwidth = ((document.body.clientWidth)/2);
centerheight = ((document.body.clientHeight)/2);
}
if (document.layers)
{
centerwidth = ((window.innerWidth)/2);
centerheight = ((window.innerHeight)/2);
}
if ((left == 'center')) left=centerwidth;
if ((top == 'center')) top=centerheight;
document.write("<style>#" + name + "2 \{POSITION:absolute;
VISIBILITY:visible; TOP:" + top + "px; LEFT:" + left + "px;
Z-INDEX:2; WIDTH:" + width + "; HEIGHT:" + height + "\}
<\/style>");
document.write("<DIV ID='" + name + "2'><table border=0
cellpadding=0 cellspacing=0><tr><td height=" + height + "
width=" + width + " ID='cel" + name
+ "'></td></tr></table></DIV>");
document.write("<LAYER ID='" + name + "' top=" + top + "
left=" + left + " width=" + width + " height=" + height
+ "></layer>");
document.write("<script language=\"Javascript\">");
document.write("function change" + name + "(text){if
(document.layers) { document." + name + ".document.write
(text); document." + name + ".document.close();} else if
(document.all) {cel" + name + ".innerHTML=text;}}");
document.write("function move" + name + "(x,y) {if
(document.all) {" + name + "2.style.pixelLeft += x; " +
name + "2.style.pixelTop += y; } else if
(document.layers) { document.layers." + name + ".left =
((document.layers." + name + ".left) + (x)) ;
document.layers." + name + ".top = ((document.layers." +
name + ".top) + (y)) ; }}");
if (layerglue == "glued")
document.write("function place" + name + "(x,y) {if
(document.all) {" + name + "2.style.left = (x +
document.body.scrollLeft); " + name + "2.style.top = (y +
document.body.scrollTop); } else if (document.layers) {
document.layers." + name + ".left = x ; document.layers." +
name + ".top = y ; }}")
else
document.write("function place" + name + "(x,y) {if
(document.all) {" + name + "2.style.pixelLeft = x; " + name
+ "2.style.pixelTop = y; } else if (document.layers) {
document.layers." + name + ".left = x ; document.layers." +
name + ".top = y ; }}");
if (document.all)
document.write("function loadpagein" + name
+ "(url,scrolloption) {change" + name + "('<iframe ' +
scrolloption + ' frameborder=0 height=100% width=100% src='
+ url + '></iframe>');}");
if (document.layers)
document.write("function loadpagein" + name
+ "(url,scrolloption) {change" + name
+ "('<center>+++<br>Script doesn\\'t work in
Netscape.<br>This<a href=' + url + '> page</a> won\\'t load
inside this layer.<br>+++</center>');}");
document.write("var " + name + "status = 'loaded';");
document.write("<\/script>");
}
///////////////// end what is normally stored
in "monitor.js" /////////////////
var testcontents =
'<table width=150><tr><td bgcolor=#AAAAAA>Hello, this is a
layer</td></tr></table>' ;
var introductie_video =
"<OBJECT ID=itmeintro WIDTH=436 HEIGHT=320
CLASSID='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'
CODEBASE='[URL unfurl="true"]http://www.microsoft.com/ntserver/netshow/download[/URL]
/en/nsmp2inf.cab#Version=5,1,51,415' standby='Loading
Microsoft Media Player components...' type='application/x-
oleobject'>\n" +
"<PARAM NAME=AutoStart VALUE=true>\n" +
"<PARAM NAME=FileName VALUE='[URL unfurl="true"]http://www.itme.nl/www.itme.nl/flash/itme-[/URL]
intro.wmv'>\n" +
"<PARAM NAME=ControlType VALUE=1>\n" +
"<param name='showcontrols' value='1'>\n" +
"<EMBED Type=video/x-ms-asf-plugin
pluginspage='[URL unfurl="true"]http://www.microsoft.com/windows/mediaplayer/do[/URL]
wnload/default.asp' src='0' name='nsplay' AutoStart=1
ShowControls=1 width=436 height=320>\n" +
"</embed>\n" +
"</OBJECT>\n" ;
</SCRIPT>
</head>
<body>
<SCRIPT language="Javascript">
monitor('mp',100,100,1,1);
</SCRIPT>
<a href="Javascript:changemp(testcontents)">test 1</a><br>
<a href="Javascript:changemp(introductie_video)">test 2</a><br>
</body>
</html>