Hey all. Just started playing with flashpunk today and have two small questions about graphics. I discovered that both
addGraphic(new Image(PLAYER));
and
graphic = new Image(PLAYER);
work equally well when rendering an IMAGE in an entity.
Question 1: is there a reason someone might use one over the other in different circumstances?
Out of curiosity I went and checked out if this worked the same for adding TEXT.
addGraphic(new Text("some string"));
^this works BUT
graphic = new Text("some string");
pulls an undefined graphic property error. (even though graphics.Text was already required for the first one)
Question 2: why does it work for images but not text?