I have a health bar, when I enter the frame, it gets a little less and is not complete I How do I fix it? "Must be" represents what I want to see. "What it currently does" represents my problem.
should be:
What's currently: You can manually set On the results of the two tests, how can you narrow down the issue of how
Package {import flash.display.MovieClip; Import flash.display.Sprite; Import flash.events.Event; Import flash.events.TimerEvent; Import Flash.events.KeyboardEvent; Import Flash. Import Flash. Text. Fonts; Import flash.events.MouseEvent; Import Flash. Text. TextDisplayModa; Import flash.text.TextExtent; Import Flash. Text. Textfield; Import Flash. Text. Text format; Import fl.motion.easing.back; Import Flash.Display.DisplayObject; Import flash.geom.Point; Import Flash.ui.Mouse; Import flash.events.TimerEvent; Public class HealthBar movieclip {public WEHHP: Int = 670; Public var currentHP: int = maxHP; Public var% hp: number = currenthp / maxhp; Public Health () () {updateHealthBar (); } Public work updateHealthBar () {percentHP = currentHP / maxHP; ScaleX = percentHP; If you have a print statement which output to
percentHP then
scaleX to 1 and see if there is still a non-loaded bar yield.
scaleX is being used, or how
percentHP updates
Comments
Post a Comment