Jump to content

Creating a Progress bar using sprite.scale


shvalb
 Share

Recommended Posts

Hi guys,

I'm trying to create a progress bar.
I have 2 images:
1. Black frame
2. The bar itself which is a linear horizontal gradient (or something close to that).

Because I'm trying to keep the gradient effect I'm not using a mask but a scaling the bar itself from zero to 1.

Here is how it looks:
https://demo-project-shvalb.c9users.io/Phaser.io/index.html

If you pay close attention to the first 5 seconds at the left of the scrollbar you see that it starts outside of the frame and fixes itself afterwards.

I'm trying to fix this problem by using a BitmapData.alphaMask, just cutting a mask from the bg image. but it doesn't work.

If someone has an idea, please share...

Thanks!

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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