topical media & game development
mobile-query-game-tests-human-Animation-type-test1.htm / htm
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="../../../../jquery.gamequery.js"></script>
<script>
$(function(){
var simpleVerticalAnimation = new .gameQuery.ANIMATION_VERTICAL, numberOfFrame: 4, delta: 32, rate: 300});
var simpleHorizontalAnimation = new .gameQuery.ANIMATION_HORIZONTAL, numberOfFrame: 4, delta: 32, rate: 300});
var multiVerticalAnimation = new .gameQuery.ANIMATION_VERTICAL | .gameQuery.Animation({imageURL: "mh.png", type: .gameQuery.ANIMATION_MULTI, numberOfFrame: 4, delta: 32, rate: 300, distance: 32});
var simpleOffsetVerticalAnimation = new .gameQuery.ANIMATION_VERTICAL, offsetx: 100, offsety: 100, numberOfFrame: 4, delta: 32, rate: 300});
var simpleOffsetHorizontalAnimation = new .gameQuery.ANIMATION_HORIZONTAL, offsetx: 100, offsety: 100, numberOfFrame: 4, delta: 32, rate: 300});
var multiOffsetVerticalAnimation = new .gameQuery.ANIMATION_VERTICAL | .gameQuery.Animation({imageURL: "moh.png", type: .gameQuery.ANIMATION_MULTI, offsetx: 100, offsety: 100, numberOfFrame: 4, delta: 32, rate: 300, distance: 32});
var pingpongAnimation = new .gameQuery.ANIMATION_HORIZONTAL | .gameQuery.Animation({imageURL: "reboundm.png", type: .gameQuery.ANIMATION_PINGPONG | .gameQuery.Animation({imageURL: "sv.png", type: .gameQuery.ANIMATION_ONCE | .playground()
.addSprite("simpleVertical",{animation: simpleVerticalAnimation, posx: 0})
.addSprite("simpleHorizontal",{animation: simpleHorizontalAnimation, posx: 34})
.addSprite("multiVertical",{animation: multiVerticalAnimation, posx: 75})
.addSprite("multiHorizontal",{animation: multiHorizontalAnimation, posx: 109})
.addSprite("simpleOffsetVertical",{animation: simpleOffsetVerticalAnimation, posx: 150})
.addSprite("simpleOffsetHorizontal",{animation: simpleOffsetHorizontalAnimation, posx: 184})
.addSprite("multiOffsetVertical",{animation: multiOffsetVerticalAnimation, posx: 225})
.addSprite("multiOffsetHorizontal",{animation: multiOffsetHorizontalAnimation, posx: 259})
.addSprite("pingpong",{animation: pingpongAnimation, posx: 286, width: 64, height: 64})
.addSprite("multiPingpong",{animation: multiPingpongAnimation, posx: 350, width: 64, height: 64})
.addSprite("callback",{animation: callbackAnim, posx: 414, callback: function(){
counter++;
if(counter > 1){
$("#callback").remove();
}
}});
$("#multiVertical").setAnimation(1);
$("#multiHorizontal").setAnimation(1);
$("#multiOffsetVertical").setAnimation(1);
$("#multiOffsetHorizontal").setAnimation(1);
$("#multiPingpong").setAnimation(1);
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.