Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.conceptualideas.videoplayer.modules.interfaces {
  2.     import com.conceptualideas.videoplayer.core.hooks.Hooks;
  3.     import com.conceptualideas.videoplayer.events.BaseComponent;
  4.    
  5.     import com.conceptualideas.videoplayer.events.AbstractView;
  6.     import com.conceptualideas.videoplayer.events.HookingEvents;
  7.     import com.conceptualideas.videoplayer.interfaces.ISystemHook;
  8.    
  9.    
  10.    
  11.     import com.conceptualideas.videoplayer.utils.Reflection;
  12.     import flash.utils.Dictionary;
  13.    
  14.     /**
  15.      * ...
  16.      * @author Conceptual Ideas
  17.      */
  18.     public class Hooker extends BaseComponent{
  19.        
  20.         private var _hooks:Dictionary = new Dictionary();
  21.        
  22.         public function Hooker() {
  23.             this.
  24.         }
  25.        
  26.        
  27.        
  28.         override public function initalize(view:AbstractView):void {
  29.             super.initalize(view);
  30.              Hooks.init(Reflection.getClassConst(HookingEvents,true));
  31.            
  32.         }
  33.         public function getName():String {
  34.             return "hooker";
  35.         }
  36.         public function run(type:String, callback:Function, scope:Object = null):void {
  37.             Hooks.run(type, callback, scope);
  38.         }
  39.         public function hook(type:String, name:String, func:Function, scope:Object = null, sync:Boolean = true):ISystemHook {
  40.             return Hooks.hook(type,name,func,scope,sync)
  41.         }
  42.         public function unhook(type:String, func:Function = null, removeAll:Boolean = false):Boolean {
  43.             return Hooks.unhook(type, func, removeAll);
  44.         }
  45.        
  46.        
  47.        
  48.        
  49.     }
  50.    
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement