我让我的代码像这样
<script src="http://code.createjs.com/easeljs-0.6.0.min.js"></script>
<script src="http://code.createjs.com/preloadjs-0.3.0.min.js"></script>
<script type="text/javascript" src="src/easeljs/utils/UID.js"></script>
<script type="text/javascript" src="src/easeljs/geom/Matrix2D.js"></script>
<script type="text/javascript" src="src/easeljs/display/DisplayObject.js"></script>
<script type="text/javascript" src="src/easeljs/display/Container.js"></script>
<script type="text/javascript" src="src/easeljs/display/Stage.js"></script>
<script type="text/javascript" src="src/easeljs/events/MouseEvent.js"></script>
<script type="text/javascript" src="src/easeljs/display/Shape.js"></script>
<script type="text/javascript" src="src/easeljs/display/Graphics.js"></script>
<script type="text/javascript" src="src/easeljs/utils/Ticker.js"></script>
<script type="text/javascript" src="src/easeljs/display/SpriteSheet.js"></script>
<script type="text/javascript" src="src/easeljs/display/BitmapAnimation.js"></script>
<script type="text/javascript" src="src/easeljs/geom/Rectangle.js"></script>
<script>
var canvas;var stage;var rect;var bottle;
function init() {
canvas = new createjs.Stage("democanvas");
sheet = {"frames": [[120, 0, 60, 200, 0, -20, 0], [180, 0, 60, 200, 0, -20, 0], [240, 0, 58, 200, 0, -21, 0], [62, 0, 58, 200, 0, -21, 0], [0, 0, 62, 200, 0, -19, 0]], "images": ["swf/bottle.png"], "animations": {"sosro": {"frames": [1]}, "nu": {"frames": [2]}, "joy": {"frames": [0]}, "tra": {"frames": [4]}, "mizone": {"frames": [3]}}};
var ss = new createjs.SpriteSheet(sheet);
bottle = new createjs.BitmapAnimation(ss);
canvas.addChild(bottle);
bottle.x = 100;
bottle.y = 100;
createjs.Ticker.addEventListener('tick', canvas);
}
</script>
<canvas id="democanvas" width="500" height="200" style="border:1px solid #000000; background-color:#999;" >
alternate content
</canvas>
<script>
init();
</script>
但不知何故,我的动画不会显示。我使用 Zoe 制作 png javascript 动画。我的脚本中是否缺少某些内容?