drawRoundedRect width immutable

Recommended Posts


I'm trying to use a roundedRect as a healthbar for a game.

Every time an event happens (player hits enemy), the health bar must become shorter. The problem is, the rouded rect ignores my code to shrink and stays the same. I tried a lot of things but none of them helped.

Any ideas the change the properties of a rounded rect?


Thanks in advance,


Share this post

Link to post
Share on other sites

I've a similar problem.

My roundedRect width change... but it is not drawed.

RoundedRect.drawRoundedRect(10, 0, 1, 12, 6);

RoundedRect.width = sender.x;

RoundedRect.width became equals to sender.x but it is disappear from the screen without any reason.

Console.log give me the right values of x, y, width and height.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.