home *** CD-ROM | disk | FTP | other *** search
- package controller
- {
- import flash.events.EventDispatcher;
-
- public class VersionController extends EventDispatcher
- {
- private static var allowInstantiation:Boolean;
-
- private static var instance:VersionController = null;
-
- private static var _version:String = "";
-
- public function VersionController()
- {
- super();
- if(!allowInstantiation)
- {
- throw new Error("Error: Instantiation failed: Use VersionController.getInstance() instead of new.");
- }
- }
-
- public static function getInstance(param1:String) : VersionController
- {
- if(instance == null)
- {
- _version = param1;
- allowInstantiation = true;
- instance = new VersionController();
- allowInstantiation = false;
- }
- return instance;
- }
-
- public function get version() : String
- {
- return _version;
- }
-
- public function get path() : String
- {
- if(_version == "linux")
- {
- return "../";
- }
- return "";
- }
- }
- }
-
-