home *** CD-ROM | disk | FTP | other *** search
- package controller
- {
- import flash.events.Event;
- import flash.events.EventDispatcher;
-
- public class LoadingController extends EventDispatcher
- {
- private static var allowInstantiation:Boolean;
-
- private static var _help:String;
-
- private static var _exercise:String;
-
- public static var PROGRESS:String = "progress";
-
- private static var _loaded:Number = 0;
-
- private static var _total:Number = 0;
-
- private static var instance:LoadingController = null;
-
- public function LoadingController()
- {
- super();
- if(!allowInstantiation)
- {
- throw new Error("Error: Instantiation failed: Use SingletonDemo.getInstance() instead of new.");
- }
- }
-
- public static function getInstance() : LoadingController
- {
- if(instance == null)
- {
- allowInstantiation = true;
- instance = new LoadingController();
- allowInstantiation = false;
- }
- return instance;
- }
-
- public function set loaded(param1:Number) : void
- {
- _loaded = param1;
- dispatchEvent(new Event(PROGRESS));
- }
-
- public function get loaded() : Number
- {
- return _loaded;
- }
-
- public function set total(param1:Number) : void
- {
- _total = param1;
- }
-
- public function get total() : Number
- {
- return _total;
- }
-
- public function set exercise(param1:String) : void
- {
- _exercise = param1;
- }
-
- public function get exercise() : String
- {
- return _exercise;
- }
-
- public function set help(param1:String) : void
- {
- _help = param1;
- }
-
- public function get help() : String
- {
- return _help;
- }
- }
- }
-
-