Ignore:
Timestamp:
03/04/09 17:07:01 (4 years ago)
Author:
jeroen
Message:

completed first version of testing page, made all plugins backward compatible and fixed outstanding 4.4 bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/as3/com/jeroenwijering/plugins/ClickProxy.as

    r161 r170  
    3636 
    3737        /** Start the search. **/ 
    38         private function clickHandler(evt:MouseEvent=null) { 
     38        private function clickHandler(evt:MouseEvent) { 
    3939                var obj:Object = { 
    4040                        'client':view.config['client'], 
     
    4646                        'state':view.config['state'] 
    4747                }; 
    48                 if(ExternalInterface.available && view.clip.loaderInfo.url.indexOf('http') == 0) { 
    49                         try { 
    50                                 ExternalInterface.call(config['listener'],obj); 
    51                         } catch (err:Error) {} 
     48                if(ExternalInterface.available) { 
     49                        ExternalInterface.call(config['listener'],obj); 
    5250                } 
    5351        }; 
     
    5755        public function initializePlugin(vie:AbstractView):void { 
    5856                view = vie; 
    59                 view.config['icons'] = false; 
    6057                view.addControllerListener(ControllerEvent.RESIZE,resizeHandler); 
    6158                view.addModelListener(ModelEvent.TIME,timeHandler); 
    6259                rectangle = new MovieClip(); 
    63                 rectangle.graphics.beginFill(0x000000,0); 
    64                 rectangle.graphics.drawRect(0,0,100,100); 
    6560                clip.addChild(rectangle); 
    6661                rectangle.addEventListener(MouseEvent.CLICK,clickHandler); 
     
    6863                rectangle.mouseChildren = false; 
    6964                resizeHandler(); 
     65                if(view.config['clickproxy.listener']) { 
     66                        config['listener'] = view.config['clickproxy.listener']; 
     67                } 
    7068        }; 
    7169 
     
    7371        /** Resize the area. **/ 
    7472        private function resizeHandler(evt:ControllerEvent=null) { 
    75                 rectangle.width = view.config['width']; 
    76                 rectangle.height = view.config['height']; 
     73                rectangle.graphics.beginFill(0x000000,0); 
     74                rectangle.graphics.drawRect(0,0,view.config['width'],view.config['height']); 
    7775        }; 
    7876 
Note: See TracChangeset for help on using the changeset viewer.