Slide layer to a position
http://dynapi.sourceforge.net/
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
<html>
<head>
<title>DynAPI Examples - DynLayer [Slide]</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api');
</script>
<script language="Javascript">
block = new DynLayer();
block.setSize(20,20);
block.setLocation(100,100);
block.setBgColor("red");
var listener = {};
listener.onpathstart = function(e) {
status = "start";
}
listener.onpathrun = function(e) {
var o = e.getSource();
status = "play "+o.x+" "+o.y;
}
listener.onpathstop = function(e) {
var o = e.getSource();
status = "stop "+o.x+" "+o.y;;
}
block.addEventListener(listener);
dynapi.document.addChild(block);
//-->
</script>
</head>
<body bgcolor="#999999">
<script>
dynapi.document.insertAllChildren();
</script>
<p>SlideTo:
<br>(<a href="javascript:block.slideTo(100,100)">100,100</a>)
<br>(<a href="javascript:block.slideTo(200,100)">200,100</a>)
<br>(<a href="javascript:block.slideTo(200,200)">200,200</a>)
<br>(<a href="javascript:block.slideTo(100,200)">100,200</a>)
<br>(<a href="javascript:block.slideTo(400,50)">400,50</a>)
<br>(<a href="javascript:block.slideTo(50,400)">50,400</a>)
</body>
</html>
dynapi.zip( 791 k)Related examples in the same category