home *** CD-ROM | disk | FTP | other *** search
- package controller
- {
- import flash.events.Event;
- import flash.events.EventDispatcher;
-
- public class VideoPlayerController extends EventDispatcher
- {
- private static var allowInstantiation:Boolean;
-
- public static var STATUS:String = "status";
-
- public static var JPG:String = "jpg";
-
- public static var OUTRO:String = "outro";
-
- public static var EXERCISEPATH:String = "exercisepath";
-
- private static var _pause:Boolean = false;
-
- private static var instance:VideoPlayerController = null;
-
- private static var _packshot:String = "";
-
- private static var _outro:String = "";
-
- private static var _exercisePath:* = "";
-
- public static var INTROCOMPLETE:String = "introcomplete";
-
- public function VideoPlayerController()
- {
- super();
- if(!allowInstantiation)
- {
- throw new Error("Error: Instantiation failed: Use SingletonDemo.getInstance() instead of new.");
- }
- }
-
- public static function getInstance(param1:String) : VideoPlayerController
- {
- trace("VideoPlayerController.getinstance " + param1);
- if(instance == null)
- {
- allowInstantiation = true;
- instance = new VideoPlayerController();
- allowInstantiation = false;
- }
- return instance;
- }
-
- public function set pause(param1:Boolean) : void
- {
- trace("vpc pause " + param1);
- _pause = param1;
- dispatchEvent(new Event(STATUS));
- }
-
- public function get pause() : Boolean
- {
- trace("vpc get pause");
- return _pause;
- }
-
- public function set packshot(param1:String) : void
- {
- trace("set packshot " + param1);
- _packshot = param1;
- trace("DISPATCH NOW");
- dispatchEvent(new Event(JPG));
- }
-
- public function get packshot() : String
- {
- return _packshot;
- }
-
- public function set outro(param1:String) : void
- {
- trace("set packshot " + param1);
- _outro = param1;
- trace("DISPATCH NOW");
- dispatchEvent(new Event(OUTRO));
- }
-
- public function get outro() : String
- {
- return _outro;
- }
-
- public function set exercisePath(param1:String) : void
- {
- trace("set _exercisePath " + param1);
- _exercisePath = param1;
- dispatchEvent(new Event(EXERCISEPATH));
- }
-
- public function get exercisePath() : String
- {
- return _exercisePath;
- }
-
- public function onIntroComplete() : void
- {
- dispatchEvent(new Event(INTROCOMPLETE));
- }
- }
- }
-
-