Posted By

damarev on 03/04/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

iamgowan


global class


 / Published in: ActionScript 3
 

  1. package
  2. {
  3. dynamic public class Global
  4. {
  5. private static var _global:Global;
  6. public static function get global():Global
  7. {
  8. if(_global == null)
  9. {
  10. _global = new Global(new shield());
  11. }
  12. return _global;
  13. }
  14. // constructor can only be called inside
  15. public function Global(shield:shield) { }
  16. public function getInstance():Global
  17. {
  18. return global;
  19. }
  20. }
  21. }
  22. class shield {}

Report this snippet  

You need to login to post a comment.