Ninjadoodle Posted May 21, 2018 Share Posted May 21, 2018 Hi @enpu I'm having a bit of a problem getting the essentials plugin's 'flash', working here. It works correctly in every other case, but here I have the sprite alpha set to 0 and only set it to 1 just before doing the 'flash' - and it doesn't work. If I have the alpha set to 0.5 and set it to 1 just before the 'flash', then the flash still happens. game.createClass('S07PuzzleTile', { init: function(image, x, y, id) { this.id = id; this.sprite = new game.Sprite(image); this.sprite.position.set(x, y); this.sprite.anchorCenter(); this.sprite.alpha = 0; this.sprite.interactive = true; this.sprite.addTo(game.scene.mg); this.sprite.mousedown = this.mousedown.bind(this); }, mousedown: function() { if (!game.scene.solved) { game.audio.playSound('click.wav'); if (game.scene.progress === 0) { if (this.id === 1) { this.sprite.alpha = 1; this.sprite.interactive = false; this.sprite.flash(250, '#ffffff'); game.scene.progress ++; Thanks in advance for any feedback Quote Link to comment Share on other sites More sharing options...
enpu Posted May 21, 2018 Share Posted May 21, 2018 @Ninjadoodle Good catch! This was actually a bug in the engine, should be now fixed, just update to latest dev version. Thanks! Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted May 21, 2018 Author Share Posted May 21, 2018 @enpu - Nice! Thanks 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.