You see, you can set the hp to nearly infinite, but if you don't specify the maximum hp, there's no real way to make sure it doesn't go beyond 100. After all, flash does know how much hp you have, but doesn't know what percentage that is of the total health. In the example above, your health bar will start at 50%, which equals 50 pixels wide.