topical media & game development
professional-javascript-18-FlashExample2.htm / htm
<html>
<head>
<title>Flash Example</title>
<script type="text/javascript" src="listutil.js"></script>
<script type="text/javascript">
var aProperties = new Array("X_POS", "Y_POS",
"X_SCALE", "Y_SCALE", "CURRENT_FRAME",
"TOTAL_FRAMES", "ALPHA", "VISIBLE", "WIDTH",
"HEIGHT", "ROTATION", "TARGET", "FRAMES_LOADED",
"NAME", "DROP_TARGET", "URL", "HIGH_QUALITY",
"FOCUS_RECT", "SOUND_BUF_TIME");
function getProperty() {
var oFlashMovie = document.getElementById("ExampleMovie");
var selProperties = document.getElementById("selProperties");
alert(aProperties[selProperties.selectedIndex] + " = " + oFlashMovie.TGetProperty("/", selProperties.selectedIndex));
}
window.onload = function () {
var selProperties = document.getElementById("selProperties");
for (var i=0; i < aProperties.length; i++) {
ListUtil.add(selProperties, aProperties[i]);
}
}
</script>
</head>
<body>
<object type="application/x-shockwave-flash" data="ExampleMovie.swf"
width="200" height="200" id="ExampleMovie">
<param name="movie" value="ExampleMovie.swf" />
</object>
<p><select id="selProperties">
</select><input type="button" value="Get Property Value" onclick="getProperty()" /></p>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.