Ninjadoodle Posted July 23, 2014 Share Posted July 23, 2014 Hi guys Normally I would setup my movie clip like this ... Mouse = game.Class.extend({ init: function(x, y) { this.sprite = new game.MovieClip([ game.Texture.fromImage('mouse1.png'), game.Texture.fromImage('mouse2.png'), game.Texture.fromImage('mouse3.png') ]); this.sprite.anchor.set(0.5, 0.5); this.sprite.position.x = x; this.sprite.position.y = y; layerMg.addChild(this.sprite); }}) Is there any way to add more animation sequences? For example, jump, walk? Thank you in advance! Quote Link to comment Share on other sites More sharing options...
enpu Posted July 24, 2014 Share Posted July 24, 2014 You can do it like this:this.runAnim = [ game.Texture.fromFrame('run01.png'), game.Texture.fromFrame('run02.png'), game.Texture.fromFrame('run03.png')];this.jumpAnim = [ game.Texture.fromFrame('jump01.png'), game.Texture.fromFrame('jump02.png'), game.Texture.fromFrame('jump03.png')];this.sprite = new game.Animation(this.runAnim);// Change animthis.sprite.textures = this.jumpAnim; Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted July 24, 2014 Author Share Posted July 24, 2014 Awesome! Thank you heaps Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.