Timb2525 Posted November 1, 2016 Share Posted November 1, 2016 I need to be able to click a sprite and it falls and a new sprite pops up. Not just show if possible. I've tried lost of things. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
Cold_Meson_06 Posted November 2, 2016 Share Posted November 2, 2016 Like this? var texture1 = PIXI.Texture.fromImage(/*texture url*/) var texture2 = PIXI.Texture.fromImage(/*texture url*/) var button = new PIXI.Sprite(texture1); button.buttonMode = true; button.interactive = true; button.on('click', onClick) function onClick(){ this.texture = texture2 } The content in http://pixijs.github.io/examples/#/demos/interactivity.js can help. 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.