Guest User

Untitled

a guest
Sep 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // the graphic variable in an Entity is of the Graphic class, that all graphics extend.
  2. // however, it lacks much of the functionality that other graphic classes have. So, you
  3. // must create a variable and access it through that. For example:
  4.  
  5. public var sprite:Image = new Image(GAMEDROP);
  6.  
  7. public function MyEntity()
  8. {
  9.       graphic = sprite;
  10.       sprite.color = 0xffffff;
  11. }
  12.  
  13. // now access your graphic through the sprite variable, which IS an image.
Add Comment
Please, Sign In to add comment