Graphics Reference
In-Depth Information
_bbParent.removeChild(this);
}
}
public function deactivate():void{
if(hasEventListener(MouseEvent.CLICK)){
buttonMode = false;
removeEventListener(MouseEvent.CLICK,clickOut);
}
}
private function clickOut(e:MouseEvent):void {
if(_playerType== activex ||
_playerType== plugin ){
_extInterfaceAvailable =
ExternalInterface.available;
}
if (_extInterfaceAvailable) {
ExternalInterface.call( ' window.open ' ,_destination,_target
Window);
}else{
navigateToURL(new
URLRequest(_destination),_targetWindow);
}
}
}
}
This BorderButton class is covered in detail in Chapter 12, but I
thought it was worth a quick look here as well. Table 3.1 outlines
the BorderButton
'
s draw method parameters.
Table 3.1 BorderButton Draw Method Parameters
Variable
Purpose
_bbParent (DisplayObjectContainer)
The parent object of the BorderButton
_halfThick (Number)
Half the thickness of the border line
_w (Number)
Width to draw the BorderButton
_h (Number)
Height to draw the BorderButton
_targetWindow (String)
Window where targeted URL will open
_destination (String)
The target URL
_playerType (String)
The type of Flash Player currently being used (plugIn,
external, and so on)
_extInterfaceAvailable (Boolean)
Set to true if content is being played in the browser
AND ExternalInterface is available; default is false
Search WWH ::




Custom Search