You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
HTML
49 lines
1.1 KiB
HTML
5 years ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=10">
|
||
|
<title>Clippy</title>
|
||
|
<link rel="stylesheet" type="text/css" href="./clippy.js/build/clippy.css" media="all">
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Hello Clippy!</h1>
|
||
|
|
||
|
<script src="./jquery.1.7.min.js"></script>
|
||
|
<script src="./clippy.js/build/clippy.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
function getRandomInt(max) {
|
||
|
return Math.floor(Math.random() * Math.floor(max));
|
||
|
};
|
||
|
|
||
|
for (var i = 0; i < 30; i++) {
|
||
|
|
||
|
clippy.load('Clippy', function(agent){
|
||
|
|
||
|
|
||
|
//agent.play('Searching');
|
||
|
|
||
|
//agent.animate();
|
||
|
|
||
|
//agent.animations();
|
||
|
|
||
|
//agent.speak('When all else fails, bind some paper together. My name is Clippy.');
|
||
|
for (var i = 0; i < 50; i++) {
|
||
|
agent.show();
|
||
|
agent.moveTo(getRandomInt(screen.width-100),getRandomInt(screen.height-200));
|
||
|
agent.animate();
|
||
|
agent.speak('Wooooo');
|
||
|
};
|
||
|
//agent.gestureAt(200,200);
|
||
|
|
||
|
//agent.stopCurrent();
|
||
|
|
||
|
//agent.stop();
|
||
|
|
||
|
});
|
||
|
|
||
|
};
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|