Section 1
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.geom.*;
import fl.events.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 2
//ScrollPane (fl.containers.ScrollPane)
package fl.containers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public class ScrollPane extends BaseScrollPane implements IFocusManagerComponent {
protected var scrollDragHPos:Number;
protected var loader:Loader;
protected var yOffset:Number;
protected var currentContent:Object;
protected var xOffset:Number;
protected var _source:Object;// = ""
protected var scrollDragVPos:Number;
protected var _scrollDrag:Boolean;// = false
protected var contentClip:Sprite;
private static var defaultStyles:Object = {upSkin:"ScrollPane_upSkin", disabledSkin:"ScrollPane_disabledSkin", focusRectSkin:null, focusRectPadding:null, contentPadding:0};
public function ScrollPane(){
_source = "";
_scrollDrag = false;
super();
}
public function get source():Object{
return (_source);
}
public function set source(_arg1:Object):void{
var _local2:*;
clearContent();
if (isLivePreview){
return;
};
_source = _arg1;
if ((((_source == "")) || ((_source == null)))){
return;
};
currentContent = getDisplayObjectInstance(_arg1);
if (currentContent != null){
_local2 = contentClip.addChild((currentContent as DisplayObject));
dispatchEvent(new Event(Event.INIT));
update();
} else {
load(new URLRequest(_source.toString()));
};
}
public function get bytesLoaded():Number{
return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesLoaded);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = (scrollDragVPos - (mouseY - yOffset));
_verticalScrollBar.setScrollPosition(_local2);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, true);
_local3 = (scrollDragHPos - (mouseX - xOffset));
_horizontalScrollBar.setScrollPosition(_local3);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, true);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = calculateAvailableHeight();
switch (_arg1.keyCode){
case Keyboard.DOWN:
verticalScrollPosition++;
break;
case Keyboard.UP:
verticalScrollPosition--;
break;
case Keyboard.RIGHT:
horizontalScrollPosition++;
break;
case Keyboard.LEFT:
horizontalScrollPosition--;
break;
case Keyboard.END:
verticalScrollPosition = maxVerticalScrollPosition;
break;
case Keyboard.HOME:
verticalScrollPosition = 0;
break;
case Keyboard.PAGE_UP:
verticalScrollPosition = (verticalScrollPosition - _local2);
break;
case Keyboard.PAGE_DOWN:
verticalScrollPosition = (verticalScrollPosition + _local2);
break;
};
}
protected function doStartDrag(_arg1:MouseEvent):void{
if (!enabled){
return;
};
xOffset = mouseX;
yOffset = mouseY;
scrollDragHPos = horizontalScrollPosition;
scrollDragVPos = verticalScrollPosition;
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
}
public function get content():DisplayObject{
var _local1:Object;
_local1 = currentContent;
if ((_local1 is URLRequest)){
_local1 = loader.content;
};
return ((_local1 as DisplayObject));
}
public function get percentLoaded():Number{
if (loader != null){
return (Math.round(((bytesLoaded / bytesTotal) * 100)));
};
return (0);
}
protected function endDrag(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
}
public function update():void{
var _local1:DisplayObject;
_local1 = contentClip.getChildAt(0);
setContentSize(_local1.width, _local1.height);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:*;
_local3 = contentClip.scrollRect;
_local3.x = _arg1;
contentClip.scrollRect = _local3;
}
public function refreshPane():void{
if ((_source is URLRequest)){
_source = _source.url;
};
source = _source;
}
protected function passEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0));
}
public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{
if (_arg2 == null){
_arg2 = new LoaderContext(false, ApplicationDomain.currentDomain);
};
clearContent();
initLoader();
currentContent = (_source = _arg1);
loader.load(_arg1, _arg2);
}
override protected function handleScroll(_arg1:ScrollEvent):void{
passEvent(_arg1);
super.handleScroll(_arg1);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:*;
_local3 = contentClip.scrollRect;
_local3.y = _arg1;
contentClip.scrollRect = _local3;
}
protected function initLoader():void{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, passEvent, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onContentLoad, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.INIT, passEvent, false, 0, true);
contentClip.addChild(loader);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawBackground();
};
if (isInvalid(InvalidationType.STATE)){
setScrollDrag();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
contentClip = new Sprite();
addChild(contentClip);
contentClip.scrollRect = contentScrollRect;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
}
public function set scrollDrag(_arg1:Boolean):void{
_scrollDrag = _arg1;
invalidate(InvalidationType.STATE);
}
protected function clearContent():void{
if (contentClip.numChildren == 0){
return;
};
contentClip.removeChildAt(0);
currentContent = null;
if (loader != null){
try {
loader.close();
} catch(e) {
};
try {
loader.unload();
} catch(e) {
};
loader = null;
};
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = contentClip.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
contentClip.cacheAsBitmap = useBitmapScrolling;
contentClip.scrollRect = contentScrollRect;
contentClip.x = (contentClip.y = contentPadding);
}
override protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue((enabled) ? "upSkin" : "disabledSkin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function get bytesTotal():Number{
return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesTotal);
}
protected function onContentLoad(_arg1:Event):void{
var _local2:*;
update();
_local2 = calculateAvailableHeight();
calculateAvailableSize();
horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), availableWidth);
verticalScrollBar.setScrollProperties(_local2, 0, (contentHeight - _local2), _local2);
passEvent(_arg1);
}
public function get scrollDrag():Boolean{
return (_scrollDrag);
}
protected function setScrollDrag():void{
if (_scrollDrag){
contentClip.addEventListener(MouseEvent.MOUSE_DOWN, doStartDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, endDrag, false, 0, true);
} else {
contentClip.removeEventListener(MouseEvent.MOUSE_DOWN, doStartDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag);
removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
};
contentClip.buttonMode = _scrollDrag;
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.containers
Section 3
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 4
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 5
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 6
//Label (fl.controls.Label)
package fl.controls {
import fl.core.*;
import flash.text.*;
import fl.events.*;
public class Label extends UIComponent {
protected var actualHeight:Number;
protected var _html:Boolean;// = false
protected var actualWidth:Number;
protected var defaultLabel:String;// = "Label"
protected var _savedHTML:String;
public var textField:TextField;
private static var defaultStyles:Object = {textFormat:null, embedFonts:false};
public function Label(){
defaultLabel = "Label";
_html = false;
super();
text = defaultLabel;
actualWidth = _width;
actualHeight = _height;
}
public function get autoSize():String{
return (textField.autoSize);
}
public function get selectable():Boolean{
return (textField.selectable);
}
public function set text(_arg1:String):void{
if (_arg1 == text){
return;
};
if (((componentInspectorSetting) && ((_arg1 == defaultLabel)))){
return;
};
_html = false;
textField.text = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function get wordWrap():Boolean{
return (textField.wordWrap);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function set selectable(_arg1:Boolean):void{
textField.selectable = _arg1;
}
public function set autoSize(_arg1:String):void{
textField.autoSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set wordWrap(_arg1:Boolean):void{
textField.wordWrap = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
override public function get height():Number{
if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (wordWrap))){
return (_height);
};
return (actualHeight);
}
public function set htmlText(_arg1:String):void{
if (_arg1 == htmlText){
return;
};
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function get text():String{
return (textField.text);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
addChild(textField);
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
textField.wordWrap = false;
}
public function get htmlText():String{
return (textField.htmlText);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
actualWidth = _arg1;
actualHeight = _arg2;
super.setSize(_arg1, _arg2);
}
override public function set width(_arg1:Number):void{
actualWidth = _arg1;
super.width = _arg1;
}
protected function drawLayout():void{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
_local1 = false;
textField.width = width;
textField.height = height;
if (textField.autoSize != TextFieldAutoSize.NONE){
_local2 = textField.width;
_local3 = textField.height;
_local1 = ((!((_width == _local2))) || (!((_height == _local3))));
_width = _local2;
_height = _local3;
switch (textField.autoSize){
case TextFieldAutoSize.CENTER:
textField.x = ((actualWidth / 2) - (textField.width / 2));
break;
case TextFieldAutoSize.LEFT:
textField.x = 0;
break;
case TextFieldAutoSize.RIGHT:
textField.x = -((textField.width - actualWidth));
break;
};
} else {
textField.width = actualWidth;
textField.height = actualHeight;
textField.x = 0;
};
if (_local1){
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, true));
};
}
override public function get width():Number{
if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (!(wordWrap)))){
return (_width);
};
return (actualWidth);
}
protected function drawTextFormat():void{
var _local1:TextFormat;
var _local2:Object;
_local1 = (getStyleValue("textFormat") as TextFormat);
if (_local1 == null){
_local2 = UIComponent.getStyleDefinition();
_local1 = (enabled) ? (_local2.defaultTextFormat as TextFormat) : (_local2.defaultDisabledTextFormat as TextFormat);
};
textField.defaultTextFormat = _local1;
textField.setTextFormat(_local1);
if (((_html) && (!((_savedHTML == null))))){
htmlText = _savedHTML;
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 7
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 8
//RadioButton (fl.controls.RadioButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.ui.*;
public class RadioButton extends LabelButton implements IFocusManagerGroup {
protected var _value:Object;
protected var defaultGroupName:String;// = "RadioButtonGroup"
protected var _group:RadioButtonGroup;
private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
public function RadioButton(){
defaultGroupName = "RadioButtonGroup";
super();
mode = "border";
groupName = defaultGroupName;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 * 2));
uiFocusRect.height = (background.height + (_local2 * 2));
};
}
private function setThis():void{
var _local1:RadioButtonGroup;
_local1 = _group;
if (_local1 != null){
if (_local1.selection != this){
_local1.selection = this;
};
} else {
super.selected = true;
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
protected function handleClick(_arg1:MouseEvent):void{
if (_group == null){
return;
};
_group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.DOWN:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.UP:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.SPACE:
setThis();
_toggle = false;
default:
super.keyDownHandler(_arg1);
break;
};
}
private function setNext(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local2.numRadioButtons;
_local6 = _local4;
if (_local4 != -1){
do {
_local6++;
_local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6;
_local7 = _local2.getRadioButtonAt(_local6);
if (((_local7) && (_local7.enabled))){
if (_arg1){
_local2.selection = _local7;
};
_local7.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local6 != _local4);
};
}
public function get group():RadioButtonGroup{
return (_group);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
super.keyUpHandler(_arg1);
if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){
_toggle = true;
};
}
override public function get selected():Boolean{
return (super.selected);
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a RadioButtons toggle."));
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function set group(_arg1:RadioButtonGroup):void{
groupName = _arg1.name;
}
override public function set selected(_arg1:Boolean):void{
if ((((_arg1 == false)) || (selected))){
return;
};
if (_group != null){
_group.selection = this;
} else {
super.selected = _arg1;
};
}
override protected function draw():void{
super.draw();
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
}
public function set groupName(_arg1:String):void{
if (_group != null){
_group.removeRadioButton(this);
_group.removeEventListener(Event.CHANGE, handleChange);
};
_group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1);
if (_group != null){
_group.addRadioButton(this);
_group.addEventListener(Event.CHANGE, handleChange, false, 0, true);
};
}
public function get value():Object{
return (_value);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (RadioButton.createAccessibilityImplementation != null){
RadioButton.createAccessibilityImplementation(this);
};
}
public function get groupName():String{
return (((_group)==null) ? null : _group.name);
}
private function setPrev(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:int;
var _local6:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local4;
if (_local4 != -1){
do {
--_local5;
_local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5;
_local6 = _local2.getRadioButtonAt(_local5);
if (((_local6) && (_local6.enabled))){
if (_arg1){
_local2.selection = _local6;
};
_local6.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local5 != _local4);
};
}
protected function handleChange(_arg1:Event):void{
super.selected = (_group.selection == this);
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 9
//RadioButtonGroup (fl.controls.RadioButtonGroup)
package fl.controls {
import flash.events.*;
public class RadioButtonGroup extends EventDispatcher {
protected var _selection:RadioButton;
protected var radioButtons:Array;
protected var _name:String;
private static var groups:Object;
private static var groupCount:uint = 0;
public function RadioButtonGroup(_arg1:String){
_name = _arg1;
radioButtons = [];
registerGroup(this);
}
public function getRadioButtonIndex(_arg1:RadioButton):int{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function get numRadioButtons():int{
return (radioButtons.length);
}
public function get name():String{
return (_name);
}
public function get selection():RadioButton{
return (_selection);
}
public function set selection(_arg1:RadioButton):void{
if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){
return;
};
_selection = _arg1;
dispatchEvent(new Event(Event.CHANGE, true));
}
public function set selectedData(_arg1:Object):void{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3.value == _arg1){
selection = _local3;
return;
};
_local2++;
};
}
public function removeRadioButton(_arg1:RadioButton):void{
var _local2:int;
_local2 = getRadioButtonIndex(_arg1);
if (_local2 != -1){
radioButtons.splice(_local2, 1);
};
if (_selection == _arg1){
_selection = null;
};
}
public function addRadioButton(_arg1:RadioButton):void{
if (_arg1.groupName != name){
_arg1.groupName = name;
return;
};
radioButtons.push(_arg1);
if (_arg1.selected){
selection = _arg1;
};
}
public function getRadioButtonAt(_arg1:int):RadioButton{
return (RadioButton(radioButtons[_arg1]));
}
public function get selectedData():Object{
var _local1:RadioButton;
_local1 = _selection;
return (((_local1)==null) ? null : _local1.value);
}
public static function getGroup(_arg1:String):RadioButtonGroup{
var _local2:RadioButtonGroup;
if (groups == null){
groups = {};
};
_local2 = (groups[_arg1] as RadioButtonGroup);
if (_local2 == null){
_local2 = new RadioButtonGroup(_arg1);
if ((++groupCount % 20) == 0){
cleanUpGroups();
};
};
return (_local2);
}
private static function registerGroup(_arg1:RadioButtonGroup):void{
if (groups == null){
groups = {};
};
groups[_arg1.name] = _arg1;
}
private static function cleanUpGroups():void{
var _local1:String;
var _local2:RadioButtonGroup;
for (_local1 in groups) {
_local2 = (groups[_local1] as RadioButtonGroup);
if (_local2.radioButtons.length == 0){
delete groups[_local1];
};
};
}
}
}//package fl.controls
Section 10
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 11
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 12
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 13
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 14
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 15
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import flash.text.*;
import fl.events.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 16
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 17
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 18
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 19
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 20
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 21
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 22
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 23
//_toolbar_25 (print2flash_fla._toolbar_25)
package print2flash_fla {
import flash.display.*;
import flash.accessibility.*;
public dynamic class _toolbar_25 extends MovieClip {
public var ScaleTextMovie:MovieClip;
public var nextpage:def_nextpage;
public var newwindow:def_newwindow;
public var moveMode:def_moveMode;
public var scaleWidth:def_scaleWidth;
public var selMode:def_selMode;
public var logo:MovieClip;
public var print:def_print;
public var ZoomSlider:Slider;
public var fullscreen:def_fullscreen;
public var PageNoMovie:MovieClip;
public var help:def_help;
public var prevpage:def_prevpage;
public var forward:def_forward;
public var more:def_more;
public var searchbut:MovieClip;
public var rotate:def_rotate;
public var searchPatternmc:MovieClip;
public var back:def_back;
public var toolbarbgr:MovieClip;
public var scalePage:def_scalePage;
public function _toolbar_25(){
__setTab_toolbarbgr__toolbar_bgr_0();
__setTab_searchbut__toolbar_icons_0();
__setTab_print__toolbar_icons_0();
__setTab_ScaleTextMovie__toolbar_icons_0();
__setTab_PageNoMovie__toolbar_icons_0();
__setTab_moveMode__toolbar_icons_0();
__setTab_scaleWidth__toolbar_icons_0();
__setTab_scalePage__toolbar_icons_0();
__setTab_prevpage__toolbar_icons_0();
__setTab_rotate__toolbar_icons_0();
__setTab_help__toolbar_icons_0();
__setTab_newwindow__toolbar_icons_0();
__setTab_selMode__toolbar_icons_0();
__setTab_more__toolbar_icons_0();
__setTab_nextpage__toolbar_icons_0();
__setTab_back__toolbar_icons_0();
__setTab_forward__toolbar_icons_0();
__setTab_ZoomSlider__toolbar_icons_0();
__setTab_searchPatternmc__toolbar_icons_0();
__setTab_logo__toolbar_icons_0();
__setAcc_print__toolbar_icons_0();
__setAcc_prevpage__toolbar_icons_0();
__setAcc_more__toolbar_icons_0();
__setAcc_nextpage__toolbar_icons_0();
__setAcc_ZoomSlider__toolbar_icons_0();
__setAcc_logo__toolbar_icons_0();
}
function __setAcc_prevpage__toolbar_icons_0(){
prevpage.accessibilityProperties = new AccessibilityProperties();
prevpage.accessibilityProperties.shortcut = "Control+Y";
}
function __setTab_moveMode__toolbar_icons_0(){
moveMode.tabIndex = 0;
}
function __setTab_help__toolbar_icons_0(){
help.tabIndex = 0;
}
function __setTab_forward__toolbar_icons_0(){
forward.tabIndex = 0;
}
function __setTab_prevpage__toolbar_icons_0(){
prevpage.tabIndex = 0;
}
function __setTab_back__toolbar_icons_0(){
back.tabIndex = 1;
}
function __setTab_newwindow__toolbar_icons_0(){
newwindow.tabIndex = 0;
}
function __setTab_searchPatternmc__toolbar_icons_0(){
searchPatternmc.tabIndex = 0;
}
function __setTab_print__toolbar_icons_0(){
print.tabIndex = 0;
}
function __setTab_rotate__toolbar_icons_0(){
rotate.tabIndex = 0;
}
function __setTab_selMode__toolbar_icons_0(){
selMode.tabIndex = 0;
}
function __setAcc_logo__toolbar_icons_0(){
logo.accessibilityProperties = new AccessibilityProperties();
logo.accessibilityProperties.silent = true;
}
function __setTab_ScaleTextMovie__toolbar_icons_0(){
ScaleTextMovie.tabIndex = 0;
}
function __setAcc_nextpage__toolbar_icons_0(){
nextpage.accessibilityProperties = new AccessibilityProperties();
nextpage.accessibilityProperties.shortcut = "Control+U";
}
function __setTab_logo__toolbar_icons_0(){
logo.tabIndex = 0;
}
function __setAcc_print__toolbar_icons_0(){
print.accessibilityProperties = new AccessibilityProperties();
print.accessibilityProperties.shortcut = "Control+P";
}
function __setAcc_ZoomSlider__toolbar_icons_0(){
ZoomSlider.accessibilityProperties = new AccessibilityProperties();
ZoomSlider.accessibilityProperties.silent = true;
}
function __setTab_toolbarbgr__toolbar_bgr_0(){
toolbarbgr.tabIndex = 0;
}
function __setTab_nextpage__toolbar_icons_0(){
nextpage.tabIndex = 0;
}
function __setTab_scalePage__toolbar_icons_0(){
scalePage.tabIndex = 7;
}
function __setTab_more__toolbar_icons_0(){
more.tabIndex = 0;
}
function __setAcc_more__toolbar_icons_0(){
more.accessibilityProperties = new AccessibilityProperties();
more.accessibilityProperties.silent = true;
}
function __setTab_ZoomSlider__toolbar_icons_0(){
ZoomSlider.tabIndex = 0;
}
function __setTab_PageNoMovie__toolbar_icons_0(){
PageNoMovie.tabIndex = 0;
}
function __setTab_searchbut__toolbar_icons_0(){
searchbut.tabIndex = 8;
}
function __setTab_scaleWidth__toolbar_icons_0(){
scaleWidth.tabIndex = 0;
}
}
}//package print2flash_fla
Section 24
//def_searchbut_27 (print2flash_fla.def_searchbut_27)
package print2flash_fla {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_searchbut_27 extends MovieClip {
public var but:manualbutton;
public function def_searchbut_27(){
__setAcc_but_def_searchbut_Layer2_0();
__setTab_but_def_searchbut_Layer2_0();
}
function __setAcc_but_def_searchbut_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Search";
but.accessibilityProperties.forceSimple = true;
}
function __setTab_but_def_searchbut_Layer2_0(){
but.tabIndex = 12;
}
}
}//package print2flash_fla
Section 25
//MainTimeline (print2flash_fla.MainTimeline)
package print2flash_fla {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import fl.events.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
import flash.accessibility.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
import Print2Flash.*;
public dynamic class MainTimeline extends MovieClip {
public const xmargin:int = 10;
public const yinterstice:int = 10;
public const Deftoppanelheight:uint = 34;
public const ymargin:int = 10;
public const xinterstice:int = 10;
public var SearchField:TextField;
public var settings;
public var heights:Array;
public var pageLoadTimer:Timer;
public var AreaHeight:uint;
public var DownButColor;
public var extName:String;
public var MovieHeight:uint;
public var textSelectColor;
public var __setPropDict:Dictionary;
public var settings2:XML;
public var History;
public var LastPressed:int;
public var MovieWidth:uint;
public var beforeFSWidth:Number;
public var ClientWidth:uint;
public var MinSelHScrollRatio:uint;
public var HasBookmarks:Boolean;
public var DblCLickTime:int;
public var HistoryIndex;
public var HandCursor:MovieClip;
public var Resolution:uint;
public var PageNo:uint;
public var beforeFSHeight:Number;
public var ClientHeight:uint;
public var __setAccDict:Dictionary;
public var MaxPageHeight;
public var PageNoInitVal:String;
public var SelStartInfo:Object;
public var AreaWidth:uint;
public var TBBgrImage:BitmapData;
public var TBButtons:Array;
public var DownRectColor;
public var ZoomValue:uint;
public var secondtime:Boolean;
public var minZoom:uint;
public var OverRectColor;
public var Selecting:Boolean;
public var BottomArea:Sprite;
public var FromPage:uint;
public var copyTextMenuItem:ContextMenuItem;
public var PageMode4:Boolean;
public var lastSearchTSNo:Number;
public var LinkDef:Object;
public var DocPages:Array;
public var NoAPICopying:Boolean;
public var lastSearchPos:int;
public var totalpagestip:TextField;
public var notfoundtip:TextField;
public var PrintAsBitmap:Boolean;
public var localData:SharedObject;
public var TBMargin:uint;
public var HelpPageURL:String;
public var ScaleTextField:TextField;
public var DocArea:ScrollPain;
public var onLoadonResize:Boolean;
public var TotalPagesField:TextField;
public var printScaleMode:String;
public var DropDownToolbar:MovieClip;
public var waitmsg;
public var __setTabDict:Dictionary;
public var PageNoField:TextField;
public var scaleMode:String;
public var ScaleTextMovietip:TextField;
public var pagenotip:TextField;
public var zoomCorr:Number;
public var lastSearchText:String;
public var locale:P2FLocale;
public var MoreButWidth:uint;
public var OverButColor;
public var MaxSelVScrollRatio:uint;
public var SelEndInfo:Object;
public var ScrollBarHeight;
public var Selected:Boolean;
public var loadedPages:int;
public var lastSearchTS:TextSnapshot;
public var totalPages:uint;
public var SelectScrollInterval:uint;
public var DocAreaContent:MovieClip;
public var TextCursor:MovieClip;
public var ToolbarBgrColor;
public var NoPrinting:Boolean;
public var ScaleFactor:Number;
public var NoCopying:Boolean;
public var textmsg:MovieClip;
public var MaxSelHScrollRatio:uint;
public var cursor:MovieClip;
public var maxZoom:uint;
public var widths;
public var autonomous:Boolean;
public var toolbar:MovieClip;
public var searchPatternmctip:TextField;
public var ScrollBarWidth;
public var firstResize:Boolean;
public var TBBgrImageBehavior:String;
public var MaxPageWidth;
public var Links;
public var Rotation:int;
public var Pages:Array;
public var LogoURL:String;
public var toppanelheight:uint;
public var BMDef:Object;
public var printRangeWnd:MovieClip;
public var mousemode:String;
public var pagey:int;
public var MinSelVScrollRatio:uint;
public var ToPage:uint;
public var bgrSkin:Sprite;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
__setAccDict = new Dictionary(true);
__setTabDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2);
this.root.accessibilityProperties = new AccessibilityProperties();
this.root.accessibilityProperties.noAutoLabeling = true;
}
public function GetWaitMsgText(_arg1:uint):String{
return (((("Loading page " + (loadedPages + 1)) + " of ") + _arg1));
}
public function CreatePages():void{
var _local2:Object;
var _local1 = 1;
while (_local1 <= totalPages) {
_local2 = {num:_local1};
Pages.push(_local2);
DocPages.push(_local2);
CreatePageMovie(_local1);
_local2.width = new Number(widths[(_local1 - 1)]);
_local2.realWidth = _local2.width;
_local2.height = new Number(heights[(_local1 - 1)]);
_local2.realHeight = _local2.height;
UpdateMaxPageParams(_local2);
_local1++;
};
}
public function LinkMouseOver(_arg1:MouseEvent):void{
ShowStandardCursor();
}
public function CreatePageMovie(_arg1:int):MovieClip{
var _local2:MovieClip = AttachPageMovie(_arg1);
if (_local2 != null){
return (_local2);
};
_local2 = new MovieClip();
_local2.name = ("Page" + _arg1);
var _local3:MovieClip = new MovieClip();
_local3.name = "realMovie";
_local2.addChild(_local3);
DocAreaContent.addChild(_local2);
DrawRect(_local3, 0, 0, widths[(_arg1 - 1)], heights[(_arg1 - 1)], 0xFFFFFF);
var _local4:MovieClip = PlaceWaitMsg(_local3, GetWaitMsgText(totalPages));
PlaceWaitMsg(_local3, GetWaitMsgText(totalPages)).scaleX = (_local4.scaleY = (widths[(_arg1 - 1)] / 826));
_local4.x = ((_local3.width - _local4.width) / 2);
_local4.y = ((_local3.height - _local4.height) / 2);
var _local5:Object = DocPages[(_arg1 - 1)];
_local5.movie = _local2;
_local5.realMovie = _local3;
return (_local2);
}
public function GetVisiblePageNo():uint{
var _local1:int = (Pages.length - 1);
while (_local1 >= 0) {
if (Pages[_local1].movie.y <= ((DocArea.verticalScrollPosition + (DocArea.height / 2)) / DocAreaContent.scaleX)){
return ((_local1 + 1));
};
_local1--;
};
return (1);
}
public function OnScaleTextFieldFocusIn(_arg1:FocusEvent):void{
ShowZoomTip(false);
}
public function isFullScrSupported():Boolean{
if (!stage.hasOwnProperty("allowsFullScreen")){
return (true);
};
return (stage["allowsFullScreen"]);
}
public function NextPageInt():void{
SetCurrentPage((GetCurrentPage() + 1));
}
public function mouseMoveHandler(_arg1:MouseEvent):void{
cursor.x = root.mouseX;
cursor.y = root.mouseY;
_arg1.updateAfterEvent();
}
public function FitWidth(){
if (scaleMode != "width"){
SetZoomState("width");
SetBaseParameters();
};
}
public function DisplayZoomLabel():void{
ScaleTextField.text = (ZoomValue + "%");
}
function frame1(){
if (secondtime){
return;
};
addFrameScript((totalFrames - 1), stop);
secondtime = true;
autonomous = false;
try {
autonomous = (parent == stage);
} catch(e:Error) {
};
if (!contextMenu){
contextMenu = new ContextMenu();
};
try {
Security.allowDomain("*");
} catch(e:Error) {
};
if (autonomous){
contextMenu.hideBuiltInItems();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
};
OnSettingsAvailable();
stage.addEventListener(Event.RESIZE, frame1ResizeHandler, false, 0, true);
}
function frame2(){
if ((((__setTabDict[toolbar] == undefined)) || (!((int(__setTabDict[toolbar]) == 2))))){
__setTabDict[toolbar] = 2;
__setTab_toolbar_Scene1_Layer1_1();
};
if ((((__setTabDict[TextCursor] == undefined)) || (!((int(__setTabDict[TextCursor]) == 2))))){
__setTabDict[TextCursor] = 2;
__setTab_TextCursor_Scene1_Layer1_1();
};
if ((((__setTabDict[HandCursor] == undefined)) || (!((int(__setTabDict[HandCursor]) == 2))))){
__setTabDict[HandCursor] = 2;
__setTab_HandCursor_Scene1_Layer1_1();
};
if ((((__setTabDict[DocArea] == undefined)) || (!((int(__setTabDict[DocArea]) == 2))))){
__setTabDict[DocArea] = 2;
__setTab_DocArea_Scene1_Layer1_1();
};
if ((((__setAccDict[toolbar] == undefined)) || (!((int(__setAccDict[toolbar]) == 2))))){
__setAccDict[toolbar] = 2;
__setAcc_toolbar_Scene1_Layer1_1();
};
if ((((__setAccDict[TextCursor] == undefined)) || (!((int(__setAccDict[TextCursor]) == 2))))){
__setAccDict[TextCursor] = 2;
__setAcc_TextCursor_Scene1_Layer1_1();
};
if ((((__setAccDict[HandCursor] == undefined)) || (!((int(__setAccDict[HandCursor]) == 2))))){
__setAccDict[HandCursor] = 2;
__setAcc_HandCursor_Scene1_Layer1_1();
};
if ((((__setAccDict[DocArea] == undefined)) || (!((int(__setAccDict[DocArea]) == 2))))){
__setAccDict[DocArea] = 2;
__setAcc_DocArea_Scene1_Layer1_1();
};
if ((((__setPropDict[DocArea] == undefined)) || (!((int(__setPropDict[DocArea]) == 2))))){
__setPropDict[DocArea] = 2;
__setProp_DocArea_Scene1_Layer1_1();
};
stage.removeEventListener(Event.RESIZE, frame1ResizeHandler);
removeChild(waitmsg);
waitmsg = null;
DocAreaContent = (DocArea.content as MovieClip);
BottomArea = (DocAreaContent.getChildByName("BottomArea") as Sprite);
stage.addEventListener(Event.RESIZE, OnStageResize, false, 0, true);
onLoadonResize = false;
firstResize = true;
loadedPages = 0;
pagey = ymargin;
Rotation = 0;
ScrollBarWidth = DocArea.verticalScrollBar.width;
ScrollBarHeight = DocArea.horizontalScrollBar.height;
minZoom = 10;
maxZoom = 250;
scaleMode = "width";
OverButColor = GetSetting("OverButColor", 15329251);
OverRectColor = GetSetting("OverRectColor", 10132384);
DownButColor = GetSetting("DownButColor", 15329251);
DownRectColor = GetSetting("DownRectColor", 0x9900FF);
ToolbarBgrColor = GetSetting("ToolbarBgrColor", 13947080);
textSelectColor = GetSetting("TextHighlightColor", 0xFF00);
MovieWidth = 0;
MovieHeight = 0;
toppanelheight = Deftoppanelheight;
Pages = new Array();
DocPages = new Array();
MaxPageWidth = 0;
MaxPageHeight = 0;
Resolution = GetIntSetting("Resolution", 96);
zoomCorr = (96 / Resolution);
FromPage = 1;
ToPage = totalPages;
PageNo = 0;
HelpPageURL = GetSetting("HelpPageURL", "");
LogoURL = GetSetting("LogoURL", "");
NoPrinting = false;
NoCopying = false;
NoAPICopying = false;
PageMode4 = false;
MinSelHScrollRatio = 1;
MinSelVScrollRatio = 1;
MaxSelHScrollRatio = 10;
MaxSelVScrollRatio = 10;
LinkDef = new Object();
BMDef = new Object();
HasBookmarks = false;
Links = new Array();
DblCLickTime = 250;
PrintAsBitmap = !((GetSetting("PrintAsBitmap", "") == ""));
extName = loaderInfo.parameters["extName"];
try {
localData = SharedObject.getLocal("P2FDoc", "/");
printScaleMode = localData.data.printScaleMode;
} catch(e) {
};
PageNoField = toolbar.PageNoMovie.PageNoFieldMC.PageNoField;
PageNoField.restrict = "0-9";
TotalPagesField = toolbar.PageNoMovie.TotalPagesMC.TotalPages;
ScaleTextField = toolbar.ScaleTextMovie.ScaleTextField;
ScaleTextField.restrict = "0-9%";
SearchField = toolbar.searchPatternmc.searchPattern;
DocArea.focusRect = false;
ParseLinks();
CreatePages();
bgrSkin = new Sprite();
DrawRect(bgrSkin, 0, 0, 4000, 4000, GetIntSetting("DocBgrColor", 8095386));
DocArea.setStyle("upSkin", bgrSkin);
pageLoadTimer = new Timer(100);
pageLoadTimer.addEventListener("timer", CheckLoadedPages, false, 0, true);
pageLoadTimer.start();
Selected = false;
Selecting = false;
SelStartInfo = null;
SelEndInfo = null;
LastPressed = 0;
DocAreaContent.addEventListener(MouseEvent.MOUSE_DOWN, OnDocAreaContentMouseDown, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, OnStageMouseUp, false, 0, true);
DocAreaContent.addEventListener(MouseEvent.MOUSE_MOVE, OnDocAreaContentMouseMove, false, 0, true);
DocArea.addEventListener(MouseEvent.MOUSE_WHEEL, OnDocAreaContentMouseWheel, false, int.MAX_VALUE, true);
if (((contextMenu) && (contextMenu.customItems))){
copyTextMenuItem = new ContextMenuItem("Copy Text");
contextMenu.customItems.push(copyTextMenuItem);
copyTextMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, OnCopyMenuItemSelect, false, 0, true);
contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, OnContextMenuSelect, false, 0, true);
};
DocArea.addEventListener(ScrollEvent.SCROLL, OnDocAreaScroll, false, 0, true);
DocArea.addEventListener(KeyboardEvent.KEY_DOWN, OnDocAreaKeyDown, false, int.MAX_VALUE, true);
DocArea.addEventListener(KeyboardEvent.KEY_UP, OnDocAreaKeyUp, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, OnStageKeyDown, false, 0, true);
locale = new P2FLocale();
printRangeWnd = AttachMovie("PrintRangeWnd");
printRangeWnd.locale = locale;
printRangeWnd.addEventListener("OKResult", onPrintRangeSelected, false, 0, true);
stage.addEventListener(FullScreenEvent.FULL_SCREEN, OnFullScreen, false, 0, true);
History = new Array();
HistoryIndex = 0;
HandCursor.mouseEnabled = (TextCursor.mouseEnabled = false);
DocAreaContent.addEventListener(MouseEvent.ROLL_OVER, OnDocAreaContentRollOver, false, 0, true);
DocAreaContent.addEventListener(MouseEvent.ROLL_OUT, mouseOutHandler, false, 0, true);
stage.addEventListener(Event.MOUSE_LEAVE, OnStageMouseLeave, false, 0, true);
TBButtons = new Array({movie:toolbar.logo, nohide:true, flag:1, id:1}, {movie:toolbar.back, tip:"IDS_BACK", flag:196608, id:18}, {movie:toolbar.forward, tip:"IDS_FORWARD", flag:786432, id:19}, {movie:toolbar.moveMode, tip:"IDS_DRAG", flag:2, id:2}, {movie:toolbar.selMode, tip:"IDS_SELTEXT", flag:4, id:3}, {movie:toolbar.ZoomSlider, nodropdown:true, flag:8, id:4}, {movie:toolbar.ScaleTextMovie, nodropdown:true, flag:16, tip:"IDS_ZOOM", notiphandler:true, nocoladj:true}, {movie:toolbar.scaleWidth, tip:"IDS_FITWIDTH", flag:32, id:7}, {movie:toolbar.scalePage, tip:"IDS_FITPAGE", flag:64, id:8}, {movie:toolbar.prevpage, tip:"IDS_PREVPAGE", flag:128, id:9}, {movie:toolbar.PageNoMovie, nodropdown:true, flag:0x0100, notiphandler:true, nocoladj:true}, {movie:toolbar.nextpage, tip:"IDS_NEXTPAGE", flag:0x0200, id:10}, {movie:toolbar.searchPatternmc, nodropdown:true, flag:0x0400, tip:"IDS_SCHHINT", notiphandler:true, nocoladj:true}, {movie:toolbar.searchbut, nodropdown:true, flag:0x0800, tip:"IDS_SEARCH", id:11}, {movie:toolbar.rotate, tip:"IDS_ROTATE", flag:0x1000, id:12}, {movie:toolbar.print, tip:"IDS_PRINT", flag:0x2000, id:13}, {movie:toolbar.fullscreen, tip:"IDS_FULLSCR", flag:0x300000, id:20}, {movie:toolbar.newwindow, tip:"IDS_NEWWND", flag:0x4000, id:14}, {movie:toolbar.help, tip:"IDS_HELP", flag:0x8000, id:15});
MoreButWidth = toolbar.more.width;
toolbar.more.but.tabEnabled = false;
TBMargin = 1;
AttachBtnImages();
toolbar.ZoomSlider.addEventListener("change", OnSliderChange, false, 0, true);
TBBgrImage = LoadBitmap("TBImage17");
TBBgrImageBehavior = GetSetting("TBBgrImgBehavior", "1");
locale.setLanguage("auto");
CreateTips();
stage.addEventListener(MouseEvent.MOUSE_DOWN, OnStageMouseDown, false, 0, true);
onload();
toolbar.rotate.but.addEventListener(MouseEvent.CLICK, OnRotateButClick, false, 0, true);
toolbar.nextpage.but.addEventListener(MouseEvent.CLICK, OnNextPageButClick, false, 0, true);
toolbar.prevpage.but.addEventListener(MouseEvent.CLICK, OnPrevPageButClick, false, 0, true);
toolbar.newwindow.but.addEventListener(MouseEvent.CLICK, OnNewWindowButClick, false, 0, true);
toolbar.help.but.addEventListener(MouseEvent.CLICK, OnHelpButClick, false, 0, true);
PageNoField.addEventListener(FocusEvent.FOCUS_OUT, OnPageNoFieldFocusOut, false, 0, true);
ScaleTextField.addEventListener(FocusEvent.FOCUS_OUT, OnScaleTextFieldFocusOut, false, 0, true);
PageNoField.addEventListener(KeyboardEvent.KEY_DOWN, OnPageNoFieldKeyDown, false, 0, true);
ScaleTextField.addEventListener(KeyboardEvent.KEY_DOWN, OnScaleTextFieldKeyDown, false, 0, true);
toolbar.scalePage.but.addEventListener(MouseEvent.CLICK, OnFitPageButClick, false, 0, true);
toolbar.scaleWidth.but.addEventListener(MouseEvent.CLICK, OnFitWidthButClick, false, 0, true);
toolbar.moveMode.but.addEventListener(MouseEvent.CLICK, OnDragButClick, false, 0, true);
toolbar.selMode.but.addEventListener(MouseEvent.CLICK, OnSelectButClick, false, 0, true);
toolbar.searchbut.but.addEventListener(MouseEvent.CLICK, OnSearchButClick, false, 0, true);
toolbar.searchPatternmc.searchPattern.addEventListener(KeyboardEvent.KEY_DOWN, OnSearchFieldKeyDown, false, 0, true);
toolbar.back.but.addEventListener(MouseEvent.CLICK, OnBackButClick, false, 0, true);
toolbar.forward.but.addEventListener(MouseEvent.CLICK, OnForwardButClick, false, 0, true);
toolbar.print.but.addEventListener(MouseEvent.CLICK, OnPrintButClick, false, 0, true);
toolbar.fullscreen.but.addEventListener(MouseEvent.CLICK, OnFullScreenButClick, false, 0, true);
toolbar.logo.useHandCursor = (toolbar.logo.buttonMode = true);
toolbar.logo.addEventListener(MouseEvent.CLICK, OnLogoClick, false, 0, true);
toolbar.more.addEventListener(MouseEvent.CLICK, OnMoreButClick, false, 0, true);
PageNoField.addEventListener(MouseEvent.ROLL_OVER, OnPageNoFieldRollOver, false, 0, true);
PageNoField.addEventListener(MouseEvent.ROLL_OUT, OnPageNoFieldRollOut, false, 0, true);
PageNoField.addEventListener(FocusEvent.FOCUS_IN, OnPageNoFieldFocusIn, false, 0, true);
TotalPagesField.addEventListener(MouseEvent.ROLL_OVER, OnTotalPagesFieldRollOver, false, 0, true);
TotalPagesField.addEventListener(MouseEvent.ROLL_OUT, OnTotalPagesFieldRollOut, false, 0, true);
SearchField.addEventListener(MouseEvent.ROLL_OVER, OnSearchFieldRollOver, false, 0, true);
SearchField.addEventListener(MouseEvent.ROLL_OUT, OnSearchFieldRollOut, false, 0, true);
SearchField.addEventListener(FocusEvent.FOCUS_IN, OnSearchFieldFocusIn, false, 0, true);
ScaleTextField.addEventListener(MouseEvent.ROLL_OVER, OnScaleTextFieldRollOver, false, 0, true);
ScaleTextField.addEventListener(MouseEvent.ROLL_OUT, OnScaleTextFieldRollOut, false, 0, true);
ScaleTextField.addEventListener(FocusEvent.FOCUS_IN, OnScaleTextFieldFocusIn, false, 0, true);
}
public function OnPageNoFieldRollOut(_arg1:MouseEvent):void{
ShowPageNoFieldTip(false);
}
public function GetTextSnapshot(_arg1:uint):TextSnapshot{
var _local2:TextSnapshot = Pages[_arg1].ts;
if (_local2 == null){
_local2 = (Pages[_arg1].ts = Pages[_arg1].realMovie.textSnapshot);
};
_local2.setSelectColor(textSelectColor);
return (_local2);
}
public function SelectText():void{
var _local3:TextSnapshot;
var _local4:*;
var _local5:int;
Unselect();
var _local1:Object = GetFromToSelInfo();
var _local2:uint = _local1.FromInfo.page;
while (_local2 <= _local1.ToInfo.page) {
_local3 = GetTextSnapshot(_local2);
if (_local2 == _local1.FromInfo.page){
_local4 = _local1.FromInfo.pos;
} else {
_local4 = 0;
};
if (_local2 == _local1.ToInfo.page){
_local5 = (_local1.ToInfo.pos + 1);
} else {
_local5 = _local3.charCount;
};
_local3.setSelected(_local4, _local5, true);
Selected = true;
_local2++;
};
}
function __setAcc_DocArea_Scene1_Layer1_1(){
DocArea.accessibilityProperties = new AccessibilityProperties();
DocArea.accessibilityProperties.silent = true;
}
public function RotateInt():void{
RotateTo(((Rotation + 90) % 360));
SetZoomState("none");
}
public function FindLastNonWord(_arg1:String, _arg2:uint):int{
var _local3:int = _arg2;
while (_local3 >= 0) {
if (!IsWordSym(_arg1.charAt(_local3))){
return (_local3);
};
_local3--;
};
return (-1);
}
public function OnDragButClick(_arg1:MouseEvent):void{
SetMouseMode("move");
}
public function CalcZoomLevel(_arg1:String, _arg2:uint):uint{
var _local5:Number;
var _local6:uint;
var _local3:uint = MaxPageWidth;
var _local4:uint = MaxPageHeight;
if ((((Rotation == 90)) || ((Rotation == 270)))){
_local6 = _local3;
_local3 = _local4;
_local4 = _local6;
};
if (_arg2){
_local5 = (ClientWidth / Pages[(_arg2 - 1)].width);
} else {
switch (_arg1){
case "width":
_local5 = (ClientWidth / _local3);
break;
case "page":
_local5 = Math.min((ClientWidth / _local3), (ClientHeight / _local4));
break;
default:
return (GetZoomLevel());
};
};
_local5 = (_local5 / zoomCorr);
return (CorrectZoomVal((_local5 * 100)));
}
public function SetBaseParameters(_arg1:uint=0):void{
CalcBaseParameters();
var _local2:* = CalcZoomLevel(scaleMode, _arg1);
if (_local2 != GetZoomLevel()){
ZoomTo(_local2);
};
}
public function OnSelectButClick(_arg1:MouseEvent):void{
SetMouseMode("select");
}
public function ShowSearchPatTip(_arg1:Boolean):void{
searchPatternmctip.visible = ((((_arg1) && (toolbar.searchPatternmc.visible))) && (!((stage.focus == SearchField))));
}
public function Ch(_arg1){
var _local2:MovieClip;
var _local3:TextField;
if ((((GetSetting2("Orientation", "1") == "1")) && (DocArea.visible))){
_local2 = DocPages[_arg1].realMovie;
_local3 = (_local2.getChildByName("CR") as TextField);
DocArea.visible = ((!((_local3 == null))) && (((!((_local3.text.indexOf("print2flash.com") == -1))) || (!((_local3.text.indexOf("blue-pacific.com") == -1))))));
if (!NoPrinting){
NoPrinting = !(DocArea.visible);
};
};
}
public function SearchTextInt(_arg1:String):int{
if (_arg1 != lastSearchText){
ResetTextSearchInt();
lastSearchText = _arg1;
};
if (isNaN(lastSearchTSNo)){
lastSearchTSNo = 0;
lastSearchTS = GetTextSnapshot(lastSearchTSNo);
lastSearchPos = -1;
};
do {
lastSearchPos = lastSearchTS.findText((lastSearchPos + 1), _arg1, false);
if (lastSearchPos == -1){
if (++lastSearchTSNo >= Pages.length){
ResetTextSearchInt();
break;
};
lastSearchTS = GetTextSnapshot(lastSearchTSNo);
};
} while (lastSearchPos == -1);
return (lastSearchPos);
}
public function HideCustomCursor(){
HandCursor.visible = (TextCursor.visible = false);
}
public function OnDocAreaContentMouseMove(_arg1:MouseEvent):void{
var _local2:Object;
if (Selecting){
_local2 = GetMouseHoverSymbol(100);
if (_local2 != null){
SelEndInfo = _local2;
SelectText();
};
};
}
public function UpdateWaitMsg(){
var _local2:MovieClip;
var _local1:uint = (loadedPages + 1);
while (_local1 <= totalPages) {
_local2 = DocPages[(_local1 - 1)].realMovie.getChildByName("waitmsg");
if (_local2){
_local2.msg.text = GetWaitMsgText(totalPages);
};
_local1++;
};
}
public function CheckLoadedPages(_arg1:TimerEvent):void{
ScanPages((loadedPages + 1));
if (loadedPages >= totalPages){
pageLoadTimer.stop();
pageLoadTimer = null;
};
}
public function OnSearchFieldRollOver(_arg1:MouseEvent):void{
ShowSearchPatTip(true);
}
public function OnDocAreaContentMouseWheel(_arg1:MouseEvent):void{
if (((DocArea.enabled) && (((_arg1.ctrlKey) || (_arg1.altKey))))){
SetZoomLevel((ZoomValue + (_arg1.delta * 10)));
_arg1.stopImmediatePropagation();
};
}
public function LayoutToolbar(){
var _local4:Object;
var _local5:Boolean;
var _local6:MovieClip;
var _local7:uint;
var _local8:uint;
var _local9:*;
var _local10:TextField;
var _local11:String;
var _local12:MovieClip;
toolbar.toolbarbgr.graphics.clear();
if (TBBgrImage){
FillWithBitmap(toolbar.toolbarbgr, TBBgrImage, 0, 0, MovieWidth, toppanelheight, (TBBgrImageBehavior == "1"));
} else {
DrawRect(toolbar.toolbarbgr, 0, 0, MovieWidth, toppanelheight, ToolbarBgrColor);
};
toolbar.more.x = (MovieWidth - MoreButWidth);
toolbar.more.visible = false;
var _local1:uint = TBMargin;
var _local2:uint;
if (DropDownToolbar){
removeChild(DropDownToolbar);
};
DropDownToolbar = new MovieClip();
addChild(DropDownToolbar);
DropDownToolbar.visible = false;
DropDownToolbar.y = toppanelheight;
DropDownToolbar.Buttons = new Array();
var _local3:uint;
while (_local3 < TBButtons.length) {
_local4 = TBButtons[_local3];
_local5 = true;
if (_local5){
_local4.movie.visible = ((_local4.nohide) || (((_local4.movie.x + _local4.movie.width) < (toolbar.more.x - 5))));
if (((!(_local4.movie.visible)) && (!(_local4.nodropdown)))){
_local6 = AttachMovie(("def_" + _local4.movie.name), DropDownToolbar);
_local6.button = _local4;
_local7 = _local6.width;
_local8 = _local6.height;
_local9 = _local4.id;
if (_local4.movie == toolbar.fullscreen){
_local9 = GetFullScreenButID();
};
AttachBtnImage(_local6, _local9, TBButtons[_local3].nocoladj);
_local6.y = _local1;
_local6.x = TBMargin;
_local6.addEventListener(MouseEvent.CLICK, DropDowbButHandler, false, 0, true);
DropDownToolbar.Buttons.push(_local6);
_local10 = new TextField();
_local10.x = ((_local6.x + _local7) + TBMargin);
_local10.autoSize = TextFieldAutoSize.LEFT;
_local10.selectable = false;
_local10.defaultTextFormat = new TextFormat("Tahoma");
_local11 = _local4.tip;
if (_local4.movie == toolbar.fullscreen){
_local11 = GetFullScreenTipID();
};
_local10.text = locale.loadString(_local11);
_local10.y = (_local1 + ((_local8 - _local10.height) / 2));
DropDownToolbar.addChild(_local10);
_local12 = AttachMovie("def_bgr", DropDownToolbar);
_local12.x = ((_local6.x + _local7) + TBMargin);
_local12.y = _local1;
_local12.button = _local4;
_local6.bgr = _local12;
_local12.height = _local10.height;
_local12.buttonMode = (_local12.useHandCursor = true);
_local12.addEventListener(MouseEvent.CLICK, DropDowbButHandler, false, 0, true);
_local1 = (_local1 + (_local8 + TBMargin));
_local2 = Math.max(((((TBMargin + _local7) + TBMargin) + _local10.width) + TBMargin), _local2);
toolbar.more.visible = true;
};
};
_local3++;
};
if (toolbar.more.visible){
_local3 = 0;
while (_local3 < DropDownToolbar.Buttons.length) {
_local4 = DropDownToolbar.Buttons[_local3];
_local4.bgr.width = ((_local2 - _local4.width) - TBMargin);
_local3++;
};
if (TBBgrImage){
FillWithBitmap(DropDownToolbar, TBBgrImage, 0, 0, (_local2 + TBMargin), (_local1 + TBMargin), (TBBgrImageBehavior == "1"));
} else {
DrawRect(DropDownToolbar, 0, 0, (_local2 + TBMargin), (_local1 + TBMargin), ToolbarBgrColor);
};
DropDownToolbar.x = (MovieWidth - DropDownToolbar.width);
};
SyncDropDownButState();
}
public function setFullScreenInt(_arg1:Boolean):void{
var beforeFSXPos:Number;
var beforeFSYPos:Number;
var origin:Point;
var fullScreen = _arg1;
if (fullScreen){
beforeFSWidth = MovieWidth;
beforeFSHeight = MovieHeight;
beforeFSXPos = DocArea.horizontalScrollPosition;
beforeFSYPos = DocArea.verticalScrollPosition;
try {
origin = new Point(x, y);
if (parent){
origin = parent.localToGlobal(origin);
};
stage.fullScreenSourceRect = new Rectangle(origin.x, origin.y, stage.fullScreenWidth, stage.fullScreenHeight);
setSize(stage.fullScreenWidth, stage.fullScreenHeight);
} catch(e:Error) {
};
try {
stage.displayState = "fullScreenInteractive";
if (stage.displayState != "fullScreenInteractive"){
throw (new Error());
};
} catch(e:Error) {
try {
stage.displayState = StageDisplayState.FULL_SCREEN;
if (stage.displayState != StageDisplayState.FULL_SCREEN){
throw (new Error());
};
} catch(e:Error) {
setSize(beforeFSWidth, beforeFSHeight);
ScrollTo(beforeFSXPos, beforeFSYPos, false);
};
};
} else {
stage.displayState = StageDisplayState.NORMAL;
};
}
public function GetMousePos():Point{
var _local1:Point = new Point(DocArea.mouseX, DocArea.mouseY);
return (DocArea.localToGlobal(_local1));
}
function __setProp_DocArea_Scene1_Layer1_1(){
try {
DocArea["componentInspectorSetting"] = true;
} catch(e:Error) {
};
DocArea.enabled = true;
DocArea.horizontalLineScrollSize = 4;
DocArea.horizontalPageScrollSize = 0;
DocArea.horizontalScrollPolicy = "auto";
DocArea.scrollDrag = false;
DocArea.source = "ScrollArea";
DocArea.verticalLineScrollSize = 4;
DocArea.verticalPageScrollSize = 0;
DocArea.verticalScrollPolicy = "auto";
DocArea.visible = true;
try {
DocArea["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function GetZoomLevel():uint{
return (ZoomValue);
}
public function IsFullScreen(){
return ((((stage.displayState == StageDisplayState.FULL_SCREEN)) || ((stage.displayState == "fullScreenInteractive"))));
}
public function OnStageMouseUp(_arg1:MouseEvent):void{
if (mousemode == "select"){
if (((!(Selecting)) && (!(Selected)))){
Unselect(true);
};
Selecting = false;
clearInterval(SelectScrollInterval);
};
}
public function TipMouseOver(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
var _local3:TextField = _local2.tip;
_local2.tipOrigx = _local3.x;
if ((_local3.x + _local3.width) > MovieWidth){
_local3.x = (MovieWidth - _local3.width);
};
if (_local3.x < 0){
_local3.x = 0;
};
_local3.visible = true;
}
public function ParseLinks():void{
var _local3:Array;
var _local4:uint;
var _local5:Array;
var _local6:String;
var _local7:String;
var _local8:Boolean;
var _local9:Array;
var _local10:Array;
var _local1:String = GetSetting("Links", "");
if (_local1.length){
_local3 = _local1.split("\r\n");
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4].split("\t");
_local6 = ("p" + _local5[0]);
if (!LinkDef[_local6]){
LinkDef[_local6] = new Array();
};
_local7 = _local5[2];
_local8 = (_local7.substr(0, 5) == "an://");
if (_local8){
_local7 = ("anchor:" + _local7.substr(5));
};
LinkDef[_local6].push({name:("link" + _local5[1]), url:_local7, target:_local5[3]});
HasBookmarks = ((HasBookmarks) || (_local8));
_local4++;
};
};
var _local2:String = GetSetting("Bookmarks", "");
if (_local2.length){
_local9 = _local2.split("\r\n");
_local4 = 0;
while (_local4 < _local9.length) {
_local10 = _local9[_local4].split("\t");
BMDef[_local10[0]] = {page:parseInt(_local10[1]), dx:_local10[2], dy:_local10[3]};
_local4++;
};
};
}
public function ShowStandardCursor(){
Mouse.show();
root.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
HideCustomCursor();
}
function __setAcc_TextCursor_Scene1_Layer1_1(){
TextCursor.accessibilityProperties = new AccessibilityProperties();
TextCursor.accessibilityProperties.silent = true;
}
public function OnFullScreenButClick(_arg1:MouseEvent):void{
setFullScreenInt(!(IsFullScreen()));
DropDownToolbar.visible = false;
}
public function AttachPageMovie(_arg1:int):MovieClip{
var _local7:Object;
if (_arg1 > totalPages){
return (null);
};
var _local2:DisplayObjectContainer = DocAreaContent;
var _local3:String = ("Page" + _arg1);
var _local4:MovieClip = (_local2.getChildByName(_local3) as MovieClip);
var _local5 = !((_local4 == null));
if (!_local5){
_local4 = new MovieClip();
_local4.name = _local3;
_local2.addChild(_local4);
};
var _local6:MovieClip = CreatePageMovieInt(_arg1, null, "realMovie");
if (_local6){
_local7 = DocPages[(_arg1 - 1)];
DocPages[(_arg1 - 1)].ts = (_local7.text = null);
_local7.movie = _local4;
_local7.realMovie = _local6;
Ch((_arg1 - 1));
CreateLinks(_arg1);
if (_local5){
_local4.removeChild(_local4.getChildByName("realMovie"));
};
_local4.addChild(_local6);
} else {
if (!_local5){
_local2.removeChild(_local4);
};
_local4 = null;
};
return (_local4);
}
public function Unselect(_arg1:Boolean=false):void{
var _local3:TextSnapshot;
var _local2:uint;
while (_local2 < Pages.length) {
_local3 = Pages[_local2].ts;
if (_local3 != null){
_local3.setSelected(0, _local3.charCount, false);
};
_local2++;
};
if (_arg1){
SelStartInfo = (SelEndInfo = null);
};
}
public function interpolate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
var _local6:Number = (_arg1 + (((_arg5 - _arg3) / (_arg4 - _arg3)) * (_arg2 - _arg1)));
if (_local6 < _arg1){
_local6 = _arg1;
};
if (_local6 > _arg2){
_local6 = _arg2;
};
return (_local6);
}
public function GetFromToSelInfo():Object{
if ((((SelStartInfo == null)) || ((SelEndInfo == null)))){
return (null);
};
if ((((SelStartInfo.page < SelEndInfo.page)) || ((((SelStartInfo.page == SelEndInfo.page)) && ((SelStartInfo.pos <= SelEndInfo.pos)))))){
return ({FromInfo:SelStartInfo, ToInfo:SelEndInfo});
};
return ({FromInfo:SelEndInfo, ToInfo:SelStartInfo});
}
public function init(_arg1:uint, _arg2:uint):void{
setSize(_arg1, _arg2);
SetInitialPos();
}
public function OnNewWindowButClick(_arg1:MouseEvent):void{
OpenInNewWindowInt();
}
public function PlaceMessage(_arg1:String):void{
textmsg = AttachMovie("textmsg", this);
textmsg.text.autoSize = TextFieldAutoSize.LEFT;
textmsg.text.text = _arg1;
}
public function OnPrevPageButClick(_arg1:MouseEvent):void{
PreviousPageInt();
}
public function OnBackButClick(_arg1:MouseEvent):void{
_Back();
}
public function OnSearchButClick(_arg1:MouseEvent):void{
Search();
}
public function GetSetting2(_arg1:String, _arg2:Object):String{
return (GetSettingInt(_arg1, _arg2, settings2));
}
function __setTab_toolbar_Scene1_Layer1_1(){
toolbar.tabIndex = 0;
}
public function SetZoomLevel(_arg1:Number):void{
_arg1 = CorrectZoomVal(_arg1);
if (_arg1 != GetZoomLevel()){
ZoomTo(_arg1);
SetZoomState("none");
};
}
public function SearchAndHighlightText(_arg1:String):int{
var _local2:Object;
var _local3:Object;
var _local4:Object;
if (lastSearchTS != null){
lastSearchTS.setSelected(0, lastSearchTS.charCount, false);
};
SearchTextInt(_arg1);
if (lastSearchPos != -1){
lastSearchTS.setSelected(lastSearchPos, (lastSearchPos + _arg1.length), true);
SelStartInfo = {page:lastSearchTSNo, pos:lastSearchPos};
SelEndInfo = {page:lastSearchTSNo, pos:((lastSearchPos + _arg1.length) - 1)};
_local2 = lastSearchTS.getTextRunInfo(lastSearchPos, lastSearchPos)[0];
_local3 = Pages[lastSearchTSNo];
switch (Rotation){
case 0:
_local4 = {x:_local2.corner3x, y:_local2.corner3y};
break;
case 90:
_local4 = {x:(_local3.width - _local2.corner0y), y:_local2.corner0x};
break;
case 180:
_local4 = {x:(_local3.width - _local2.corner1x), y:(_local3.height - _local2.corner1y)};
break;
case 270:
_local4 = {x:_local2.corner2y, y:(_local3.height - _local2.corner2x)};
};
SetCurrentPage((lastSearchTSNo + 1), _local4.x, _local4.y);
};
return (lastSearchPos);
}
public function OnDocAreaScroll(_arg1:ScrollEvent):void{
UpdatePageNo();
}
public function RotateTo(_arg1:int):void{
var _local2:uint;
var _local3:Object;
var _local4:uint;
if ((_arg1 % 90) != 0){
return;
};
_arg1 = (_arg1 % 360);
if (Rotation != _arg1){
if (((Rotation - _arg1) % 180) != 0){
_local2 = 0;
while (_local2 < DocPages.length) {
_local3 = DocPages[_local2];
_local4 = _local3.width;
_local3.width = _local3.height;
_local3.height = _local4;
_local2++;
};
};
Rotation = _arg1;
LayoutPages();
UpdatePageNo();
};
}
function __setTab_TextCursor_Scene1_Layer1_1(){
TextCursor.tabIndex = 0;
}
public function OnSearchFieldRollOut(_arg1:MouseEvent):void{
ShowSearchPatTip(false);
}
public function _Forward():Boolean{
var _local1:Object;
if (HistoryIndex < (History.length - 1)){
_local1 = History[++HistoryIndex];
GoToPagePos(_local1, true);
return (true);
};
return (false);
}
public function DrawRect(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:Number=NaN){
var _local8:Graphics = _arg1.graphics;
_local8.beginFill(_arg6);
if (isNaN(_arg7)){
_local8.lineStyle();
} else {
_local8.lineStyle(0, _arg7);
};
_local8.drawRect(_arg2, _arg3, (_arg4 - _arg2), (_arg5 - _arg3));
_local8.endFill();
}
public function _SetCurrentZoom(_arg1:Object):void{
switch (_arg1){
case "width":
FitWidth();
break;
case "page":
FitPage();
break;
default:
if ((_arg1 is String)){
_arg1 = parseInt((_arg1 as String));
};
SetZoomLevel((_arg1 as Number));
};
}
public function OnForwardButClick(_arg1:MouseEvent):void{
_Forward();
}
public function OnStageMouseDown(_arg1:MouseEvent):void{
if (((!(DropDownToolbar.hitTestPoint(_arg1.stageX, _arg1.stageY))) && (!(toolbar.more.hitTestPoint(_arg1.stageX, _arg1.stageY))))){
DropDownToolbar.visible = false;
};
notfoundtip.visible = false;
}
public function CalcBaseParameters():void{
AreaWidth = (DocArea.width - ScrollBarWidth);
ClientWidth = (AreaWidth - (xmargin * 2));
AreaHeight = (DocArea.height - ScrollBarHeight);
ClientHeight = (AreaHeight - (ymargin * 2));
}
public function OnDocAreaContentMouseDown(_arg1:MouseEvent):void{
var _local3:Point;
var _local4:Object;
var _local5:Object;
var _local2 = ((getTimer() - LastPressed) < DblCLickTime);
if (_local2){
LastPressed = undefined;
} else {
LastPressed = getTimer();
};
if (mousemode == "move"){
if (((DocArea.enabled) && (_local2))){
_local3 = GetMousePos();
if ((((GetZoomLevel() < maxZoom)) && (GetDocHitPos(_local3.x, _local3.y)))){
if (GetZoomLevel() >= CalcZoomLevel("", _local4.page)){
SetZoomLevel((GetZoomLevel() * 1.5));
} else {
SetBaseParameters(_local4.page);
};
_local4.x = (_local4.x - ((AreaWidth / 2) / DocAreaContent.scaleX));
_local4.y = (_local4.y - ((AreaHeight / 2) / DocAreaContent.scaleY));
SetCurrentPage(_local4.page, _local4.x, _local4.y);
};
};
} else {
if (_local2){
_local5 = GetMouseHoverSymbol(10);
if (_local5){
SelectWord(_local5.page, _local5.pos);
Selected = true;
};
} else {
Selected = false;
if (DocArea.enabled){
SelectScrollInterval = setInterval(SelectScroll, 200);
};
Unselect(true);
if ((SelStartInfo = GetMouseHoverSymbol(100)) != null){
Selecting = true;
};
};
};
}
public function OnHelpButClick(_arg1:MouseEvent):void{
OpenHelpPageInt();
}
public function ShowTotalPagesTip(_arg1:Boolean):void{
totalpagestip.visible = ((_arg1) && (totalpagestip.parent.visible));
}
public function LinkClick(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.target as MovieClip);
_goToLinkTarget(_local2.LinkURL, _local2.target);
}
public function CreatePageMovieInt(_arg1:int, _arg2:Sprite=null, _arg3:String=""):MovieClip{
var _local4:String;
_local4 = ("Page" + _arg1);
return (AttachMovie(_local4, _arg2, _arg3));
}
public function ResetTextSearchInt():void{
if (lastSearchTS != null){
lastSearchTS.setSelected(0, lastSearchTS.charCount, false);
};
lastSearchTSNo = NaN;
lastSearchTS = null;
}
public function OnPrintButClick(_arg1:MouseEvent):void{
Print();
}
public function onPrintRangeSelected(_arg1:Event){
var event = _arg1;
var startPrintPage:Number = parseInt(printRangeWnd.pagesFrom.text);
var endPrintPage:Number = parseInt(printRangeWnd.pagesTo.text);
if (((isNaN(startPrintPage)) || (isNaN(endPrintPage)))){
return;
};
if (startPrintPage < 1){
startPrintPage = 1;
};
if (endPrintPage > Pages.length){
endPrintPage = Pages.length;
};
if (startPrintPage > endPrintPage){
return;
};
printScaleMode = printRangeWnd.printScaleMode;
try {
localData.data.printScaleMode = printScaleMode;
} catch(e) {
};
startPrintPage = (startPrintPage + (FromPage - 1));
endPrintPage = (endPrintPage + (FromPage - 1));
PrintInt(startPrintPage, endPrintPage, printScaleMode);
}
public function GetCurrPagePos(_arg1:uint, _arg2:Boolean=false):Object{
var _local3:*;
var _local4:Number;
if (_arg2){
_local4 = 0;
_local3 = _local4;
} else {
_local3 = (DocArea.width / 2);
_local4 = (DocArea.height / 2);
};
var _local5:Object = Pages[(_arg1 - 1)];
return ({y:(((DocArea.verticalScrollPosition + _local4) / DocAreaContent.scaleX) - _local5.movie.y), x:(((DocArea.horizontalScrollPosition + _local3) / DocAreaContent.scaleY) - _local5.movie.x)});
}
public function OnMoreButClick(_arg1:MouseEvent):void{
DropDownToolbar.visible = !(DropDownToolbar.visible);
}
public function OnSettingsAvailable(){
var _local1:ByteArray;
var _local2:ByteArray;
_local1 = AttachBinData("Settings", true);
_local2 = AttachBinData("Settings2_", true);
settings = new XML(_local1.readUTFBytes(_local1.length));
settings2 = new XML(_local2.readUTFBytes(_local2.length));
totalPages = GetIntSetting("PageNum", 0);
widths = GetSetting("Widths", "").split(/,/);
heights = GetSetting("Heights", "").split(/,/);
if (totalPages){
waitmsg = PlaceWaitMsg(this, "Loading...");
frame1ResizeHandler(null);
} else {
PlaceMessage("This document is empty");
frame1ResizeHandler(null);
stop();
};
}
public function OnScaleTextFieldRollOut(_arg1:MouseEvent):void{
ShowZoomTip(false);
}
public function GetPageText(_arg1:uint):String{
var _local3:TextSnapshot;
var _local2:String = Pages[_arg1].text;
if (_local2 == null){
_local3 = GetTextSnapshot(_arg1);
_local2 = _local3.getText(0, _local3.charCount, false);
Pages[_arg1].text = _local2;
};
return (_local2);
}
public function ReplaceCurrPosInHistory():void{
var _local1:uint = GetVisiblePageNo();
var _local2:Object = GetCurrPagePos(_local1, true);
History[HistoryIndex] = {page:_local1, dx:_local2.x, dy:_local2.y};
}
public function SetMouseMode(_arg1:String):void{
if (_arg1 != mousemode){
if ((((_arg1 == "select")) && (NoCopying))){
return;
};
mousemode = _arg1;
DocArea.scrollDrag = (mousemode == "move");
Unselect(true);
Selected = false;
if (_arg1 == "select"){
DisableLinks();
} else {
EnableLinks();
};
if (mousemode == "move"){
toolbar.moveMode.but.ShowState(2);
toolbar.moveMode.but.normalState = 2;
toolbar.selMode.but.ShowState(1);
toolbar.selMode.but.normalState = 1;
cursor = HandCursor;
} else {
toolbar.moveMode.but.ShowState(1);
toolbar.moveMode.but.normalState = 1;
toolbar.selMode.but.ShowState(2);
toolbar.selMode.but.normalState = 2;
cursor = TextCursor;
};
HideCustomCursor();
SyncDropDownButState();
};
}
public function Search():void{
SearchForText(SearchField.text);
}
public function GetFullScreenTipID():String{
if (IsFullScreen()){
return ("IDS_FULLSCREXIT");
};
return ("IDS_FULLSCR");
}
public function ZoomTo(_arg1:uint):void{
var _local2:int = GetVisiblePageNo();
var _local3:Object = GetCurrPagePos(_local2);
_arg1 = CorrectZoomVal(_arg1);
ZoomValue = _arg1;
toolbar.ZoomSlider.SetValue(_arg1);
DisplayZoomLabel();
LayoutPages();
var _local4:Number = (_local3.x - (((DocArea.width / 2) - xinterstice) / DocArea.content.scaleX));
var _local5:Number = (_local3.y - (((DocArea.height / 2) - yinterstice) / DocArea.content.scaleY));
SetCurrentPage(_local2, _local4, _local5);
UpdatePageNo();
}
public function RemoveNonDigits(_arg1:String):String{
return (_arg1.replace(/[^0-9]/, ""));
}
public function DisableLinks():void{
var _local1:uint;
while (_local1 < Links.length) {
Links[_local1].removeEventListener(MouseEvent.CLICK, LinkClick);
Links[_local1].removeEventListener(MouseEvent.ROLL_OVER, LinkMouseOver);
Links[_local1].removeEventListener(MouseEvent.ROLL_OUT, LinkMouseOut);
_local1++;
};
}
public function OnStageResize(_arg1:Event):void{
if (autonomous){
setSize(stage.stageWidth, stage.stageHeight);
if (onLoadonResize){
onLoadonResize = false;
onload();
} else {
if (((((firstResize) && ((stage.stageWidth == 0)))) && ((stage.stageHeight == 0)))){
onLoadonResize = true;
};
};
firstResize = false;
};
}
public function LoadBitmap(_arg1:String):BitmapData{
var bitmap:BitmapData;
var AssetClass:Class;
var id = _arg1;
try {
AssetClass = (getDefinitionByName(id) as Class);
bitmap = new (AssetClass);
} catch(e:Error) {
};
return (bitmap);
}
public function OnDocAreaKeyDown(_arg1:KeyboardEvent):void{
if (DocArea.enabled){
switch (_arg1.keyCode){
case Keyboard.UP:
_arg1.stopImmediatePropagation();
if (_arg1.ctrlKey){
PreviousPageInt();
} else {
ScrollTo(NaN, (DocArea.verticalScrollPosition - DocArea.verticalLineScrollSize));
};
break;
case Keyboard.DOWN:
_arg1.stopImmediatePropagation();
if (_arg1.ctrlKey){
NextPageInt();
} else {
ScrollTo(NaN, (DocArea.verticalScrollPosition + DocArea.verticalLineScrollSize));
};
break;
case Keyboard.LEFT:
_arg1.stopImmediatePropagation();
if (_arg1.ctrlKey){
_Back();
} else {
ScrollTo((DocArea.horizontalScrollPosition - DocArea.horizontalLineScrollSize), NaN);
};
break;
case Keyboard.RIGHT:
_arg1.stopImmediatePropagation();
if (_arg1.ctrlKey){
_Forward();
} else {
ScrollTo((DocArea.horizontalScrollPosition + DocArea.horizontalLineScrollSize), NaN);
};
break;
case Keyboard.BACKSPACE:
_Back();
break;
case 85:
if (_arg1.ctrlKey){
NextPageInt();
};
break;
case 89:
if (_arg1.ctrlKey){
PreviousPageInt();
};
break;
case 107:
if (_arg1.ctrlKey){
SetZoomLevel((ZoomValue + 10));
};
break;
case 109:
if (_arg1.ctrlKey){
SetZoomLevel((ZoomValue - 10));
};
break;
};
} else {
_arg1.stopImmediatePropagation();
};
if ((((_arg1.keyCode == 80)) && (_arg1.ctrlKey))){
Print();
};
}
public function ShowTotalPages():void{
TotalPagesField.text = ("/ " + new String(Pages.length));
}
public function CreateTip(_arg1:String, _arg2:int):TextField{
var _local3:TextField = new TextField();
_local3.accessibilityProperties = new AccessibilityProperties();
_local3.accessibilityProperties.silent = true;
_local3.y = toppanelheight;
_local3.visible = false;
_local3.border = true;
_local3.borderColor = 0;
_local3.background = true;
_local3.backgroundColor = 16777185;
_local3.selectable = false;
_local3.defaultTextFormat = new TextFormat("Tahoma", 12, 0);
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.text = _arg1;
_local3.x = (_arg2 - (_local3.width / 2));
toolbar.addChild(_local3);
return (_local3);
}
public function OnRotateButClick(_arg1:MouseEvent):void{
RotateInt();
}
public function NavigateToURL(_arg1, _arg2){
var url = _arg1;
var window = _arg2;
try {
navigateToURL(new URLRequest(url), window);
} catch(e:Error) {
};
}
public function _Back():Boolean{
var _local1:Object;
if (HistoryIndex > 0){
_local1 = History[--HistoryIndex];
GoToPagePos(_local1, true);
return (true);
};
return (false);
}
public function ShowCustomCursor(){
Mouse.hide();
cursor.visible = true;
root.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, false, 0, true);
}
public function OnNextPageButClick(_arg1:MouseEvent):void{
NextPageInt();
}
public function frame1ResizeHandler(_arg1:Event):void{
CenterMsg(waitmsg);
}
public function AttachBtnImage(_arg1:MovieClip, _arg2:uint, _arg3:Boolean):void{
var _local4:* = ("TBImage" + _arg2);
if (_arg1.image){
_arg1.removeChild(_arg1.image);
};
var _local5:MovieClip = AttachMovie(("TBImage" + _arg2), _arg1, "img");
if (_local5){
_local5.mouseEnabled = false;
_local5.x = Math.round(((_arg1.width - _local5.width) / 2));
_local5.y = Math.round(((_arg1.height - _local5.height) / 2));
_arg1.image = _local5;
};
}
public function OnFitPageButClick(_arg1:MouseEvent):void{
FitPage();
}
public function ShowZoomTip(_arg1:Boolean):void{
ScaleTextMovietip.visible = ((((_arg1) && (toolbar.ScaleTextMovie.visible))) && (!((stage.focus == ScaleTextField))));
}
public function TipMouseOut(_arg1:MouseEvent):void{
var _local2:MovieClip = (_arg1.currentTarget as MovieClip);
var _local3:TextField = _local2.tip;
_local3.visible = false;
_local3.x = _local2.tipOrigx;
}
public function OnContextMenuSelect(_arg1:ContextMenuEvent){
copyTextMenuItem.visible = ((!(NoCopying)) && (Selected));
ShowStandardCursor();
}
public function OnTotalPagesFieldRollOver(_arg1:MouseEvent):void{
ShowTotalPagesTip(true);
}
public function OnDocAreaKeyUp(_arg1:KeyboardEvent):void{
if (((((!(NoCopying)) && (_arg1.ctrlKey))) && ((((_arg1.keyCode == 67)) || ((_arg1.keyCode == 45)))))){
CopyText();
};
}
public function SetCurrentPage(_arg1:uint, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=false):void{
if (_arg1 < 1){
_arg1 = 1;
};
if (_arg1 > Pages.length){
_arg1 = Pages.length;
};
_arg2 = (_arg2 * DocAreaContent.scaleX);
_arg3 = (_arg3 * DocAreaContent.scaleY);
var _local5:Number = ((Pages[(_arg1 - 1)].movie.y * DocAreaContent.scaleY) + _arg3);
var _local6:Number = ((Pages[(_arg1 - 1)].movie.x * DocAreaContent.scaleX) + _arg2);
if (!_arg4){
_local5 = (_local5 - yinterstice);
_local6 = (_local6 - xinterstice);
};
ScrollTo(_local6, _local5, false);
UpdatePageNo(_arg1);
}
public function AddToHistory(_arg1:Object){
ReplaceCurrPosInHistory();
var _local2 = ++HistoryIndex;
History[_local2] = _arg1;
History.splice((HistoryIndex + 1), History.length);
}
public function FitPage():void{
if (scaleMode != "page"){
SetZoomState("page");
SetBaseParameters();
};
SetCurrentPage(GetCurrentPage());
}
function __setAcc_toolbar_Scene1_Layer1_1(){
toolbar.accessibilityProperties = new AccessibilityProperties();
toolbar.accessibilityProperties.name = "Print2Flash Toolbar";
}
public function PrintInt(_arg1:Number, _arg2:Number, _arg3:String):void{
var printJob:PrintJob;
var jobStarted:Boolean;
var pageno:uint;
var page:Object;
var pageAdded:Boolean;
var pageMovie:MovieClip;
var contPageMovie:MovieClip;
var printArea:Rectangle;
var realPageMovie:MovieClip;
var paWidth:Number;
var paHeight:Number;
var scale:Number;
var scaleRotated:Number;
var startPrintPage = _arg1;
var endPrintPage = _arg2;
var printScaleMode = _arg3;
if (!NoPrinting){
printJob = new PrintJob();
try {
jobStarted = printJob.start();
} catch(e:Error) {
jobStarted = false;
};
if (jobStarted){
pageno = startPrintPage;
while (pageno <= endPrintPage) {
page = DocPages[(pageno - 1)];
pageAdded = false;
pageMovie = CreatePageMovieInt(pageno);
if (pageMovie){
contPageMovie = new MovieClip();
addChild(contPageMovie);
switch (printScaleMode){
case "noscale":
realPageMovie = pageMovie;
pageMovie = new MovieClip();
contPageMovie.addChild(pageMovie);
paWidth = ((printJob.pageWidth / 72) * Resolution);
paHeight = ((printJob.pageHeight / 72) * Resolution);
DrawRect(pageMovie, 0, 0, (paWidth * 1.1), (paHeight * 1.1), 0xFFFFFF, 0xFFFFFF);
pageMovie.addChild(realPageMovie);
realPageMovie.x = ((paWidth - ((printJob.paperWidth / 72) * Resolution)) / 2);
realPageMovie.y = ((paHeight - ((printJob.paperHeight / 72) * Resolution)) / 2);
printArea = new Rectangle(0, 0, paWidth, paHeight);
pageMovie.scaleX = (pageMovie.scaleY = (72 / Resolution));
break;
default:
contPageMovie.addChild(pageMovie);
scale = Math.min((printJob.pageWidth / page.realWidth), (printJob.pageHeight / page.realHeight));
scaleRotated = Math.min((printJob.pageWidth / page.realHeight), (printJob.pageHeight / page.realWidth));
if (scaleRotated > scale){
scale = scaleRotated;
pageMovie.rotation = 270;
pageMovie.y = (page.realWidth * scale);
};
pageMovie.scaleX = (pageMovie.scaleY = scale);
printArea = new Rectangle(0, 0, (page.realWidth - 1), (page.realHeight - 1));
break;
};
scale = Math.min((MovieWidth / contPageMovie.width), (MovieHeight / contPageMovie.height));
contPageMovie.scaleX = (contPageMovie.scaleY = scale);
try {
printJob.addPage(pageMovie, printArea, new PrintJobOptions(PrintAsBitmap));
pageAdded = true;
} catch(e:Error) {
};
removeChild(contPageMovie);
};
if (!pageAdded){
break;
};
pageno = (pageno + 1);
};
printJob.send();
printJob = null;
};
};
}
public function GetFullScreenButID():int{
if (IsFullScreen()){
return (21);
};
return (20);
}
public function _goToLinkTarget(_arg1:String, _arg2:String):Boolean{
if (_arg1.substr(0, 7) == "anchor:"){
return (GoToBookmark(_arg1.substr(7)));
};
NavigateToURL(_arg1, _arg2);
return (true);
}
public function getSelectedTextInt():String{
var _local3:TextSnapshot;
var _local4:String;
var _local1 = "";
var _local2:uint;
while (_local2 < Pages.length) {
_local3 = Pages[_local2].ts;
if (_local3 != null){
_local4 = _local3.getSelectedText(true);
if (_local4 != ""){
_local1 = (_local1 + (_local4 + String.fromCharCode(13, 10)));
};
};
_local2++;
};
return (_local1);
}
public function GetSetting(_arg1:String, _arg2:Object):String{
return (GetSettingInt(_arg1, _arg2, settings));
}
public function GoToPagePos(_arg1:Object, _arg2:Boolean){
var _local3:Number;
var _local4:Number;
var _local5:Object = Pages[(_arg1.page - 1)];
switch (Rotation){
case 90:
_local3 = (_local5.realHeight - _arg1.dy);
_local4 = _arg1.dx;
break;
case 180:
_local3 = (_local5.realWidth - _arg1.dx);
_local4 = (_local5.realHeight - _arg1.dy);
break;
case 270:
_local3 = _arg1.dy;
_local4 = (_local5.realWidth - _arg1.dx);
break;
default:
_local3 = _arg1.dx;
_local4 = _arg1.dy;
};
SetCurrentPage(_arg1.page, _local3, _local4, _arg2);
}
public function SelectWord(_arg1:uint, _arg2:uint){
var _local4:*;
var _local5:int;
var _local3:String = GetPageText(_arg1);
if (IsWordSym(_local3.substr(_arg2, 1))){
_local5 = FindNonWord(_local3, _arg2);
if (_local5 == -1){
_local5 = _local3.length;
};
_local4 = FindLastNonWord(_local3, _arg2);
if (_local4 == -1){
_local4 = 0;
} else {
_local4++;
};
} else {
_local4 = _arg2;
_local5 = (_arg2 + 1);
};
Unselect();
var _local6:TextSnapshot = GetTextSnapshot(_arg1);
_local6.setSelected(_local4, _local5, true);
SelStartInfo = {page:_arg1, pos:_local4};
SelEndInfo = {page:_arg1, pos:(_local5 - 1)};
}
public function ScrollTo(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{
var _local4:Boolean;
if (!isNaN(_arg1)){
if (_arg1 > DocArea.maxHorizontalScrollPosition){
_arg1 = DocArea.maxHorizontalScrollPosition;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
if (_arg1 != DocArea.horizontalScrollPosition){
DocArea.horizontalScrollPosition = _arg1;
_local4 = true;
};
};
if (!isNaN(_arg2)){
if (_arg2 > DocArea.maxVerticalScrollPosition){
_arg2 = DocArea.maxVerticalScrollPosition;
} else {
if (_arg2 < 0){
_arg2 = 0;
};
};
if (_arg2 != DocArea.verticalScrollPosition){
DocArea.verticalScrollPosition = _arg2;
_local4 = true;
};
};
if (_arg3){
UpdatePageNo();
};
}
public function SetInitialPage():void{
SetCurrentPage(GetInitParam("INITIAL_PAGE", "1"));
}
public function SetInitialPos():void{
var _local1:String = GetInitParam("INITIAL_BOOKMARK", "");
if (_local1){
if (!GoToBookmark(_local1, false)){
SetInitialPage();
};
} else {
SetInitialPage();
};
}
public function SetZoomState(_arg1:String):void{
scaleMode = _arg1;
if (scaleMode == "page"){
toolbar.scalePage.but.ShowState(2);
toolbar.scalePage.but.normalState = 2;
} else {
toolbar.scalePage.but.ShowState(1);
toolbar.scalePage.but.normalState = 1;
};
if (scaleMode == "width"){
toolbar.scaleWidth.but.ShowState(2);
toolbar.scaleWidth.but.normalState = 2;
} else {
toolbar.scaleWidth.but.ShowState(1);
toolbar.scaleWidth.but.normalState = 1;
};
SyncDropDownButState();
}
public function CopyText():void{
var _local1:String = getSelectedTextInt();
if (_local1 != ""){
System.setClipboard(_local1);
};
}
public function OnStageKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode != 13){
notfoundtip.visible = false;
};
}
public function SetInitialView():void{
_SetCurrentZoom(GetInitParam("INITIAL_VIEW", "width"));
RotateTo(GetInitParam("INITIAL_ROTATE", "0"));
}
public function CreateTips():void{
var _local2:Object;
var _local3:MovieClip;
var _local4:TextField;
var _local1:uint;
while (_local1 < TBButtons.length) {
_local2 = TBButtons[_local1];
if (_local2.tip){
_local3 = _local2.movie;
_local4 = CreateTip(locale.loadString(_local2.tip), (_local3.x + (_local3.width / 2)));
_local3.tip = _local4;
if (!_local2.notiphandler){
_local3.addEventListener(MouseEvent.ROLL_OVER, TipMouseOver, false, 0, true);
_local3.addEventListener(MouseEvent.ROLL_OUT, TipMouseOut, false, 0, true);
};
if (_local3 == toolbar.searchPatternmc){
searchPatternmctip = _local4;
};
if (_local3 == toolbar.ScaleTextMovie){
ScaleTextMovietip = _local4;
};
};
_local1++;
};
notfoundtip = CreateTip(locale.loadString("IDS_NOTFOUND"), (toolbar.searchPatternmc.x + (toolbar.searchPatternmc.width / 2)));
pagenotip = CreateTip(locale.loadString("IDS_GOTOPAGE"), ((toolbar.PageNoMovie.x + toolbar.PageNoMovie.PageNoFieldMC.x) + (toolbar.PageNoMovie.PageNoFieldMC.width / 2)));
totalpagestip = CreateTip(locale.loadString("IDS_TOTPAGES"), ((toolbar.PageNoMovie.x + toolbar.PageNoMovie.TotalPagesMC.x) + (toolbar.PageNoMovie.TotalPagesMC.width / 2)));
SetupFSButton();
if (Accessibility.active){
Accessibility.updateProperties();
};
}
public function OnPageNoFieldKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.charCode == 13){
ProcessPageNo();
};
}
public function GetDocHitPos(_arg1:Number, _arg2:Number):Object{
var _local4:MovieClip;
var _local5:Point;
var _local3:uint;
while (_local3 < Pages.length) {
if (Pages[_local3].movie.hitTestPoint(_arg1, _arg2)){
_local4 = Pages[_local3].movie;
_local5 = new Point(_local4.x, _local4.y);
_local5 = _local4.parent.localToGlobal(_local5);
return ({page:(_local3 + 1), x:((_arg1 - _local5.x) / DocArea.content.scaleX), y:((_arg2 - _local5.y) / DocArea.content.scaleY)});
};
_local3++;
};
return (null);
}
public function Print(_arg1:Number=1, _arg2:Number=0, _arg3:String=""){
if (!NoPrinting){
if (!_arg2){
_arg2 = Pages.length;
};
if (_arg3 == ""){
_arg3 = printScaleMode;
};
DropDownToolbar.visible = false;
printRangeWnd.show(this, MovieWidth, MovieHeight, _arg1, _arg2, _arg3);
};
}
public function ShowPageNoFieldTip(_arg1:Boolean):void{
pagenotip.visible = ((((_arg1) && (pagenotip.parent.visible))) && (!((stage.focus == PageNoField))));
}
public function GetCurrentPage():uint{
return (PageNo);
}
public function OnScaleTextFieldRollOver(_arg1:MouseEvent):void{
ShowZoomTip(true);
}
public function LayoutPages():void{
var _local6:Object;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:int;
var _local10:Number;
var _local11:uint;
var _local12:uint;
var _local13:int;
var _local14:int;
var _local1:int = xmargin;
var _local2:int = ymargin;
var _local3:int;
ScaleFactor = ((ZoomValue / 100) * zoomCorr);
DocAreaContent.scaleX = (DocAreaContent.scaleY = ScaleFactor);
var _local4:uint;
var _local5:int;
while (_local5 < Pages.length) {
_local6 = Pages[_local5];
_local7 = _local6.movie;
_local8 = _local6.realMovie;
if (((_local1 + (_local6.width * ScaleFactor)) + xmargin) > AreaWidth){
if (_local3 > 0){
_local2 = (_local2 + ((_local3 * ScaleFactor) + yinterstice));
};
_local1 = xmargin;
_local3 = 0;
};
_local6.y = _local2;
_local7.x = (_local1 / ScaleFactor);
_local7.y = (_local2 / ScaleFactor);
_local8.rotation = Rotation;
switch (Rotation){
case 0:
_local8.x = (_local8.y = 0);
break;
case 90:
_local8.x = _local6.width;
_local8.y = 0;
break;
case 180:
_local8.x = _local6.width;
_local8.y = _local6.height;
break;
case 270:
_local8.x = 0;
_local8.y = _local6.height;
break;
};
_local1 = (_local1 + ((_local6.width * ScaleFactor) + xinterstice));
if (_local6.height > _local3){
_local3 = _local6.height;
};
_local4 = Math.max(_local1, _local4);
_local5++;
};
_local5 = 0;
while (_local5 < Pages.length) {
_local9 = _local5;
_local10 = Pages[_local5].movie.y;
_local11 = uint.MAX_VALUE;
_local12 = uint.MIN_VALUE;
do {
_local6 = Pages[_local5];
_local11 = Math.min(_local11, _local6.movie.x);
_local12 = Math.max(_local12, (_local6.movie.x + _local6.width));
_local5++;
} while ((((_local5 < Pages.length)) && ((_local10 == Pages[_local5].movie.y))));
_local13 = (((ClientWidth / ScaleFactor) - (_local12 - _local11)) / 2);
if (_local13 > 0){
_local14 = _local9;
while (_local14 < _local5) {
Pages[_local14].movie.x = (Pages[_local14].movie.x + _local13);
_local14++;
};
};
};
BottomArea.y = (((_local2 + yinterstice) + (_local3 * ScaleFactor)) / ScaleFactor);
BottomArea.height = (ymargin / ScaleFactor);
BottomArea.x = (_local4 / ScaleFactor);
BottomArea.width = (xmargin / ScaleFactor);
DocArea.update();
}
public function mouseOutHandler(_arg1:MouseEvent):void{
ShowStandardCursor();
}
public function LinkMouseOut(_arg1:MouseEvent):void{
ShowCustomCursor();
}
public function CorrectZoomVal(_arg1:Number):uint{
if (_arg1 > maxZoom){
_arg1 = maxZoom;
};
if (_arg1 < minZoom){
_arg1 = minZoom;
};
return (Math.floor(_arg1));
}
public function CalcScrollSteps():void{
DocArea.verticalLineScrollSize = (DocArea.height / 20);
DocArea.verticalPageScrollSize = (DocArea.height - DocArea.verticalLineScrollSize);
DocArea.horizontalLineScrollSize = (DocArea.width / 20);
DocArea.horizontalPageScrollSize = (DocArea.width - DocArea.horizontalLineScrollSize);
}
public function OnStageMouseLeave(_arg1:Event):void{
mouseOutHandler(new MouseEvent(MouseEvent.MOUSE_OUT));
}
function __setAcc_HandCursor_Scene1_Layer1_1(){
HandCursor.accessibilityProperties = new AccessibilityProperties();
HandCursor.accessibilityProperties.silent = true;
}
public function IsWordSym(_arg1:String):Boolean{
var _local2:Number = _arg1.charCodeAt(0);
return ((((((((((_arg1 >= "A")) && ((_arg1 <= "Z")))) || ((((_arg1 >= "a")) && ((_arg1 <= "z")))))) || ((((_arg1 >= "0")) && ((_arg1 <= "9")))))) || ((((((((_local2 >= 128)) && (!((((_local2 >= 0x2000)) && ((_local2 <= 8303))))))) && (!((((_local2 >= 160)) && ((_local2 <= 191))))))) && (!((((_local2 >= 0x2E00)) && ((_local2 <= 11903)))))))));
}
public function SearchForText(_arg1:String):Boolean{
return ((notfoundtip.visible = (SearchAndHighlightText(_arg1) == -1)));
}
public function SyncDropDownButState():void{
var _local1:*;
var _local2:MovieClip;
if (DropDownToolbar){
_local1 = 0;
while (_local1 < DropDownToolbar.Buttons.length) {
_local2 = DropDownToolbar.Buttons[_local1];
_local2.but.normalState = _local2.button.movie.but.normalState;
_local2.but.ShowState(_local2.but.normalState);
_local1++;
};
};
}
public function OnPageNoFieldRollOver(_arg1:MouseEvent):void{
ShowPageNoFieldTip(true);
}
public function OnDocAreaContentRollOver(_arg1:MouseEvent):void{
cursor.x = _arg1.stageX;
cursor.y = _arg1.stageY;
ShowCustomCursor();
}
public function GetInitParam(_arg1:String, _arg2:Object){
var _local3:* = loaderInfo.parameters[_arg1];
if (_local3 == null){
_local3 = _arg2;
};
return (_local3);
}
public function CenterMsg(_arg1:MovieClip){
if (_arg1){
_arg1.x = ((stage.stageWidth - _arg1.width) / 2);
_arg1.y = ((stage.stageHeight - _arg1.height) / 2);
};
}
public function ProcessZoomEntry():void{
SetZoomLevel(new Number(RemoveNonDigits(ScaleTextField.text)));
}
public function PlaceWaitMsg(_arg1:Sprite, _arg2:String):MovieClip{
var _local3 = "waitmsg";
var _local4:MovieClip = AttachMovie(_local3, _arg1, _local3);
_local4.msg.autoSize = TextFieldAutoSize.LEFT;
_local4.msg.text = _arg2;
return (_local4);
}
public function OpenInNewWindowInt():void{
DropDownToolbar.visible = false;
NavigateToURL(loaderInfo.url, "_blank");
}
public function OnScaleTextFieldFocusOut(_arg1:FocusEvent):void{
ProcessZoomEntry();
}
public function OnPageNoFieldFocusIn(_arg1:FocusEvent):void{
PageNoInitVal = PageNoField.text;
ShowPageNoFieldTip(false);
}
public function OnFitWidthButClick(_arg1:MouseEvent):void{
FitWidth();
}
public function SelectScroll(){
if (DocArea.mouseY > DocArea.height){
ScrollTo(undefined, (DocArea.verticalScrollPosition + interpolate((DocArea.verticalLineScrollSize * MinSelVScrollRatio), (DocArea.verticalLineScrollSize * MaxSelVScrollRatio), DocArea.height, (DocArea.height * 2), DocArea.mouseY)));
} else {
if (DocArea.mouseY < 0){
ScrollTo(undefined, (DocArea.verticalScrollPosition - interpolate((DocArea.verticalLineScrollSize * MinSelVScrollRatio), (DocArea.verticalLineScrollSize * MaxSelVScrollRatio), 0, -(DocArea.height), DocArea.mouseY)));
} else {
if (DocArea.mouseX > DocArea.width){
ScrollTo((DocArea.horizontalScrollPosition + interpolate((DocArea.horizontalLineScrollSize * MinSelHScrollRatio), (DocArea.horizontalLineScrollSize * MaxSelHScrollRatio), DocArea.width, (DocArea.width * 2), DocArea.mouseX)), undefined);
} else {
if (DocArea.mouseX < 0){
ScrollTo((DocArea.horizontalScrollPosition - interpolate((DocArea.horizontalLineScrollSize * MinSelHScrollRatio), (DocArea.horizontalLineScrollSize * MaxSelHScrollRatio), 0, -(DocArea.width), DocArea.mouseX)), undefined);
};
};
};
};
}
public function AttachBtnImages(){
var _local4:*;
var _local1:* = 0;
while (_local1 < TBButtons.length) {
_local4 = TBButtons[_local1];
if (_local4.id){
AttachBtnImage(_local4.movie, _local4.id, _local4.nocoladj);
};
_local1++;
};
AttachBtnImage(toolbar.more, 16, false);
toolbar.ZoomSlider.SetRange(minZoom, maxZoom);
toolbar.ZoomSlider.y = Math.round(((Deftoppanelheight - toolbar.ZoomSlider.height) / 2));
toolbar.ZoomSlider.Init();
var _local2:MovieClip = toolbar.ZoomSlider.getChildByName("img");
if (_local2){
toolbar.ZoomSlider.swapChildren(_local2, toolbar.ZoomSlider.SliderHandle);
toolbar.ZoomSlider.SliderHandleBtn.y = Math.round(((-((toolbar.ZoomSlider.SliderHandleBtn.height - _local2.height)) / 2) + GetIntSetting("ZoomHandleOffset", 0)));
};
var _local3:MovieClip = toolbar.logo.getChildByName("img");
if (_local3){
_local3.y = Math.round(((29 - _local3.height) / 2));
};
}
public function UpdateMaxPageParams(_arg1:Object):void{
if (_arg1.width > MaxPageWidth){
MaxPageWidth = _arg1.width;
};
if (_arg1.height > MaxPageHeight){
MaxPageHeight = _arg1.height;
};
}
public function UpdatePageNo(_arg1:Number=0):void{
if (!_arg1){
_arg1 = GetVisiblePageNo();
};
PageNoField.text = _arg1.toString();
if (PageNo != _arg1){
PageNo = _arg1;
};
}
function __setTab_HandCursor_Scene1_Layer1_1(){
HandCursor.tabIndex = 0;
}
public function OnPageNoFieldFocusOut(_arg1:FocusEvent):void{
if (PageNoInitVal != PageNoField.text){
ProcessPageNo();
};
}
public function OnTotalPagesFieldRollOut(_arg1:MouseEvent):void{
ShowTotalPagesTip(false);
}
public function ScanPages(_arg1:uint):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local2:uint = _arg1;
do {
_local3 = DocPages[(_local2 - 1)].movie;
_local4 = DocPages[(_local2 - 1)].realMovie;
_local5 = _local3.x;
_local6 = _local3.y;
_local7 = _local4.x;
_local8 = _local4.y;
_local9 = _local4.rotation;
_local10 = AttachPageMovie(_local2);
_local11 = !((_local10 == null));
if (_local11){
if ((((_local2 < FromPage)) || ((_local2 > ToPage)))){
DocAreaContent.removeChild(_local10);
} else {
_local10.x = _local5;
_local10.y = _local6;
_local12 = _local10.getChildByName("realMovie");
_local12.x = _local7;
_local12.y = _local8;
_local12.rotation = _local9;
};
loadedPages = _local2;
UpdateWaitMsg();
};
_local2++;
} while (((_local11) && ((_local2 <= totalPages))));
}
public function AttachBinData(_arg1:String, _arg2:Boolean=false):ByteArray{
var ba:ByteArray;
var AssetClass:Class;
var id = _arg1;
var fromExtDoc = _arg2;
try {
AssetClass = (getDefinitionByName(id) as Class);
ba = new (AssetClass);
} catch(e) {
};
return (ba);
}
public function GetIntSetting(_arg1:String, _arg2:Object):int{
return (parseInt(GetSetting(_arg1, _arg2)));
}
public function OnFullScreen(_arg1:FullScreenEvent):void{
if (((!(_arg1.fullScreen)) && (!(isNaN(beforeFSWidth))))){
setSize(beforeFSWidth, beforeFSHeight);
beforeFSWidth = NaN;
};
SetupFSButton();
LayoutToolbar();
}
public function onload():void{
SetMouseMode("move");
SetInitialView();
if (autonomous){
stage.dispatchEvent(new Event(Event.RESIZE));
} else {
setSize(550, 400);
};
SetInitialPos();
ShowTotalPages();
}
public function GetSettingInt(_arg1:String, _arg2:Object, _arg3:XML, _arg4:XML=null):String{
var _local5:String = _arg3.attribute(_arg1);
if (((!(_local5)) && (_arg4))){
_local5 = _arg4.attribute(_arg1);
};
if (!_local5){
_local5 = String(_arg2);
};
return (_local5);
}
public function OnLogoClick(_arg1:MouseEvent):void{
NavigateToURL(LogoURL, "_blank");
}
public function GetMouseHoverSymbol(_arg1:Number):Object{
var _local3:*;
var _local4:TextSnapshot;
var _local5:Number;
var _local2:uint;
while (_local2 < Pages.length) {
_local3 = GetMousePos();
if (Pages[_local2].realMovie.hitTestPoint(_local3.x, _local3.y)){
_local4 = GetTextSnapshot(_local2);
_local5 = _local4.hitTestTextNearPos(Pages[_local2].realMovie.mouseX, Pages[_local2].realMovie.mouseY, _arg1);
if (_local5 != -1){
return ({page:_local2, pos:_local5});
};
};
_local2++;
};
return (null);
}
public function OnSearchFieldKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.charCode == 13){
Search();
};
}
public function FindNonWord(_arg1:String, _arg2:uint):int{
var _local3:int = _arg2;
while (_local3 < _arg1.length) {
if (!IsWordSym(_arg1.charAt(_local3))){
return (_local3);
};
_local3++;
};
return (-1);
}
public function setSize(_arg1:uint, _arg2:uint):void{
DocArea.y = toppanelheight;
MovieWidth = _arg1;
MovieHeight = _arg2;
DocArea.width = MovieWidth;
DocArea.height = (MovieHeight - toppanelheight);
CalcScrollSteps();
SetBaseParameters();
LayoutPages();
LayoutToolbar();
ModalScreen.resizeContainer(_arg1, _arg2);
}
function __setTab_DocArea_Scene1_Layer1_1(){
DocArea.tabIndex = 17;
}
public function OnSliderChange(_arg1:Event):void{
ZoomTo(toolbar.ZoomSlider.GetValue());
SetZoomState("none");
}
public function OpenHelpPageInt():void{
DropDownToolbar.visible = false;
NavigateToURL(HelpPageURL, "_blank");
}
public function FillWithBitmap(_arg1:MovieClip, _arg2:BitmapData, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean):void{
var matrix:*;
var movie = _arg1;
var bitmap = _arg2;
var x1 = _arg3;
var y1 = _arg4;
var x2 = _arg5;
var y2 = _arg6;
var scaleToFit = _arg7;
var _local9 = movie.graphics;
with (_local9) {
if (scaleToFit){
matrix = new Matrix();
matrix.scale(((x2 - x1) / bitmap.width), ((y2 - y1) / bitmap.height));
};
beginBitmapFill(bitmap, matrix, true);
moveTo(x1, y1);
lineTo(x1, y2);
lineTo(x2, y2);
lineTo(x2, y1);
lineTo(x1, y1);
endFill();
};
}
public function DropDowbButHandler(_arg1:MouseEvent):void{
_arg1.currentTarget.button.movie.but.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function SetupFSButton():void{
var _local1:* = toolbar.fullscreen;
AttachBtnImage(_local1, GetFullScreenButID(), false);
var _local2:TextField = _local1.tip;
_local2.visible = false;
_local2.text = locale.loadString(GetFullScreenTipID());
_local1.tipOrigx = (_local2.x = ((_local1.x + (_local1.width / 2)) - (_local2.width / 2)));
}
public function OnScaleTextFieldKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.charCode == 13){
ProcessZoomEntry();
};
}
public function PreviousPageInt():void{
SetCurrentPage((GetCurrentPage() - 1));
}
public function AttachMovie(_arg1:String, _arg2:Sprite=null, _arg3:String=""):MovieClip{
var movie:MovieClip;
var AssetClass:Class;
var id = _arg1;
var parent = _arg2;
var name = _arg3;
try {
AssetClass = (getDefinitionByName(id) as Class);
movie = new (AssetClass);
if (name.length){
movie.name = name;
};
if (parent){
parent.addChild(movie);
};
} catch(e:Error) {
};
return (movie);
}
public function EnableLinks():void{
var _local1:uint;
while (_local1 < Links.length) {
Links[_local1].addEventListener(MouseEvent.CLICK, LinkClick, false, 0, true);
Links[_local1].addEventListener(MouseEvent.ROLL_OVER, LinkMouseOver, false, 0, true);
Links[_local1].addEventListener(MouseEvent.ROLL_OUT, LinkMouseOut, false, 0, true);
_local1++;
};
}
public function ProcessPageNo(){
var _local1:String = PageNoField.text;
SetCurrentPage(new Number(_local1));
PageNoInitVal = PageNoField.text;
}
public function OnCopyMenuItemSelect(_arg1:ContextMenuEvent){
if (!NoCopying){
CopyText();
};
}
public function OnSearchFieldFocusIn(_arg1:FocusEvent):void{
ShowSearchPatTip(false);
}
public function GoToBookmark(_arg1:String, _arg2:Boolean=true){
var _local3:Object = BMDef[_arg1];
if (((((_local3) && ((_local3.page >= 1)))) && ((_local3.page <= totalPages)))){
if (_arg2){
AddToHistory(_local3);
};
GoToPagePos(_local3, false);
return (true);
};
return (false);
}
public function CreateLinks(_arg1:uint):void{
var _local3:uint;
var _local4:Object;
var _local5:MovieClip;
var _local6:MovieClip;
var _local2:Object = LinkDef[("p" + _arg1)];
if (_local2){
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
_local5 = DocPages[(_arg1 - 1)].realMovie;
_local6 = (_local5.getChildByName(_local4.name) as MovieClip);
_local6.LinkURL = _local4.url;
_local6.target = _local4.target;
_local6.pageno = _arg1;
_local6.useHandCursor = true;
_local6.buttonMode = true;
_local6.addEventListener(MouseEvent.CLICK, LinkClick, false, 0, true);
_local6.addEventListener(MouseEvent.ROLL_OVER, LinkMouseOver, false, 0, true);
_local6.addEventListener(MouseEvent.ROLL_OUT, LinkMouseOut, false, 0, true);
Links.push(_local6);
_local3++;
};
};
}
}
}//package print2flash_fla
Section 26
//MCSlider_47 (print2flash_fla.MCSlider_47)
package print2flash_fla {
import flash.display.*;
import flash.accessibility.*;
public dynamic class MCSlider_47 extends MovieClip {
public var SliderHandleBtn:ImgButton;
public function MCSlider_47(){
__setAcc_SliderHandleBtn_MCSlider_Layer1_0();
__setTab_SliderHandleBtn_MCSlider_Layer1_0();
}
function __setTab_SliderHandleBtn_MCSlider_Layer1_0(){
SliderHandleBtn.tabIndex = 0;
}
function __setAcc_SliderHandleBtn_MCSlider_Layer1_0(){
SliderHandleBtn.accessibilityProperties = new AccessibilityProperties();
SliderHandleBtn.accessibilityProperties.silent = true;
}
}
}//package print2flash_fla
Section 27
//Timeline_30 (print2flash_fla.Timeline_30)
package print2flash_fla {
import flash.display.*;
import flash.text.*;
import flash.accessibility.*;
public dynamic class Timeline_30 extends MovieClip {
public var ScaleTextField:TextField;
public function Timeline_30(){
__setAcc_ScaleTextField_();
__setTab_ScaleTextField_();
}
function __setTab_ScaleTextField_(){
ScaleTextField.tabIndex = 5;
}
function __setAcc_ScaleTextField_(){
ScaleTextField.accessibilityProperties = new AccessibilityProperties();
ScaleTextField.accessibilityProperties.name = "Zoom";
}
}
}//package print2flash_fla
Section 28
//Timeline_31 (print2flash_fla.Timeline_31)
package print2flash_fla {
import flash.display.*;
import flash.accessibility.*;
public dynamic class Timeline_31 extends MovieClip {
public var PageNoFieldMC:MovieClip;
public var TotalPagesMC:MovieClip;
public function Timeline_31(){
__setAcc_TotalPagesMC_();
__setTab_TotalPagesMC_();
__setTab_PageNoFieldMC_();
}
function __setAcc_TotalPagesMC_(){
TotalPagesMC.accessibilityProperties = new AccessibilityProperties();
TotalPagesMC.accessibilityProperties.silent = true;
}
function __setTab_PageNoFieldMC_(){
PageNoFieldMC.tabIndex = 0;
}
function __setTab_TotalPagesMC_(){
TotalPagesMC.tabIndex = 0;
}
}
}//package print2flash_fla
Section 29
//Timeline_32 (print2flash_fla.Timeline_32)
package print2flash_fla {
import flash.display.*;
import flash.text.*;
import flash.accessibility.*;
public dynamic class Timeline_32 extends MovieClip {
public var TotalPages:TextField;
public function Timeline_32(){
__setAcc_TotalPages_();
__setTab_TotalPages_();
}
function __setTab_TotalPages_(){
TotalPages.tabIndex = 0;
}
function __setAcc_TotalPages_(){
TotalPages.accessibilityProperties = new AccessibilityProperties();
TotalPages.accessibilityProperties.silent = true;
}
}
}//package print2flash_fla
Section 30
//Timeline_33 (print2flash_fla.Timeline_33)
package print2flash_fla {
import flash.display.*;
import flash.text.*;
import flash.accessibility.*;
public dynamic class Timeline_33 extends MovieClip {
public var PageNoField:TextField;
public function Timeline_33(){
__setAcc_PageNoField_();
__setTab_PageNoField_();
}
function __setTab_PageNoField_(){
PageNoField.tabIndex = 9;
}
function __setAcc_PageNoField_(){
PageNoField.accessibilityProperties = new AccessibilityProperties();
PageNoField.accessibilityProperties.name = "Go to page";
}
}
}//package print2flash_fla
Section 31
//Timeline_50 (print2flash_fla.Timeline_50)
package print2flash_fla {
import flash.display.*;
import flash.text.*;
import flash.accessibility.*;
public dynamic class Timeline_50 extends MovieClip {
public var searchPattern:TextField;
public function Timeline_50(){
__setAcc_searchPattern_();
__setTab_searchPattern_();
}
function __setTab_searchPattern_(){
searchPattern.tabIndex = 11;
}
function __setAcc_searchPattern_(){
searchPattern.accessibilityProperties = new AccessibilityProperties();
searchPattern.accessibilityProperties.name = "Search";
}
}
}//package print2flash_fla
Section 32
//button (button)
package {
import flash.display.*;
public dynamic class button extends SimpleButton {
}
}//package
Section 33
//Button_disabledSkin (Button_disabledSkin)
package {
import flash.display.*;
public dynamic class Button_disabledSkin extends MovieClip {
}
}//package
Section 34
//Button_downSkin (Button_downSkin)
package {
import flash.display.*;
public dynamic class Button_downSkin extends MovieClip {
}
}//package
Section 35
//Button_emphasizedSkin (Button_emphasizedSkin)
package {
import flash.display.*;
public dynamic class Button_emphasizedSkin extends MovieClip {
}
}//package
Section 36
//Button_overSkin (Button_overSkin)
package {
import flash.display.*;
public dynamic class Button_overSkin extends MovieClip {
}
}//package
Section 37
//Button_selectedDisabledSkin (Button_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDisabledSkin extends MovieClip {
}
}//package
Section 38
//Button_selectedDownSkin (Button_selectedDownSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDownSkin extends MovieClip {
}
}//package
Section 39
//Button_selectedOverSkin (Button_selectedOverSkin)
package {
import flash.display.*;
public dynamic class Button_selectedOverSkin extends MovieClip {
}
}//package
Section 40
//Button_selectedUpSkin (Button_selectedUpSkin)
package {
import flash.display.*;
public dynamic class Button_selectedUpSkin extends MovieClip {
}
}//package
Section 41
//Button_upSkin (Button_upSkin)
package {
import flash.display.*;
public dynamic class Button_upSkin extends MovieClip {
}
}//package
Section 42
//def_back (def_back)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_back extends MovieClip {
public var but:manualbutton;
public function def_back(){
__setAcc_but_def_back_Layer2_0();
__setTab_but_def_back_Layer2_0();
}
function __setAcc_but_def_back_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Back";
but.accessibilityProperties.forceSimple = true;
}
function __setTab_but_def_back_Layer2_0(){
but.tabIndex = 1;
}
}
}//package
Section 43
//def_bgr (def_bgr)
package {
import flash.display.*;
public dynamic class def_bgr extends MovieClip {
}
}//package
Section 44
//def_forward (def_forward)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_forward extends MovieClip {
public var but:manualbutton;
public function def_forward(){
__setAcc_but_def_forward_Layer2_0();
__setTab_but_def_forward_Layer2_0();
}
function __setTab_but_def_forward_Layer2_0(){
but.tabIndex = 2;
}
function __setAcc_but_def_forward_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Forward";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 45
//def_fullscreen (def_fullscreen)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_fullscreen extends MovieClip {
public var but:manualbutton;
public function def_fullscreen(){
__setAcc_but_def_fullscreen_Layer2_0();
__setTab_but_def_fullscreen_Layer2_0();
}
function __setTab_but_def_fullscreen_Layer2_0(){
but.tabIndex = 1;
}
function __setAcc_but_def_fullscreen_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Back";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 46
//def_help (def_help)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_help extends MovieClip {
public var but:manualbutton;
public function def_help(){
__setAcc_but_def_help_Layer2_0();
__setTab_but_def_help_Layer2_0();
}
function __setAcc_but_def_help_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Help";
but.accessibilityProperties.forceSimple = true;
}
function __setTab_but_def_help_Layer2_0(){
but.tabIndex = 16;
}
}
}//package
Section 47
//def_more (def_more)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_more extends MovieClip {
public var but:manualbutton;
public function def_more(){
__setAcc_but_def_more_Layer3_0();
__setTab_but_def_more_Layer3_0();
}
function __setTab_but_def_more_Layer3_0(){
but.tabIndex = 0;
}
function __setAcc_but_def_more_Layer3_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.silent = true;
}
}
}//package
Section 48
//def_moveMode (def_moveMode)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_moveMode extends MovieClip {
public var but:manualbutton;
public function def_moveMode(){
__setAcc_but_def_moveMode_Layer2_0();
__setTab_but_def_moveMode_Layer2_0();
}
function __setTab_but_def_moveMode_Layer2_0(){
but.tabIndex = 3;
}
function __setAcc_but_def_moveMode_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Drag";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 49
//def_newwindow (def_newwindow)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_newwindow extends MovieClip {
public var but:manualbutton;
public function def_newwindow(){
__setAcc_but_def_newwindow_Layer2_0();
__setTab_but_def_newwindow_Layer2_0();
}
function __setAcc_but_def_newwindow_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Open in New Window";
but.accessibilityProperties.forceSimple = true;
}
function __setTab_but_def_newwindow_Layer2_0(){
but.tabIndex = 15;
}
}
}//package
Section 50
//def_nextpage (def_nextpage)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_nextpage extends MovieClip {
public var but:manualbutton;
public function def_nextpage(){
__setAcc_but_def_nextpage_Layer2_0();
__setTab_but_def_nextpage_Layer2_0();
}
function __setTab_but_def_nextpage_Layer2_0(){
but.tabIndex = 10;
}
function __setAcc_but_def_nextpage_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Next page";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 51
//def_prevpage (def_prevpage)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_prevpage extends MovieClip {
public var but:manualbutton;
public function def_prevpage(){
__setAcc_but_def_prevpage_Layer2_0();
__setTab_but_def_prevpage_Layer2_0();
}
function __setTab_but_def_prevpage_Layer2_0(){
but.tabIndex = 8;
}
function __setAcc_but_def_prevpage_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Previous page";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 52
//def_print (def_print)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_print extends MovieClip {
public var but:manualbutton;
public function def_print(){
__setAcc_but_def_print_Layer2_0();
__setTab_but_def_print_Layer2_0();
}
function __setTab_but_def_print_Layer2_0(){
but.tabIndex = 14;
}
function __setAcc_but_def_print_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Print";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 53
//def_rotate (def_rotate)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_rotate extends MovieClip {
public var but:manualbutton;
public function def_rotate(){
__setAcc_but_def_rotate_Layer2_0();
__setTab_but_def_rotate_Layer2_0();
}
function __setTab_but_def_rotate_Layer2_0(){
but.tabIndex = 13;
}
function __setAcc_but_def_rotate_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Rotate";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 54
//def_scalePage (def_scalePage)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_scalePage extends MovieClip {
public var but:manualbutton;
public function def_scalePage(){
__setAcc_but_def_scalePage_Layer2_0();
__setTab_but_def_scalePage_Layer2_0();
}
function __setAcc_but_def_scalePage_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Fit page";
but.accessibilityProperties.forceSimple = true;
}
function __setTab_but_def_scalePage_Layer2_0(){
but.tabIndex = 7;
}
}
}//package
Section 55
//def_scaleWidth (def_scaleWidth)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_scaleWidth extends MovieClip {
public var but:manualbutton;
public function def_scaleWidth(){
__setAcc_but_def_scaleWidth_Layer2_0();
__setTab_but_def_scaleWidth_Layer2_0();
}
function __setTab_but_def_scaleWidth_Layer2_0(){
but.tabIndex = 6;
}
function __setAcc_but_def_scaleWidth_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Fit width";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 56
//def_selMode (def_selMode)
package {
import flash.display.*;
import flash.accessibility.*;
public dynamic class def_selMode extends MovieClip {
public var but:manualbutton;
public function def_selMode(){
__setAcc_but_def_selMode_Layer2_0();
__setTab_but_def_selMode_Layer2_0();
}
function __setTab_but_def_selMode_Layer2_0(){
but.tabIndex = 4;
}
function __setAcc_but_def_selMode_Layer2_0(){
but.accessibilityProperties = new AccessibilityProperties();
but.accessibilityProperties.name = "Select Text";
but.accessibilityProperties.forceSimple = true;
}
}
}//package
Section 57
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 58
//ImgButton (ImgButton)
package {
import flash.display.*;
public class ImgButton extends SimpleButton {
private var upImageID;
private var downImageID:String;
public function SetImages(_arg1, _arg2:String){
var _local3:MovieClip = MovieClip(root);
upState = new ImgButtonDisplayState(_arg1, _local3);
downState = new ImgButtonDisplayState(_arg2, _local3);
overState = new ImgButtonDisplayState(_arg2, _local3);
hitTestState = new Sprite();
_local3.DrawRect(hitTestState, 0, 0, Math.max(upState.width, downState.width), Math.max(upState.height, downState.height), 0);
}
}
}//package
Section 59
//ImgButtonDisplayState (ImgButtonDisplayState)
package {
import flash.display.*;
public class ImgButtonDisplayState extends Sprite {
public function ImgButtonDisplayState(_arg1:String, _arg2:MovieClip){
_arg2.AttachMovie(_arg1, this);
}
}
}//package
Section 60
//manualbutton (manualbutton)
package {
import flash.display.*;
import flash.events.*;
public class manualbutton extends MovieClip {
private var canvas:Sprite;
public var normalState:uint;// = 1
public function manualbutton(){
useHandCursor = (buttonMode = true);
mouseChildren = false;
addEventListener(MouseEvent.ROLL_OVER, onRollOver, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, onRollOut, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true);
}
public function onMouseUp(_arg1:MouseEvent):void{
ShowState(2);
}
public function onRollOut(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(root);
ShowState(normalState);
}
public function onRollOver(_arg1:MouseEvent):void{
ShowState(2);
}
public function ShowState(_arg1:uint):void{
var _local2:MovieClip = MovieClip(root);
if (canvas){
removeChild(canvas);
};
canvas = new Sprite();
addChild(canvas);
switch (_arg1){
case 2:
_local2.DrawRect(canvas, 0, 0, (width / scaleX), height, _local2.OverButColor, _local2.OverRectColor);
break;
case 3:
_local2.DrawRect(canvas, 0, 0, (width / scaleX), height, _local2.DownButColor, _local2.DownRectColor);
break;
};
}
public function onMouseDown(_arg1:MouseEvent):void{
ShowState(3);
}
}
}//package
Section 61
//ModalScreen (ModalScreen)
package {
import flash.display.*;
public class ModalScreen {
private static var container:DisplayObjectContainer;
private static var sprite:Sprite;
private static var object:DisplayObject;
private static function DrawSprite(_arg1, _arg2:uint){
sprite.graphics.beginFill(0);
sprite.graphics.drawRect(container.x, container.y, _arg1, _arg2);
sprite.graphics.endFill();
}
public static function resizeContainer(_arg1, _arg2:uint):void{
if (sprite){
sprite.graphics.clear();
DrawSprite(_arg1, _arg2);
center(_arg1, _arg2, object);
};
}
public static function close(){
container.removeChild(sprite);
sprite = null;
}
private static function center(_arg1:uint, _arg2:uint, _arg3:DisplayObject):void{
_arg3.x = ((_arg1 / 2) - (_arg3.width / 2));
_arg3.y = ((_arg2 / 2) - (_arg3.height / 2));
}
public static function show(_arg1:DisplayObjectContainer, _arg2:DisplayObject, _arg3:uint, _arg4:uint){
_arg1 = DisplayObjectContainer(_arg1.root);
ModalScreen.container = _arg1;
ModalScreen.object = _arg2;
sprite = new Sprite();
DrawSprite(_arg3, _arg4);
sprite.addChild(_arg2);
sprite.alpha = 0.5;
_arg2.alpha = 2;
_arg1.addChild(sprite);
_arg1.setChildIndex(sprite, (_arg1.numChildren - 1));
ModalScreen.center(_arg3, _arg4, _arg2);
}
}
}//package
Section 62
//P2FLocale (P2FLocale)
package {
import flash.system.*;
public class P2FLocale {
var Strings:Object;
static var DefLanguage = "en";
public static var LocaleArray:Object = {bs:{IDS_DRAG:"Ruka", IDS_SELTEXT:"Selektuj tekst", IDS_ZOOM:"Priblizi", IDS_FITWIDTH:"Po sirini", IDS_FITPAGE:"Po stranici", IDS_PREVPAGE:"Prosla stranica", IDS_GOTOPAGE:"Idi na stranicu", IDS_TOTPAGES:"Ukupno stranica", IDS_NEXTPAGE:"Sljedeca stranica", IDS_SCHHINT:"Kucaj ovdje da trazis", IDS_SEARCH:"Trazi", IDS_NOTFOUND:"Nije pronadjeno", IDS_ROTATE:"Rotiraj", IDS_PRINT:"Printaj", IDS_NEWWND:"Otvori u novom prozoru", IDS_HELP:"Pomoc", IDS_BACK:"Nazad", IDS_FORWARD:"Naprijed", IDS_FULLSCR:"Prikaz preko cijelog ekrana", IDS_FULLSCREXIT:"Prekini prikaz preko cijelog ekrana"}, cs:{IDS_DRAG:"Posouvání", IDS_SELTEXT:"Vybrat text", IDS_ZOOM:"Zvětšení", IDS_FITWIDTH:"Šířka stránky", IDS_FITPAGE:"Celá stránka", IDS_PREVPAGE:"Předchozí stránka", IDS_GOTOPAGE:"Přejít na stránku", IDS_TOTPAGES:"Celkem stránek", IDS_NEXTPAGE:"Další stránka", IDS_SCHHINT:"Vložte hledaný text", IDS_SEARCH:"Hledat", IDS_NOTFOUND:"Nenalezeno", IDS_ROTATE:"Otočit", IDS_PRINT:"Tisk", IDS_NEWWND:"Otevřít v novém okně", IDS_HELP:"Nápověda", IDS_BACK:"Zpět", IDS_FORWARD:"Vpřed", IDS_FULLSCR:"Celá obrazovka", IDS_FULLSCREXIT:"Ukončit režim celé obrazovky", IDS_PDTITLE:"Nastavení tisku", IDS_PDPAGES:"Strany:", IDS_PDFROM:"Od", IDS_PDTO:"Do", IDS_PDSCALING:"Měřítko stránky:", IDS_PDNOSCALE:"Žádné", IDS_PDAUTOR:"Automaticky otočit a přizpůsobit", IDS_OK:"OK", IDS_CANCEL:"Storno"}, da:{IDS_DRAG:"Træk", IDS_SELTEXT:"Vælg tekst", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Tilpas bredde", IDS_FITPAGE:"Tilpas side", IDS_PREVPAGE:"Forrige side", IDS_GOTOPAGE:"Gå til side", IDS_TOTPAGES:"Antal sider", IDS_NEXTPAGE:"Næste side", IDS_SCHHINT:"Angiv søgeord", IDS_SEARCH:"Søg", IDS_NOTFOUND:"Ikke fundet", IDS_ROTATE:"Rotér", IDS_PRINT:"Udskriv", IDS_NEWWND:"Åbn i nyt vindue", IDS_HELP:"Hjælp", IDS_BACK:"Tilbage", IDS_FORWARD:"Fremad", IDS_FULLSCR:"Fuldskærm", IDS_FULLSCREXIT:"Afslut fuldskærmstilstand"}, de:{IDS_DRAG:"Schwenken", IDS_SELTEXT:"Text auswählen", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Breite anpassen", IDS_FITPAGE:"An Ansicht anpassen", IDS_PREVPAGE:"Vorherige Seite", IDS_GOTOPAGE:"Springen zu Seite", IDS_TOTPAGES:"Gesamtseiten", IDS_NEXTPAGE:"Nächste Seite", IDS_SCHHINT:"Geben Sie hier ein um Text zu suchen", IDS_SEARCH:"Suche", IDS_NOTFOUND:"Nicht gefunden", IDS_ROTATE:"Drehen", IDS_PRINT:"Drucken", IDS_NEWWND:"In neuem Browser öffnen", IDS_HELP:"Hilfe", IDS_BACK:"Zurück", IDS_FORWARD:"Vor", IDS_FULLSCR:"Vollbild", IDS_FULLSCREXIT:"Vollbildmodus beenden", IDS_PDTITLE:"Druckeinstellungen", IDS_PDPAGES:"Seiten:", IDS_PDFROM:"Von", IDS_PDTO:"Bis", IDS_PDSCALING:"Seitenanpassung:", IDS_PDNOSCALE:"Keine", IDS_PDAUTOR:"Automatisch drehen und einpassen", IDS_OK:"OK", IDS_CANCEL:"Abbrechen"}, en:{IDS_DRAG:"Drag", IDS_SELTEXT:"Select Text", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Fit Width", IDS_FITPAGE:"Fit Page", IDS_PREVPAGE:"Previous Page", IDS_GOTOPAGE:"Go To Page", IDS_TOTPAGES:"Total Pages", IDS_NEXTPAGE:"Next Page", IDS_SCHHINT:"Type here to search", IDS_SEARCH:"Search", IDS_NOTFOUND:"Not Found", IDS_ROTATE:"Rotate", IDS_PRINT:"Print", IDS_NEWWND:"Open In New Window", IDS_HELP:"Help", IDS_BACK:"Back", IDS_FORWARD:"Forward", IDS_FULLSCR:"Full Screen", IDS_FULLSCREXIT:"Exit Full Screen Mode", IDS_PDTITLE:"Print Options", IDS_PDPAGES:"Pages:", IDS_PDFROM:"From", IDS_PDTO:"To", IDS_PDSCALING:"Scaling:", IDS_PDNOSCALE:"No scale", IDS_PDAUTOR:"Auto-Rotate and Fit", IDS_OK:"OK", IDS_CANCEL:"Cancel"}, es:{IDS_DRAG:"Desplazar", IDS_SELTEXT:"Seleccionar", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Ajustar al ancho", IDS_FITPAGE:"Ajustar al visor", IDS_PREVPAGE:"Página Anterior", IDS_GOTOPAGE:"Vaya A paginar", IDS_TOTPAGES:"Páginas Totales", IDS_NEXTPAGE:"Página Siguiente", IDS_SCHHINT:"Mecanografíe aquí a búsqueda", IDS_SEARCH:"Buscar", IDS_NOTFOUND:"No encontrado", IDS_ROTATE:"Rote", IDS_PRINT:"Imprimir", IDS_NEWWND:"Abrir en nuevo navegador", IDS_HELP:"Ayuda", IDS_BACK:"Anterior", IDS_FORWARD:"Siguiente", IDS_FULLSCR:"Pantalla completa", IDS_FULLSCREXIT:"Salir del modo pantalla completa", IDS_PDTITLE:"Imprimir", IDS_PDPAGES:"Páginas:", IDS_PDFROM:"De", IDS_PDTO:"A", IDS_PDSCALING:"Escala:", IDS_PDNOSCALE:"Sin escala", IDS_PDAUTOR:"Auto-rotar y Ajustar", IDS_OK:"OK", IDS_CANCEL:"Cancelar"}, fr:{IDS_DRAG:"Panorama", IDS_SELTEXT:"Sélectionner le texte", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Ajuster la largeur", IDS_FITPAGE:"Ajuster dans la visionneuse", IDS_PREVPAGE:"Page précédente", IDS_GOTOPAGE:" Aller a la page", IDS_TOTPAGES:"Nombre de pages", IDS_NEXTPAGE:"Prochaine page", IDS_SCHHINT:"Entrez votre question ici", IDS_SEARCH:"Rechercher", IDS_NOTFOUND:"Non trouvé", IDS_ROTATE:"Rotation", IDS_PRINT:"Imprimer", IDS_NEWWND:"Ouvrir dans une nouvelle fenêtre", IDS_HELP:"Aide", IDS_BACK:"Page précédente", IDS_FORWARD:"Page suivante", IDS_FULLSCR:"Plein écran", IDS_FULLSCREXIT:"Quitter le mode plein écran"}, hr:{IDS_DRAG:"Ruka", IDS_SELTEXT:"Selektiraj tekst", IDS_ZOOM:"Zumiraj", IDS_FITWIDTH:"Po sirini", IDS_FITPAGE:"Po stranici", IDS_PREVPAGE:"Prethodna stranica", IDS_GOTOPAGE:"Idi na stranicu", IDS_TOTPAGES:"Svega stranica", IDS_NEXTPAGE:"Sljedeca stranica", IDS_SCHHINT:"Upisi ovdje za pretragu", IDS_SEARCH:"Pretraga", IDS_NOTFOUND:"Nema rezultata", IDS_ROTATE:"Zarotiraj", IDS_PRINT:"Stampaj", IDS_NEWWND:"Otvori u novom prozoru", IDS_HELP:"Pomoc", IDS_BACK:"Nazad", IDS_FORWARD:"Naprijed", IDS_FULLSCR:"Potpuni ekran", IDS_FULLSCREXIT:"Izađi iz prikaza potpunog ekrana"}, it:{IDS_DRAG:"Trascina", IDS_SELTEXT:"Seleziona testo", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Adatta larghezza", IDS_FITPAGE:"Adatta pagina", IDS_PREVPAGE:"Pagina precedente", IDS_GOTOPAGE:"Vai a pagina", IDS_TOTPAGES:"Pagine totali", IDS_NEXTPAGE:"Pagina successiva", IDS_SCHHINT:"Testo da cercare", IDS_SEARCH:"Trova", IDS_NOTFOUND:"Testo non trovato", IDS_ROTATE:"Ruota", IDS_PRINT:"Stampa", IDS_NEWWND:"Apri in una nuova finestra", IDS_HELP:"Aiuto", IDS_BACK:"Indietro", IDS_FORWARD:"Avanti", IDS_FULLSCR:"Schermo intero", IDS_FULLSCREXIT:"Esci da schermo intero"}, ja:{IDS_DRAG:"ドラッグ", IDS_SELTEXT:"テキスト選択", IDS_ZOOM:"ズーム", IDS_FITWIDTH:"幅に合わせる", IDS_FITPAGE:"ページに合わせる", IDS_PREVPAGE:"前頁", IDS_GOTOPAGE:"ページへ", IDS_TOTPAGES:"総ページ数", IDS_NEXTPAGE:"次頁", IDS_SCHHINT:"検索する文字列を入力してください", IDS_SEARCH:"検索", IDS_NOTFOUND:"指定のものは見つかりません", IDS_ROTATE:"回転", IDS_PRINT:"印刷", IDS_NEWWND:"新しいウィンドウで開く", IDS_HELP:"ヘルプ", IDS_BACK:"前へ", IDS_FORWARD:"次へ", IDS_FULLSCR:"全画面表示", IDS_FULLSCREXIT:"全画面表示モードを閉じる", IDS_PDTITLE:"印刷オプション", IDS_PDPAGES:"ページ指定", IDS_PDFROM:"開始", IDS_PDTO:"終了", IDS_PDSCALING:"スケーリング", IDS_PDNOSCALE:"スケール無し", IDS_PDAUTOR:"自動回転とページに合わせる", IDS_OK:"印刷", IDS_CANCEL:"キャンセル"}, nl:{IDS_DRAG:"Slepen", IDS_SELTEXT:"Selecteer tekst", IDS_ZOOM:"Vergroten", IDS_FITWIDTH:"Aanpassen breedte", IDS_FITPAGE:"Aanpassen pagina", IDS_PREVPAGE:"Vorige pagina", IDS_GOTOPAGE:"Ga naar", IDS_TOTPAGES:"Totaal aantal pagina's", IDS_NEXTPAGE:"Volgende pagina", IDS_SCHHINT:"Zoekargument", IDS_SEARCH:"Zoeken", IDS_NOTFOUND:"Niet gevonden", IDS_ROTATE:"Roteren", IDS_PRINT:"Afdrukken", IDS_NEWWND:"Open in nieuw window", IDS_HELP:"Help", IDS_BACK:"Terug", IDS_FORWARD:"Vooruit", IDS_FULLSCR:"Volledig scherm", IDS_FULLSCREXIT:"Volledigschermmodus verlaten", IDS_PDTITLE:"Print Opties", IDS_PDPAGES:"Pagina’s:", IDS_PDFROM:"Van", IDS_PDTO:"Tot", IDS_PDSCALING:"Schalen:", IDS_PDNOSCALE:"Niet schalen", IDS_PDAUTOR:"Passend maken", IDS_OK:"OK", IDS_CANCEL:"Annuleer"}, pl:{IDS_DRAG:"Przeciągnij", IDS_SELTEXT:"Zaznacz tekst", IDS_ZOOM:"Zmień rozmiar", IDS_FITWIDTH:"Dopasuj szerokość", IDS_FITPAGE:"Dopasuj stronę", IDS_PREVPAGE:"Poprzednia strona", IDS_GOTOPAGE:"Przejdź do strony", IDS_TOTPAGES:"Suma stron", IDS_NEXTPAGE:"Następna strona", IDS_SCHHINT:"Wpisz tekst", IDS_SEARCH:"Szukaj", IDS_NOTFOUND:"Nie znalezionio", IDS_ROTATE:"Obróć", IDS_PRINT:"Drukuj", IDS_NEWWND:"Otwórz w nowym oknie", IDS_HELP:"Pomoc", IDS_BACK:"Do tyłu", IDS_FORWARD:"Do przodu", IDS_FULLSCR:"Tryb pełnoekranowy", IDS_FULLSCREXIT:"Opuść tryb pełnoekranowy", IDS_PDTITLE:"Opcje wydruku", IDS_PDPAGES:"Strony:", IDS_PDFROM:"Od", IDS_PDTO:"Do", IDS_PDSCALING:"Skalowanie:", IDS_PDNOSCALE:"Nie skaluj", IDS_PDAUTOR:"Autorotacja i dopasowanie", IDS_OK:"OK", IDS_CANCEL:"Anuluj"}, pt:{IDS_DRAG:"Arrastar", IDS_SELTEXT:"Selecionar Texto", IDS_ZOOM:"Zoom", IDS_FITWIDTH:"Ajustar Largura", IDS_FITPAGE:"Ajustar Página", IDS_PREVPAGE:"Página Anterior", IDS_GOTOPAGE:"Ir para Página", IDS_TOTPAGES:"Total de Páginas", IDS_NEXTPAGE:"Próxima Página", IDS_SCHHINT:"Digite aqui para Procurar", IDS_SEARCH:"Procurar", IDS_NOTFOUND:"Não Encontrado", IDS_ROTATE:"Girar", IDS_PRINT:"Imprimir", IDS_NEWWND:"Abrir em uma Nova Janela", IDS_HELP:"Ajuda", IDS_BACK:"Retroceder", IDS_FORWARD:"Avançar", IDS_FULLSCR:"Ecrã inteiro", IDS_FULLSCREXIT:"Sair de Modo de Ecrã Inteiro", IDS_PDTITLE:"Opções de Impressão", IDS_PDPAGES:"Páginas:", IDS_PDFROM:"De", IDS_PDTO:"Para", IDS_PDSCALING:"Escala:", IDS_PDNOSCALE:"Sem escala", IDS_PDAUTOR:"Rotação Automática e Ajuste", IDS_OK:"OK", IDS_CANCEL:"Cancelar"}, ru:{IDS_DRAG:"Перемещение", IDS_SELTEXT:"Выбор текста", IDS_ZOOM:"Масштаб", IDS_FITWIDTH:"По ширине страницы", IDS_FITPAGE:"Страница целиком", IDS_PREVPAGE:"Предыдущая страница", IDS_GOTOPAGE:"Перейти к странице", IDS_TOTPAGES:"Всего страниц", IDS_NEXTPAGE:"Следующая страница", IDS_SCHHINT:"Введите здесь текст для поиска", IDS_SEARCH:"Поиск", IDS_NOTFOUND:"Не найдено", IDS_ROTATE:"Поворот", IDS_PRINT:"Печать", IDS_NEWWND:"Открыть в новом окне", IDS_HELP:"Помощь", IDS_BACK:"Назад", IDS_FORWARD:"Вперёд", IDS_FULLSCR:"Полный экран", IDS_FULLSCREXIT:"Выйти из полноэкранного режима", IDS_PDTITLE:"Параметры печати", IDS_PDPAGES:"Страницы:", IDS_PDFROM:"С", IDS_PDTO:"По", IDS_PDSCALING:"Масштабирование:", IDS_PDNOSCALE:"Без масштабирования", IDS_PDAUTOR:"Повернуть и подогнать", IDS_OK:"OK", IDS_CANCEL:"Отмена"}, sr:{IDS_DRAG:"Ruka", IDS_SELTEXT:"Selektuj tekst", IDS_ZOOM:"Ublizi", IDS_FITWIDTH:"Po sirini", IDS_FITPAGE:"Po stranici", IDS_PREVPAGE:"Prethodna stranica", IDS_GOTOPAGE:"Idi na stranicu", IDS_TOTPAGES:"Svega stranica", IDS_NEXTPAGE:"Sledeca stranica", IDS_SCHHINT:"Upisi ovde za pretragu", IDS_SEARCH:"Pretraga", IDS_NOTFOUND:"Nema", IDS_ROTATE:"Zarotiraj", IDS_PRINT:"Stampa", IDS_NEWWND:"Otvori u novom prozoru", IDS_HELP:"Pomoc", IDS_BACK:"Nazad", IDS_FORWARD:"Napred", IDS_FULLSCR:"Full Screen", IDS_FULLSCREXIT:"Exit Full Screen Mode"}, sv:{IDS_DRAG:"Dra", IDS_SELTEXT:"Välj text", IDS_ZOOM:"Zooma", IDS_FITWIDTH:"Anpassa bredd", IDS_FITPAGE:"Anpassa sida", IDS_PREVPAGE:"Föregående sida", IDS_GOTOPAGE:"Gå till sidan", IDS_TOTPAGES:"Alla sidor", IDS_NEXTPAGE:"Nästa sida", IDS_SCHHINT:"Skriv in sökord här", IDS_SEARCH:"Sök", IDS_NOTFOUND:"Kan inte hittas", IDS_ROTATE:"Rotera", IDS_PRINT:"Skriv ut", IDS_NEWWND:"Öppna i nytt fönster", IDS_HELP:"Hjälp", IDS_BACK:"Tillbaka", IDS_FORWARD:"Framåt", IDS_FULLSCR:"Helskärm", IDS_FULLSCREXIT:"Avsluta helskärmsläget", IDS_PDTITLE:"Skriv ut", IDS_PDPAGES:"Sidor:", IDS_PDFROM:"Från", IDS_PDTO:"Till", IDS_PDSCALING:"Anpassningsalternativ", IDS_PDNOSCALE:"Ingen anpassning", IDS_PDAUTOR:"Auto-rotering och anpassning", IDS_OK:"OK", IDS_CANCEL:"Avbryt"}, tr:{IDS_DRAG:"Sürükle", IDS_SELTEXT:"Seç", IDS_ZOOM:"Yaklaştır", IDS_FITWIDTH:"Enine Sığdır", IDS_FITPAGE:"Sayfayı Sığdır", IDS_PREVPAGE:"Önceki Sayfa", IDS_GOTOPAGE:"Sayfaya Git", IDS_TOTPAGES:"Toplam Sayfa", IDS_NEXTPAGE:"Sonraki Sayfa", IDS_SCHHINT:"Aramak istediğiniz kelimeyi giriniz", IDS_SEARCH:"Ara", IDS_NOTFOUND:"Bulunamadı", IDS_ROTATE:"Döndür", IDS_PRINT:"Bas", IDS_NEWWND:"Yeni Pencerede Aç", IDS_HELP:"Yardım", IDS_BACK:"Geri", IDS_FORWARD:"İleri", IDS_FULLSCR:"Tam Ekran", IDS_FULLSCREXIT:"Tam Ekrandan çık", IDS_PDTITLE:"Baskı Seçenekleri", IDS_PDPAGES:"Sayfalar:", IDS_PDFROM:"", IDS_PDTO:"-", IDS_PDSCALING:"Boyutlandırma:", IDS_PDNOSCALE:"Yok", IDS_PDAUTOR:"Otomatik çevir ve sığdır", IDS_OK:"Tamam", IDS_CANCEL:"Vazgeç"}};
public function P2FLocale(){
var _local1:* = {IDS_DRAG:"拖曳页面", IDS_SELTEXT:"选择文本", IDS_ZOOM:"缩放", IDS_FITWIDTH:"适合宽度", IDS_FITPAGE:"适合页面", IDS_PREVPAGE:"前一页", IDS_GOTOPAGE:"前往页", IDS_TOTPAGES:"总页数", IDS_NEXTPAGE:"下一页", IDS_SCHHINT:"此处输入查询内容", IDS_SEARCH:"查询", IDS_NOTFOUND:"没有找到", IDS_ROTATE:"旋转", IDS_PRINT:"打印", IDS_NEWWND:"在新窗口打开", IDS_HELP:"帮助", IDS_BACK:"返回", IDS_FORWARD:"向前", IDS_FULLSCR:"全屏", IDS_FULLSCREXIT:"退出全屏模式", IDS_PDTITLE:"打印设置", IDS_PDPAGES:"页面:", IDS_PDFROM:"从", IDS_PDTO:"到", IDS_PDSCALING:"缩放:", IDS_PDNOSCALE:"不缩放", IDS_PDAUTOR:"自动旋转并适合页面缩放", IDS_OK:"确定", IDS_CANCEL:"取消"};
var _local2:* = {IDS_DRAG:"拖曳頁面", IDS_SELTEXT:"選擇文字", IDS_ZOOM:"縮放", IDS_FITWIDTH:"頁面符合視窗寬度", IDS_FITPAGE:"符合完整頁面", IDS_PREVPAGE:"前一頁", IDS_GOTOPAGE:"前往頁", IDS_TOTPAGES:"總頁數", IDS_NEXTPAGE:"下一頁", IDS_SCHHINT:"輸入查詢內容", IDS_SEARCH:"查詢", IDS_NOTFOUND:"沒有找到", IDS_ROTATE:"旋轉", IDS_PRINT:"列印", IDS_NEWWND:"開啟於新視窗", IDS_HELP:"幫助", IDS_BACK:"往後", IDS_FORWARD:"往前", IDS_FULLSCR:"全螢幕", IDS_FULLSCREXIT:"離開全螢幕", IDS_PDTITLE:"列印選項", IDS_PDPAGES:"頁面:", IDS_PDFROM:"從", IDS_PDTO:"到", IDS_PDSCALING:"縮放:", IDS_PDNOSCALE:"不縮放", IDS_PDAUTOR:"自動旋轉符合頁面大小", IDS_OK:"確定", IDS_CANCEL:"取消"};
LocaleArray["zh-CN"] = _local1;
LocaleArray["zh-TW"] = _local2;
}
public function setLanguage(_arg1:String){
if (_arg1 == "auto"){
_arg1 = Capabilities.language;
};
Strings = LocaleArray[_arg1];
if (Strings == null){
Strings = LocaleArray[DefLanguage];
};
}
public function loadString(_arg1:String):String{
var _local2:String = Strings[_arg1];
if (_local2 == null){
_local2 = LocaleArray[DefLanguage][_arg1];
};
return (_local2);
}
}
}//package
Section 63
//Page1 (Page1)
package {
import flash.display.*;
import flash.text.*;
public class Page1 extends MovieClip {
public var CR:TextField;
}
}//package
Section 64
//Page10 (Page10)
package {
import flash.display.*;
import flash.text.*;
public class Page10 extends MovieClip {
public var CR:TextField;
}
}//package
Section 65
//Page11 (Page11)
package {
import flash.display.*;
import flash.text.*;
public class Page11 extends MovieClip {
public var CR:TextField;
}
}//package
Section 66
//Page12 (Page12)
package {
import flash.display.*;
import flash.text.*;
public class Page12 extends MovieClip {
public var CR:TextField;
}
}//package
Section 67
//Page13 (Page13)
package {
import flash.display.*;
import flash.text.*;
public class Page13 extends MovieClip {
public var CR:TextField;
}
}//package
Section 68
//Page14 (Page14)
package {
import flash.display.*;
import flash.text.*;
public class Page14 extends MovieClip {
public var CR:TextField;
}
}//package
Section 69
//Page15 (Page15)
package {
import flash.display.*;
import flash.text.*;
public class Page15 extends MovieClip {
public var CR:TextField;
}
}//package
Section 70
//Page16 (Page16)
package {
import flash.display.*;
import flash.text.*;
public class Page16 extends MovieClip {
public var CR:TextField;
}
}//package
Section 71
//Page2 (Page2)
package {
import flash.display.*;
import flash.text.*;
public class Page2 extends MovieClip {
public var CR:TextField;
}
}//package
Section 72
//Page3 (Page3)
package {
import flash.display.*;
import flash.text.*;
public class Page3 extends MovieClip {
public var CR:TextField;
}
}//package
Section 73
//Page4 (Page4)
package {
import flash.display.*;
import flash.text.*;
public class Page4 extends MovieClip {
public var CR:TextField;
}
}//package
Section 74
//Page5 (Page5)
package {
import flash.display.*;
import flash.text.*;
public class Page5 extends MovieClip {
public var CR:TextField;
}
}//package
Section 75
//Page6 (Page6)
package {
import flash.display.*;
import flash.text.*;
public class Page6 extends MovieClip {
public var CR:TextField;
}
}//package
Section 76
//Page7 (Page7)
package {
import flash.display.*;
import flash.text.*;
public class Page7 extends MovieClip {
public var CR:TextField;
}
}//package
Section 77
//Page8 (Page8)
package {
import flash.display.*;
import flash.text.*;
public class Page8 extends MovieClip {
public var CR:TextField;
}
}//package
Section 78
//Page9 (Page9)
package {
import flash.display.*;
import flash.text.*;
public class Page9 extends MovieClip {
public var CR:TextField;
}
}//package
Section 79
//PrintRangeWnd (PrintRangeWnd)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import flash.ui.*;
import flash.accessibility.*;
public class PrintRangeWnd extends MovieClip {
public var cancelBtn;
private var active:Boolean;
public var scalingtxt:TextField;
public var fromtxt:TextField;
public var pagesFrom;
public var totxt:TextField;
public var pagestxt:TextField;
public var closeBtn:SimpleButton;
private var fm:FocusManager;
private var tabArray:Array;
public var optNoScale;
public var title:TextField;
public var locale:P2FLocale;
public var optFit:RadioButton;
public var pagesTo:TextField;
public var OKBtn:Button;
public var printScaleMode:String;
public function PrintRangeWnd(){
pagesFrom.restrict = (pagesTo.restrict = "0-9");
tabArray = new Array(pagesFrom, pagesTo, optNoScale, optFit, OKBtn, cancelBtn);
addEventListener(FocusEvent.KEY_FOCUS_CHANGE, OnFocusChange, false, 0, true);
addEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown, false, 0, true);
closeBtn.addEventListener(MouseEvent.CLICK, onCloseBtnClick, false, 0, true);
cancelBtn.addEventListener(MouseEvent.CLICK, onCloseBtnClick, false, 0, true);
OKBtn.addEventListener(MouseEvent.CLICK, onOKBtnClick, false, 0, true);
__setTab_title_PrintRangeWnd_Layer1_0();
__setTab_pagesFrom_PrintRangeWnd_Layer1_0();
__setTab_pagesTo_PrintRangeWnd_Layer1_0();
__setTab_OKBtn_PrintRangeWnd_Layer1_0();
__setTab_cancelBtn_PrintRangeWnd_Layer1_0();
__setAcc_pagesFrom_PrintRangeWnd_Layer1_0();
__setAcc_pagesTo_PrintRangeWnd_Layer1_0();
__setAcc_OKBtn_PrintRangeWnd_Layer1_0();
__setAcc_cancelBtn_PrintRangeWnd_Layer1_0();
__setProp_OKBtn_PrintRangeWnd_Layer1_0();
__setProp_cancelBtn_PrintRangeWnd_Layer1_0();
__setProp_optNoScale_PrintRangeWnd_Layer1_0();
__setProp_optFit_PrintRangeWnd_Layer1_0();
}
private function onCloseBtnClick(_arg1:MouseEvent){
close();
}
function __setProp_cancelBtn_PrintRangeWnd_Layer1_0(){
try {
cancelBtn["componentInspectorSetting"] = true;
} catch(e:Error) {
};
cancelBtn.emphasized = false;
cancelBtn.enabled = true;
cancelBtn.label = "";
cancelBtn.labelPlacement = "right";
cancelBtn.selected = false;
cancelBtn.toggle = false;
cancelBtn.visible = true;
try {
cancelBtn["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setTab_pagesFrom_PrintRangeWnd_Layer1_0(){
pagesFrom.tabIndex = 0;
}
function __setProp_optNoScale_PrintRangeWnd_Layer1_0(){
try {
optNoScale["componentInspectorSetting"] = true;
} catch(e:Error) {
};
optNoScale.enabled = true;
optNoScale.groupName = "Scaling";
optNoScale.label = "";
optNoScale.labelPlacement = "right";
optNoScale.selected = false;
optNoScale.value = "";
optNoScale.visible = true;
try {
optNoScale["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setAcc_OKBtn_PrintRangeWnd_Layer1_0(){
OKBtn.accessibilityProperties = new AccessibilityProperties();
OKBtn.accessibilityProperties.name = "OK";
OKBtn.accessibilityProperties.forceSimple = true;
}
function __setTab_title_PrintRangeWnd_Layer1_0(){
title.tabIndex = 0;
}
function __setTab_pagesTo_PrintRangeWnd_Layer1_0(){
pagesTo.tabIndex = 0;
}
private function OnKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ESCAPE){
onCloseBtnClick(null);
};
}
function __setTab_cancelBtn_PrintRangeWnd_Layer1_0(){
cancelBtn.tabIndex = 0;
}
function __setAcc_pagesFrom_PrintRangeWnd_Layer1_0(){
pagesFrom.accessibilityProperties = new AccessibilityProperties();
pagesFrom.accessibilityProperties.name = "Pages From";
}
private function onOKBtnClick(_arg1:MouseEvent){
close();
dispatchEvent(new Event("OKResult"));
}
private function OnFocusChange(_arg1:FocusEvent):void{
var _local2:int;
if (active){
_arg1.preventDefault();
_local2 = tabArray.indexOf(_arg1.target);
if (_local2 != -1){
if (_arg1.shiftKey){
_local2--;
} else {
_local2++;
};
if (_local2 < 0){
_local2 = (tabArray.length - 1);
} else {
if (_local2 >= tabArray.length){
_local2 = 0;
};
};
fm.setFocus(tabArray[_local2]);
};
};
}
function __setAcc_cancelBtn_PrintRangeWnd_Layer1_0(){
cancelBtn.accessibilityProperties = new AccessibilityProperties();
cancelBtn.accessibilityProperties.name = "Cancel";
cancelBtn.accessibilityProperties.forceSimple = true;
}
function __setAcc_pagesTo_PrintRangeWnd_Layer1_0(){
pagesTo.accessibilityProperties = new AccessibilityProperties();
pagesTo.accessibilityProperties.name = "Pages To";
}
function __setProp_OKBtn_PrintRangeWnd_Layer1_0(){
try {
OKBtn["componentInspectorSetting"] = true;
} catch(e:Error) {
};
OKBtn.emphasized = false;
OKBtn.enabled = true;
OKBtn.label = "";
OKBtn.labelPlacement = "right";
OKBtn.selected = false;
OKBtn.toggle = false;
OKBtn.visible = true;
try {
OKBtn["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function close(){
printScaleMode = (optNoScale.selected) ? "noscale" : "fit";
fm.deactivate();
ModalScreen.close();
active = false;
}
function __setProp_optFit_PrintRangeWnd_Layer1_0(){
try {
optFit["componentInspectorSetting"] = true;
} catch(e:Error) {
};
optFit.enabled = true;
optFit.groupName = "Scaling";
optFit.label = "";
optFit.labelPlacement = "right";
optFit.selected = false;
optFit.value = "";
optFit.visible = true;
try {
optFit["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function show(_arg1:DisplayObjectContainer, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:String){
title.text = locale.loadString("IDS_PDTITLE");
pagestxt.text = locale.loadString("IDS_PDPAGES");
fromtxt.text = locale.loadString("IDS_PDFROM");
totxt.text = locale.loadString("IDS_PDTO");
scalingtxt.text = locale.loadString("IDS_PDSCALING");
optNoScale.label = locale.loadString("IDS_PDNOSCALE");
optFit.label = locale.loadString("IDS_PDAUTOR");
OKBtn.label = locale.loadString("IDS_OK");
cancelBtn.label = locale.loadString("IDS_CANCEL");
pagesFrom.text = _arg4.toString();
pagesTo.text = _arg5.toString();
optNoScale.selected = (optFit.selected = false);
if (_arg6 == "noscale"){
optNoScale.selected = true;
} else {
optFit.selected = true;
};
ModalScreen.show(_arg1, this, _arg2, _arg3);
if (!fm){
fm = new FocusManager(this);
fm.defaultButton = OKBtn;
};
fm.activate();
fm.setFocus(pagesFrom);
active = true;
}
function __setTab_OKBtn_PrintRangeWnd_Layer1_0(){
OKBtn.tabIndex = 0;
}
}
}//package
Section 80
//RadioButton_disabledIcon (RadioButton_disabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_disabledIcon extends MovieClip {
}
}//package
Section 81
//RadioButton_downIcon (RadioButton_downIcon)
package {
import flash.display.*;
public dynamic class RadioButton_downIcon extends MovieClip {
}
}//package
Section 82
//RadioButton_overIcon (RadioButton_overIcon)
package {
import flash.display.*;
public dynamic class RadioButton_overIcon extends MovieClip {
}
}//package
Section 83
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDisabledIcon extends MovieClip {
}
}//package
Section 84
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDownIcon extends MovieClip {
}
}//package
Section 85
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedOverIcon extends MovieClip {
}
}//package
Section 86
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedUpIcon extends MovieClip {
}
}//package
Section 87
//RadioButton_upIcon (RadioButton_upIcon)
package {
import flash.display.*;
public dynamic class RadioButton_upIcon extends MovieClip {
}
}//package
Section 88
//ScrollArea (ScrollArea)
package {
import flash.display.*;
public dynamic class ScrollArea extends MovieClip {
public var BottomArea:MovieClip;
}
}//package
Section 89
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 90
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 91
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 92
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 93
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 94
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 95
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 96
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 97
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 98
//ScrollPain (ScrollPain)
package {
import flash.events.*;
import fl.containers.*;
public class ScrollPain extends ScrollPane {
override protected function endDrag(_arg1:MouseEvent):void{
if (stage){
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
};
}
}
}//package
Section 99
//ScrollPane_disabledSkin (ScrollPane_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollPane_disabledSkin extends MovieClip {
}
}//package
Section 100
//ScrollPane_upSkin (ScrollPane_upSkin)
package {
import flash.display.*;
public dynamic class ScrollPane_upSkin extends MovieClip {
}
}//package
Section 101
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 102
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 103
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 104
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 105
//Settings (Settings)
package {
import flash.utils.*;
public class Settings extends ByteArray {
}
}//package
Section 106
//Settings2_ (Settings2_)
package {
import flash.utils.*;
public class Settings2_ extends ByteArray {
}
}//package
Section 107
//Slider (Slider)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
import flash.accessibility.*;
public dynamic class Slider extends MovieClip {
private var Max;
public var SliderHandle:MovieClip;
private var oldValue:int;
public var SliderHandleBtn:ImgButton;
private var Width;
private var DragUpdateInt;
private var Min;
private var HandleOffset;
public function Slider(){
SliderHandleBtn = SliderHandle.SliderHandleBtn;
SliderHandleBtn.tabEnabled = false;
addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
SliderHandleBtn.addEventListener(MouseEvent.MOUSE_DOWN, onHandlePress, false, 0, true);
__setAcc_SliderHandle_();
__setTab_SliderHandle_();
}
public function SetValue(_arg1:int):void{
if (_arg1 > Max){
_arg1 = Max;
} else {
if (_arg1 < Min){
_arg1 = Min;
};
};
SliderHandle.x = (((_arg1 - Min) / (Max - Min)) * Width);
}
function __setAcc_SliderHandle_(){
SliderHandle.accessibilityProperties = new AccessibilityProperties();
SliderHandle.accessibilityProperties.silent = true;
}
public function onMouseDown(_arg1:MouseEvent):void{
var _local2:int;
if (_arg1.target == this){
_local2 = Math.round((Min + (((_arg1.localX - (SliderHandleBtn.width / 2)) / Width) * (Max - Min))));
if (_local2 != GetValue()){
SetValue(_local2);
dispatchEvent(new Event("change"));
};
};
}
public function SetRange(_arg1:int, _arg2:int):void{
this.Min = _arg1;
this.Max = _arg2;
}
function onHandlePress(_arg1:MouseEvent):void{
oldValue = GetValue();
SliderHandle.startDrag(false, new Rectangle(0, HandleOffset, Width, HandleOffset));
DragUpdateInt = setInterval(DragUpdate, 100);
stage.addEventListener(MouseEvent.MOUSE_UP, onHandleRelease, false, 0, true);
}
function onHandleRelease(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, onHandleRelease);
clearInterval(DragUpdateInt);
SliderHandle.stopDrag();
if (oldValue != GetValue()){
dispatchEvent(new Event("change"));
};
}
public function GetValue():int{
return (Math.round((Min + ((SliderHandle.x / Width) * (Max - Min)))));
}
function __setTab_SliderHandle_(){
SliderHandle.tabIndex = 0;
}
public function Init():void{
SliderHandleBtn.SetImages("TBImage6", "TBImage5");
Width = Math.floor((width - SliderHandleBtn.width));
HandleOffset = SliderHandleBtn.y;
}
function DragUpdate():void{
if (oldValue != GetValue()){
oldValue = GetValue();
dispatchEvent(new Event("change"));
};
}
}
}//package
Section 108
//TBImage1 (TBImage1)
package {
import flash.display.*;
public class TBImage1 extends MovieClip {
}
}//package
import flash.display.*;
class TBImage2 extends MovieClip {
public function TBImage2(){
}
}
class TBImage3 extends MovieClip {
public function TBImage3(){
}
}
class TBImage4 extends MovieClip {
public function TBImage4(){
}
}
class TBImage5 extends MovieClip {
public function TBImage5(){
}
}
class TBImage6 extends MovieClip {
public function TBImage6(){
}
}
class TBImage7 extends MovieClip {
public function TBImage7(){
}
}
class TBImage8 extends MovieClip {
public function TBImage8(){
}
}
class TBImage9 extends MovieClip {
public function TBImage9(){
}
}
class TBImage10 extends MovieClip {
public function TBImage10(){
}
}
class TBImage11 extends MovieClip {
public function TBImage11(){
}
}
class TBImage12 extends MovieClip {
public function TBImage12(){
}
}
class TBImage13 extends MovieClip {
public function TBImage13(){
}
}
class TBImage14 extends MovieClip {
public function TBImage14(){
}
}
class TBImage15 extends MovieClip {
public function TBImage15(){
}
}
class TBImage16 extends MovieClip {
public function TBImage16(){
}
}
class TBImage18 extends MovieClip {
public function TBImage18(){
}
}
class TBImage19 extends MovieClip {
public function TBImage19(){
}
}
class TBImage20 extends MovieClip {
public function TBImage20(){
}
}
class TBImage21 extends MovieClip {
public function TBImage21(){
}
}
class TBImage22 extends MovieClip {
public function TBImage22(){
}
}
Section 109
//textmsg (textmsg)
package {
import flash.display.*;
import flash.text.*;
public dynamic class textmsg extends MovieClip {
public var text:TextField;
}
}//package
Section 110
//waitmsg (waitmsg)
package {
import flash.display.*;
import flash.text.*;
public dynamic class waitmsg extends MovieClip {
public var msg:TextField;
}
}//package