Jump to content

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,


Link to comment
Share on other sites

  • 2 years later...

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.

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...