Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the graphic variable in an Entity is of the Graphic class, that all graphics extend.
- // however, it lacks much of the functionality that other graphic classes have. So, you
- // must create a variable and access it through that. For example:
- public var sprite:Image = new Image(GAMEDROP);
- public function MyEntity()
- {
- graphic = sprite;
- sprite.color = 0xffffff;
- }
- // now access your graphic through the sprite variable, which IS an image.
Add Comment
Please, Sign In to add comment