0
http://spritely.net/というプラグインを使用して、Jqueryでアニメーション化されたスプライトを作成しています。Jqueryのアニメーションの最後のフレームで停止する
私はそれがマウスの上に開始し、スプライトの最後のフレーム '8'にマウスがオフになるまでそれが必要であることを除いて、正常に動作します。ここで
は、コードは次のとおりです。
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('#bird')
.sprite({
fps: 16,
no_of_frames: 8,
// the following are optional: new in version 0.6...
start_at_frame: 1,
on_first_frame: function(obj) {
if (window.console) {
console.log('first frame');
}
},
on_last_frame: function(obj) {
// you could stop the sprite here with, e.g.
// obj.spStop();
obj.spStop();
},
on_frame: {
8: function(obj) {
// you could change the 'state' of the
// sprite here with, e.g. obj.spState(2);
if (window.console) {
console.log('frame 8');
}
}
}
})
});
})(jQuery);
</script>
すべてのヘルプは素晴らしいことです。
ありがとうございました
は感謝しています。 – codef0rmer
私は今それを設定します。 –
私は別の方法で行っています。 http://jsfiddle.net/iamchristill/LeusR/33/各フレームのフェードを遅くする必要があります。 –