Monkey4aday Posted January 20, 2016 Share Posted January 20, 2016 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 More sharing options...
Fenopiù Posted February 22, 2018 Share Posted February 22, 2018 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 More sharing options...
head Posted February 26, 2018 Share Posted February 26, 2018 you don't change graphics properties on the fly you redraw it graphics.clear() .beginFill(...) .drawRect(...) .endFill() Link to comment Share on other sites More sharing options...
Recommended Posts