JavaScript DHTML/HTML/Object
Содержание
"classid" Example
<html>
<body>
<script>
function activate() {
document.all.myObject.classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
}
</script>
<object id="myObject"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="250"
height="230">
<param name=movie value="yourflashmovie.swf">
<param name=quality value=high>
</object>
<br>
<button onclick="activate();">Activate</button>
</body>
</html>
"codeBase" Example
<html>
<head>
<script language="JavaScript">
function activate() {
document.all.myObject.codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0";
}
</script>
</head>
<body>
<object id="myObject" width="250" height="230">
<param name="movie" value="Puzzle.swf">
<param name="quality" value="high">
<embed src="yourshockwavemovie.swf"
quality=highpluginspage=http://www.macromedia.ru/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlashtype="application/x-shockwave-flash"
width="250"
height="230">
</embed>
</object>
</body>
</html>
Object Block Formats "Count"
<html>
<body>
<object id="myDhelper"
classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b">
</object>
<button onclick="alert(myDhelper.blockFormats.Count);">
Number of Block Formats
</button>
</body>
</html>
Object code Type
<html>
<head>
<script language="javascript">
function function1() {
var m = document.getElementById("myObject").codeType;
alert("The value of codeType property is:\n"+m);
}
</script>
</head>
<body>
<object codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="250" height="230" >
<param name="movie" value="yourshockwavefile.swf">
<param name="quality" value="high">
<embed id="myObject"
src="yourshockwavefile.swf"
quality="high"
pluginspage="http://www.macromedia.ru/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
width="250"
height="230"
codeType="application/x-shockwave-flash">
</embed>
</object>
</p>
<input type="button" value="Click here" onClick="function1();">
</body>
</html>
Object data
<html>
<body>
<script>
function function1() {
document.all.myObject.data ="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="250" height="230"";
}
</script>
<object id="myObject"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="yourshockwavemovie.swf">
<param name="quality" value="high">
</object>
</body>
</html>
Object declare
<html>
<body>
<script>
function function1() {
document.all.myObject.declare = true;
}
</script>
<object id="myObject"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="250"
height="230">
<param name="movie" value="yourflash.swf">
<param name="quality" value="high">
</object>
</body>
</html>
Object Parameter type
<html>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="243"
height="194">
<param id="myP1" name="movie" valuetype="ref">
<param id="myP2" name="quality">
<script language="JavaScript">
document.getElementById("myP1").type = "video/*";
</script>
<embed id="myE"
src="yourFlashMovie.swf"
quality="high" pluginspage="http://www.macromedia.ru/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash"
width="243"
height="194">
</embed>
</object>
</body>
</html>
Object Parameter value
<html>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="243"
height="194">
<param id="myP1" name="movie" value="yourfile.swf" valuetype="ref" type="video/*">
<param id="myP2" value="high" name="quality">
<script language="JavaScript">
document.getElementById("myP1").valueType = "ref";
</script>
</object>
</body>
</html>
Object Parameter value Type
<html>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="243"
height="194">
<param id="myP1" name="movie" value="yourfile.swf" valuetype="ref" type="video/*">
<param id="myP2" value="high" name="quality">
<script language="JavaScript">
document.getElementById("myP1").valueType = "ref";
</script>
</object>
</body>
</html>
Object "plugins page"
<html>
<body>
<script language="JavaScript">
var m = document.all.myE.pluginspage;
alert(m);
</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="243"
height="194">
<param name="movie" value="yourfile.swf">
<param name="quality" value="high">
<embed id="myE"
src="yourfile.swf"
quality="high"
type="application/x-shockwave-flash"
width="243"
height="194">
</embed>
</object>
Object"s object
<html>
<body>
<object id="myObject"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="250"
height="230">
<param name="movie" value="yourfile.swf">
<param name="quality" value="high">
</object>
<script language="JavaScript">
function function1() {
var m = document.getElementById("myObject").object;
alert(m);
}
</script>
<input type="Button" id="myB" value="Get "myObject" object property value" onClick="function1();">
</body>
</html>
Object "standBy" Example
<html>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.ru/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="250"
height="230"
id="myObject">
<param name="movie" value="yourfile.swf">
<param name="quality" value="high">
</object>
<script language="JavaScript">
document.all.myObject.standby = "You can play this puzzle";
alert(document.all.myObject.standby);
</script>
</body>
</html>