Guest User

Untitled

a guest
Jun 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public enum ImageType
  2. {
  3. None = 0,
  4. Png = 1,
  5. Jpg = 2,
  6. Gif = 3
  7. }
  8.  
  9. public class ImageType
  10. {
  11. public function ImageType() {}
  12. [Inspectable(category="Generated values", eumeration="None,Png,Jpg,Gif", type="String")]
  13. public var _ImageType:String;public function toString():String
  14. {
  15. return _ImageType.toString();
  16. }
  17. }
  18.  
  19. var imgType:ImageType = ImageType.Png; //this does not actually work though
  20.  
  21. var imgType:ImageType = new ImageType();
  22. imgType._imageType = "Png";
Add Comment
Please, Sign In to add comment