Jump to content

Alpha Tween not working as expected


Recommended Posts


I am currently having an issue where my alpha tween on my game isn't working as I expected. I set the tween to happen over 5 seconds however it seems to only take a fraction of the time and ignores the time. Here is my code:

var box = this.game.add.graphics(0,0);
box.alpha = 0.1;

box.moveTo(0, 0);

box.drawRect(borderSide, borderTop, (this.game.world.width - borderSide * 2), this.game.world.height);

var fadeTween = this.game.add.tween(box).to({ alpha: 1 }, 5000, "Linear", true);
fadeTween.onComplete.add(this._end_game, this);

You can see my video attached below for an example of this in action.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...