Jump to content

drawRoundedRect width immutable


Monkey4aday
 Share

Recommended Posts

Hi,

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,

Monkey4aday

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.beginFill(color);
RoundedRect.drawRoundedRect(10, 0, 1, 12, 6);
RoundedRect.endFill();

RoundedRect.beginFill(color);
RoundedRect.width = sender.x;
RoundedRect.endFill;

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

 Share

  • Recently Browsing   0 members

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