来源:flash,as,js兴趣爱好者flash龙的特效完成版 跟随鼠标动,用canvas动画写的。很辛苦啊。
由于代码是做完动画自动生成的,所以贴出代码为了显得内容丰富点。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>html5龙</title>
<script src="http://code.createjs.com/easeljs-0.7.0.min.js"></script>
<script src="http://code.createjs.com/tweenjs-0.5.0.min.js"></script>
<script src="http://code.createjs.com/movieclip-0.7.0.min.js"></script>
<script src="html5龙.js"></script>
<script>
var canvas, stage, exportRoot;
function init() {
canvas = document.getElementById("canvas");
exportRoot = new lib.html5龙();
stage = new createjs.Stage(canvas);
stage.addChild(exportRoot);
stage.update();
createjs.Ticker.setFPS(lib.properties.fps);
createjs.Ticker.addEventListener("tick", stage);
}
</script>
</head>
<body onload="init();" style="background-color:#D4D4D4">
<canvas id="canvas" width="1000" height="800" style="background-color:#000000"></canvas>
</body>
</html>