Changeset 1571


Ignore:
Timestamp:
01/25/11 11:20:05 (2 years ago)
Author:
pablo
Message:

Plugin should change icon alpha on state change, not entire button's alpha (1211)

Location:
plugins/captions/v5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/captions/v5/src/com/longtailvideo/plugins/captions/Captions.as

    r1408 r1571  
    5555        /** Reference to the dock icon. **/ 
    5656        private var _icon:MovieClip; 
     57        /** Reference to the controlbar button icon **/ 
     58        private var _buttonIcon:DisplayObject; 
    5759        /** XML connect and parse object. **/ 
    5860        private var _loader:URLLoader; 
     
    139141                        _icon = _player.controls.dock.addButton(icn,'is on',clickHandler); 
    140142                } else { 
    141                         var btn:DisplayObject = _player.skin.getSkinElement("captions", "controlbarButton"); 
    142                         if (btn == null) { btn = new ControlbarButton; } 
    143                         _button = _player.controls.controlbar.addButton(btn,'captions',clickHandler); 
     143                        _buttonIcon = _player.skin.getSkinElement("captions", "controlbarButton"); 
     144                        if (_buttonIcon == null) { _buttonIcon = new ControlbarButton(); } 
     145                        _button = _player.controls.controlbar.addButton(_buttonIcon,'captions',clickHandler); 
    144146                } 
    145147                drawClip(); 
     
    256258                                _icon.field.text = "is on"; 
    257259                        } else { 
    258                                 _button.alpha = 1; 
     260                                _buttonIcon.alpha = 1; 
    259261                        } 
    260262                } else { 
     
    262264                                _icon.field.text = "is off"; 
    263265                        } else { 
    264                                 _button.alpha = 0.3; 
     266                                _buttonIcon.alpha = 0.3; 
    265267                        } 
    266268                } 
Note: See TracChangeset for help on using the changeset viewer.