Frame 1
flashpaperversion = "2.02.2302.0";
totalPages = 1;
dpi = 300;
documentWidth = 2550;
documentHeight = 3300;
fpAnchors_o = {};
fpBookmarks_array = [];
if (this == _level0) {
Stage.showMenu = false;
Stage.align = "";
Stage.scaleMode = "noBorder";
this._width = Stage.width;
this._height = Stage.height;
} else {
_yscale = 100;
_xscale = 100;
}
Frame 3
function getIFlashPaper() {
return(gMainView);
}
function isFlashPaperDocument() {
return(true);
}
function getViewerType() {
return(gMainView.getViewerType());
}
function getViewerVersion() {
return(gMainView.getViewerVersion());
}
function getCurrentPage() {
return(gMainView.getCurrentPage());
}
function setCurrentPage(pageNumber) {
gMainView.setCurrentPage(pageNumber);
}
function getNumberOfPages() {
return(gMainView.getNumberOfPages());
}
function getLoadedPages() {
return(gMainView.getLoadedPages());
}
function showPrevNextUI(flag) {
gMainView.showUIElement("PrevNext", flag);
}
function showPrintUI(flag) {
gMainView.showUIElement("Print", flag);
}
function printTheDocument() {
return(gMainView.printTheDocument());
}
function showZoomUI(flag) {
gMainView.showUIElement("Zoom", flag);
}
function setCurrentZoom(percent) {
gMainView.setCurrentZoom(percent);
}
function getCurrentZoom() {
return(gMainView.getCurrentZoom());
}
function setSize(w, h) {
if (!gMainView) {
return(false);
}
return(gMainView.setSize(w, h));
}
function onPageChanged(newPageNumber) {
}
function onZoomChanged(percent) {
}
var gMainView;
var fpLocalizations_o = null;
var INITIAL_PAGE = ((INITIAL_PAGE == undefined) ? "1" : (INITIAL_PAGE));
var INITIAL_VIEW = ((INITIAL_VIEW == undefined) ? "width" : (INITIAL_VIEW));
var HANDHELD = ((HANDHELD == undefined) ? (getVersion().indexOf("WINCE") != -1) : (HANDHELD));
var SCREEN_DPI = ((SCREEN_DPI == undefined) ? "96" : (SCREEN_DPI));
var SEARCH_TO_TOP = ((SEARCH_TO_TOP == undefined) ? "true" : (SEARCH_TO_TOP));
var POPUP_ENABLED = ((POPUP_ENABLED == undefined) ? "true" : (POPUP_ENABLED));
if ((System.capabilities.language == "ko") || (System.capabilities.language == "ja")) {
FlashPaper.Utils.UISMALLFONTSIZE = FlashPaper.Utils.UIFONTSIZE;
}
if (UIFONT != undefined) {
FlashPaper.Utils.UIFONT = UIFONT;
}
if (UISMALLFONTSIZE != undefined) {
FlashPaper.Utils.UISMALLFONTSIZE = parseInt(UISMALLFONTSIZE);
}
if (UIFONTSIZE != undefined) {
FlashPaper.Utils.UIFONTSIZE = parseInt(UIFONTSIZE);
}
if (totalPages == undefined) {
totalPages = 100;
documentWidth = 2550;
documentHeight = 3300;
dpi = 300;
}
if (gMainView === undefined) {
fpLocalizations_o = new Object();
fpLocalizations_o.en = new FlashPaper.Localization.English();
fpLocalizations_o.de = new FlashPaper.Localization.German();
fpLocalizations_o.fr = new FlashPaper.Localization.French();
fpLocalizations_o.ja = new FlashPaper.Localization.Japanese();
fpLocalizations_o.es = new FlashPaper.Localization.Spanish();
fpLocalizations_o.it = new FlashPaper.Localization.Italian();
fpLocalizations_o.ko = new FlashPaper.Localization.Korean();
gMainView = new FlashPaper.MainView(this);
gMainView.addListener(this);
}
Symbol 19 MovieClip [pageLoadingMsg] Frame 21
gotoAndPlay (2);
Symbol 28 MovieClip [fsl_pointerThumb] Frame 1
stop();
Symbol 29 MovieClip [Component] Frame 1
#initclip 45
Object.registerClass("Component", FPUI.Component);
#endinitclip
Symbol 39 MovieClip [mUpArrow] Frame 1
stop();
Symbol 39 MovieClip [mUpArrow] Frame 2
stop();
Symbol 39 MovieClip [mUpArrow] Frame 3
stop();
Symbol 39 MovieClip [mUpArrow] Frame 4
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 2
stop();
Symbol 46 MovieClip Frame 3
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 2
stop();
Symbol 53 MovieClip Frame 3
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
Symbol 60 MovieClip Frame 3
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 3
stop();
Symbol 75 MovieClip [mDownArrow] Frame 1
stop();
Symbol 75 MovieClip [mDownArrow] Frame 2
stop();
Symbol 75 MovieClip [mDownArrow] Frame 3
stop();
Symbol 75 MovieClip [mDownArrow] Frame 4
stop();
Symbol 84 MovieClip [FPUI_TreeSelectableItem] Frame 1
#initclip 35
Object.registerClass("FPUI_TreeSelectableItem", FPUI.TreeSelectableItem);
#endinitclip
Symbol 85 MovieClip [FPUI_TreeNode] Frame 1
#initclip 36
Object.registerClass("FPUI_TreeNode", FPUI.TreeNode);
#endinitclip
Symbol 98 MovieClip [FPUI_DropdownList] Frame 1
#initclip 37
Object.registerClass("FPUI_DropdownList", FPUI.DropdownList);
#endinitclip
Symbol 102 MovieClip [divider] Frame 1
#initclip 38
Object.registerClass("divider", FlashPaper.DividerView);
#endinitclip
Symbol 110 MovieClip [fsl_scrollTrack] Frame 1
stop();
Symbol 111 MovieClip [Slider] Frame 1
#initclip 39
Object.registerClass("Slider", FPUI.Slider);
#endinitclip
Symbol 116 MovieClip [FPUI_NButtonRound] Frame 1
#initclip 40
Object.registerClass("FPUI_NButtonRound", FPUI.NButton);
#endinitclip
Symbol 121 MovieClip [FPUI_NButton] Frame 1
#initclip 41
Object.registerClass("FPUI_NButton", FPUI.NButton);
#endinitclip
Symbol 124 MovieClip [FPUI_Tree] Frame 1
#initclip 42
Object.registerClass("FPUI_Tree", FPUI.Tree);
#endinitclip
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 3
stop();
Symbol 129 MovieClip Frame 4
stop();
Symbol 130 MovieClip [Scrollbar] Frame 1
#initclip 43
Object.registerClass("Scrollbar", FPUI.Scrollbar);
#endinitclip
Symbol 134 MovieClip [document area] Frame 1
#initclip 44
Object.registerClass("document area", FlashPaper.DocumentView);
#endinitclip
Symbol 177 MovieClip [__Packages.FPUI.Component] Frame 0
class FPUI.Component extends MovieClip
{
function Component () {
var _local1 = this;
var _local2 = _global;
super();
_local1.useHandCursor = false;
_local1.tabChildren = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1._focusrect = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.m_width = _local1._width;
_local1.m_height = _local1._height;
_local1.m_methodTable = new Object();
_local1.m_keyListener = new Object();
_local1.m_keyListener.controller = _local1;
_local1.m_keyListener.onKeyDown = function () {
this.controller.onComponentKeyDown();
};
if (_local2.fpuiFocusControl == undefined) {
_local2.fpuiFocusControl = new Object();
_local2.fpuiFocusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.onComponentKillFocus();
newFocus.onComponentSetFocus();
FPUI.Component.focusedComponent = newFocus;
};
Selection.addListener(_local2.fpuiFocusControl);
}
}
function setEnabled(enabledFlag) {
var _local1 = this;
var _local2 = enabledFlag;
_local1.m_enable = _local2;
_local1.tabEnabled = _local2;
_local1.focusEnabled = _local2;
if ((!_local1.m_enable) && (_local1.m_focused)) {
Selection.setFocus(undefined);
}
}
function getEnabled() {
return(m_enable);
}
function getFocused() {
return(m_focused);
}
function setSize(w, h) {
m_width = w;
m_height = h;
}
function setChangeHandler(chng, obj) {
var _local1 = this;
_local1.m_handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.m_changeHandler = chng;
}
function invalidate(methodName) {
var _local1 = this;
_local1.m_methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
}
function cleanUI() {
var _local1 = this;
var _local2 = _local1.m_methodTable;
_local1.m_methodTable = new Object();
delete _local1.onEnterFrame;
for (var _local3 in _local2) {
_local1[_local3]();
}
}
function pressFocus() {
Selection.setFocus(this);
}
function onComponentSetFocus() {
m_focused = true;
Key.addListener(m_keyListener);
}
function onComponentKillFocus() {
m_focused = false;
Key.removeListener(m_keyListener);
}
function onComponentKeyDown() {
}
function executeCallBack() {
var _local1 = this;
_local1.m_handlerObj[_local1.m_changeHandler](_local1);
}
static function fillRect(mc, left, top, width, height, ca) {
var _local1 = mc;
var _local3 = top;
var _local2 = ca >> 24;
if (_local2 < 0) {
_local2 = _local2 + 256;
}
_local2 = (_local2 * 100) / 255;
var c = (ca & 16777215);
_local1.beginFill(c, _local2);
_local1.moveTo(left, _local3);
_local1.lineTo(left + width, _local3);
_local1.lineTo(left + width, _local3 + height);
_local1.lineTo(left, _local3 + height);
_local1.lineTo(left, _local3);
_local1.endFill();
}
static var focusedComponent = null;
var m_width = 0;
var m_height = 0;
var m_enable = true;
var m_focused = false;
var m_handlerObj = null;
var m_changeHandler = "";
var m_methodTable = null;
var m_keyListener = null;
var m_eatsNavKeysWhenFocused = false;
static var kHiliteColor = 4290117529;
static var kRolloverColor = 4292542412;
static var kWhiteBgColor = 4294967295;
}
Symbol 178 MovieClip [__Packages.FPUI.SelectableItem] Frame 0
class FPUI.SelectableItem extends FPUI.Component
{
var m_labelFieldMC, m_controller, m_itemNum, m_width;
function SelectableItem () {
var _local1 = this;
super();
_local1.createTextField("m_labelFieldMC", 1, 0, 0, 1, 1);
_local1.m_labelFieldMC.embedFonts = false;
_local1.m_labelFieldMC.selectable = false;
_local1.m_labelFieldMC.autosize = true;
}
function calcLabelHeight(s) {
setLabel(s);
return(m_labelFieldMC._height);
}
function setLabel(label) {
var _local1 = this;
if (_local1.m_labelFieldMC.text != label) {
_local1.m_labelFieldMC.text = label;
_local1.updateLabelStyle();
}
}
function drawItem(itmObj, selected, index) {
displayContent(itmObj, selected, index);
}
function getHighlightHeight() {
return(m_highlightMC._height);
}
function doClickHandler() {
m_controller.clickHandler(m_itemNum);
}
function fillHighlight(ca) {
var _local1 = this;
_local1.m_highlightMC.clear();
FPUI.Component.fillRect(_local1.m_highlightMC, 0, 0, _local1.m_width, _local1.m_height, ca);
}
function assignHighlightFunctions(b) {
var _local2 = this;
var _local1 = _local2.m_highlightMC;
if (b) {
_local1.onPress = function () {
var _local1 = this.controller;
if (_local1.getEnabled()) {
_local1.doClickHandler();
}
};
_local1.onDragOver = function () {
var _local1 = this.controller;
if (_local1.m_controller.getFocused()) {
this.onPress();
}
};
_local1.onRollOver = function () {
var _local1 = this.controller;
if (_local1.m_controller.hasCursorFocus()) {
_local1.fillHighlight(FPUI.Component.kRolloverColor);
}
};
_local1.onRollOut = function () {
var _local1 = this.controller;
_local1.fillHighlight(_local1.m_lastDrawnColor);
};
} else {
_local1.onPress = (_local1.onDragOver = (_local1.onRollOver = (_local1.onRollOut = null)));
}
}
function setSize(width, height) {
var _local1 = this;
var _local3 = width;
var _local2 = -16384;
_local1.m_width = _local3;
_local1.m_height = height;
_local1.m_labelFieldMC._x = 2;
_local1.m_labelFieldMC._y = 0;
_local1.m_labelFieldMC._width = _local3 - 2;
if (_local1.m_highlightMC == undefined) {
_local1.createEmptyMovieClip("m_highlightMC", _local2);
_local1.fillHighlight(FPUI.Component.kWhiteBgColor);
_local1.m_highlightMC._x = (_local1.m_highlightMC._y = 0);
_local1.m_highlightMC.controller = _local1;
_local1.m_highlightMC.trackAsMenu = true;
_local1.m_highlightMC.useHandCursor = false;
}
_local1.m_highlightMC._width = _local3;
_local1.m_highlightMC._height = height;
}
function setEnabled(enabledFlag) {
var _local1 = this;
if (_local1.m_enable != enabledFlag) {
_local1.m_enable = enabledFlag;
_local1.updateLabelStyle();
}
}
function setMinHighlightWidth(width) {
m_highlightMC._width = Math.max(m_width, width);
}
function updateLabelStyle() {
var _local1 = this;
if (_local1.m_labelFieldMC) {
_local1.m_labelFieldMC.setTextFormat(new TextFormat(FlashPaper.Utils.UIFONT, FlashPaper.Utils.UIFONTSIZE, (_local1.m_enable ? 0 : 8947848), _local1.m_boldLF));
_local1.m_labelFieldMC._height = _local1.m_labelFieldMC.textHeight + 2;
}
}
function setLabelBold(bold) {
var _local1 = this;
if (_local1.m_boldLF != bold) {
_local1.m_boldLF = bold;
_local1.updateLabelStyle();
}
}
function displayContent(itmObj, selected, index) {
var _local1 = this;
var _local2 = _local1.m_lastDrawnColor;
if (itmObj) {
_local1.setLabel(itmObj.getDataItemLabel() + " ");
if (selected && (_local1.m_controller.getFocused())) {
_local2 = FPUI.Component.kHiliteColor;
} else {
_local2 = FPUI.Component.kWhiteBgColor;
}
_local1.assignHighlightFunctions(true);
} else {
_local1.setLabel("");
_local2 = FPUI.Component.kWhiteBgColor;
_local1.assignHighlightFunctions(false);
}
if (_local1.m_lastDrawnColor != _local2) {
_local1.m_lastDrawnColor = _local2;
_local1.fillHighlight(_local1.m_lastDrawnColor);
}
}
var m_boldLF = false;
var m_highlightMC = null;
var m_lastDrawnColor = FPUI.Component.kWhiteBgColor;
}
Symbol 179 MovieClip [__Packages.FPUI.IDataView] Frame 0
interface FPUI.IDataView{}
Symbol 180 MovieClip [__Packages.FPUI.SelectableList] Frame 0
class FPUI.SelectableList extends FPUI.Component
{
var m_eatsNavKeysWhenFocused, m_dataProvider, invalidate, m_enable, m_scrollbar, m_containerMC;
function SelectableList () {
super();
m_eatsNavKeysWhenFocused = true;
m_selectedItems = new Array();
}
function setCursorManager(m) {
m_cursorManager = m;
}
function hasCursorFocus() {
var _local1 = this;
_local1.m_cursorManager.setCursorFocus(_local1);
return(_local1.m_cursorManager.getCursorFocus() == _local1);
}
function getLength() {
return(m_dataProvider.getLength());
}
function getSelectedIndex() {
var _local2 = this;
for (var _local3 in _local2.m_selectedItems) {
var _local1 = _local2.m_selectedItems[_local3];
return(_local1);
}
return(undefined);
}
function getSelectedItem() {
return(getItemAt(getSelectedIndex()));
}
function getItemAt(index) {
return(m_dataProvider.getItemAt(index));
}
function setSelectedIndex(index, flag) {
var _local1 = this;
var _local2 = index;
if (((_local2 >= 0) && (_local2 < _local1.getLength())) && (_local1.m_enable)) {
_local1.clearSelected();
_local1.selectItem(_local2, true);
_local1.m_lastSelected = _local2;
_local1.invalidate("updateControl");
if (flag) {
_local1.executeCallBack();
}
}
}
function setDataProvider(d) {
var _local1 = this;
_local1.setScrollPosition(0);
_local1.clearSelected();
if (_local1.m_dataProvider != null) {
_local1.m_dataProvider.removeView(_local1);
}
_local1.m_dataProvider = d;
if (_local1.m_dataProvider != null) {
_local1.m_dataProvider.addView(_local1);
}
}
function setEnabled(enabledFlag) {
var _local2 = this;
super.setEnabled(enabledFlag);
_local2.m_enable = enabledFlag;
var limit = Math.min(_local2.m_numDisplayed, _local2.getLength());
var _local1 = 0;
while (_local1 < limit) {
var _local3 = _local2.getNthSelectableItem(_local1);
_local3.setEnabled(_local2.m_enable);
_local1++;
}
_local2.m_scrollbar.setEnabled(_local2.m_enable);
_local2.m_horizScrollbar.setEnabled(_local2.m_enable);
if (_local2.m_enable) {
_local2.invalidate("updateControl");
}
}
function updateControl() {
var _local2 = this;
if (!_local2.needVS()) {
_local2.m_topDisplayed = 0;
}
var _local1 = 0;
while (_local1 < _local2.m_numDisplayed) {
var ci = _local2.getNthSelectableItem(_local1);
var _local3 = _local2.m_topDisplayed + _local1;
ci.drawItem(_local2.getItemAt(_local3), _local2.isSelected(_local3), _local3);
_local1++;
}
}
function setSize(w, h) {
var _local1 = this;
var pos = _local1.m_topDisplayed;
_local1.calcNumDisplayed();
super.setSize(w, h);
if (_local1.m_containerMC == undefined) {
_local1.createEmptyMovieClip("m_containerMC" + _local1.m_mcCount, _local1.m_mcCount - 2);
_local1.m_containerMC = _local1["m_containerMC" + _local1.m_mcCount];
}
var _local2 = 0;
while (_local2 < _local1.m_numDisplayed) {
var _local3 = _local1.getNthSelectableItem(_local2);
if (_local3 == undefined) {
_local3 = _local1.createNthSelectableItem(_local2);
}
_local3.setSize(_local1.m_width - _local1.m_scrollOffset, _local1.m_itemHeight);
_local3._y = _local1.m_itemHeight * _local2;
_local2++;
}
_local2 = _local1.m_numDisplayed;
for(;;){
var _local3 = _local1.getNthSelectableItem(_local2);
if (_local3 == undefined) {
break;
}
_local1.deleteNthSelectableItem(_local2);
_local2++;
};
_local1.updateControl();
if (_local1.m_maskMC == undefined) {
_local1.createEmptyMovieClip("m_maskMC", _local1.m_mcCount - 1);
FPUI.Component.fillRect(_local1.m_maskMC, 0, 0, 1, 1, 4278190080);
_local1.setMask(_local1.m_maskMC);
}
_local1.m_maskMC._width = w;
_local1.m_maskMC._height = h;
_local1.initScrollBar();
_local1.setScrollPosition(pos);
}
function dataViewModelChanged() {
modelChanged();
}
function getItemHeight() {
return(m_itemHeight);
}
function modelChanged() {
invalidate("updateControl");
invalidate("initScrollBar");
}
function measureItmHgt() {
var _local1 = this;
_local1.attachMovie(_local1.getItemSymbolName(), "tmpItem_mc", 0, {m_controller:_local1, m_itemNum:0});
_local1.m_itemHeight = _local1.tmpItem_mc.calcLabelHeight("Sizer: PjtTopg");
_local1.tmpItem_mc.removeMovieClip();
delete _local1.tmpItem_mc;
}
function calcNumDisplayed() {
var _local1 = this;
_local1.measureItmHgt();
_local1.m_numDisplayed = Math.floor((_local1.m_height - (_local1.m_horizScrollbar ? (_local1.m_horizScrollbar._height) : 0)) / _local1.m_itemHeight);
}
function selectItem(index, selectedFlag) {
var _local1 = this;
var _local2 = index;
if (selectedFlag != _local1.isSelected(_local2)) {
var _local3 = _local1.m_dataProvider.getItemAt(_local2).getDataItemUniqueID();
if (selectedFlag) {
_local1.m_selectedItems[_local3] = _local2;
} else {
delete _local1.m_selectedItems[_local3];
}
if (_local1.isVisible(_local2)) {
var ci = _local1.getNthSelectableItem(_local2 - _local1.m_topDisplayed);
ci.drawItem(_local1.getItemAt(_local2), selectedFlag, _local2);
}
}
}
function isSelected(index) {
var _local1 = m_dataProvider.getItemAt(index).getDataItemUniqueID();
return(m_selectedItems[_local1] != undefined);
}
function isVisible(index) {
var _local1 = this;
return((index >= _local1.m_topDisplayed) && (index < (_local1.m_topDisplayed + _local1.m_numDisplayed)));
}
function clearSelected() {
var _local1 = this;
for (var uniqueID in _local1.m_selectedItems) {
var _local2 = _local1.m_selectedItems[uniqueID];
if (_local1.isVisible(_local2)) {
var _local3 = _local1.getNthSelectableItem(_local2 - _local1.m_topDisplayed);
_local3.drawItem(_local1.getItemAt(_local2), false, _local2);
}
}
delete _local1.m_selectedItems;
_local1.m_selectedItems = new Array();
}
function selectionHandler(itemNum) {
var _local1 = this;
var _local3 = _local1.m_topDisplayed + itemNum;
var ditem = _local1.getItemAt(_local3);
if (ditem == undefined) {
_local1.m_changeFlag = false;
} else {
_local1.m_changeFlag = true;
var shift = Key.isDown(16);
var ctrl = Key.isDown(17);
if ((_local1.m_singleSelect && (!ctrl)) || ((!shift) && (!ctrl))) {
_local1.clearSelected();
_local1.selectItem(_local3, true);
_local1.m_lastSelected = _local3;
} else if (shift && (!_local1.m_singleSelect)) {
if (_local1.m_lastSelected == -1) {
_local1.m_lastSelected = _local3;
}
var incr = ((_local1.m_lastSelected < _local3) ? 1 : -1);
_local1.clearSelected();
var _local2 = _local1.m_lastSelected;
while (_local2 != _local3) {
_local1.selectItem(_local2, true);
_local2 = _local2 + incr;
}
_local1.selectItem(_local3, true);
} else if (ctrl) {
var selectedFlag = _local1.isSelected(_local3);
if (_local1.m_singleSelect) {
_local1.clearSelected();
}
if ((!_local1.m_singleSelect) || (!selectedFlag)) {
_local1.selectItem(_local3, !selectedFlag);
}
_local1.m_lastSelected = _local3;
}
}
}
function moveSelBy(incr) {
var _local1 = this;
var _local3 = _local1.getSelectedIndex();
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(_local1.getLength() - 1, _local2);
if (_local2 == _local3) {
} else {
if ((_local3 < _local1.m_topDisplayed) || (_local3 >= (_local1.m_topDisplayed + _local1.m_numDisplayed))) {
_local1.setScrollPosition(_local3);
}
if ((_local2 >= (_local1.m_topDisplayed + _local1.m_numDisplayed)) || (_local2 < _local1.m_topDisplayed)) {
_local1.setScrollPosition(_local1.m_topDisplayed + incr);
}
_local1.selectionHandler(_local2 - _local1.m_topDisplayed);
}
}
function clickHandler(itmNum) {
var _local1 = this;
if (!_local1.m_focused) {
_local1.pressFocus();
}
_local1.selectionHandler(itmNum);
_local1.onMouseUp = _local1.releaseHandler;
if ((_local1.m_dragScrollingIntervalID == undefined) && (_local1.m_scrollbar != undefined)) {
_local1.m_dragScrollingIntervalID = setInterval(_local1, "dragScroll", 15);
}
}
function releaseHandler() {
var _local1 = this;
clearInterval(_local1.m_dragScrollingIntervalID);
_local1.m_dragScrollingIntervalID = undefined;
if (_local1.m_changeFlag) {
_local1.executeCallBack();
}
_local1.m_changeFlag = false;
delete _local1.onMouseUp;
}
function setScrollPosition(pos) {
if (m_enable) {
m_scrollbar.setScrollPosition(pos);
}
}
function getItemSymbolName() {
return("FPUI_SelectableItem");
}
function createNthSelectableItem(i) {
var _local1 = this;
var _local2 = i;
_local1.m_containerMC.attachMovie(_local1.getItemSymbolName(), "fListItem" + _local2, 10 + _local2, {m_controller:_local1, m_itemNum:_local2});
return(_local1.getNthSelectableItem(_local2));
}
function getNthSelectableItem(i) {
return(m_containerMC["fListItem" + i]);
}
function deleteNthSelectableItem(i) {
m_containerMC["fListItem" + i].removeMovieClip();
delete m_containerMC["fListItem" + i];
}
function rebuildSelectedItems() {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.m_dataProvider.getLength()) {
var _local2 = _local3.m_dataProvider.getItemAt(_local1).getDataItemUniqueID();
if (_local3.m_selectedItems[_local2] != undefined) {
_local3.m_selectedItems[_local2] = _local1;
}
_local1++;
}
}
function needVS() {
var _local1 = this;
var _local2 = _local1.m_height - _local1.m_horizScrollbar._height;
return((_local1.getLength() > _local1.m_numDisplayed) && (_local2 > MIN_SBAR_SIZE));
}
function needHS() {
var _local2 = this;
var _local1 = _local2.m_width - _local2.m_scrollbar._width;
return((_local2.m_virtualWidth > _local1) && (_local1 > MIN_SBAR_SIZE));
}
function attachVSBar() {
var _local1 = this;
_local1.m_scrollbarContainer.attachMovie("Scrollbar", "m_scrollbar", 1);
_local1.m_scrollbar = _local1.m_scrollbarContainer.m_scrollbar;
_local1.m_scrollbar.setChangeHandler("scrollHandler", _local1);
}
function attachHSBar() {
var _local1 = this;
_local1.m_scrollbarContainer.attachMovie("Scrollbar", "m_horizScrollbar", 2);
_local1.m_horizScrollbar = _local1.m_scrollbarContainer.m_horizScrollbar;
_local1.m_horizScrollbar.setHorizontal(true);
_local1.m_horizScrollbar.setChangeHandler("hScrollHandler", _local1);
}
function initScrollBar() {
var _local1 = this;
var _local3 = true;
var bAdjustHS = true;
if (!_local1.needVS()) {
_local3 = false;
_local1.m_scrollOffset = 0;
if (_local1.m_scrollbar) {
_local1.m_scrollbar.removeMovieClip();
delete _local1.m_scrollbar;
_local1.invalidate("initScrollBar");
}
}
if (!_local1.needHS()) {
bAdjustHS = false;
if (_local1.m_horizScrollbar) {
_local1.m_horizScrollbar.removeMovieClip();
delete _local1.m_horizScrollbar;
_local1.invalidate("initScrollBar");
}
}
if (bAdjustHS || (_local3)) {
if (_local1.m_scrollbarContainer == undefined) {
_local1.m_mcCount = _local1.m_mcCount + 3;
_local1.createEmptyMovieClip("sbc_mc" + _local1.m_mcCount, _local1.m_mcCount);
_local1.m_scrollbarContainer = _local1["sbc_mc" + _local1.m_mcCount];
}
if (_local3 && (_local1.m_scrollbar == undefined)) {
_local1.attachVSBar();
_local1.invalidate("initScrollBar");
}
if (bAdjustHS && (_local1.m_horizScrollbar == undefined)) {
_local1.attachHSBar();
_local1.calcNumDisplayed();
if ((_local1.m_scrollbar == undefined) && (_local1.needVS())) {
_local1.attachVSBar();
_local3 = true;
}
_local1.invalidate("initScrollBar");
}
var i;
var _local2;
if (_local3) {
i = ((_local1.m_horizScrollbar != null) ? (_local1.m_horizScrollbar._height) : 0);
_local2 = _local1.m_scrollbar;
_local2.setSize(_local1.m_height - i);
_local2._x = _local1.m_width - _local2._width;
_local2._y = 0;
_local2.setLargeScroll(_local1.m_numDisplayed - 1);
_local1.m_scrollOffset = _local2._width;
_local2.setScrollProperties(_local1.m_numDisplayed, _local1.getLength() - _local1.m_numDisplayed);
}
if (bAdjustHS) {
i = ((_local1.m_scrollbar != undefined) ? (_local1.m_scrollbar._width) : 0);
_local2 = _local1.m_horizScrollbar;
_local2.setSize(_local1.m_width - i);
_local2._x = 0;
_local2._y = _local1.m_height - _local2._height;
_local2.setLargeScroll(_local1.m_width);
_local2.setScrollProperties(_local1.m_width, _local1.m_virtualWidth - (_local1.m_width - i));
_local2.setSmallScroll(5);
}
}
if (_local1.m_scrollbar._visible && (_local1.m_horizScrollbar._visible)) {
if (_local1.m_corner == undefined) {
_local1.m_corner = _local1.m_scrollbarContainer.createEmptyMovieClip("m_corner", 3);
FPUI.Component.fillRect(_local1.m_corner, 0, 0, _local1.m_scrollbar._width, _local1.m_horizScrollbar._height, 4294967295);
}
_local1.m_corner._visible = true;
_local1.m_corner._x = _local1.m_horizScrollbar._x + _local1.m_horizScrollbar._width;
_local1.m_corner._y = _local1.m_scrollbar._y + _local1.m_scrollbar._height;
} else {
_local1.m_corner._visible = false;
}
}
function scrollHandler(scrollBar) {
var _local2 = this;
var _local1 = scrollBar.getScrollPosition();
_local2.m_topDisplayed = _local1;
if (_local2.m_lastPosition != _local1) {
_local2.updateControl();
}
_local2.m_lastPosition = _local1;
}
function hScrollHandler(scrollBar) {
var _local2 = this;
var _local1 = scrollBar.getScrollPosition();
if (_local2.m_lastHorizPosition != _local1) {
_local2.m_containerMC._x = -_local1;
}
_local2.m_lastHorizPosition = _local1;
}
function dragScroll() {
var _local1 = this;
clearInterval(_local1.m_dragScrollingIntervalID);
var _local2 = 15;
if (_local1.m_containerMC._ymouse < 0) {
_local1.setScrollPosition(_local1.m_topDisplayed - 1);
_local1.selectionHandler(0);
_local2 = Math.max(25, (-23.8 * (-_local1.m_containerMC._ymouse)) + 500);
} else if (_local1.m_containerMC._ymouse > (_local1.m_itemHeight * _local1.m_numDisplayed)) {
_local1.setScrollPosition(_local1.m_topDisplayed + 1);
_local1.selectionHandler(_local1.m_numDisplayed - 1);
_local2 = Math.max(25, (-23.8 * Math.abs((_local1.m_containerMC._ymouse - (_local1.m_itemHeight * _local1.m_numDisplayed)) - 2)) + 500);
}
_local1.m_dragScrollingIntervalID = setInterval(_local1, "dragScroll", 15);
}
function onComponentKeyDown() {
var _local3 = this;
if (_local3.m_focused) {
var _local2 = [40, 38, 34, 33, 36, 35];
var keyIncrs = [1, -1, _local3.m_numDisplayed - 1, -(_local3.m_numDisplayed - 1), -_local3.getLength(), _local3.getLength()];
var _local1 = 0;
while (_local1 < _local2.length) {
if (Key.isDown(_local2[_local1])) {
_local3.moveSelBy(keyIncrs[_local1]);
return;
}
_local1++;
}
}
}
var m_selectedItems = null;
var m_topDisplayed = 0;
var m_numDisplayed = 0;
var m_selectHolder = 0;
var m_scrollOffset = 0;
var m_itemHeight = 0;
var m_changeFlag = false;
var m_singleSelect = true;
var m_lastSelected = -1;
var m_mcCount = 4;
var m_cursorManager = null;
var m_virtualWidth = 0;
static var MIN_SBAR_SIZE = 56;
}
Symbol 181 MovieClip [__Packages.FPUI.DataProvider] Frame 0
class FPUI.DataProvider
{
function DataProvider () {
m_items = new Array();
m_views = new Array();
}
function addView(viewRef) {
m_views.push(viewRef);
viewRef.dataViewModelChanged();
}
function removeView(viewRef) {
var _local1 = this;
var _local2 = viewRef;
for (var _local3 in _local1.m_views) {
if (_local1.m_views[_local3] == _local2) {
_local1.m_views[_local3] = null;
}
}
_local2.dataViewModelChanged();
}
function addItemAt(index, value) {
var _local1 = this;
var _local2 = index;
if (_local2 < _local1.getLength()) {
_local1.m_items.splice(_local2, 0, false);
}
_local1.m_items[_local2] = value;
_local1.updateViews();
}
function removeItemsAt(index, count) {
if (count > 0) {
m_items.splice(index, count);
}
updateViews();
}
function removeAll() {
m_items = new Array();
updateViews();
}
function getLength() {
return(m_items.length);
}
function getItemAt(index) {
return(m_items[index]);
}
function updateViews() {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.m_views.length) {
var _local2 = _local3.m_views[_local1];
if (_local2) {
_local2.dataViewModelChanged();
}
_local1++;
}
}
var m_items = null;
var m_views = null;
var m_uniqueID = 0;
}
Symbol 182 MovieClip [__Packages.FPUI.IDataItem] Frame 0
interface FPUI.IDataItem{}
Symbol 183 MovieClip [__Packages.FPUI.ICursorManager] Frame 0
interface FPUI.ICursorManager{}
Symbol 184 MovieClip [__Packages.FPUI.Scrollbar] Frame 0
class FPUI.Scrollbar extends FPUI.Component
{
function Scrollbar () {
var _local1 = this;
super();
_local1.tabEnabled = false;
_local1.tabChildren = false;
_local1.m_horizontal = _local1._width > _local1._height;
_local1.m_width = (_local1.m_horizontal ? (_local1._width) : (_local1._height));
_local1._xscale = 100;
_local1._yscale = 100;
_local1.setScrollPosition(0);
_local1.setSize(_local1.m_width);
}
function setHorizontal(flag) {
var _local1 = this;
var _local2 = flag;
if (_local1.m_horizontal && (!_local2)) {
_local1._xscale = 100;
_local1._rotation = 0;
} else if (_local2 && (!_local1.m_horizontal)) {
_local1._xscale = -100;
_local1._rotation = -90;
}
_local1.m_horizontal = _local2;
}
static function clearUIFuncs(mc) {
var _local1 = mc;
_local1.gotoAndStop("disabled");
_local1.onPress = null;
_local1.onRelease = null;
_local1.onDragOver = null;
_local1.onDragOut = null;
_local1.onRollOver = null;
_local1.onRollOut = null;
_local1.onReleaseOutside = null;
_local1.useHandCursor = false;
}
function setScrollProperties(pSize, mxPos) {
var _local1 = this;
_local1.m_pageSize = pSize;
_local1.m_maxPos = Math.max(mxPos, 0);
_local1.m_scrollPosition = Math.max(0, _local1.m_scrollPosition);
_local1.m_scrollPosition = Math.min(_local1.m_maxPos, _local1.m_scrollPosition);
clearUIFuncs(_local1.m_upArrowMC);
clearUIFuncs(_local1.m_downArrowMC);
clearUIFuncs(_local1.scrollTrack_mc);
_local1.m_scrollThumbMC.removeMovieClip();
if (_local1.m_maxPos > 0) {
var _local2;
_local2 = _local1.m_upArrowMC;
_local2.gotoAndStop("up");
if (_local1.m_enable) {
_local2.onPress = (_local2.onDragOver = function () {
this.controller.startUpDownScroller(this, -1);
});
_local2.onRelease = (_local2.onDragOut = function () {
this.controller.stopScrolling();
});
_local2.onRollOver = function () {
this.controller.rolloverPart(this);
};
_local2.onRollOut = (_local2.onReleaseOutside = function () {
this.controller.rolloutPart(this);
});
}
_local2._alpha = (_local1.m_enable ? 100 : 50);
_local2 = _local1.m_downArrowMC;
_local2.gotoAndStop("up");
if (_local1.m_enable) {
_local2.onPress = (_local2.onDragOver = function () {
this.controller.startUpDownScroller(this, 1);
});
_local2.onRelease = (_local2.onDragOut = function () {
this.controller.stopScrolling();
});
_local2.onRollOver = function () {
this.controller.rolloverPart(this);
};
_local2.onRollOut = (_local2.onReleaseOutside = function () {
this.controller.rolloutPart(this);
});
}
_local2._alpha = (_local1.m_enable ? 100 : 50);
_local2 = _local1.scrollTrack_mc;
_local2.gotoAndStop("enabled");
if (_local1.m_enable) {
_local2.onPress = (_local2.onDragOver = function () {
this.controller.startTrackScroller();
});
_local2.onRelease = (_local2.onDragOut = (_local2.onRollOut = function () {
this.controller.stopScrolling();
}));
}
var tmp = _local1.getScrollPosition();
_local2 = _local1.attachMovie("mScrollThumb", "m_scrollThumbMC", 3);
_local2._x = 1;
_local2._y = 13;
if (_local1.m_enable) {
_local2.useHandCursor = false;
_local2.controller = _local1;
_local2.onPress = function () {
this.controller.startDragThumb();
};
_local2.onRelease = (_local2.onReleaseOutside = function () {
this.controller.stopDragThumb();
});
_local2.onRollOver = function () {
this.controller.rollOverOrOutOfThumb(true);
};
_local2.onRollOut = function () {
this.controller.rollOverOrOutOfThumb(false);
};
_local2.onDragOut = function () {
this.controller.dragoutThumb();
};
} else {
clearUIFuncs(_local2);
}
_local2._alpha = (_local1.m_enable ? 100 : 50);
var _local3 = _local1.m_width - 32;
_local1.m_thumbHeight = Math.max((_local1.m_pageSize / (_local1.m_maxPos + _local1.m_pageSize)) * _local3, 26);
var midHeight = (_local1.m_thumbHeight - 10);
_local2.mc_sliderMid._yScale = (midHeight * 100) / _local2.mc_sliderMid._height;
_local2.mc_sliderMid._y = 2;
_local2.grips._y = Math.floor(((_local1.m_thumbHeight / 2) - (_local2.grips._height / 2)) - 1.5);
_local2.mc_sliderBot._y = (5 + midHeight) - 3;
_local1.m_scrollTop = _local2._y + 3;
_local1.m_trackHeight = (_local3 - _local1.m_thumbHeight) + 3;
_local1.m_scrollBot = _local1.m_scrollTop + _local1.m_trackHeight;
_local1.m_scrollPosition = Infinity;
_local1.setScrollPosition(tmp);
}
}
function getScrollPosition() {
return(m_scrollPosition);
}
function setScrollPosition(pos) {
var _local1 = this;
var _local2 = pos;
if (_local1.m_scrollPosition != _local2) {
_local2 = Math.max(Math.min(_local2, _local1.m_maxPos), 0);
if (_local1.m_scrollPosition != _local2) {
_local1.m_scrollPosition = _local2;
_local1.m_scrollThumbMC._y = Math.round((_local1.m_scrollPosition * _local1.m_trackHeight) / _local1.m_maxPos) + _local1.m_scrollTop;
_local1.executeCallBack();
return(true);
}
}
return(false);
}
function setLargeScroll(lScroll) {
m_largeScroll = lScroll;
}
function setSmallScroll(sScroll) {
m_smallScroll = sScroll;
}
function setEnabled(enabledFlag) {
var _local1 = this;
_local1.m_enable = enabledFlag;
_local1.setScrollProperties(_local1.m_pageSize, _local1.m_maxPos);
}
function getSize() {
var _local1 = this;
if (!_local1.m_horizontal) {
return(_local1._height);
}
return(_local1._width);
}
function getMaxPos() {
return(m_maxPos);
}
function setSize(hgt) {
var _local1 = this;
if (_local1._height == 1) {
} else {
_local1.m_width = hgt + 1;
var _local2 = _local1.scrollTrack_mc;
_local2._yscale = 100;
_local2._yscale = (100 * _local1.m_width) / _local2._height;
if (_local1.m_upArrowMC == undefined) {
_local1.attachMovie("mUpArrow", "m_upArrowMC", 1);
_local1.attachMovie("mDownArrow", "m_downArrowMC", 2);
_local1.m_downArrowMC.controller = (_local1.m_upArrowMC.controller = _local1);
_local1.m_upArrowMC.useHandCursor = (_local1.m_downArrowMC.useHandCursor = false);
_local1.m_upArrowMC._x = (_local1.m_upArrowMC._y = 0);
_local1.m_downArrowMC._x = 0;
}
_local2.controller = _local1;
_local1.m_downArrowMC._y = _local1.m_width - 16;
_local1.setScrollProperties(_local1.m_pageSize, _local1.m_maxPos);
_local2.topShad._yscale = 100;
_local2.topShad._xscale = 100;
_local2.topShad._y = _local2._y + 8;
_local2.botShad._yscale = 100;
_local2.botShad._xscale = 100;
_local2.botShad._y = _local1.m_downArrowMC._y - 8;
}
}
function scrollIt(inc, mode) {
var _local1 = this;
var _local2 = _local1.m_smallScroll;
if (inc != "one") {
_local2 = ((_local1.m_largeScroll == 0) ? (_local1.m_pageSize) : (_local1.m_largeScroll));
}
_local1.setScrollPosition(_local1.getScrollPosition() + (mode * _local2));
}
function sliderGoTo(state) {
var _local2 = state;
var _local1 = m_scrollThumbMC;
_local1.mc_sliderTop.gotoAndStop(_local2);
_local1.mc_sliderBot.gotoAndStop(_local2);
_local1.mc_sliderMid.gotoAndStop(_local2);
_local1.grips.gotoAndStop(_local2);
}
function startDragThumb() {
var _local1 = this;
_local1.sliderGoTo("down");
_local1.m_scrollThumbMC.lastY = _local1.m_scrollThumbMC._ymouse;
_local1.m_scrollThumbMC.onMouseMove = function () {
this.controller.dragThumb();
};
}
function dragThumb() {
var _local1 = this;
_local1.m_scrollThumbMC.scrollMove = (_local1.m_scrollThumbMC._ymouse - _local1.m_scrollThumbMC.lastY) + _local1.m_scrollThumbMC._y;
if (_local1.m_scrollThumbMC.scrollMove < _local1.m_scrollTop) {
_local1.m_scrollThumbMC.scrollMove = _local1.m_scrollTop;
} else if (_local1.m_scrollThumbMC.scrollMove > _local1.m_scrollBot) {
_local1.m_scrollThumbMC.scrollMove = _local1.m_scrollBot;
}
_local1.m_scrollThumbMC._y = _local1.m_scrollThumbMC.scrollMove;
_local1.m_scrollPosition = Math.round((_local1.m_maxPos * (_local1.m_scrollThumbMC._y - _local1.m_scrollTop)) / _local1.m_trackHeight);
_local1.m_isScrolling = true;
updateAfterEvent();
_local1.executeCallBack();
}
function stopDragThumb() {
var _local1 = this;
_local1.sliderGoTo(((_local1.m_mouseOverMC == _local1.m_scrollThumbMC) ? "over" : "up"));
_local1.m_isScrolling = false;
_local1.m_scrollThumbMC.onMouseMove = null;
}
function rollOverOrOutOfThumb(over) {
var _local1 = this;
if (over) {
_local1.m_mouseOverMC = _local1.m_scrollThumbMC;
} else if (_local1.m_mouseOverMC == _local1.m_scrollThumbMC) {
_local1.m_mouseOverMC = null;
}
_local1.sliderGoTo((over ? "over" : "up"));
}
function dragoutThumb() {
var _local1 = this;
if (_local1.m_mouseOverMC == _local1.m_scrollThumbMC) {
_local1.m_mouseOverMC = null;
}
}
function stopScrolling() {
var _local1 = this;
_local1.m_downArrowMC.gotoAndStop(((_local1.m_mouseOverMC == _local1.m_downArrowMC) ? "over" : "up"));
_local1.m_upArrowMC.gotoAndStop(((_local1.m_mouseOverMC == _local1.m_upArrowMC) ? "over" : "up"));
clearInterval(_local1.m_scrollingIntervalID);
}
function rolloverPart(part) {
m_mouseOverMC = part;
part.gotoAndStop("over");
}
function rolloutPart(part) {
if (m_mouseOverMC == part) {
m_mouseOverMC = null;
}
part.gotoAndStop("up");
}
function startTrackScroller() {
var _local1 = this;
_local1.trackScroller();
_local1.m_scrollingIntervalID = setInterval(_local1, "scrollInterval", 500, "page", -1);
}
function startUpDownScroller(part, dir) {
var _local1 = this;
part.gotoAndStop("down");
_local1.scrollIt("one", dir);
_local1.m_scrollingIntervalID = setInterval(_local1, "scrollInterval", 500, "one", dir);
}
function scrollInterval(inc, dir) {
var _local1 = this;
var _local2 = inc;
clearInterval(_local1.m_scrollingIntervalID);
if (_local2 == "page") {
_local1.trackScroller();
} else {
_local1.scrollIt(_local2, dir);
}
_local1.m_scrollingIntervalID = setInterval(_local1, "scrollInterval", 35, _local2, dir);
}
function trackScroller() {
var _local1 = this;
if ((_local1.m_scrollThumbMC._y + _local1.m_thumbHeight) < _local1._ymouse) {
_local1.scrollIt("page", 1);
} else if (_local1.m_scrollThumbMC._y > _local1._ymouse) {
_local1.scrollIt("page", -1);
}
}
var m_scrollPosition = 0;
var m_maxPos = 0;
var m_pageSize = 0;
var m_scrollTop = 0;
var m_scrollBot = 0;
var m_trackHeight = 0;
var m_largeScroll = 0;
var m_smallScroll = 1;
var m_thumbHeight = 0;
var m_horizontal = false;
var m_isScrolling = false;
var m_scrollingIntervalID = 0;
var m_scrollThumbMC = null;
var m_upArrowMC = null;
var m_downArrowMC = null;
var m_mouseOverMC = null;
}
Symbol 185 MovieClip [__Packages.FlashPaper.Utils] Frame 0
class FlashPaper.Utils
{
function Utils () {
}
static function clamp(min, val, max) {
var _local1 = val;
if (_local1 < min) {
return(min);
}
if (_local1 > max) {
return(max);
}
return(_local1);
}
static function doMouseHitTest(mc) {
if (mc._visible == false) {
return(false);
}
var _local1 = new Object();
_local1.x = _level0._xmouse;
_local1.y = _level0._ymouse;
_level0.localToGlobal(_local1);
return(mc.hitTest(_local1.x, _local1.y, true));
}
static function addShadow(destMC, topOffset, w, h, addTop) {
var _local3 = destMC;
var _local1;
var _local2 = {silent:true};
_local1 = _local3.attachMovie("shadow_h_mc", "shadow_h_mc", 1);
_local1._x = 3;
_local1._y = h;
_local1._width = w - 6;
_local1._accProps = _local2;
_local1 = _local3.attachMovie("shadow_lv_mc", "shadow_lv_mc", 2);
_local1._y = topOffset;
_local1._height = (h - 3) - topOffset;
_local1._accProps = _local2;
_local1 = _local3.attachMovie("shadow_rv_mc", "shadow_rv_mc", 3);
_local1._x = w;
_local1._y = topOffset;
_local1._height = (h - 3) - topOffset;
_local1._accProps = _local2;
_local1 = _local3.attachMovie("shadow_lc_mc", "shadow_lc_mc", 4);
_local1._y = h;
_local1._accProps = _local2;
_local1 = _local3.attachMovie("shadow_rc_mc", "shadow_rc_mc", 5);
_local1._x = w;
_local1._y = h;
_local1._accProps = _local2;
if (addTop) {
_local1 = _local3.attachMovie("shadow_h_mc", "shadow_top_mc", 6);
_local1._x = 0;
_local1._y = topOffset;
_local1._width = w;
_local1._accProps = _local2;
}
}
static function removeShadow(destMC) {
var _local1 = destMC;
_local1.shadow_h_mc.removeMovieClip();
_local1.shadow_lv_mc.removeMovieClip();
_local1.shadow_rv_mc.removeMovieClip();
_local1.shadow_lc_mc.removeMovieClip();
_local1.shadow_rc_mc.removeMovieClip();
_local1.shadow_top_mc.removeMovieClip();
}
static function replaceInString(source, replace, replaceWith) {
var _local3 = replace;
var sb = "";
var found = false;
var _local2 = 0;
for ( ; _local2 < source.length ; _local2++) {
if (source.charAt(_local2) == _local3.charAt(0)) {
found = true;
var _local1 = 0;
while (_local1 < _local3.length) {
if (source.charAt(_local2 + _local1) != _local3.charAt(_local1)) {
found = false;
break;
}
_local1++;
}
if (found) {
sb = sb + replaceWith;
_local2 = _local2 + (_local3.length - 1);
continue;
}
} else {
sb = sb + source.charAt(_local2);
}
}
return(sb);
}
static var UIFONT = "Verdana";
static var UIFONTSIZE = 12;
static var UISMALLFONTSIZE = 10;
}
Symbol 186 MovieClip [__Packages.FPUI.TreeSelectableItem] Frame 0
class FPUI.TreeSelectableItem extends FPUI.SelectableItem
{
function TreeSelectableItem () {
super();
}
function displayContent(nodeObj, selected, index) {
var _local1 = this;
var _local2 = nodeObj;
super.displayContent(_local2, selected, index);
var treeControl = _local1.m_controller;
var iconName = ((_local2 && (!_local2.isBranch())) ? "ftree_icon_leaf" : "");
if ((_local2 == null) || (_local1.m_iconName != iconName)) {
_local1.m_iconName = "";
if (_local1.m_iconMC) {
_local1.m_iconMC.removeMovieClip();
}
}
_local1.m_connectorMC.ex.clear();
if (_local2 == null) {
} else {
if (_local1.m_connectorMC == undefined) {
_local1.createEmptyMovieClip("m_connectorMC", 3001);
}
_local1.m_connectorMC._x = 2;
var ch = _local1.getHighlightHeight();
var cw = 17;
var nodeLevel = _local2.getLevel();
if (_local2.isBranch()) {
_local1.setLabelBold(true);
var mx = (Math.floor(cw / 2) + (nodeLevel * cw));
var my = Math.floor(ch / 2);
var _local3 = _local1.m_connectorMC.ex;
if (_local3 == undefined) {
_local3 = _local1.m_connectorMC.createEmptyMovieClip("ex", 1);
}
_local1.drawExpander(_local3, mx, my, _local2.isOpen());
_local3.node = _local2;
_local3.index = index;
_local3.tree = treeControl;
_local3.useHandCursor = false;
_local3.trackAsMenu = true;
_local3.onRelease = function () {
var _local1 = this.tree;
if (_local1.getEnabled()) {
var _local2 = this.node;
_local2.setIsOpen(!_local2.isOpen());
var _local3 = this.index;
_local1.refreshBranch(_local3);
if (!_local1.getFocused()) {
_local1.pressFocus();
}
}
};
} else {
_local1.setLabelBold(false);
}
if (_local1.m_iconMC == undefined) {
_local1.attachMovie(iconName, "m_iconMC", 3000);
_local1.m_iconName = iconName;
}
var offset = ((_local1.m_connectorMC._x + ((nodeLevel + 1) * cw)) - 1);
if (_local1.m_iconMC) {
_local1.m_iconMC._x = Math.round(offset);
_local1.m_iconMC._y = Math.round((ch - _local1.m_iconMC._height) / 2);
_local1.m_iconMC.useHandCursor = false;
offset = offset + (_local1.m_iconMC._width + 4);
}
_local1.m_labelFieldMC._x = Math.round(offset);
if (_local1.m_controller.getItemHeight() < ch) {
_local1.m_labelFieldMC._y = Math.round((ch - _local1.m_controller.getItemHeight()) / 2);
}
if (_local2 != null) {
_local2.setLastDrawnWidth((offset + _local1.m_labelFieldMC._x) + _local1.m_labelFieldMC.textWidth);
treeControl.setMinTreeWidth(_local2.getLastDrawnWidth());
}
_local1._y = Math.round(_local1._y);
}
}
function drawExpander(ex, x, y, isOpen) {
var _local2 = ex;
_local2.clear();
var _local1 = 6;
_local2.beginFill(16777215, 0);
_local2.moveTo(-_local1, -_local1);
_local2.lineTo(_local1, -_local1);
_local2.lineTo(_local1, _local1);
_local2.lineTo(-_local1, _local1);
_local2.lineTo(-_local1, -_local1);
_local2.endFill();
var _local3 = 7697781 /* 0x757575 */;
_local1 = 3;
_local2.beginFill(_local3);
_local2.moveTo(-_local1, -_local1);
_local2.lineTo(_local1, 0);
_local2.lineTo(-_local1, _local1);
_local2.lineTo(-_local1, -_local1);
_local2.endFill();
_local2._x = Math.floor(x);
_local2._y = Math.floor(y);
_local2._rotation = (isOpen ? 90 : 0);
}
var m_iconName = "";
}
Symbol 187 MovieClip [__Packages.FPUI.TreeNode] Frame 0
class FPUI.TreeNode
{
function TreeNode (s, d) {
var _local1 = this;
_local1.m_label = s;
_local1.m_data = d;
_local1.m_kids = new Array();
_local1.m_uniqueID = ++m_nextID;
}
function getDataItemLabel() {
return(m_label);
}
function getDataItemData() {
return(m_data);
}
function getDataItemUniqueID() {
return(m_uniqueID);
}
function getLevel() {
return(m_level);
}
function setLevel(lev) {
m_level = lev;
}
function getLastDrawnWidth() {
return(m_lastDrawnWidth);
}
function setLastDrawnWidth(i) {
m_lastDrawnWidth = i;
}
function addNode(kid) {
addChildNodeAt(m_kids.length, kid);
}
function addChildNodeAt(i, kid) {
var _local1 = this;
var _local2 = kid;
_local1.m_branch = true;
_local1.m_kids.splice(i, 0, _local2);
_local2.m_parent = _local1;
_local2.m_level = _local1.m_level + 1;
}
function getChildNodes() {
return(m_kids);
}
function getLength() {
return(m_kids.length);
}
function isBranch() {
return(m_branch);
}
function isOpen() {
return(m_open);
}
function setIsOpen(b) {
m_open = b;
}
function isOnOpenBranch() {
var _local2 = true;
var _local1 = m_parent;
while (_local2 && (_local1 != null)) {
_local2 = _local2 & _local1.isOpen();
_local1 = _local1.m_parent;
}
return(_local2);
}
static var m_nextID = 0;
var m_label = "";
var m_data = null;
var m_open = false;
var m_branch = false;
var m_level = 0;
var m_kids = null;
var m_parent = null;
var m_lastDrawnWidth = 0;
var m_uniqueID = 0;
}
Symbol 188 MovieClip [__Packages.FPUI.Tree] Frame 0
class FPUI.Tree extends FPUI.SelectableList
{
var getSelectedItem, executeCallBack;
function Tree () {
var _local1 = this;
super();
_local1._x = Math.round(_local1._x);
_local1._y = Math.round(_local1._y);
_local1.m_width = _local1._width;
_local1.m_height = _local1._height;
_local1._yscale = (_local1._xscale = 100);
_local1.setSize(_local1.m_width, _local1.m_height);
}
function refresh() {
refreshBranch(-1);
}
function refreshBranch(index) {
var _local1 = this;
_local1.m_dataProvider.updateBranch(index);
_local1.rebuildSelectedItems();
_local1.invalidate("updateControl");
}
function setDataProvider(dataProvider) {
var _local1 = this;
_local1.clearSelected();
super.setDataProvider(dataProvider);
_local1.resetTreeWidth();
_local1.refresh();
}
function setSize(w, h) {
super.setSize(w, h);
setMinHighlightWidth(Stage.width);
}
function moveSelBy(incr) {
var _local1 = getSelectedItem();
if ((_local1 != null) && (_local1.isOnOpenBranch())) {
super.moveSelBy(incr);
}
executeCallBack();
}
function resetTreeWidth() {
var _local1 = this;
_local1.m_virtualWidth = _local1.m_dataProvider.calcWidth();
_local1.setMinHighlightWidth(Stage.width);
_local1.invalidate("updateControl");
}
function setMinTreeWidth(w) {
var _local1 = this;
if (w > _local1.m_virtualWidth) {
_local1.m_virtualWidth = w;
_local1.setMinHighlightWidth(_local1.m_virtualWidth);
_local1.invalidate("initScrollBar");
}
}
function setMinHighlightWidth(width) {
var _local2 = this;
var _local3 = width;
var _local1 = 0;
while (_local1 < _local2.m_numDisplayed) {
_local2.getNthSelectableItem(_local1).setMinHighlightWidth(_local3);
_local1++;
}
}
function onComponentKeyDown() {
var _local2 = this;
if (_local2.m_focused && (_local2.m_enable)) {
if (Key.isDown(32)) {
var _local1 = _local2.getSelectedItem();
if ((_local1 != null) && (_local1.isBranch())) {
_local1.setIsOpen(!_local1.isOpen());
_local2.refreshBranch(_local2.getSelectedIndex());
}
} else {
super.onComponentKeyDown();
}
}
}
function getItemSymbolName() {
return("FPUI_TreeSelectableItem");
}
}
Symbol 189 MovieClip [__Packages.FPUI.TreeDataProvider] Frame 0
class FPUI.TreeDataProvider extends FPUI.DataProvider
{
var addItemAt, getItemAt;
function TreeDataProvider (root) {
super();
setRootNode(root);
}
function setRootNode(root) {
var _local1 = this;
_local1.m_root = root;
_local1.removeAll();
if (_local1.m_root != null) {
_local1.m_root.setIsOpen(true);
_local1.addNodeAt(-1, -1, _local1.m_root);
}
_local1.updateViews();
}
function calcWidth() {
return(doCalcWidth(m_root, 0));
}
function doCalcWidth(node, w) {
var _local3 = w;
if (node.getLastDrawnWidth() > _local3) {
_local3 = node.getLastDrawnWidth();
}
if (node.isOpen()) {
var cn = node.getChildNodes();
var _local1 = 0;
while (_local1 < cn.length) {
var _local2 = doCalcWidth(cn[_local1], _local3);
if (_local2 > _local3) {
_local3 = _local2;
}
_local1++;
}
}
return(_local3);
}
function addNodeAt(n, level, node) {
var _local2 = n;
node.setLevel(level);
if (_local2 >= 0) {
addItemAt(_local2, node);
}
_local2++;
if (node.isBranch() && (node.isOpen())) {
level++;
var _local3 = node.getChildNodes();
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = addNodeAt(_local2, level, _local3[_local1]);
_local1++;
}
}
return(_local2);
}
function getNthNode(index) {
return(getItemAt(index));
}
function updateBranch(index) {
var _local2 = this;
var node = ((index == -1) ? (_local2.m_root) : (_local2.getNthNode(index)));
if (!node.isBranch()) {
} else {
var _local3 = index + 1;
var level = (node.getLevel() + 1);
var _local1 = _local3;
while ((_local1 < _local2.getLength()) && (_local2.getNthNode(_local1).getLevel() >= level)) {
_local1++;
}
_local2.removeItemsAt(_local3, _local1 - _local3);
if (node.isOpen()) {
var kids = node.getChildNodes();
_local1 = 0;
while (_local1 < kids.length) {
_local3 = _local2.addNodeAt(_local3, level, kids[_local1]);
_local1++;
}
}
}
}
var m_root = null;
}
Symbol 190 MovieClip [__Packages.FPUI.DropdownList] Frame 0
class FPUI.DropdownList extends FPUI.Component
{
var _visible;
function DropdownList () {
var _local1 = this;
super();
_local1.setListVisible(false);
_local1.m_rowHeight = Math.max(ICON_SIZE + (ICON_X_PAD * 2), FlashPaper.Utils.UISMALLFONTSIZE + TEXT_FIELD_SLOP);
_local1.m_selectedItem = -1;
_local1.useHandCursor = false;
_local1.m_data = new Array();
_local1.m_dividers = new Array();
_local1.createEmptyMovieClip("m_highlightMC", -1);
_local1.adjustHeight();
}
function setController(controller) {
m_controller = controller;
}
function setCursorManager(cursorManager) {
m_cursorManager = cursorManager;
}
function setButton(button) {
var _local1 = this;
_local1.m_button = button;
_local1.m_button._visible = false;
_local1.m_button.m_eatsNavKeysWhenFocused = true;
_local1.m_button.setKeyHandler(_local1);
}
function setListVisible(visible) {
var _local1 = this;
var _local2 = visible;
if (_local1._visible == _local2) {
} else {
_local1._visible = _local2;
if (_local2) {
if (_local1.m_button) {
_local1.m_button.setActive(true);
_local1.m_button.pressFocus();
}
FlashPaper.Utils.removeShadow(_local1);
FlashPaper.Utils.addShadow(_local1, 0, _local1.list_mc._width, _local1.list_mc._height, true);
} else {
if (_local1.m_button) {
_local1.m_button.setActive(false);
if (FPUI.Component.focusedComponent == _local1.m_button) {
Selection.setFocus(null);
}
}
_local1.highlightItem(-1);
}
}
}
function onButtonRelease() {
var _local1 = this;
if (_local1.m_button) {
var _local2 = _local1.m_button.getBounds(_local1._parent);
_local1._x = Math.round(_local2.xMin - (_local1.list_mc._width - _local1.m_button._width));
_local1._y = Math.round(_local1._y);
_local1.setListVisible(!_local1._visible);
}
}
function moveSelection(dir) {
var _local2 = this;
var _local1 = _local2.m_selectedItem;
_local1 = _local1 + dir;
if ((_local1 >= 0) && (_local1 < _local2.m_data.length)) {
_local2.highlightItem(_local1);
}
}
function addItem(iconName, displayText, method) {
var _local1 = this;
var _local3 = (_local1.m_data.length * _local1.m_rowHeight) + (_local1.m_dividers.length * DIVIDER_HEIGHT);
_local1.m_data.push(new FPUI.DropdownListData(displayText, _local3, method));
_local1.adjustHeight();
var _local2 = _local1.m_data.length - 1;
_local1.addLabel(iconName, ITEM_LABEL + _local2, _local2);
_local1.adjustWidth();
if ((_local1.m_data.length > 0) && (_local1.m_button)) {
_local1.m_button._visible = true;
}
return(_local1.m_data.length);
}
function removeItem() {
var _local1 = this;
if (_local1.m_data.length > 0) {
_local1.removeLabel(ITEM_LABEL + (_local1.m_data.length - 1));
_local1.m_data.pop();
_local1.adjustHeight();
_local1.adjustWidth();
if ((_local1.m_data.length == 0) && (_local1.m_button)) {
_local1.m_button._visible = false;
}
}
}
function clear() {
var _local1 = this;
while (_local1.m_data.length > 0) {
_local1.removeItem();
}
}
function addDivider() {
var _local1 = this;
var _local3 = _local1.m_dividers.length;
var depth = (FIRST_DIV_DEPTH + _local3);
var _local2 = ("divider" + _local3) + "_mc";
_local1.m_dividers.push(_local1.attachMovie("ListDivider", _local2, depth));
_local1[_local2]._x = _local1.list_mc._x;
_local1[_local2]._y = ((_local1.m_data.length * _local1.m_rowHeight) + (_local3 * DIVIDER_HEIGHT)) + 0.5;
_local1[_local2]._width = _local1.list_mc._width;
}
function removeDivider() {
var _local1 = m_dividers.pop();
_local1.removeMovieClip();
}
function executeSelection() {
var _local1 = this;
if ((_local1.m_selectedItem >= 0) && (_local1.m_selectedItem < _local1.m_data.length)) {
_local1.m_controller[_local1.m_data[_local1.m_selectedItem].m_method]();
return(true);
}
return(false);
}
function onMouseDown() {
var _local1 = this;
_local1.executeSelection();
if ((!_local1.m_button) || (FlashPaper.Utils.doMouseHitTest(_local1.m_button) == false)) {
_local1.setListVisible(false);
}
}
function onMouseMove() {
var _local1 = this;
if (_local1._visible) {
if (FlashPaper.Utils.doMouseHitTest(_local1.list_mc)) {
var _local2 = _local1._ymouse;
if (_local2 < 0) {
_local2 = 0;
}
var _local3 = Math.floor(_local2 / _local1.m_rowHeight);
_local1.highlightItem(_local3);
}
}
}
function onRollOver() {
var _local1 = this;
if (_local1._visible) {
_local1.m_cursorManager.setCursorFocus(_local1);
}
}
function onRollOut() {
if (_visible) {
highlightItem(-1);
}
}
function onReleaseOutside() {
if (_visible) {
highlightItem(-1);
}
}
function onKeyDown() {
var _local1 = this;
var _local2 = Key.getCode();
switch (_local2) {
case 38 :
_local1.moveSelection(-1);
if (_local1.m_button) {
_local1.m_button.pressFocus();
}
return;
case 40 :
_local1.moveSelection(1);
if (_local1.m_button) {
_local1.m_button.pressFocus();
}
return;
case 9 :
_local1.setListVisible(false);
return;
case 13 :
if (_local1.executeSelection()) {
_local1.setListVisible(false);
} else {
_local1.onButtonRelease();
}
}
}
function addLabel(iconName, instanceName, idx) {
var _local1 = this;
_local1.createEmptyMovieClip(instanceName, FIRST_ITEM_DEPTH + idx);
var _local2 = _local1[instanceName];
var y = ((idx * _local1.m_rowHeight) + (_local1.m_dividers.length * DIVIDER_HEIGHT));
var textFieldXpos = 0;
if (iconName.length != 0) {
var _local3 = _local2.attachMovie(iconName, "icon", 1);
var w = Math.min(_local3._width, ICON_SIZE);
var h = Math.min(_local3._height, _local1.m_rowHeight);
_local3._x = Math.round(ICON_X_PAD + ((ICON_SIZE - w) / 2));
_local3._y = Math.round(y + ((_local1.m_rowHeight - h) / 2));
_local3._accProps = {silent:true};
textFieldXpos = (ICON_X_PAD * 2) + ICON_SIZE;
} else {
textFieldXpos = TEXT_LABEL_PADDING;
}
if (_local1.m_data[idx].m_text.length != 0) {
var textFormat = new TextFormat(FlashPaper.Utils.UIFONT, FlashPaper.Utils.UISMALLFONTSIZE, 0, true);
_local2.createTextField("textLabel", 2, textFieldXpos, Math.round((y + ((_local1.m_rowHeight - FlashPaper.Utils.UISMALLFONTSIZE) / 2)) - TEXT_FIELD_SLOP), _local1.list_mc._width - textFieldXpos, _local1.m_rowHeight);
_local2.textLabel.embedFonts = false;
_local2.textLabel.text = _local1.m_data[idx].m_text;
_local2.textLabel.setTextFormat(textFormat);
_local2.textLabel.selectable = false;
_local2.textLabel._accProps = {silent:true};
}
Accessibility.updateProperties();
}
function removeLabel(instanceName) {
this[instanceName].removeMovieClip();
}
function adjustHeight() {
var _local1 = this;
var _local2 = (_local1.m_data.length * _local1.m_rowHeight) + (_local1.m_dividers.length * DIVIDER_HEIGHT);
_local1.list_mc._height = _local2;
}
function adjustWidth() {
var _local1 = this;
var _local3 = 0;
var currTextWidth = 0;
var icons = false;
var _local2 = 0;
while (_local2 < _local1.m_data.length) {
currTextWidth = _local1[ITEM_LABEL + _local2].textLabel.textWidth + (TEXT_FIELD_SLOP * 2);
if (_local3 < currTextWidth) {
_local3 = currTextWidth;
}
if (_local1[ITEM_LABEL + _local2].icon) {
icons = true;
}
_local2++;
}
_local2 = 0;
while (_local2 < _local1.m_data.length) {
_local1[ITEM_LABEL + _local2].textLabel._width = _local3;
_local2++;
}
if (icons) {
_local3 = _local3 + (((ICON_X_PAD * 2) + ICON_SIZE) + TEXT_LABEL_PADDING);
} else {
_local3 = _local3 + (TEXT_LABEL_PADDING * 2);
}
_local1.list_mc._width = _local3;
}
function highlightItem(index) {
var _local1 = this;
var _local2 = index;
_local1.m_highlightMC.clear();
if (((_local2 >= 0) && (_local2 < _local1.m_data.length)) && (_local1.m_data[_local2].m_method != "")) {
_local1.m_highlightMC._visible = true;
FPUI.Component.fillRect(_local1.m_highlightMC, 0, _local1.m_data[_local2].m_yOffset, _local1.list_mc._width, _local1.m_rowHeight, FPUI.Component.kRolloverColor);
_local1.m_selectedItem = _local2;
} else {
_local1.m_highlightMC._visible = false;
_local1.m_selectedItem = -1;
}
}
var m_button = null;
var m_controller = null;
var m_cursorManager = null;
var m_selectedItem = -1;
var m_data = null;
var m_rowHeight = 0;
var m_dividers = null;
var m_nextLabelYPos = 0;
var m_numDividers = 0;
static var ICON_X_PAD = 4;
static var ICON_SIZE = 16;
static var TEXT_LABEL_PADDING = 4;
static var ITEM_LABEL = "listItem_mc";
static var DIVIDER_HEIGHT = 3;
static var TEXT_FIELD_SLOP = 2;
static var FIRST_ITEM_DEPTH = 100;
static var FIRST_DIV_DEPTH = 200;
}
Symbol 191 MovieClip [__Packages.FPUI.NButton] Frame 0
class FPUI.NButton extends FPUI.Component
{
var m_enable, m_iconMC, _parent;
function NButton () {
var _local1 = this;
super();
_local1.stop();
_local1.useHandCursor = false;
if (_local1.m_iconName != "") {
var _local2 = _local1.attachMovie(_local1.m_iconName, "m_iconMC", 99);
_local2._x = Math.round((_local1._width - _local2._width) / 2);
_local2._y = Math.round((_local1._height - _local2._height) / 2);
_local2.tabEnabled = false;
}
if (_local1._accImpl != null) {
delete _local1._accImpl;
_local1._accImpl = null;
}
}
function onComponentSetFocus() {
super.onComponentSetFocus();
go("focus");
}
function onComponentKillFocus() {
super.onComponentKillFocus();
go("up");
}
function go(s) {
var _local1 = s;
var _local2 = this;
_local2.m_state = _local1;
if (!_local2.m_enable) {
_local1 = "up";
} else if (_local1 == "up") {
if (_local2.m_active) {
_local1 = "over";
} else if (_local2.getFocused()) {
_local1 = "focus";
}
} else if ((_local1 == "focus") && (_local2.m_active)) {
_local1 = "over";
}
_local2.gotoAndStop(_local1);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
m_iconMC._alpha = (m_enable ? 100 : 50);
}
function setActive(a) {
var _local1 = this;
_local1.m_active = a;
_local1.go(_local1.m_state);
}
function isActive() {
return(m_active);
}
function findListener(method) {
var _local2 = method;
var _local1 = _parent;
while (_local1 != null) {
if ((_local1.controller != undefined) && (_local1.controller[_local2] != undefined)) {
return(_local1.controller);
}
_local1 = _local1._parent;
}
return(null);
}
function sendListener(method) {
var _local1 = findListener(method);
if (_local1 != null) {
_local1[method]();
}
}
function setKeyHandler(h) {
m_keyHandler = h;
}
function onComponentKeyDown() {
var _local1 = this;
if (_local1.m_keyHandler) {
_local1.m_keyHandler.onKeyDown();
} else if (Key.getCode() == 13) {
_local1.sendListener(_local1.m_clickHandler);
}
}
function onDragOver() {
go("down");
}
function onDragOut() {
go("up");
}
function onRollOver() {
go("over");
}
function onRollOut() {
go("up");
}
function onPress() {
go("down");
}
function onRelease() {
var _local1 = this;
if (_local1.m_enable) {
_local1.sendListener(_local1.m_clickHandler);
}
_local1.go("over");
}
function onReleaseOutside() {
go("up");
}
var m_active = false;
var m_keyHandler = null;
var m_state = "up";
var m_iconName = "";
var m_clickHandler = "";
var m_localName = "";
}
Symbol 192 MovieClip [__Packages.FPUI.DropdownListData] Frame 0
class FPUI.DropdownListData
{
function DropdownListData (displayText, yOffset, method) {
var _local1 = this;
_local1.m_text = displayText;
_local1.m_yOffset = yOffset;
_local1.m_method = method;
}
}
Symbol 193 MovieClip [__Packages.FlashPaper.DividerView] Frame 0
class FlashPaper.DividerView extends MovieClip
{
var useHandCursor, gripper_mc, m_mainView, _height;
function DividerView () {
super();
useHandCursor = false;
gripper_mc.useHandCursor = false;
}
function setMainView(p_mainView) {
var _local1 = this;
_local1.m_mainView = p_mainView;
_local1.m_mainView.addListener(_local1);
_local1.onResize();
}
function handleContractionClick() {
var _local1 = this;
var _local2 = _local1.m_mainView.getSidebarWidth();
if (_local2 > 0) {
_local1.m_savedTreeWidth = _local2;
_local1.m_mainView.setSidebarWidth(0);
} else {
_local1.m_mainView.setSidebarWidth(_local1.m_savedTreeWidth);
}
}
function onMouseDown() {
var _local1 = this;
_local1.m_mouseMovedEnough = false;
_local1.m_mouseDownInGripper = FlashPaper.Utils.doMouseHitTest(_local1.gripper_mc);
if (FlashPaper.Utils.doMouseHitTest(_local1)) {
_local1.m_mouseDown = true;
_local1.m_mouseX = _local1.m_mainView.getMouseX();
_local1.m_mouseTW = _local1.m_mainView.getSidebarWidth();
}
}
function onMouseMove() {
var _local1 = this;
if (_local1.m_mouseDown) {
var _local2 = _local1.m_mainView.getMouseX();
if (Math.abs(_local2 - _local1.m_mouseX) >= 3) {
_local1.m_mouseMovedEnough = true;
}
if (_local1.m_mouseMovedEnough) {
_local1.m_mainView.setSidebarWidth((_local1.m_mouseTW + _local2) - _local1.m_mouseX);
}
}
}
function onMouseUp() {
var _local1 = this;
_local1.m_mouseDown = false;
if ((!_local1.m_mouseMovedEnough) && (_local1.m_mouseDownInGripper)) {
_local1.handleContractionClick();
}
}
function onRollOver() {
var _local1 = this;
_local1.m_mainView.setCursorFocus(_local1);
_local1.m_mainView.setCursor(_local1, "divider");
}
function onRollOut() {
m_mainView.setCursor(this, "");
}
function onReleaseOutside() {
m_mainView.setCursor(this, "");
}
function onResize() {
_height = m_mainView.getDocViewHeight();
}
}
Symbol 194 MovieClip [__Packages.FlashPaper.IFlashPaper] Frame 0
interface FlashPaper.IFlashPaper{}
Symbol 195 MovieClip [__Packages.FlashPaper.SelectionRange] Frame 0
class FlashPaper.SelectionRange
{
function SelectionRange () {
}
function equals(that) {
var _local1 = this;
var _local2 = that;
return((((_local1.headPageIdx == _local2.headPageIdx) && (_local1.headCharIdx == _local2.headCharIdx)) && (_local1.tailPageIdx == _local2.tailPageIdx)) && (_local1.tailCharIdx == _local2.tailCharIdx));
}
}
Symbol 196 MovieClip [__Packages.FlashPaper.MainView] Frame 0
class FlashPaper.MainView
{
var m_mainMC, m_viewMode, m_isHandheld, m_treeWidth, m_docDpiToScreenDpiFactor, m_toolbarView, m_treeView, m_dividerView, m_documentView;
function MainView (p_main_mc) {
AsBroadcaster.initialize(this);
m_mainMC = p_main_mc;
m_accSilentList = new Array();
m_viewMode = getConfigString("INITIAL_VIEW");
m_currentScale = parseFloat(m_viewMode);
if (((!isNaN(m_currentScale)) && (m_currentScale >= ZOOM_MIN)) && (m_currentScale <= ZOOM_MAX)) {
m_viewMode = "zoom";
} else {
m_currentScale = 100;
}
m_isHandheld = getConfigString("HANDHELD") == "true";
m_treeWidth = TREE_WIDTH;
m_screenDPI = parseFloat(getConfigString("SCREEN_DPI"));
m_docDpiToScreenDpiFactor = m_screenDPI / m_mainMC.dpi;
m_mainMC.m_mainView = this;
m_mainMC.onEnterFrame = function () {
var _local2 = this;
var _local1 = _local2.m_mainView;
_local1.loadPages();
if (_local2._currentframe == _local2._totalframes) {
_local2.stop();
delete _local2.onEnterFrame;
_local1.broadcastMessage("internal_onDocumentLoaded");
_local1.onResize();
}
};
m_mainMC.onMouseDown = function () {
this.m_mainView.updateCursor();
if ((FPUI.Component.focusedComponent != null) && (FlashPaper.Utils.doMouseHitTest(FPUI.Component.focusedComponent) == false)) {
Selection.setFocus(null);
}
};
m_mainMC.onMouseMove = (m_mainMC.onMouseUp = function () {
this.m_mainView.updateCursor();
});
m_mainMC.onUnload = function () {
this.m_mainView.cleanupCursor();
};
for (var i in m_mainMC.cursors_mc) {
m_mainMC.cursors_mc[i]._visible = false;
}
if (m_mainMC == _level0) {
Stage.showMenu = false;
Stage.align = "TL";
Stage.scaleMode = "noScale";
m_mainMC._xscale = 100;
m_mainMC._yscale = 100;
} else {
setForcedWidthAndHeight(550, 400);
}
m_mainMC.controller = this;
m_mainMC._quality = "BEST";
m_toolbarView = new FlashPaper.ToolbarView(this, m_mainMC, getConfigString("POPUP_ENABLED") == "true");
p_main_mc.toolbar_mc._xscale = 100;
p_main_mc.toolbar_mc._yscale = 100;
m_treeView = new FlashPaper.TreeView(this, m_mainMC.tree_mc);
m_mainMC.tree_mc._xscale = 100;
m_mainMC.tree_mc._yscale = 100;
m_dividerView = m_mainMC.divider_mc;
m_dividerView._xscale = 100;
m_dividerView._yscale = 100;
m_dividerView.setMainView(this);
m_documentView = m_mainMC.document_mc;
m_documentView._xscale = 100;
m_documentView._yscale = 100;
m_documentView.setMainView(this, getConfigString("SEARCH_TO_TOP") == "true");
if (((m_mainMC.fpBookmarks_array === undefined) || (m_mainMC.fpBookmarks_array.length == 0)) || (getConfigString("HIDE_SIDEBAR") == "true")) {
m_mainMC.divider_mc._visible = false;
m_mainMC.tree_mc._visible = false;
m_treeWidth = 0;
delete m_mainMC.fpBookmarks_array;
}
var messages = m_mainMC.message_mc;
messages.setController(this);
messages.setCursorManager(this);
messages.setListVisible(false);
var i = 1;
while (i <= getNumberOfPages()) {
var width_i = eval ("pageWidth" + i);
if (width_i == undefined) {
width_i = getDocumentWidth();
}
var height_i = eval ("pageHeight" + i);
if (height_i == undefined) {
height_i = getDocumentHeight();
}
m_numPages++;
broadcastMessage("internal_onAddPage", width_i, height_i);
i++;
}
Stage.addListener(this);
Key.addListener(this);
onResize();
setCurrentPage(parseInt(getConfigString("INITIAL_PAGE")));
var b = getConfigString("INITIAL_BOOKMARK");
if (b != "") {
var bm = findBookmark(b, m_mainMC.fpBookmarks_array);
if (bm != null) {
goToAnchor(m_mainMC.fpAnchors_o[bm.anchorName_str]);
}
}
var b = getConfigString("INITIAL_ANCHOR");
if (b != "") {
var anchor = m_mainMC.fpAnchors_o[b];
if (anchor) {
goToAnchor(anchor);
}
}
onResize2();
initializeTabbing();
initializeAccessibility();
}
static function disableLMR(mc) {
var _local1 = mc;
_local1.tabEnabled = false;
_local1.middle.tabEnabled = false;
_local1.left.tabEnabled = false;
_local1.right.tabEnabled = false;
}
function initializeTabbing() {
var _local2 = m_mainMC.toolbar_mc.controls_mc;
var _local1;
_local1 = m_mainMC;
_local1.toolbar_mc.tabEnabled = false;
_local1.cursors_mc.tabEnabled = false;
_local1.tree_mc.tabEnabled = false;
_local1.divider_mc.tabEnabled = false;
_local1.divider_mc.gripper_mc.tabEnabled = false;
_local1 = m_mainMC.document_mc;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.bg_mc.tabEnabled = false;
_local1.pages_mc.tabEnabled = false;
_local1.corner_mc.tabEnabled = false;
_local1 = m_mainMC.toolbar_mc.toolbarBg_mc;
_local1.tabEnabled = false;
_local1.middle_mc.tabEnabled = false;
_local1.middle_mc.fill_mc.tabEnabled = false;
_local1.middle_mc.dropShadow_mc.tabEnabled = false;
_local1.right_mc.tabEnabled = false;
_local1.left_mc.tabEnabled = false;
_local1 = m_mainMC.toolbar_mc.brandClip_mc;
_local1.tabEnabled = false;
_local1.gotoLink_btn.tabEnabled = false;
_local1._icon.tabEnabled = false;
_local1 = _local2;
_local1.tabEnabled = false;
_local1.dividePager_mc.tabEnabled = false;
_local1.divideZoom_mc.tabEnabled = false;
_local1.dividePrint_mc.tabEnabled = false;
_local1.divideTools_mc.tabEnabled = false;
_local1 = _local2.find_mc;
_local1.tabEnabled = false;
disableLMR(_local1.findBg_mc);
_local1 = _local2.currZoom_mc;
_local1.tabEnabled = false;
disableLMR(_local1.currZoomBg_mc);
_local1 = _local2.currPg_mc;
_local1.tabEnabled = false;
disableLMR(_local1.currPgBg_mc);
_local2.numPgs_txt.tabEnabled = false;
_local2.prevNext_mc.tabEnabled = false;
var _local3 = m_nextTabIndex;
m_mainMC.toolbar_mc.tabIndex = _local3++;
_local2.panTool_mc.tabIndex = _local3++;
_local2.selectTool_mc.tabIndex = _local3++;
_local2.find_mc.find_txt.tabIndex = _local3++;
_local2.find_mc.findButton_mc.tabIndex = _local3++;
_local2.divideZoom_mc.tabIndex = _local3++;
_local2.zoom_sld.tabIndex = _local3++;
_local2.currZoom_mc.currZoom_txt.tabIndex = _local3++;
_local2.fitPage_mc.tabIndex = _local3++;
_local2.fitWidth_mc.tabIndex = _local3++;
_local2.currPg_mc.currPg_txt.tabIndex = _local3++;
_local2.prevNext_mc.prevPg_mc.tabIndex = _local3++;
_local2.prevNext_mc.nextPg_mc.tabIndex = _local3++;
_local2.print_mc.tabIndex = _local3++;
_local2.popup_mc.tabIndex = _local3++;
_local2.hiddenToolsBtn_mc.tabIndex = _local3++;
_local1 = m_mainMC.toolbar_mc;
_local1.createEmptyMovieClip("accessible_mc", -16384);
_local1.accessible_mc.visible = true;
_local1.accessible_mc.tabIndex = _local3++;
_local1.accessible_mc.tabEnabled = false;
_local1.accessible_mc.createEmptyMovieClip("prevPg_mc", 1);
_local1.accessible_mc.createEmptyMovieClip("nextPg_mc", 2);
_local1.accessible_mc.prevPg_mc.tabIndex = _local3++;
_local1.accessible_mc.nextPg_mc.tabIndex = _local3++;
m_mainMC.document_mc.tabIndex = _local3++;
m_nextTabIndex = _local3;
}
function getLanguageObject() {
var _local1 = m_mainMC.fpLocalizations_o[System.capabilities.language];
if (_local1 == null) {
_local1 = m_mainMC.fpLocalizations_o.en;
}
return(_local1);
}
function initializeAccessibility() {
var _local1 = this;
var _local3 = _local1.getLanguageObject();
_local1.m_mainMC._accProps = new Object();
_local1.m_mainMC._accProps.name = _local3.DOCUMENT;
_local1.makeSilent(_local1.m_mainMC.tree_mc, true);
_local1.makeSilent(_local1.m_mainMC.divider_mc, true);
var toolbar_mc = _local1.m_mainMC.toolbar_mc;
_local1.addAccProp(toolbar_mc, _local3.TOOLBAR, "");
_local1.makeSilent(toolbar_mc.toolbarBg_mc, true);
_local1.makeSilent(toolbar_mc.brandClip_mc, true);
_local1.makeSilent(toolbar_mc.brandClip_mc._icon, true);
_local1.makeSilent(toolbar_mc.popup_mc, true);
var _local2 = toolbar_mc.controls_mc;
_local1.makeSilent(_local2.panTool_mc, true);
_local1.makeSilent(_local2.selectTool_mc, true);
_local1.makeSilent(_local2.divideTools_mc, true);
_local1.makeSilent(_local2.find_mc.findBg_mc, true);
_local1.addAccProp(_local2.find_mc.find_txt, _local3.FIND, "Search for text by typing in search keywords and hitting the enter key.");
_local1.addAccProp(_local2.find_mc.findButton_mc, _local3.FIND, "");
_local1.makeSilent(_local2.divideZoom_mc, true);
_local1.makeSilent(_local2.zoom_sld, true);
_local1.makeSilent(_local2.currZoom_mc.currZoomBg_mc, true);
_local1.addAccProp(_local2.currZoom_mc.currZoom_txt, _local3.ZOOM, "Enter the numeric zoom percentage level and hit enter.");
_local1.addAccProp(_local2.fitPage_mc, _local3.FIT_PAGE, "This button will refit the document so that only the current page will be visible in the current view.");
_local1.addAccProp(_local2.fitWidth_mc, _local3.FIT_WIDTH, "This button will refit the document by maximizing the width of the current page in the current view.");
_local1.makeSilent(_local2.dividePager_mc, true);
_local1.makeSilent(_local2.currPg_mc.currPgBg_mc, true);
_local1.addAccProp(_local2.currPg_mc.currPg_txt, _local3.CURR_PAGE, "");
_local1.makeSilent(_local2.numPgs_txt, true);
_local1.addAccProp(_local2.prevNext_mc.prevPg_mc, _local3.PREV_PAGE, "");
_local1.addAccProp(_local2.prevNext_mc.nextPg_mc, _local3.NEXT_PAGE, "");
_local1.makeSilent(_local2.dividePrint_mc, true);
_local1.addAccProp(_local2.print_mc, _local3.PRINT, "");
_local1.addAccProp(_local2.hiddenToolsBtn_mc, _local3.OVERFLOW, "This button will reveal the tools that are hidden due to the resized view.");
_local1.makeSilent(_local1.m_mainMC.hiddenToolsList_mc, true);
_local1.makeSilent(_local1.m_mainMC.hiddneToolsList_mc.list_mc, true);
_local1.makeSilent(_local2.popup_mc, true);
toolbar_mc.accessible_mc.prevPg_mc.controller = _local1;
toolbar_mc.accessible_mc.prevPg_mc.onRelease = function () {
this.controller.prevPageButton();
};
toolbar_mc.accessible_mc.nextPg_mc.controller = _local1;
toolbar_mc.accessible_mc.nextPg_mc.onRelease = function () {
this.controller.nextPageButton();
};
_local1.makeMCHiddenAccButton(toolbar_mc.accessible_mc.prevPg_mc, "AccPrevPage");
_local1.makeMCHiddenAccButton(toolbar_mc.accessible_mc.nextPg_mc, "AccNextPage");
_local1.setMCHiddenAccButtonAvailable(toolbar_mc.accessible_mc.prevPg_mc, false);
var document_mc = _local1.m_mainMC.document_mc;
_local1.addAccProp(document_mc, _local3.CONTENT, "");
_local1.makeSilent(document_mc.bg_mc, true);
_local1.makeSilent(document_mc.x_sb, true);
_local1.makeSilent(document_mc.y_sb, true);
_local1.makeSilent(document_mc.corner_mc, true);
Accessibility.updateProperties();
if (Accessibility.isActive()) {
_local1.zoomToPageFit();
}
}
function hyperlinksTabEnabled(pageIdx, enable) {
var accInfo = eval ("fpAltTextMap" + pageIdx);
if (accInfo != null) {
var page_mc = m_documentView.getNthPage(pageIdx);
for (var instanceName in accInfo) {
if (instanceName.indexOf("link") > -1) {
var mc = page_mc.rawPage_mc[instanceName];
if (mc != null) {
mc.tabEnabled = enable;
}
}
}
}
}
function activateHyperlinks(pageIdx) {
var _local1 = this;
if (pageIdx != _local1.m_currentPage) {
_local1.hyperlinksTabEnabled(_local1.m_currentPage, false);
_local1.hyperlinksTabEnabled(pageIdx, true);
}
}
function makeAllPagesAccessible() {
var listSize = m_accSilentList.length;
var _local3 = 0;
while (_local3 < listSize) {
var _local2 = m_accSilentList.shift();
var _local1 = m_documentView.getNthPage(_local2).rawPage_mc;
_local1.tabEnabled = false;
setRawPageTabIndex(_local1, _local2);
_local1._accProps.forceSimple = false;
_local3++;
}
return(listSize > 0);
}
function makePageNotAccessible(pageIdx) {
var _local2 = pageIdx;
var _local3 = this;
_local3.m_accSilentList.push(_local2);
var _local1 = _local3.m_documentView.getNthPage(_local2).rawPage_mc;
_local1.tabEnabled = false;
_local3.setRawPageTabIndex(_local1, _local2);
_local1._accProps.forceSimple = true;
}
function accSilentPageBehindToolbar(pageIdx) {
var rawPage_mc;
var _local3 = ((pageIdx <= 1) ? true : false);
var _local1 = pageIdx - 1;
var toolbarBounds = m_mainMC.toolbar_mc.getBounds(_root);
var updateAccessibility = makeAllPagesAccessible();
while ((!_local3) && (_local1 > 0)) {
rawPage_mc = m_documentView.getNthPage(_local1).rawPage_mc;
var _local2 = rawPage_mc.getBounds(_root);
if (_local2.yMax < toolbarBounds.yMin) {
_local3 = true;
} else if (_local2.yMax <= toolbarBounds.yMax) {
makePageNotAccessible(_local1);
updateAccessibility = true;
}
_local1--;
}
if (updateAccessibility) {
Accessibility.updateProperties();
}
}
function findBookmark(n, a) {
var _local2 = a;
var _local3 = n;
for (var i in _local2) {
var _local1 = _local2[i];
if (_local1.publicName_str == _local3) {
return(_local1);
}
_local1 = findBookmark(_local3, _local1.subBookmarks_array);
if (_local1 != null) {
return(_local1);
}
}
return(null);
}
function updateCurrentPage(pageNum_i) {
m_currentPage = pageNum_i;
}
function getNumPages() {
return(m_numPages);
}
function goToAnchor(anchor_o) {
var _local1 = anchor_o;
if (_local1) {
m_currentPage = _local1.pageNum_i;
m_documentView.goToAnchor(_local1);
}
}
function goToNamedAnchor(anchorname) {
var _local1 = this;
if (_local1.m_mainMC.fpAnchors_o === undefined) {
} else {
_local1.goToAnchor(_local1.m_mainMC.fpAnchors_o[anchorname]);
}
}
function getConfigString(s) {
return(m_mainMC[s]);
}
function makeSilent(pmc, silent) {
var _local1 = pmc;
if (_local1._accProps == null) {
_local1._accProps = new Object();
}
_local1._accProps.silent = silent;
}
function addAccProp(pmc, name, desc) {
var _local1 = pmc;
if (_local1._accProps == null) {
_local1._accProps = new Object();
}
if (name.length > 0) {
_local1._accProps.name = name;
}
if (desc.length > 0) {
_local1._accProps.description = desc;
}
}
function makeMCAccessibleImage(pmc, desc) {
var _local1 = pmc;
makeSilent(_local1, false);
_local1.tabEnabled = false;
_local1._accProps.name = "Image";
_local1._accProps.description = desc;
}
function makeMCAccessibleHyperlink(pmc, link) {
var _local1 = pmc;
var _local3 = this;
_local3.makeSilent(_local1, false);
_local1.tabEnabled = false;
_local1._focusrect = false;
_local1._accProps.name = link;
_local1._accImpl = new FPUI.AccObject(FPUI.AccObject.ROLE_SYSTEM_LINK);
_local1.tabChildren = false;
_local1.m_mainView = _local3;
var mc = _local1.createEmptyMovieClip("focus_mc", 1);
var _local2 = _local1.getBounds();
mc.lineStyle(1, FPUI.Component.kHiliteColor, 40);
mc.moveTo(_local2.xMin, _local2.yMin);
mc.lineTo(_local2.xMax, _local2.yMin);
mc.lineTo(_local2.xMax, _local2.yMax);
mc.lineTo(_local2.xMin, _local2.yMax);
mc.lineTo(_local2.xMin, _local2.yMin);
mc._visible = false;
_local1.onRelease = function () {
if (this.m_mainView.getCurrentTool() == "pan") {
this.m_mainView.goToLinkTarget(link);
}
};
_local1.onRollOver = function () {
var _local2 = this;
var _local1 = _local2.m_mainView.getCurrentTool();
if (_local1 != "pan") {
_local2.m_mainView.setCursor(_local2.m_mainView.getCursorFocus(), _local1);
}
};
_local1.onComponentSetFocus = function () {
this.focus_mc._visible = true;
};
_local1.onComponentKillFocus = function () {
this.focus_mc._visible = false;
};
_local1.onKeyDown = function () {
if (Key.getCode() == 13) {
this.m_mainView.goToLinkTarget(link);
}
};
}
function makeMCHiddenAccButton(pmc, name, actionMC) {
var _local1 = pmc;
makeSilent(_local1, false);
addAccProp(_local1, name, "");
_local1.tabEnabled = false;
_local1._accImpl = new FPUI.AccObject(FPUI.AccObject.ROLE_SYSTEM_PUSHBUTTON);
_local1._accImpl.set_accState(FPUI.AccObject.STATE_SYSTEM_INVISIBLE, true);
_local1._accImpl.set_accDefaultAction("Press", _local1, "onRelease");
_local1.lineStyle(1, 16777215, 0);
_local1.moveTo(0, 0);
_local1.lineTo(10, 0);
_local1.lineTo(10, 10);
_local1.lineTo(0, 10);
_local1.lineTo(0, 0);
_local1._visible = true;
}
function setMCHiddenAccButtonAvailable(pmc, available) {
pmc._accImpl.set_accState(FPUI.AccObject.STATE_SYSTEM_UNAVAILABLE, !available);
}
function setRawPageTabIndex(rawPage_mc, index) {
rawPage_mc.tabIndex = m_nextTabIndex + (index % 10);
}
function loadPages() {
var i = (m_numPagesLoaded + 1);
while (i <= m_numPages) {
var page_mc = m_documentView.getNthPage(i);
if (page_mc.rawPage_mc == undefined) {
var rawPage_mc = page_mc.attachMovie("page" + i, "rawPage_mc", 10);
if (rawPage_mc != undefined) {
rawPage_mc.tabEnabled = false;
rawPage_mc._accProps = new Object();
rawPage_mc._accProps.name = "";
setRawPageTabIndex(rawPage_mc, i);
Accessibility.updateProperties();
var fpcontent_mc = rawPage_mc;
if (rawPage_mc.fpcontent_mc != undefined) {
fpcontent_mc = rawPage_mc.fpcontent_mc;
}
page_mc.fpcontent_mc = fpcontent_mc;
page_mc.msg_mc.removeMovieClip();
var factor = (getDocDpiToScreenDpiFactor() * 20);
rawPage_mc._width = rawPage_mc._width * factor;
rawPage_mc._height = rawPage_mc._height * factor;
fpcontent_mc.fpdoc_mc = m_mainMC;
if ((fpcontent_mc != null) && (fpcontent_mc.getTextSnapshot != null)) {
fpcontent_mc.textSnapshot_ts = null;
fpcontent_mc.getTS = function (allocateIfNeeded_b) {
var _local1 = this;
if ((_local1.textSnapshot_ts == null) && (allocateIfNeeded_b)) {
_local1.textSnapshot_ts = _local1.getTextSnapshot();
}
return(_local1.textSnapshot_ts);
};
fpcontent_mc.freeTS = function () {
delete this.textSnapshot_ts;
};
}
var accInfo = eval ("fpAltTextMap" + i);
if (accInfo != null) {
for (var instanceName in accInfo) {
var mc = rawPage_mc[instanceName];
if (mc != null) {
if (instanceName.indexOf("acc") > -1) {
makeMCAccessibleImage(mc, accInfo[instanceName]);
} else if (instanceName.indexOf("link") > -1) {
makeMCAccessibleHyperlink(mc, accInfo[instanceName]);
}
var pmc = mc._parent;
while (pmc != null) {
makeSilent(pmc, false);
pmc = pmc._parent;
}
}
}
Accessibility.updateProperties();
}
if (i <= 2) {
onResize();
}
if (i == getNumberOfPages()) {
hyperlinksTabEnabled(1, true);
Accessibility.updateProperties();
}
if (m_numPagesLoaded < i) {
m_numPagesLoaded = i;
}
}
}
i++;
}
}
function setCursorFocus(mc) {
m_cursorFocus = mc;
}
function getCursorFocus() {
return(m_cursorFocus);
}
function setCursor(mc, cursorName) {
var _local1 = this;
if (mc != _local1.m_cursorFocus) {
} else {
var _local2 = _local1.m_mainMC.cursors_mc[cursorName];
if (_local2 === undefined) {
_local2 = null;
}
if (_local1.m_currentCursorMC != _local2) {
if (_local1.m_currentCursorMC == null) {
_local1.m_currentCursorMC = _local2;
_local1.showCursor();
} else {
_local1.m_currentCursorMC._visible = false;
if (_local2 == null) {
_local1.hideCursor();
}
_local1.m_currentCursorMC = _local2;
}
_local1.updateCursor();
}
}
}
function showCursor() {
var _local1 = this;
if (_local1.m_currentCursorMC) {
Mouse.hide();
_local1.m_numMouseHides++;
_local1.updateCursor();
}
}
function updateCursor() {
var _local1 = this;
if (_local1.m_currentCursorMC) {
_local1.m_currentCursorMC._visible = _local1.m_numMouseHides > 0;
_local1.m_currentCursorMC._y = _local1.m_currentCursorMC._parent._ymouse;
_local1.m_currentCursorMC._x = _local1.m_currentCursorMC._parent._xmouse;
}
}
function hideCursor() {
var _local1 = this;
if (_local1.m_currentCursorMC) {
Mouse.show();
_local1.m_numMouseHides--;
_local1.updateCursor();
}
}
function cleanupCursor() {
var _local1 = this;
while (_local1.m_numMouseHides > 0) {
Mouse.show();
_local1.m_numMouseHides--;
}
}
function showMessage(s, mc) {
var _local2 = this;
var _local3 = false;
var _local1 = _local2.m_mainMC.message_mc;
_local1.clear();
_local1.addItem("", s, "");
_local1.setListVisible(s != "");
if (mc != null) {
_local1._x = Math.round(mc.getBounds(_local2.m_mainMC).xMin);
_local3 = _local1._visible && (_local1.getBounds(_local2.m_mainMC).xMax > _local2.m_mainMC.document_mc.bg_mc.getBounds(_local2.m_mainMC).xMax);
}
return(_local3);
}
function zoomTo(percent) {
var _local1 = this;
var _local2 = percent;
var _local3 = _local1.m_currentScale;
_local1.m_currentScale = FlashPaper.Utils.clamp(ZOOM_MIN, _local2, ZOOM_MAX);
_local1.broadcastMessage("internal_onZoom", _local1.m_currentScale);
if (_local3 != _local2) {
_local1.broadcastMessage("onZoomChanged", _local2);
_local1.m_documentView.delayedBroadcast("onVisibleAreaChanged", true);
}
}
function zoomToNumber(percent_i) {
m_viewMode = "zoom";
zoomTo(percent_i);
}
function zoomIn() {
zoomToNumber(Math.min(ZOOM_MAX, m_currentScale + KEY_ZOOM_DISTANCE));
}
function zoomOut() {
zoomToNumber(Math.max(ZOOM_MIN, m_currentScale - KEY_ZOOM_DISTANCE));
}
function zoomToPageFit() {
var _local1 = this;
var _local2 = _local1.getCurrentPage();
_local1.m_viewMode = "page";
_local1.zoomTo(_local1.m_pageFitScale);
_local1.setCurrentPage(_local2);
}
function zoomToWidthFit() {
var _local1 = this;
_local1.m_viewMode = "width";
_local1.zoomTo(_local1.m_pageWidthScale);
}
function getViewMode() {
return(m_viewMode);
}
function getCurrentScaleFraction() {
return(m_currentScale / 100);
}
function getBoundsInMainViewCoords(mc) {
return(mc.getBounds(m_mainMC));
}
function getMouseX() {
return(m_mainMC._xmouse);
}
function getMouseY() {
return(m_mainMC._ymouse);
}
function getPageFitScale() {
return(m_pageFitScale);
}
function getPageWidthScale() {
return(m_pageWidthScale);
}
function getIsHandheld() {
return(m_isHandheld);
}
function getDocViewWidth() {
var _local1 = this;
return((_local1.getWidth() - _local1.getSidebarWidth()) - _local1.getDividerWidth());
}
function getDocViewHeight() {
return(getHeight() - m_documentView._y);
}
function getDividerWidth() {
var _local1 = m_mainMC.divider_mc;
if (!_local1._visible) {
return(0);
}
return(_local1._width);
}
function onKeyDown() {
var _local1 = this;
_local1.showMessage("", null);
var _local3 = _local1.m_zoomingEnabled;
var focusStr = Selection.getFocus();
if (focusStr != null) {
var s = targetPath(_local1.m_mainMC);
if (focusStr.substr(0, s.length) != s) {
return;
}
_local3 = false;
}
var _local2 = Key.getCode();
if (_local2 == 13) {
if (!_local1.handleEnterKey()) {
_local1.m_documentView.keyDown(_local2);
}
} else {
var char_s = String.fromCharCode(Key.getAscii()).toLowerCase();
var prevNext_mc = _local1.m_mainMC.toolbar_mc.controls_mc.prevNext_mc;
var ctrl = Key.isDown(17);
if (ctrl && (Key.isDown(34))) {
_local1[prevNext_mc.nextPg_mc.m_clickHandler]();
Accessibility.updateProperties();
} else if (ctrl && (Key.isDown(33))) {
_local1[prevNext_mc.prevPg_mc.m_clickHandler]();
Accessibility.updateProperties();
} else if (_local2 == 17) {
if (!_local1.m_ctrlKeyMonitorIntervalID) {
_local1.m_copied = false;
_local1.m_ctrlKeyMonitorIntervalID = setInterval(_local1, "ctrlKeyMonitor", 100);
}
} else if ((_local2 == 189) || (_local2 == 109)) {
if (_local3) {
_local1.zoomOut();
}
} else if ((_local2 == 107) || (Key.isDown(16) && (Key.isDown(187)))) {
if (_local3) {
_local1.zoomIn();
}
} else if (char_s == "p") {
if (_local3) {
_local1.zoomToPageFit();
}
} else if (char_s == "w") {
if (_local3) {
_local1.zoomToWidthFit();
}
} else {
_local1.m_documentView.keyDown(_local2);
}
}
}
function copySelection() {
var _local1 = this;
if (_local1.getCurrentTool() != "select") {
} else if (_local1.m_mainMC.toolbar_mc.controls_mc.selectTool_mc.fp_hidden) {
} else {
System.setClipboard(_local1.m_documentView.getSelectedText());
}
}
function onKeyUp() {
var _local1 = this;
if (Selection.getFocus() == null) {
var _local2 = Key.getCode();
if (((_local2 == 67) && (Key.isDown(17))) || ((_local2 == 17) && (Key.isDown(67)))) {
if (!_local1.m_copied) {
_local1.copySelection();
_local1.m_copied = true;
}
}
if (_local2 == 17) {
clearInterval(_local1.m_ctrlKeyMonitorIntervalID);
_local1.m_ctrlKeyMonitorIntervalID = 0;
_local1.m_copied = false;
}
}
}
function ctrlKeyMonitor() {
var _local1 = this;
if (Key.isDown(67)) {
if (!_local1.m_copied) {
_local1.copySelection();
_local1.m_copied = true;
}
} else if (_local1.m_copied) {
_local1.m_copied = false;
}
}
function handleEnterKey() {
var _local2 = this;
var controls_mc = _local2.m_mainMC.toolbar_mc.controls_mc;
var currPg_txt = controls_mc.currPg_mc.currPg_txt;
var _local3 = controls_mc.currZoom_mc.currZoom_txt;
var find_txt = controls_mc.find_mc.find_txt;
var _local1;
var focusStr = Selection.getFocus();
if (focusStr == targetPath(currPg_txt)) {
_local1 = parseInt(currPg_txt.text);
if (isNaN(_local1)) {
currPg_txt.text = _local2.getCurrentPage();
} else {
_local2.setCurrentPage(_local1);
}
Selection.setFocus(null);
return(true);
}
if (focusStr == targetPath(_local3)) {
_local1 = parseInt(_local3.text);
if (isNaN(_local1)) {
_local3.text = Math.round(_local2.m_currentScale) + "%";
} else {
_local2.zoomToNumber(_local1);
}
Selection.setFocus(null);
return(true);
}
if (focusStr == targetPath(find_txt)) {
_local2.findTextButton();
return(true);
}
return(false);
}
function onResize2() {
onResize();
onResize();
}
function onResize() {
var _local1 = this;
var _local2 = _local1.m_toolbarView.getHeight() - 3;
var _local3 = _local1.m_mainMC.tree_mc;
_local3._x = 0;
_local3._y = _local2;
_local1.m_dividerView._x = _local1.getSidebarWidth();
_local1.m_dividerView._y = _local2;
_local1.m_documentView._x = _local1.getSidebarWidth() + _local1.getDividerWidth();
_local1.m_documentView._y = _local2;
_local1.broadcastMessage("onResize");
_local1.m_pageWidthScale = _local1.m_documentView.calcPageWidthScale();
_local1.m_pageFitScale = _local1.m_documentView.calcPageFitScale();
if (_local1.m_viewMode == "width") {
_local1.zoomToWidthFit();
} else if (_local1.m_viewMode == "page") {
_local1.zoomToPageFit();
} else {
_local1.zoomToNumber(_local1.m_currentScale);
}
_local1.m_documentView.rebuildMask();
_local1.showMessage("", null);
}
function onPageMayHaveChanged() {
var _local1 = this;
if (_local1.m_lastPageChanged != _local1.m_currentPage) {
_local1.m_lastPageChanged = _local1.m_currentPage;
_local1.broadcastMessage("onPageChanged", _local1.m_lastPageChanged);
_local1.m_documentView.delayedBroadcast("onVisibleAreaChanged", true);
}
}
function getScrolledPage() {
return(m_documentView.getScrolledPage(true));
}
function getWidth() {
return(Stage.width);
}
function getHeight() {
return(Stage.height);
}
function getBookmarksArray() {
return(m_mainMC.fpBookmarks_array);
}
function getDocDpiToScreenDpiFactor() {
return(m_docDpiToScreenDpiFactor);
}
function getDocumentWidth() {
return(m_mainMC.documentWidth);
}
function getDocumentHeight() {
return(m_mainMC.documentHeight);
}
function setForcedWidthAndHeight(w, h) {
var _local1 = this;
_local1.m_forceWidth = w;
_local1.m_forceHeight = h;
_local1.getWidth = function () {
return(this.m_forceWidth);
};
_local1.getHeight = function () {
return(this.m_forceHeight);
};
_local1.m_documentView.rebuildMask();
}
function popUpWindowButton() {
var _local1 = _url;
_local1 = FlashPaper.Utils.replaceInString(_local1, "\\", "\\\\");
_local1 = escape(_local1);
getURL (("javascript:window.open(\"" + _local1) + "\", \"fpdoc\").focus();");
}
function brandButton(_mc) {
var _local1 = getLanguageObject();
getURL (_local1.GOURL, "_blank");
}
function findTextButton() {
findNext();
}
function fitWidthButton() {
zoomToWidthFit();
}
function fitPageButton() {
zoomToPageFit();
}
function printButton() {
printTheDocument();
}
function panButton(mc) {
setCurrentTool("pan");
}
function selectButton(mc) {
var _local1 = this;
if ((!_local1.m_scrollingEnabled) && (_local1.getCurrentTool() == "select")) {
_local1.setCurrentTool("");
} else {
_local1.setCurrentTool("select");
}
}
function prevPageButton() {
var _local1 = this;
if (_local1.getCurrentPage() > 1) {
_local1.setCurrentPage(_local1.m_documentView.getScrolledPage(false) - 1);
}
}
function nextPageButton() {
var _local1 = this;
if (_local1.getCurrentPage() < _local1.getNumPages()) {
_local1.setCurrentPage(_local1.m_documentView.getScrolledPage(true) + 1);
}
}
function dropdownButton() {
Selection.setFocus(null);
m_mainMC.hiddenToolsList_mc.onButtonRelease();
}
function broadcastMessage(msg) {
}
function addListener(listener) {
}
function removeListener(listener) {
}
function getViewerType() {
return("Macromedia FlashPaper Default Viewer");
}
function getViewerVersion() {
return(218);
}
function getCurrentPage() {
return(m_currentPage);
}
function setCurrentPage(pageNum_i) {
var _local1 = this;
var _local2 = FlashPaper.Utils.clamp(1, pageNum_i, _local1.m_numPages);
_local1.activateHyperlinks(_local2);
_local1.m_currentPage = _local2;
_local1.m_documentView.setPage(_local1.m_currentPage);
_local1.accSilentPageBehindToolbar(_local1.m_currentPage);
}
function getNumberOfPages() {
return(m_mainMC.totalPages);
}
function getLoadedPages() {
return(m_numPagesLoaded);
}
function showUIElement(part, show) {
var _local3 = this;
var _local1 = _local3.m_mainMC.toolbar_mc.controls_mc;
var _local2 = !show;
switch (part) {
case "PrevNext" :
_local1.prevNext_mc.fp_hidden = _local2;
_local1.currPg_mc.currPg_txt.selectable = show;
break;
case "Print" :
_local1.dividePrint_mc.fp_hidden = _local2;
_local1.print_mc.fp_hidden = _local2;
break;
case "Tool" :
_local1.panTool_mc.fp_hidden = _local2;
_local1.selectTool_mc.fp_hidden = _local2;
break;
case "Zoom" :
_local1.currZoom_mc.fp_hidden = _local2;
_local1.fitPage_mc.fp_hidden = _local2;
_local1.fitWidth_mc.fp_hidden = _local2;
_local1.zoom_sld.fp_hidden = _local2;
_local1.divideZoom_mc.fp_hidden = _local2;
break;
case "Find" :
_local1.find_mc.fp_hidden = _local2;
_local1.divideTools_mc.fp_hidden = _local2;
break;
case "Pop" :
_local1.popup_mc.fp_hidden = _local2;
break;
case "Page" :
_local1.currPg_mc.fp_hidden = _local2;
_local1.numPgs_txt.fp_hidden = _local2;
_local1.dividePager_mc.fp_hidden = _local2;
break;
case "Sidebar" :
if (_local3.m_mainMC.fpBookmarks_array) {
_local3.m_mainMC.divider_mc._visible = show;
_local3.m_mainMC.tree_mc._visible = show;
}
break;
case "Overflow" :
_local1.hiddenToolsBtn_mc.fp_hidden = _local2;
break;
case "ZoomKeys" :
_local3.m_zoomingEnabled = show;
}
_local3.onResize2();
}
function printTheDocument() {
var _local1 = this;
if (_local1.m_mainMC.printClip_mc == undefined) {
_local1.m_mainMC.attachMovie("pageList", "printClip_mc", 9999);
_local1.m_mainMC.printClip_mc._visible = false;
}
if (_local1.m_mainMC.printClip_mc == undefined) {
return(false);
}
var _local2 = (!(_local1.m_mainMC.printClip_mc.bmovieIsOK === undefined)) && (_local1.m_mainMC.printClip_mc.bmovieIsOK == true);
var _local3 = (!(_local1.m_mainMC.printasbitmap === undefined)) && (_local1.m_mainMC.printasbitmap == true);
if (_local3) {
if (_local2) {
printAsBitmap (_local1.m_mainMC.printClip_mc, "bmovie");
} else {
printAsBitmap (_local1.m_mainMC.printClip_mc, "bframe");
}
} else if (_local2) {
print (_local1.m_mainMC.printClip_mc, "bmovie");
} else {
print (_local1.m_mainMC.printClip_mc, "bframe");
}
return(true);
}
function setCurrentZoom(percent) {
var _local1 = percent;
var _local2 = this;
if (_local1 == "width") {
_local2.zoomToWidthFit();
} else if (_local1 == "page") {
_local2.zoomToPageFit();
} else {
_local2.zoomToNumber(Number(_local1));
}
}
function getCurrentZoom() {
return(m_currentScale);
}
function setSize(w, h) {
var _local1 = this;
_local1.m_mainMC._xscale = (_local1.m_mainMC._yscale = 100);
_local1.setForcedWidthAndHeight(w, h);
_local1.onResize2();
_local1.m_mainMC._visible = true;
return(true);
}
function goToLinkTarget(linktarget, window) {
var _local1 = linktarget;
if (_local1.substr(0, 7) == "anchor:") {
goToNamedAnchor(_local1.substr(7));
} else {
getURL (_local1, window);
}
}
function enableScrolling(flag) {
var _local1 = this;
var _local2 = flag;
var _local3 = _local1.m_scrollingEnabled;
if (_local1.m_scrollingEnabled != _local2) {
_local1.m_scrollingEnabled = _local2;
_local1.broadcastMessage("onEnableScrolling", _local2);
}
return(_local3);
}
function getCurrentTool() {
return(m_documentView.getToolMode());
}
function setCurrentTool(tool) {
return(m_documentView.setToolMode(tool));
}
function getTextSelectionRange() {
return(m_documentView.getTextSelectionRange());
}
function setTextSelectionRange(sel, skipBroadcast) {
m_documentView.setTextSelectionRange(sel, skipBroadcast);
}
function getSelectedText() {
return(m_documentView.getSelectedText());
}
function getSidebarWidth() {
var _local1 = this;
if (!_local1.m_mainMC.tree_mc._visible) {
return(0);
}
return(FlashPaper.Utils.clamp(0, _local1.m_treeWidth, _local1.getWidth() - _local1.m_documentView.getMinWidth()));
}
function setSidebarWidth(w) {
var _local1 = this;
_local1.m_treeWidth = FlashPaper.Utils.clamp(0, w, _local1.getWidth() - _local1.m_documentView.getMinWidth());
_local1.onResize();
}
function getFindText() {
return(m_mainMC.toolbar_mc.controls_mc.find_mc.find_txt.text);
}
function setFindText(s) {
m_mainMC.toolbar_mc.controls_mc.find_mc.find_txt.text = s;
}
function findNext() {
var found = true;
var _local2 = getFindText();
if (_local2.length > 0) {
found = m_documentView.findText(_local2, false);
if (!found) {
var dot = "";
for(;;){
var _local1 = getLanguageObject().NOT_FOUND;
var _local3 = _local1.indexOf("%");
if (_local3 != -1) {
_local1 = ((_local1.substring(0, _local3) + _local2) + dot) + _local1.substring(_local3 + 1, _local1.length);
}
if (!showMessage(_local1, m_mainMC.toolbar_mc.controls_mc.find_mc)) {
break;
}
if (_local2.length == 0) {
break;
}
_local2 = _local2.substring(0, _local2.length - 1);
dot = "...";
};
}
}
if (found) {
showMessage("", null);
}
return(found);
}
function getVisibleArea() {
return(m_documentView.getVisibleArea());
}
function setVisibleArea(area, skipBroadcast) {
m_documentView.setVisibleArea(area, skipBroadcast);
}
static var ZOOM_MIN = 10;
static var ZOOM_MAX = 999;
static var TREE_WIDTH = 200;
static var KEY_ZOOM_DISTANCE = 5;
var m_currentPage = 0;
var m_numPages = 0;
var m_numPagesLoaded = 0;
var m_forceWidth = 0;
var m_forceHeight = 0;
var m_currentScale = 100;
var m_pageFitScale = 100;
var m_pageWidthScale = 100;
var m_currentCursorMC = null;
var m_numMouseHides = 0;
var m_screenDPI = 0;
var m_cursorFocus = null;
var m_ctrlKeyMonitorIntervalID = 0;
var m_copied = false;
var m_nextTabIndex = 1;
var m_lastPageChanged = -1;
var m_scrollingEnabled = true;
var m_zoomingEnabled = true;
var m_accSilentList = null;
}
Symbol 197 MovieClip [__Packages.FlashPaper.DocumentView] Frame 0
class FlashPaper.DocumentView extends FPUI.Component
{
var pages_mc, y_sb;
function DocumentView () {
var _local2 = this;
super();
_local2.m_delayedBroadcasts = new Object();
_local2.emptySelection();
_local2.m_smartFindChars = new Object();
for (var _local3 in SMART_FIND) {
var _local1 = SMART_FIND[_local3];
var _local3 = 0;
while (_local3 < _local1.length) {
_local2.m_smartFindChars[_local1.substr(_local3, 1)] = _local1;
_local3++;
}
}
}
function handleDelayedBroadcast() {
var _local2 = this;
var _local1 = _local2.m_delayedBroadcasts;
_local2.m_delayedBroadcasts = new Object();
delete _local2.onEnterFrame;
for (var _local3 in _local1) {
if (_local1[_local3]) {
_local2.m_mainView.broadcastMessage(_local3);
}
}
}
function delayedBroadcast(s, b) {
var _local1 = this;
_local1.m_delayedBroadcasts[s] = b;
_local1.onEnterFrame = _local1.handleDelayedBroadcast;
}
function setMainView(p_mainView, p_searchToTop) {
var _local1 = this;
_local1.m_mainView = p_mainView;
_local1.m_searchToTop = p_searchToTop;
if (_local1.m_mainView) {
_local1.m_mainView.addListener(_local1);
_local1.m_docWidthInScreenDpi = _local1.m_mainView.getDocumentWidth() * _local1.m_mainView.getDocDpiToScreenDpiFactor();
_local1.m_scaledDocWidthInScreenDpi = _local1.m_docWidthInScreenDpi;
_local1.y_sb.setSmallScroll(KEY_SCROLL_DISTANCE);
_local1.y_sb.setChangeHandler("sendOnScroll", _local1);
_local1.x_sb.setSmallScroll(KEY_SCROLL_DISTANCE);
_local1.x_sb.setChangeHandler("sendOnScroll", _local1);
_local1.bg_mc.useHandCursor = false;
_local1.bg_mc.m_documentView = _local1;
_local1.bg_mc.onRollOver = function () {
this.m_documentView.onToolOver();
};
_local1.bg_mc.onMouseDown = function () {
this.m_documentView.onToolDown();
};
_local1.bg_mc.onMouseMove = (_local1.bg_mc.onEnterFrame = function () {
this.m_documentView.onToolMove();
});
_local1.bg_mc.onMouseUp = function () {
this.m_documentView.onToolUp();
};
_local1.bg_mc.onRollOut = (_local1.bg_mc.onReleaseOutside = function () {
this.m_documentView.onToolOut();
});
Mouse.addListener(_local1);
_local1.setToolMode("pan");
}
_local1.tabChildren = true;
if (_local1._accImpl != null) {
delete _local1._accImpl;
_local1._accImpl = null;
}
}
function sendOnScroll() {
var _local1 = this;
_local1.m_mainView.activateHyperlinks(_local1.getScrolledPage(true));
_local1.m_mainView.broadcastMessage("internal_onScroll");
_local1.delayedBroadcast("onVisibleAreaChanged", true);
}
function getNthPage(i) {
return(pages_mc[("page" + i) + "_mc"]);
}
function getNthTextMC(i) {
var _local1 = getNthPage(i);
if (_local1 != null) {
return(_local1.fpcontent_mc);
}
return(null);
}
function positionMsg(pagemc) {
var _local1 = pagemc.msg_mc;
if (_local1 != undefined) {
var _local3 = pagemc.pageBorder_mc;
var _local2 = 1 / m_mainView.getCurrentScaleFraction();
_local1._xscale = (_local1._yscale = _local2 * 100);
_local1._y = _local2 * LOADING_OFFSET;
_local1._x = pagemc._x + (_local2 * LOADING_OFFSET);
_local1._visible = ((((_local1._x + _local1._width) > _local3._width) || (((_local1._y - pagemc._y) + _local1._height) > _local3._height)) ? false : true);
}
}
function internal_onAddPage(width_i, height_i) {
var _local1 = this;
var _local3 = _local1.m_mainView.getNumPages();
var _local2 = _local1.pages_mc.attachMovie("blank", ("page" + _local3) + "_mc", _local3);
_local1.m_maxPageWidth = Math.max(_local1.m_maxPageWidth, width_i);
_local1.m_maxPageHeight = Math.max(_local1.m_maxPageHeight, height_i);
var pbmc = _local2.attachMovie("pageBorder", "pageBorder_mc", 10);
var factor = _local1.m_mainView.getDocDpiToScreenDpiFactor();
pbmc._width = width_i * factor;
pbmc._height = height_i * factor;
_local2.attachMovie("pageLoadingMsg", "msg_mc", 11);
_local1.positionMsg(_local2);
FlashPaper.Utils.addShadow(_local2, 3, pbmc._width, pbmc._height, false);
if (_local3 > 1) {
var mc = _local1.getNthPage(_local3 - 1);
_local2._y = (mc._y + mc._height) + PAGE_SPACING;
} else {
_local2._y = 0;
}
}
function calcPageWidthScale() {
return(((y_sb._x - (PAGE_MARGIN * 2)) / m_docWidthInScreenDpi) * 100);
}
function calcPageFitScale() {
var _local1 = this;
var _local3 = _local1.calcPageWidthScale();
var _local2 = ((_local1.y_sb.getSize() - (PAGE_MARGIN * 2)) / (_local1.m_maxPageHeight * _local1.m_mainView.getDocDpiToScreenDpiFactor())) * 100;
var pageFitScale = Math.min(_local2, _local3);
return(pageFitScale);
}
function getMinWidth() {
return(MIN_WIDTH);
}
function onResize() {
var _local1 = this;
var _local3 = _local1.m_mainView.getDocViewWidth();
var _local2 = _local1.m_mainView.getDocViewHeight();
_local3 = _local3 - (_local1.y_sb._visible ? (_local1.y_sb._width) : 0);
_local2 = _local2 - (_local1.x_sb._visible ? (_local1.x_sb._height) : 0);
_local1.y_sb._x = _local3;
_local1.y_sb.setSize(_local2);
_local1.y_sb.setEnabled(_local1.m_scrollingEnabled);
_local1.x_sb._y = _local2;
_local1.x_sb.setSize(_local3);
_local1.x_sb.setEnabled(_local1.m_scrollingEnabled);
_local1.bg_mc._y = -DROPSHADOW_HEIGHT;
_local1.bg_mc._x = 0;
_local1.bg_mc._width = _local3;
_local1.bg_mc._height = DROPSHADOW_HEIGHT + _local2;
_local1.corner_mc._visible = _local1.x_sb._visible && (_local1.y_sb._visible);
_local1.corner_mc._x = _local1.x_sb._x + _local1.x_sb.getSize();
_local1.corner_mc._y = _local1.y_sb._y + _local1.y_sb.getSize();
}
function adjustBar(sb, maxScroll) {
var _local2 = maxScroll;
var _local3 = sb;
var _local1 = _local3.getSize();
_local2 = _local2 - _local1;
_local3.setScrollProperties(_local1, _local2);
_local3._visible = _local2 > 0;
}
function internal_onZoom(percent) {
var _local1 = this;
_local1.pages_mc._xscale = (_local1.pages_mc._yscale = percent);
_local1.m_scaledDocWidthInScreenDpi = _local1.m_docWidthInScreenDpi * (percent / 100);
var y = (_local1.y_sb.getScrollPosition() / _local1.y_sb.getMaxPos());
if (isNaN(y) || (y == Infinity)) {
y = 0;
}
var x = (_local1.x_sb.getScrollPosition() / _local1.x_sb.getMaxPos());
if (isNaN(x) || (x == Infinity)) {
x = 0.5;
}
_local1.adjustBar(_local1.x_sb, _local1.m_scaledDocWidthInScreenDpi + (PAGE_MARGIN * 2));
_local1.adjustBar(_local1.y_sb, (_local1.pages_mc._height + (PAGE_MARGIN * 2)) + (_local1.x_sb._visible ? (_local1.x_sb._height) : 0));
_local1.onResize();
_local1.y_sb.setScrollPosition(y * _local1.y_sb.getMaxPos());
_local1.x_sb.setScrollPosition(x * _local1.x_sb.getMaxPos());
_local1.sendOnScroll();
var _local3 = _local1.m_mainView.getNumPages();
var _local2 = 1;
while (_local2 <= _local3) {
_local1.positionMsg(_local1.getNthPage(_local2));
_local2++;
}
_local1.m_mainView.onPageMayHaveChanged();
}
function onScrollSB(sb, s, i) {
var _local1;
if (sb._visible) {
_local1 = sb.getScrollPosition();
if (isNaN(_local1) || (_local1 < 0)) {
_local1 = 0;
}
} else {
_local1 = i;
}
pages_mc[s] = (-_local1) + PAGE_MARGIN;
m_mainView.onPageMayHaveChanged();
}
function internal_onScroll() {
var _local1 = this;
_local1.onScrollSB(_local1.x_sb, "_x", ((-(_local1.y_sb._x - _local1.m_scaledDocWidthInScreenDpi)) / 2) + PAGE_MARGIN);
_local1.onScrollSB(_local1.y_sb, "_y", 0);
}
function getVisibleArea() {
var _local1 = this;
var _local2 = new Object();
var _local3 = _local1.m_mainView.getCurrentScaleFraction();
_local2.x = _local1.x_sb.getScrollPosition() / _local3;
_local2.y = _local1.y_sb.getScrollPosition() / _local3;
_local2.w = (_local1.bg_mc._width - (PAGE_MARGIN * 2)) / _local3;
_local2.h = (_local1.bg_mc._height - (PAGE_MARGIN * 2)) / _local3;
_local2.s = _local1.m_mainView.getSidebarWidth() / _local1.m_mainView.getWidth();
_local2.equals = function (that) {
var _local1 = this;
var _local2 = that;
return(((((_local1.x == _local2.x) && (_local1.y == _local2.y)) && (_local1.w == _local2.w)) && (_local1.h == _local2.h)) && (_local1.s == _local2.s));
};
return(_local2);
}
function setVisibleArea(area, skipBroadcast) {
var _local1 = this;
var _local2 = area;
var w = ((_local1.bg_mc._width - (PAGE_MARGIN * 2)) / _local2.w);
var h = ((_local1.bg_mc._height - (PAGE_MARGIN * 2)) / _local2.h);
_local1.m_mainView.setCurrentZoom(Math.min(w, h) * 100);
var _local3 = _local1.m_mainView.getCurrentScaleFraction();
_local1.x_sb.setScrollPosition(_local2.x * _local3);
_local1.y_sb.setScrollPosition(_local2.y * _local3);
_local1.m_mainView.setSidebarWidth(_local2.s * _local1.m_mainView.getWidth());
if (skipBroadcast) {
_local1.delayedBroadcast("onVisibleAreaChanged", false);
}
}
function onEnableScrolling(flag) {
var _local1 = this;
_local1.m_scrollingEnabled = flag;
if ((!_local1.m_scrollingEnabled) && (_local1.m_curTool == "pan")) {
_local1.setToolMode("");
} else if (_local1.m_scrollingEnabled && (_local1.m_curTool == "")) {
_local1.setToolMode("pan");
}
_local1.onResize();
}
function setPage(pageNum_i) {
var _local1 = this;
_local1.y_sb.setScrollPosition(_local1.getNthPage(pageNum_i)._y * _local1.m_mainView.getCurrentScaleFraction());
_local1.m_mainView.onPageMayHaveChanged();
}
function goToAnchor(anchor_o) {
var _local1 = this;
var _local3 = _local1.getNthPage(anchor_o.pageNum_i);
var _local2 = _local1.m_mainView.getDocDpiToScreenDpiFactor();
_local1.ensureVisibleSB(_local1.y_sb, _local3._y + (anchor_o.top_i * _local2), _local3._y + (anchor_o.bottom_i * _local2), _local1.m_searchToTop, false);
_local1.ensureVisibleSB(_local1.x_sb, _local3._x + (anchor_o.left_i * _local2), _local3._x + (anchor_o.right_i * _local2), false, false);
_local1.m_mainView.onPageMayHaveChanged();
}
function hitTestTextMC() {
var _local3 = m_mainView.getNumPages();
var _local1 = 1;
while (_local1 <= _local3) {
var _local2 = getNthTextMC(_local1);
if ((_local2 != null) && (FlashPaper.Utils.doMouseHitTest(_local2))) {
return(_local1);
}
_local1++;
}
return(0);
}
function selectRange(startmc_i, startIdx_i, endmc_i, endIdx_i, select_b) {
if (endmc_i < startmc_i) {
selectRange(endmc_i, endIdx_i, startmc_i, startIdx_i, select_b);
} else {
var _local3 = startIdx_i;
var end_i = MAX_CHARS_PER_PAGE;
var _local2 = startmc_i;
while (_local2 <= endmc_i) {
if (_local2 == endmc_i) {
end_i = endIdx_i;
}
var text_mc = getNthTextMC(_local2);
if (text_mc != null) {
var _local1 = text_mc.getTS(select_b);
if (_local1 != null) {
_local1.setSelectColor(FPUI.Component.kHiliteColor);
if (_local3 <= end_i) {
_local1.setSelected(_local3, end_i + 1, select_b);
} else {
_local1.setSelected(end_i, _local3 + 1, select_b);
}
}
}
_local3 = 0;
_local3 = 0;
_local2++;
}
}
}
function findPageWordBoundary(page_i, char_i, dir_i, select_b) {
var _local3 = char_i;
var _local2 = getNthTextMC(page_i);
if (_local2 != null) {
var _local1 = _local2.getTS(select_b);
if (_local1 != null) {
_local3 = findWordBoundary(_local1, _local3, dir_i);
}
}
return(_local3);
}
static function findWordBoundary(textSnapshot_ts, start_i, dir_i) {
var _local1 = start_i;
var _local3 = Math.max(_local1 - MAX_WORD_FIND_RADIUS, 0);
var end_i = Math.min(_local1 + MAX_WORD_FIND_RADIUS, textSnapshot_ts.getCount() - 1);
for(;;){
var _local2 = textSnapshot_ts.getText(_local1, _local1 + 1);
if (WORD_BREAK.indexOf(_local2) != -1) {
if (_local1 != start_i) {
_local1 = _local1 - dir_i;
}
return(_local1);
}
_local1 = _local1 + dir_i;
if (_local1 < _local3) {
return(_local3);
}
if (_local1 > end_i) {
return(end_i);
}
};
return(_local3);
}
function emptySelection() {
var _local1 = this;
_local1.selectRange(_local1.m_headPageIdx, _local1.m_headCharIdx, _local1.m_tailPageIdx, _local1.m_tailCharIdx, false);
_local1.m_headPageIdx = 0;
_local1.m_headCharIdx = -1;
_local1.m_tailPageIdx = 0;
_local1.m_tailCharIdx = -1;
_local1.delayedBroadcast("onSelection", true);
}
function tossAllTS() {
emptySelection();
var _local3 = m_mainView.getNumPages();
var _local1 = 1;
while (_local1 <= _local3) {
var _local2 = getNthTextMC(_local1);
if (_local2 != null) {
_local2.freeTS();
}
_local1++;
}
updateAfterEvent();
}
function getSelectionOrder() {
var _local1 = this;
if (_local1.m_headPageIdx < _local1.m_tailPageIdx) {
return(-1);
}
if (_local1.m_headPageIdx > _local1.m_tailPageIdx) {
return(1);
}
if (_local1.m_headCharIdx < _local1.m_tailCharIdx) {
return(-1);
}
if (_local1.m_headCharIdx > _local1.m_tailCharIdx) {
return(1);
}
return(0);
}
function updateSelectionRange(startmc_i, startIdx_i, endmc_i, endIdx_i) {
var _local1 = this;
_local1.selectRange(_local1.m_headPageIdx, _local1.m_headCharIdx, _local1.m_tailPageIdx, _local1.m_tailCharIdx, false);
_local1.m_headPageIdx = startmc_i;
_local1.m_headCharIdx = startIdx_i;
_local1.m_tailPageIdx = endmc_i;
_local1.m_tailCharIdx = endIdx_i;
if (_local1.m_wordSelect) {
var _local2 = ((_local1.getSelectionOrder() <= 0) ? -1 : 1);
_local1.m_headCharIdx = _local1.findPageWordBoundary(_local1.m_headPageIdx, _local1.m_headCharIdx, _local2, true);
_local1.m_tailCharIdx = _local1.findPageWordBoundary(_local1.m_tailPageIdx, _local1.m_tailCharIdx, -_local2, true);
}
_local1.selectRange(_local1.m_headPageIdx, _local1.m_headCharIdx, _local1.m_tailPageIdx, _local1.m_tailCharIdx, true);
_local1.m_lastClickHeadPageIdx = startmc_i;
_local1.m_lastClickHeadCharIdx = startIdx_i;
_local1.delayedBroadcast("onSelection", true);
}
function updateSelectionTail(newTailMC_i, newTailIdx_i) {
var _local1 = this;
var _local2 = newTailMC_i;
var _local3 = newTailIdx_i;
if (_local3 >= 0) {
var order = _local1.getSelectionOrder();
var dir_i = 0;
if ((order <= 0) && (((_local2 == _local1.m_tailPageIdx) && (_local3 > _local1.m_tailCharIdx)) || (_local2 > _local1.m_tailPageIdx))) {
dir_i = 1;
} else if ((order >= 0) && (((_local2 == _local1.m_tailPageIdx) && (_local3 < _local1.m_tailCharIdx)) || (_local2 < _local1.m_tailPageIdx))) {
dir_i = -1;
}
if (dir_i != 0) {
if (_local1.m_wordSelect) {
_local3 = _local1.findPageWordBoundary(_local2, _local3, dir_i, true);
}
_local1.selectRange(_local1.m_tailPageIdx, _local1.m_tailCharIdx, _local2, _local3, true);
_local1.m_tailPageIdx = _local2;
_local1.m_tailCharIdx = _local3;
_local1.delayedBroadcast("onSelection", true);
} else if ((_local2 != _local1.m_tailPageIdx) || (_local3 != _local1.m_tailCharIdx)) {
_local1.updateSelectionRange(_local1.m_headPageIdx, _local1.m_headCharIdx, _local2, _local3);
}
}
}
function keyDown(key_i) {
var _local1 = this;
if (!_local1.m_scrollingEnabled) {
} else if (FPUI.Component.focusedComponent.m_eatsNavKeysWhenFocused) {
} else {
var _local3 = Selection.getFocus() == null;
var scrollX_i = _local1.x_sb.getScrollPosition();
var _local2 = _local1.y_sb.getScrollPosition();
switch (key_i) {
case 34 :
_local2 = _local2 + _local1.y_sb.getSize();
break;
case 33 :
_local2 = _local2 - _local1.y_sb.getSize();
break;
case 35 :
if (_local3) {
_local2 = _local1.y_sb.getMaxPos();
}
break;
case 36 :
if (_local3) {
_local2 = 0;
}
break;
case 40 :
_local2 = _local2 + KEY_SCROLL_DISTANCE;
break;
case 38 :
_local2 = _local2 - KEY_SCROLL_DISTANCE;
break;
case 37 :
if (_local3) {
scrollX_i = scrollX_i - KEY_SCROLL_DISTANCE;
}
break;
case 39 :
if (!_local3) {
break;
}
scrollX_i = scrollX_i + KEY_SCROLL_DISTANCE;
}
_local1.y_sb.setScrollPosition(_local2);
_local1.x_sb.setScrollPosition(scrollX_i);
_local1.m_mainView.onPageMayHaveChanged();
}
}
static function unionPoint(x, y, rect) {
var _local1 = rect;
_local1.left = Math.min(_local1.left, x);
_local1.right = Math.max(_local1.right, x);
_local1.top = Math.min(_local1.top, y);
_local1.bottom = Math.max(_local1.bottom, y);
}
function getSelectionRect(onlyFirstPage) {
var sel = null;
var start_i = m_headCharIdx;
var end_i = MAX_CHARS_PER_PAGE;
var i = m_headPageIdx;
while (i <= m_tailPageIdx) {
var text_mc = getNthTextMC(i);
if (text_mc == null) {
} else {
var textSnapshot_ts = text_mc.getTS(true);
if (textSnapshot_ts == null) {
} else {
if (i == m_tailPageIdx) {
end_i = m_tailCharIdx;
}
if (sel == null) {
sel = new Object();
sel.left = 1000000000 /* 0x3B9ACA00 */;
sel.top = 1000000000 /* 0x3B9ACA00 */;
sel.right = -1000000000;
sel.bottom = -1000000000;
}
if (textSnapshot_ts.getTextRunInfo === undefined) {
var pagemc = getNthPage(i);
unionPoint(pagemc._x, pagemc._y, sel);
unionPoint(pagemc._x + pagemc._width, pagemc._y + pagemc._height, sel);
} else {
var _local1 = new Object();
var info = textSnapshot_ts.getTextRunInfo(start_i, end_i);
var _local3 = 0;
while (_local3 < info.length) {
var _local2 = 0;
while (_local2 < 4) {
_local1.x = info[_local3][("corner" + _local2) + "x"];
_local1.y = info[_local3][("corner" + _local2) + "y"];
text_mc.localToGlobal(_local1);
pages_mc.globalToLocal(_local1);
unionPoint(_local1.x, _local1.y, sel);
_local2++;
}
_local3++;
}
}
if (onlyFirstPage) {
break;
}
}
}
(start_i = 0);
++i;
}
return(sel);
}
function ensureVisibleSB(sb, min, max, toTop, includeSlop) {
if (sb._visible) {
var _local2 = m_mainView.getCurrentScaleFraction();
var curScrollPos = sb.getScrollPosition();
var _local1 = Math.round(curScrollPos / _local2);
var curVisMax = Math.round((curScrollPos + (toTop ? (VISIBILITY_MARGIN) : (sb.getSize()))) / _local2);
var _local3 = (includeSlop ? (VISIBILITY_MARGIN / _local2) : 0);
min = min - _local3;
max = max + _local3;
if (max > curVisMax) {
_local1 = Math.round(max - (curVisMax - _local1));
}
if (min < _local1) {
_local1 = min;
}
return(sb.setScrollPosition(_local1 * _local2));
}
return(false);
}
function ensureSelectionIsVisible() {
var _local1 = this;
var _local2 = _local1.getSelectionRect(true);
if (_local2 != null) {
_local1.ensureVisibleSB(_local1.x_sb, _local2.left, _local2.right, false, true);
var _local3 = _local1.ensureVisibleSB(_local1.y_sb, _local2.top, _local2.bottom, _local1.m_searchToTop, true);
if (_local3) {
_local1.m_mainView.onPageMayHaveChanged();
}
}
}
static function charsMatch(src, pattern, matcher) {
var _local2 = src;
var _local3 = pattern;
if (_local2.length == _local3.length) {
if (_local2 == _local3) {
return(true);
}
var _local1 = matcher[_local3];
if (_local1 != undefined) {
if (_local1.indexOf(_local2) != -1) {
return(true);
}
}
}
return(false);
}
static function findSpecial(textSnapshot_ts, startIdx_i, pattern, caseSens_b, matcher) {
if (!caseSens_b) {
pattern = pattern.toLowerCase();
}
var count = textSnapshot_ts.getCount();
var _local3 = startIdx_i;
while (_local3 < count) {
var _local2 = textSnapshot_ts.getText(_local3, _local3 + pattern.length);
if (!caseSens_b) {
_local2 = _local2.toLowerCase();
}
if (charsMatch(_local2.charAt(0), pattern.charAt(0), matcher)) {
var found = true;
var _local1 = 1;
while (_local1 < pattern.length) {
if (!charsMatch(_local2.charAt(_local1), pattern.charAt(_local1), matcher)) {
found = false;
break;
}
_local1++;
}
if (found) {
return(_local3);
}
}
_local3++;
}
return(-1);
}
function findText(textToFind_str, caseSens_b) {
var _local2 = this;
var anySpecial = false;
var j = 0;
while (j < textToFind_str.length) {
if (_local2.m_smartFindChars[textToFind_str.charAt(j)] != undefined) {
anySpecial = true;
break;
}
j++;
}
var startmc_i = _local2.m_tailPageIdx;
if (startmc_i == 0) {
startmc_i = 1;
}
var startIdx_i = (_local2.m_tailCharIdx + 1);
if (startIdx_i < 0) {
startIdx_i = 0;
}
if (_local2.m_lastFindStr != textToFind_str) {
startmc_i = 1;
startIdx_i = 0;
_local2.m_lastFindStr = textToFind_str;
}
var found = false;
var np = _local2.m_mainView.getNumPages();
var _local1 = startmc_i;
while (_local1 <= np) {
var text_mc = _local2.getNthTextMC(_local1);
if (text_mc != null) {
var textSnapshot_ts = text_mc.getTS(true);
var _local3;
if (anySpecial) {
_local3 = findSpecial(textSnapshot_ts, startIdx_i, textToFind_str, caseSens_b, _local2.m_smartFindChars);
} else {
_local3 = textSnapshot_ts.findText(startIdx_i, textToFind_str, caseSens_b);
}
if (_local3 >= 0) {
_local2.updateSelectionRange(_local1, _local3, _local1, (_local3 + textToFind_str.length) - 1);
_local2.ensureSelectionIsVisible();
found = true;
break;
}
}
startIdx_i = 0;
_local1++;
}
if (!found) {
_local2.selectRange(_local2.m_headPageIdx, _local2.m_headCharIdx, _local2.m_tailPageIdx, _local2.m_tailCharIdx, false);
_local2.emptySelection();
}
return(found);
}
function getTextSelectionRange() {
var _local2 = this;
if (_local2.m_headCharIdx < 0) {
return(null);
}
var _local1 = new FlashPaper.SelectionRange();
_local1.headPageIdx = _local2.m_headPageIdx;
_local1.headCharIdx = _local2.m_headCharIdx;
_local1.tailPageIdx = _local2.m_tailPageIdx;
_local1.tailCharIdx = _local2.m_tailCharIdx;
return(_local1);
}
function setTextSelectionRange(sel, skipBroadcast) {
var _local1 = sel;
var _local2 = this;
if (_local1) {
_local2.updateSelectionRange(_local1.headPageIdx, _local1.headCharIdx, _local1.tailPageIdx, _local1.tailCharIdx);
} else {
_local2.emptySelection();
}
if (skipBroadcast) {
_local2.delayedBroadcast("onSelection", false);
}
}
function getSelectedText() {
var text_s = "";
var np = m_mainView.getNumPages();
var _local2 = 1;
while (_local2 <= np) {
var _local3 = getNthTextMC(_local2);
if (_local3 != null) {
var textSnapshot_ts = _local3.getTS(true);
var _local1 = textSnapshot_ts.getSelectedText(true);
if (_local1 != null) {
if ((text_s.length > 0) && (_local1.length > 0)) {
text_s = text_s + newline;
}
text_s = text_s + _local1;
}
}
_local2++;
}
return(text_s);
}
function getToolMode() {
return(m_curTool);
}
function setToolMode(newTool) {
var _local1 = this;
var _local2 = newTool;
switch (_local2) {
case "" :
break;
case "select" :
if (_local1.getTextSnapshot == null) {
return(false);
}
break;
case "pan" :
if (!_local1.m_scrollingEnabled) {
return(false);
}
break;
default :
return(false);
}
if (_local1.m_curTool != _local2) {
if (_local1.m_curTool == "select") {
_local1.tossAllTS();
}
_local1.m_curTool = _local2;
if (FlashPaper.Utils.doMouseHitTest(_local1.bg_mc)) {
_local1.m_mainView.setCursor(_local1, _local2);
}
_local1.m_mainView.broadcastMessage("onToolChanged", _local2);
}
return(true);
}
function onToolOver() {
var _local1 = this;
_local1.m_mainView.setCursorFocus(_local1);
_local1.m_mainView.setCursor(_local1, _local1.m_curTool);
}
function onToolOut() {
m_mainView.setCursor(this, "");
}
function distFromClickIsWithin(i) {
var _local1 = this;
return((Math.abs(_local1.m_mainView.getMouseY() - _local1.m_initialMouseY) <= i) && (Math.abs(_local1.m_mainView.getMouseX() - _local1.m_initialMouseX) <= i));
}
function onToolDown() {
var _local1 = this;
if (FlashPaper.Utils.doMouseHitTest(_local1.bg_mc)) {
_local1.m_usingTool = true;
_local1.m_doubleClicked = false;
_local1.m_wordSelect = false;
_local1.m_useLastClickForHead = false;
if ((getTimer() - _local1.m_initialMouseTime) <= DBLCLICK_TIME) {
if (_local1.distFromClickIsWithin(DBLCLICK_DIST)) {
_local1.m_doubleClicked = true;
}
}
_local1.m_initialMouseTime = getTimer();
_local1.m_initialMouseX = _local1.m_mainView.getMouseX();
_local1.m_initialMouseY = _local1.m_mainView.getMouseY();
_local1.m_mouseMovedEnough = false;
switch (_local1.m_curTool) {
case "pan" :
if (!_local1.m_scrollingEnabled) {
_local1.m_usingTool = false;
return;
}
_local1.m_startScrollY = _local1.y_sb.getScrollPosition();
if (isNaN(_local1.m_startScrollY)) {
_local1.m_startScrollY = 0;
}
_local1.m_startScrollX = _local1.x_sb.getScrollPosition();
if (isNaN(_local1.m_startScrollX)) {
_local1.m_startScrollX = 0;
}
return;
case "select" :
_local1.m_wordSelect = _local1.m_doubleClicked;
var _local3 = _local1.hitTestTextMC();
if (!_local3) {
break;
}
var text_mc = _local1.getNthTextMC(_local3);
var textSnapshot_ts = text_mc.getTS(true);
var _local2 = textSnapshot_ts.hitTestTextNearPos(text_mc._xmouse, text_mc._ymouse, HUGE_HIT_TEST_DIST);
var extend = Key.isDown(16);
if (extend) {
if (_local1.m_headCharIdx < 0) {
_local1.m_headPageIdx = _local1.m_lastClickHeadPageIdx;
_local1.m_headCharIdx = _local1.m_lastClickHeadCharIdx;
}
if (_local1.m_headCharIdx < 0) {
_local2 = -1;
extend = false;
}
} else {
_local1.emptySelection();
}
if (_local2 >= 0) {
if (extend) {
_local1.updateSelectionTail(_local3, _local2);
} else if (_local1.m_wordSelect) {
_local1.updateSelectionRange(_local3, _local2, _local3, _local2);
} else {
_local1.m_lastClickHeadPageIdx = _local3;
_local1.m_lastClickHeadCharIdx = _local2;
_local1.m_useLastClickForHead = true;
}
} else {
if (extend) {
break;
}
_local1.emptySelection();
}
}
}
}
function onToolMove() {
var _local1 = this;
if (_local1.m_usingTool) {
if (!_local1.m_mouseMovedEnough) {
if (!_local1.distFromClickIsWithin(TOOL_HYSTERESIS)) {
_local1.m_mouseMovedEnough = true;
}
}
switch (_local1.m_curTool) {
case "pan" :
handleAbsoluteScroll(_local1.y_sb, _local1.m_startScrollY - (_local1.m_mainView.getMouseY() - _local1.m_initialMouseY));
handleAbsoluteScroll(_local1.x_sb, _local1.m_startScrollX - (_local1.m_mainView.getMouseX() - _local1.m_initialMouseX));
break;
case "select" :
if (!FlashPaper.Utils.doMouseHitTest(_local1.bg_mc)) {
var _local2 = _local1.m_mainView.getBoundsInMainViewCoords(_local1.bg_mc);
handleAutoScroll(_local1.y_sb, _local1.m_mainView.getMouseY(), _local2.yMin, _local2.yMax);
handleAutoScroll(_local1.x_sb, _local1.m_mainView.getMouseX(), _local2.xMin, _local2.xMax);
}
var _local3 = _local1.hitTestTextMC();
if (_local3 == 0) {
break;
}
if (!((_local1.m_headPageIdx != 0) || (_local1.m_useLastClickForHead && (_local1.m_lastClickHeadPageIdx != 0)))) {
break;
}
var text_mc = _local1.getNthTextMC(_local3);
var textSnapshot_ts = text_mc.getTS(true);
var index = textSnapshot_ts.hitTestTextNearPos(text_mc._xmouse, text_mc._ymouse, HUGE_HIT_TEST_DIST);
if (!_local1.m_mouseMovedEnough) {
break;
}
if (_local1.m_useLastClickForHead) {
_local1.updateSelectionRange(_local1.m_lastClickHeadPageIdx, _local1.m_lastClickHeadCharIdx, _local3, index);
_local1.m_useLastClickForHead = false;
} else {
_local1.updateSelectionTail(_local3, index);
}
}
_local1.m_mainView.onPageMayHaveChanged();
}
updateAfterEvent();
}
function onToolUp() {
var _local1 = this;
_local1.m_usingTool = false;
_local1.m_wordSelect = false;
_local1.m_useLastClickForHead = false;
}
static function handleAbsoluteScroll(sb, scrollPos) {
var _local1 = sb;
if (((_local1 != null) && (_local1._visible)) && (_local1.getScrollPosition() != scrollPos)) {
_local1.setScrollPosition(scrollPos);
return(true);
}
return(false);
}
static function handleRelativeScroll(sb, delta_i) {
if (delta_i != 0) {
return(handleAbsoluteScroll(sb, sb.getScrollPosition() + delta_i));
}
return(false);
}
static function handleAutoScroll(sb, pos_i, minpos_i, maxpos_i) {
var _local1 = pos_i;
var _local3 = sb;
if ((_local3 != null) && (_local3._visible)) {
var _local2;
if (_local1 > maxpos_i) {
_local2 = _local1 - maxpos_i;
} else if (_local1 < minpos_i) {
_local2 = _local1 - minpos_i;
}
return(handleRelativeScroll(_local3, _local2));
}
return(false);
}
function onMouseWheel(delta) {
var _local1 = this;
if (!_local1.m_scrollingEnabled) {
} else if (((!_local1.m_usingTool) && (_local1.y_sb._visible)) && (delta != 0)) {
var _local2 = _local1.y_sb.getScrollPosition();
if (isNaN(_local2)) {
_local2 = 0;
}
_local2 = _local2 - (delta * WHEEL_SCROLL_DISTANCE);
_local1.y_sb.setScrollPosition(_local2);
_local1.m_mainView.onPageMayHaveChanged();
}
}
function getScrolledPage(middle) {
var _local2 = this;
var _local3 = _local2.y_sb.getScrollPosition();
if (middle) {
_local3 = _local3 + (_local2.y_sb.getSize() / 2);
}
_local3 = Math.round(_local3 / _local2.m_mainView.getCurrentScaleFraction());
var _local1 = _local2.m_mainView.getNumPages();
while (_local1 > 0) {
if (_local2.getNthPage(_local1)._y <= _local3) {
return(_local1);
}
_local1--;
}
return(1);
}
function rebuildMask() {
var _local1 = this;
var _local3 = _local1.m_mainView.getDocViewWidth();
var _local2 = _local1.m_mainView.getDocViewHeight();
_local1.setMask(null);
_local1.m_fpMask.removeMovieClip();
_local1.createEmptyMovieClip("m_fpMask", 1066);
_local1.m_fpMask.beginFill(0, 100);
_local1.m_fpMask.moveTo(0, 0);
_local1.m_fpMask.lineTo(_local3, 0);
_local1.m_fpMask.lineTo(_local3, _local2);
_local1.m_fpMask.lineTo(0, _local2);
_local1.m_fpMask.lineTo(0, 0);
_local1.m_fpMask.endFill();
_local1.setMask(_local1.m_fpMask);
}
static var MAX_CHARS_PER_PAGE = 2147483646;
static var HUGE_HIT_TEST_DIST = 100000;
static var PAGE_MARGIN = 8;
static var MIN_WIDTH = 64;
static var PAGE_SPACING = 24;
static var LOADING_OFFSET = 16;
static var VISIBILITY_MARGIN = 32;
static var KEY_SCROLL_DISTANCE = 50;
static var WHEEL_SCROLL_DISTANCE = 50;
static var DROPSHADOW_HEIGHT = 2;
static var TOOL_HYSTERESIS = 4;
static var DBLCLICK_DIST = 2;
static var DBLCLICK_TIME = 500;
static var PAGE_TAB_INDEX_BASE = 400;
static var SMART_FIND = ["'\u2018\u2019", "\"\u201C\u201D"];
static var WORD_BREAK = "\t\n\x0B\f\r \u0085\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF-\u00AD\u058A\u1806\u2010\u2011\u30FB\uFE63\uFF0D\uFF65\"'\u00AB\u00BB\u2018\u2019\u201A\u201B\u201C\u201D\u201E\u201F\u2039\u203A\u300C\u300D\u300E\u300F\u301D\u301E\u301F\uFE41\uFE42\uFE43\uFE44\uFF02\uFF07\uFF62\uFF63!,.:;?\u037E\u0387\u0589\u060C\u061B\u061F\u06D4\u0700\u0701\u0702\u0703\u0704\u0705\u0706\u0707\u0708\u0709\u070A\u070C\u0964\u0965\u0E5A\u0E5B\u104A\u104B\u1361\u1362\u1363\u1364\u1365\u1366\u1367\u1368\u166D\u166E\u16EB\u16ED\u17D4\u17D5\u17D6\u17DA\u1802\u1803\u1804\u1805\u1808\u1809\u1944\u1945\u203C\u203D\u2047\u2048\u2049\u3001\u3002\uFE50\uFE51\uFE52\uFE54\uFE55\uFE56\uFE57\uFF01\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF61\uFF64#$%&()*+/<=>@[\\]^`{|}" + "~";
static var MAX_WORD_FIND_RADIUS = 100;
var m_mainView = null;
var m_usingTool = false;
var m_lastClickHeadPageIdx = 0;
var m_lastClickHeadCharIdx = -1;
var m_useLastClickForHead = false;
var m_headPageIdx = 0;
var m_headCharIdx = -1;
var m_tailPageIdx = 0;
var m_tailCharIdx = -1;
var m_scaledDocWidthInScreenDpi = 0;
var m_docWidthInScreenDpi = 0;
var m_startScrollX = 0;
var m_startScrollY = 0;
var m_initialMouseTime = 0;
var m_initialMouseX = 0;
var m_initialMouseY = 0;
var m_mouseMovedEnough = false;
var m_doubleClicked = false;
var m_wordSelect = false;
var m_curTool = "";
var m_fpMask = null;
var m_searchToTop = false;
var m_smartFindChars = null;
var m_scrollingEnabled = true;
var m_maxPageWidth = 0;
var m_maxPageHeight = 0;
}
Symbol 198 MovieClip [__Packages.FlashPaper.Anchor] Frame 0
class FlashPaper.Anchor
{
function Anchor () {
}
}
Symbol 199 MovieClip [__Packages.FlashPaper.ToolbarView] Frame 0
class FlashPaper.ToolbarView
{
var m_mainView, m_toolbarMC, m_margin, m_mainMC;
function ToolbarView (parentView_o, main_mc, popupEnabled) {
var _local1 = this;
_local1.m_mainMC = main_mc;
_local1.m_toolbarMC = main_mc.toolbar_mc;
_local1.m_mainView = parentView_o;
_local1.m_margin = TOOLBAR_MARGIN;
_local1.m_popupEnabled = popupEnabled;
_local1.m_controlsHidden = new Array();
_local1.m_toolbarMC.brandClip_mc.gotoLink_btn.tabEnabled = false;
var _local2 = _local1.m_toolbarMC.controls_mc;
if (_local1.m_mainView.getIsHandheld()) {
_local1.m_popupEnabled = false;
}
_local2.print_mc.setEnabled(false);
_local2.currPg_mc.currPg_txt.restrict = "0-9";
_local2.currZoom_mc.currZoom_txt.restrict = "0-9%";
_local2.find_mc.find_txt.restrict = "^\x01-\x1F";
var hiddenTools = _local1.m_mainMC.hiddenToolsList_mc;
hiddenTools.setButton(_local2.hiddenToolsBtn_mc);
hiddenTools.setController(_local1.m_mainView);
hiddenTools.setCursorManager(_local1.m_mainView);
var _local3 = _local2.zoom_sld;
_local3.setSliderProperties(SLIDER_MIN, SLIDER_MAX);
_local3.setSnapThreshold(SLIDER_SNAP_THRESHOLD);
_local3.setZoomKeyController(_local1.m_mainView);
_local1.updateSliderSnapValues(_local3);
if (_local1.m_toolbarMC.toolbarBg_mc._height != TOOLBAR_HEIGHT) {
var toolbarScale_i = ((TOOLBAR_HEIGHT / _local1.m_toolbarMC.toolbarBg_mc._height) * 100);
_local1.m_toolbarMC.toolbarBg_mc._yscale = toolbarScale_i;
_local2._yscale = (_local2._xscale = toolbarScale_i);
_local1.m_toolbarMC.brandClip_mc._xscale = (_local1.m_toolbarMC.brandClip_mc._yscale = toolbarScale_i);
}
if (!_local1.m_popupEnabled) {
_local2.popup_mc._visible = false;
}
_local1.m_toolbarMC.toolbarBg_mc._yscale = 100;
_local1.m_toolbarMC.toolbarBg_mc._xscale = 100;
_local1.onResize();
_local1.m_mainView.addListener(_local1);
}
function updateSliderSnapValues(zoom_sld) {
var _local1 = SLIDER_SNAP_VALUES;
_local1.unshift(m_mainView.getPageFitScale(), m_mainView.getPageWidthScale());
zoom_sld.setSnapValues(_local1);
}
function internal_onAddPage(width_i, height_i) {
var _local2 = m_toolbarMC.controls_mc;
var _local1 = m_mainView.getNumPages();
_local2.numPgs_txt.text = "/" + _local1;
}
function getHeight() {
return(m_toolbarMC.toolbarBg_mc._height);
}
function onResize() {
var _local1 = this;
var _local2 = _local1.m_toolbarMC.controls_mc;
var smallTextFormat = new TextFormat(FlashPaper.Utils.UIFONT, FlashPaper.Utils.UISMALLFONTSIZE, 0);
_local2.numPgs_txt.setNewTextFormat(smallTextFormat);
_local2.currPg_mc.currPg_txt.setNewTextFormat(smallTextFormat);
_local2.currZoom_mc.currZoom_txt.setNewTextFormat(smallTextFormat);
var find_mc = _local2.find_mc;
find_mc.find_txt.setNewTextFormat(smallTextFormat);
var toolbarBg_mc = _local1.m_toolbarMC.toolbarBg_mc;
toolbarBg_mc.middle_mc._width = _local1.m_mainView.getWidth();
toolbarBg_mc.right_mc._x = _local1.m_mainView.getWidth() - toolbarBg_mc.right_mc._width;
var _local3 = 0;
while (_local3 < TOOLBAR_ORDER.length) {
var s = TOOLBAR_ORDER[_local3];
_local2[TOOLBAR_ORDER[_local3]]._visible = true;
_local3++;
}
_local2.hiddenToolsBtn_mc._visible = false;
var hh = _local1.m_mainView.getIsHandheld();
if ((!_local1.m_popupEnabled) || (hh)) {
_local2.popup_mc._visible = false;
}
if (hh) {
_local2.print_mc._visible = false;
_local2.dividePrint_mc._visible = false;
}
if (_local1.m_toolbarMC.getTextSnapshot == null) {
_local2.panTool_mc._visible = false;
_local2.selectTool_mc._visible = false;
_local2.divideTools_mc._visible = false;
_local2.find_mc._visible = false;
_local2.divideZoom_mc._visible = false;
}
var np = _local1.m_mainView.getNumberOfPages();
if (np <= 1) {
_local2.dividePager_mc._visible = false;
_local2.currPg_mc._visible = false;
_local2.numPgs_txt._visible = false;
_local2.prevNext_mc._visible = false;
_local2.dividePager_mc._x = 0;
_local2.currPg_mc._x = 0;
_local2.numPgs_txt._x = 0;
_local2.prevNext_mc._x = 0;
}
var ctrlsWidth = _local1.stackItems();
var brandClip_mc = _local1.m_toolbarMC.brandClip_mc;
var availWidth = ((_local1.m_mainView.getWidth() - (brandClip_mc._x + brandClip_mc._width)) - _local1.m_margin);
var removeIdx = 0;
var removeItem = true;
var numControlsRemoved = 0;
do {
var s = TOOLBAR_PRIORITY[removeIdx];
var remove_mc = _local2[s];
if ((remove_mc != undefined) && (ctrlsWidth > availWidth)) {
if (remove_mc._visible) {
remove_mc._visible = false;
if (!_local2.hiddenToolsBtn_mc.fp_hidden) {
_local2.hiddenToolsBtn_mc._visible = true;
}
ctrlsWidth = _local1.stackItems();
numControlsRemoved++;
if (numControlsRemoved > _local1.m_controlsHidden.length) {
_local1.addToHiddenList(s);
_local1.m_controlsHidden.push(s);
}
}
} else {
removeItem = false;
}
removeIdx++;
} while (removeItem == true);
while (numControlsRemoved < _local1.m_controlsHidden.length) {
_local1.removeFromHiddenList(_local1.m_controlsHidden[_local1.m_controlsHidden.length - 1]);
_local1.m_controlsHidden.pop();
}
var zoom_sld = _local2.zoom_sld;
_local1.updateSliderSnapValues(zoom_sld);
var hiddenTools = _local1.m_mainMC.hiddenToolsList_mc;
hiddenTools.setListVisible(false);
}
function stackItems() {
var ctrls = m_toolbarMC.controls_mc;
var stackWidth_i = 0;
var xPos_i = ctrls._width;
var _local2 = TOOLBAR_ORDER.length - 1;
while (_local2 >= 0) {
var _local3 = TOOLBAR_ORDER[_local2];
var _local1 = ctrls[_local3];
if (_local1._visible && (!_local1.fp_hidden)) {
xPos_i = xPos_i - _local1._width;
_local1._x = Math.round(xPos_i);
var spacing = ((_local3 == "numPgs_txt") ? 1 : (TOOLBAR_SPACING));
xPos_i = xPos_i - spacing;
stackWidth_i = stackWidth_i + (_local1._width + spacing);
} else {
_local1._visible = false;
_local1._x = 0;
}
_local2--;
}
ctrls._x = Math.round((m_mainView.getWidth() - ctrls._width) - m_margin);
return(stackWidth_i);
}
function internal_onZoom(percent) {
var _local1 = m_toolbarMC.controls_mc;
var _local3 = m_mainView.getViewMode();
_local1.fitPage_mc.setActive(_local3 == "page");
_local1.fitWidth_mc.setActive(_local3 == "width");
_local1.currZoom_mc.currZoom_txt.text = Math.round(percent) + "%";
var _local2 = _local1.zoom_sld;
_local2.setChangeHandler(null);
_local2.setValue(percent);
_local2.setChangeHandler("zoomSelect", this);
}
function zoomSelect(sld) {
var _local2 = m_mainView.getIsHandheld();
var _local1 = sld.getFocused();
if (((!_local2) && (_local1)) || (_local2 && (!_local1))) {
var _local3 = parseInt(sld.getValue());
if (!isNaN(_local3)) {
m_mainView.setCurrentZoom(_local3);
}
}
}
function internal_onScroll() {
var _local2 = this;
var pageNum_i = _local2.m_mainView.getScrolledPage();
_local2.m_mainView.updateCurrentPage(pageNum_i);
var ctrls = _local2.m_toolbarMC.controls_mc;
ctrls.currPg_mc.currPg_txt.text = pageNum_i;
var stateChanged = false;
var _local3 = pageNum_i < _local2.m_mainView.getNumPages();
var enablePrevPage = (pageNum_i > 1);
var _local1 = ctrls.prevNext_mc;
if (_local1.nextPg_mc.getEnabled() != _local3) {
_local1.nextPg_mc.setEnabled(_local3);
_local1.nextPg_mc._accProps.silent = !_local3;
_local2.m_mainView.setMCHiddenAccButtonAvailable(_local2.m_toolbarMC.accessible_mc.nextPg_mc, _local3);
stateChanged = true;
}
if (_local1.prevPg_mc.getEnabled() != enablePrevPage) {
_local1.prevPg_mc.setEnabled(enablePrevPage);
_local1.prevPg_mc._accProps.silent = !enablePrevPage;
_local2.m_mainView.setMCHiddenAccButtonAvailable(_local2.m_toolbarMC.accessible_mc.prevPg_mc, enablePrevPage);
stateChanged = true;
}
if (stateChanged) {
Accessibility.updateProperties();
}
}
function internal_onDocumentLoaded() {
m_toolbarMC.controls_mc.print_mc.setEnabled(true);
}
function onToolChanged(newtool) {
var _local1 = m_toolbarMC.controls_mc;
_local1.panTool_mc.setActive(newtool == "pan");
_local1.selectTool_mc.setActive(newtool == "select");
}
function onEnableScrolling(flag) {
m_toolbarMC.controls_mc.panTool_mc.setEnabled(flag);
}
function addToHiddenList(mcInstanceName) {
var ctrls = m_toolbarMC.controls_mc;
var _local1 = ctrls[mcInstanceName];
var _local3 = m_mainView.getLanguageObject();
var _local2 = m_mainMC.hiddenToolsList_mc;
if (mcInstanceName == "prevNext_mc") {
_local2.addItem(_local1.prevPg_mc.m_iconName, _local3[_local1.prevPg_mc.m_localName], _local1.prevPg_mc.m_clickHandler);
_local2.addItem(_local1.nextPg_mc.m_iconName, _local3[_local1.nextPg_mc.m_localName], _local1.nextPg_mc.m_clickHandler);
} else if (mcInstanceName == "fitWidth_mc") {
_local2.addDivider();
_local2.addItem(_local1.m_iconName, _local3[_local1.m_localName], _local1.m_clickHandler);
} else if (mcInstanceName == "fitPage_mc") {
_local2.addItem(_local1.m_iconName, _local3[_local1.m_localName], _local1.m_clickHandler);
} else if (mcInstanceName == "zoom_sld") {
_local2.addDivider();
_local2.addItem(ICON_ZOOM_IN, _local3.ZOOM_IN, "zoomIn");
_local2.addItem(ICON_ZOOM_OUT, _local3.ZOOM_OUT, "zoomOut");
} else if (mcInstanceName == "print_mc") {
_local2.addDivider();
_local2.addItem(_local1.m_iconName, _local3[_local1.m_localName], _local1.m_clickHandler);
}
}
function removeFromHiddenList(mcInstanceName) {
var _local2 = mcInstanceName;
var _local1 = m_mainMC.hiddenToolsList_mc;
if (_local2 == "print_mc") {
_local1.removeItem();
_local1.removeDivider();
} else if (_local2 == "zoom_sld") {
_local1.removeItem();
_local1.removeItem();
_local1.removeDivider();
} else if (_local2 == "fitPage_mc") {
_local1.removeItem();
} else if (_local2 == "fitWidth_mc") {
_local1.removeItem();
_local1.removeDivider();
} else if (_local2 == "prevNext_mc") {
_local1.removeItem();
_local1.removeItem();
}
}
static var TOOLBAR_MARGIN = 3;
static var TOOLBAR_HEIGHT = 31;
static var TOOLBAR_SPACING = 3;
static var SLIDER_MIN = 25;
static var SLIDER_MAX = 250;
static var SLIDER_SNAP_VALUES = [100];
static var SLIDER_SNAP_THRESHOLD = 8;
static var ICON_PREV_PAGE = "iconPrevPage";
static var ICON_NEXT_PAGE = "iconNextPage";
static var ICON_FIT_WIDTH = "iconFitWidth";
static var ICON_FIT_PAGE = "iconFitPage";
static var ICON_ZOOM_IN = "iconZoomIn";
static var ICON_ZOOM_OUT = "iconZoomOut";
static var ICON_PRINT = "iconPrint";
static var TOOLBAR_ORDER = ["panTool_mc", "selectTool_mc", "divideTools_mc", "find_mc", "divideZoom_mc", "zoom_sld", "currZoom_mc", "fitPage_mc", "fitWidth_mc", "dividePager_mc", "currPg_mc", "numPgs_txt", "prevNext_mc", "dividePrint_mc", "print_mc", "popup_mc", "hiddenToolsBtn_mc"];
static var TOOLBAR_PRIORITY = ["prevNext_mc", "fitWidth_mc", "fitPage_mc", "numPgs_txt", "currPg_mc", "dividePager_mc", "divideZoom_mc", "divideTools_mc", "currZoom_mc", "zoom_sld", "print_mc", "panTool_mc", "selectTool_mc", "dividePrint_mc", "find_mc"];
}
Symbol 200 MovieClip [__Packages.FPUI.Slider] Frame 0
class FPUI.Slider extends FPUI.Component
{
function Slider () {
var _local1 = this;
super();
_local1.m_eatsNavKeysWhenFocused = true;
_local1.m_snapValues = new Array();
_local1.m_width = (_local1.m_horizontal ? (_local1._width) : (_local1._height));
_local1._xscale = 100;
_local1._yscale = 100;
_local1._rotation = 0;
_local1.attachMovie("fsl_scrollTrack", "m_scrollTrackMC", _local1.m_depth++, {_y:1});
_local1.attachMovie("fsl_pointerThumb", "m_thumbMC", _local1.m_depth++);
_local1.setEnabled(_local1.enabled);
_local1.setSliderProperties(_local1.m_minValue, _local1.m_maxValue);
_local1.setSize(_local1.m_width);
_local1.setHorizontal(_local1.m_horizontal);
}
function getValue() {
return(m_value);
}
function setZoomKeyController(controller) {
m_keyController = controller;
}
function setSize(pwidth) {
var _local1 = this;
var _local2 = pwidth;
if (_local2 < 4) {
_local2 = 4;
}
_local1.m_width = _local2;
_local1.m_scrollableArea = (_local1.m_thumbMC ? ((_local1.m_width - 2) - _local1.m_thumbMC._width) : (_local1.m_width - 5));
_local1.m_scrollTrackMC._x = _local1.m_width / 2;
_local1.setValue(_local1.m_value);
}
function setSliderProperties(min, max) {
var _local1 = this;
if (max <= min) {
return(false);
}
_local1.m_maxValue = Number(max);
_local1.m_minValue = Number(min);
if (isNaN(_local1.m_maxValue) || (isNaN(_local1.m_minValue))) {
return(false);
}
_local1.m_range = _local1.m_maxValue - _local1.m_minValue;
_local1.setValue(_local1.m_value);
return(true);
}
function setSnapValues(a) {
m_snapValues = a;
}
function setSnapThreshold(i) {
m_snapThreshold = i;
}
function setEnabled(penable) {
var _local1 = this;
var _local2 = penable;
super.setEnabled(_local2);
_local1.enabled = _local2;
if (!_local2) {
_local1.m_scrollTrackMC.gotoAndStop("disabled");
_local1.m_thumbMC.gotoAndStop("disabled");
delete _local1.onPress;
delete _local1.onRelease;
delete _local1.onReleaseOutside;
delete _local1.onRollOver;
delete _local1.onRollOut;
delete _local1.onMouseMove;
} else {
_local1.m_scrollTrackMC.gotoAndStop(1);
_local1.m_thumbMC.gotoAndStop(1);
_local1.onPress = _local1.myOnPress;
_local1.onRelease = _local1.myOnRelease;
_local1.onReleaseOutside = _local1.myOnRelease;
_local1.onRollOver = _local1.myOnRollOver;
_local1.onRollOut = _local1.myOnRollOut;
}
_local1.setSize(_local1.m_width);
}
function setHorizontal(horizontal) {
var _local1 = this;
if (horizontal) {
_local1._rotation = 0;
_local1.m_scrollTrackMC._rotation = 0;
_local1.m_scrollTrackMC._yscale = 100;
} else {
_local1._rotation = 90;
_local1.m_scrollTrackMC._rotation = 180;
_local1.m_scrollTrackMC._yscale = -100;
}
_local1.m_horizontal = horizontal;
_local1.setValue(_local1.getValue());
}
function setValue(value) {
var _local1 = this;
var _local3 = value;
_local3 = Math.min(Math.max(_local3, _local1.m_minValue), _local1.m_maxValue);
if ((_local1.m_snapValues != undefined) && (_local1.m_snapValues.length > 0)) {
var _local2 = 0;
while (_local2 < _local1.m_snapValues.length) {
if ((_local3 >= (_local1.m_snapValues[_local2] - _local1.m_snapThreshold)) && (_local3 <= (_local1.m_snapValues[_local2] + _local1.m_snapThreshold))) {
_local3 = _local1.m_snapValues[_local2];
break;
}
_local2++;
}
}
_local1.m_value = _local3;
var xPos = _local1.valueToCoord(_local3);
_local1.m_thumbMC._x = xPos;
var ltMC = _local1.m_scrollTrackMC.left_mc;
var midLtMC = _local1.m_scrollTrackMC.middleLeft_mc;
var midRtMC = _local1.m_scrollTrackMC.middleRight_mc;
var rtMC = _local1.m_scrollTrackMC.right_mc;
ltMC._x = (-_local1.m_width) / 2;
if (!_local1.m_horizontal) {
xPos = _local1.valueToCoord((_local1.m_range - _local3) + (_local1.m_minValue * 2));
}
midLtMC._width = xPos + (_local1.m_thumbMC._width / 2);
midLtMC._x = ltMC._x + ltMC._width;
midRtMC._width = (((_local1.m_width - xPos) - ltMC._width) - rtMC._width) - ((_local1.m_thumbMC._width - 2) / 2);
midRtMC._x = midLtMC._x + midLtMC._width;
rtMC._x = midRtMC._x + midRtMC._width;
_local1.executeCallBack();
}
function getValueFromThumb() {
var _local1 = this;
var _local2;
if (_local1.m_thumbPressed) {
_local2 = _local1._xmouse - _local1.m_distanceFromCenter;
} else {
_local2 = _local1._xmouse - (_local1.m_thumbMC._width / 2);
}
_local2 = Math.max(1, Math.min(_local2, _local1.m_scrollableArea + 1));
return(_local1.coordToValue(_local2));
}
function setValueFromThumb() {
setValue(getValueFromThumb());
}
function myOnMouseMove() {
setValueFromThumb();
}
function go(s) {
var _local1 = this;
if (s == "up") {
if (_local1.getFocused()) {
_local1.m_thumbMC.gotoAndStop("focus");
} else {
_local1.m_thumbMC.gotoAndStop(1);
}
} else {
_local1.m_thumbMC.gotoAndStop(s);
}
}
function onComponentKillFocus() {
super.onComponentKillFocus();
go("up");
}
function myOnRelease() {
var _local1 = this;
_local1.m_focused = false;
_local1.setValueFromThumb();
delete _local1.onMouseMove;
_local1.m_thumbPressed = false;
_local1.m_distanceFromCenter = 0;
_local1.go("up");
Selection.setFocus(null);
}
function myOnPress() {
var _local1 = this;
_local1.pressFocus();
_local1.m_thumbPressed = _local1.m_thumbMC.hitTest(_root._xmouse, _root._ymouse);
if (_local1.m_thumbPressed) {
_local1.m_distanceFromCenter = _local1._xmouse - _local1.m_thumbMC._x;
}
_local1.setValueFromThumb();
_local1.onMouseMove = _local1.myOnMouseMove;
_local1.go("pressed");
}
function myOnRollOver() {
go("over");
}
function myOnRollOut() {
go("up");
}
function coordToValue(coord) {
var _local1 = this;
if (_local1.m_horizontal) {
return((((coord - 1) / _local1.m_scrollableArea) * _local1.m_range) + _local1.m_minValue);
}
return(((Math.abs((coord - 1) - _local1.m_scrollableArea) / _local1.m_scrollableArea) * _local1.m_range) + _local1.m_minValue);
}
function valueToCoord(value) {
var _local1 = this;
if (_local1.m_horizontal) {
return((((value - _local1.m_minValue) / _local1.m_range) * _local1.m_scrollableArea) + 1);
}
return(((Math.abs(value - (_local1.m_range + _local1.m_minValue)) / _local1.m_range) * _local1.m_scrollableArea) + 1);
}
function onComponentKeyDown() {
var _local1 = this;
if (!_local1.m_enable) {
} else {
var increase = ((!_local1.m_horizontal) ? 38 : 39);
var decrease = ((!_local1.m_horizontal) ? 40 : 37);
var _local2 = Key.getCode();
var _local3 = (Key.isDown(17) ? (_local1.m_lgStepAmount) : (_local1.m_smStepAmount));
if (_local2 == increase) {
if (_local1.m_keyController != null) {
_local1.m_keyController.zoomIn();
} else {
_local1.setValue(_local1.m_value + _local3);
}
} else if (_local2 == decrease) {
if (_local1.m_keyController != null) {
_local1.m_keyController.zoomOut();
} else {
_local1.setValue(_local1.m_value - _local3);
}
}
}
}
var m_depth = 0;
var m_minValue = 0;
var m_maxValue = 100;
var m_range = 100;
var m_value = 0;
var m_smStepAmount = 1;
var m_lgStepAmount = 5;
var m_horizontal = true;
var m_thumbMC = null;
var m_scrollTrackMC = null;
var m_snapValues = null;
var m_snapThreshold = 0;
var m_thumbPressed = false;
var m_distanceFromCenter = 0;
var m_scrollableArea = 0;
var m_keyController = null;
}
Symbol 201 MovieClip [__Packages.FlashPaper.TreeView] Frame 0
class FlashPaper.TreeView
{
var m_treeMC, m_mainView;
function TreeView (p_mainView, p_treeMC) {
var _local1 = this;
_local1.m_treeMC = p_treeMC;
_local1.m_mainView = p_mainView;
_local1.m_mainView.addListener(_local1);
_local1.m_treeMC.setChangeHandler("change", _local1);
_local1.m_treeMC.setCursorManager(p_mainView);
_local1.rebuildTree(_local1.m_mainView.getBookmarksArray());
}
function addBookmarkNode(bm, parent) {
var _local3 = new FPUI.TreeNode(bm.publicName_str, bm);
parent.addNode(_local3);
var _local2 = bm.subBookmarks_array;
if (_local2.length > 0) {
var _local1 = 0;
while (_local1 < _local2.length) {
addBookmarkNode(_local2[_local1], _local3);
_local1++;
}
}
}
function rebuildTree(bookmarks) {
var _local2 = bookmarks;
var _local3 = new FPUI.TreeNode("", null);
var _local1 = 0;
while (_local1 < _local2.length) {
addBookmarkNode(_local2[_local1], _local3);
_local1++;
}
m_treeMC.setDataProvider(new FPUI.TreeDataProvider(_local3));
}
function onResize() {
var _local1 = this;
var _local3 = _local1.m_mainView.getSidebarWidth();
var _local2 = _local1.m_mainView.getDocViewHeight();
_local1.m_treeMC.setSize(_local3, _local2);
}
function change(eventObject) {
var _local1 = m_treeMC.getSelectedItem();
if (_local1 != null) {
var _local2 = _local1.getDataItemData();
m_mainView.goToNamedAnchor(_local2.anchorName_str);
}
}
}
Symbol 202 MovieClip [__Packages.FlashPaper.Bookmark] Frame 0
class FlashPaper.Bookmark
{
function Bookmark () {
}
}
Symbol 203 MovieClip [__Packages.FPUI.AccObject] Frame 0
class FPUI.AccObject
{
var m_type, m_state, m_defaultActionName, m_handler, m_controller;
function AccObject (accType) {
var _local1 = this;
_local1.m_type = accType;
_local1.m_state = STATE_SYSTEM_NORMAL;
_local1.m_defaultActionName = "";
_local1.m_controller = null;
_local1.m_handler = "";
}
function get_accRole(childId) {
return(m_type);
}
function set_accState(newState, enable) {
if (enable) {
m_state = m_state | newState;
} else {
m_state = m_state & (~newState);
}
}
function get_accState(childId) {
return(m_state);
}
function set_accDefaultAction(name, controller, handler) {
var _local1 = this;
_local1.m_defaultActionName = name;
_local1.m_controller = controller;
_local1.m_handler = handler;
}
function get_accDefaultAction(childId) {
return(m_defaultActionName);
}
function accDoDefaultAction(childId) {
m_controller[m_handler]();
}
static var ROLE_SYSTEM_LINK = 30;
static var ROLE_SYSTEM_SLIDER = 51;
static var ROLE_SYSTEM_TOOLBAR = 22;
static var ROLE_SYSTEM_DROPLIST = 47;
static var ROLE_SYSTEM_BUTTONDROPDOWN = 56;
static var ROLE_SYSTEM_DOCUMENT = 15;
static var ROLE_SYSTEM_SEPARATOR = 21;
static var ROLE_SYSTEM_PUSHBUTTON = 43;
static var EVENT_OBJECT_STATECHANGE = 32778;
static var EVENT_OBJECT_LOCATIONCHANGE = 32779;
static var EVENT_OBJECT_NAMECHANGE = 32780;
static var EVENT_OBJECT_DESCRIPTIONCHANGE = 32781;
static var EVENT_OBJECT_VALUECHANGE = 32782;
static var STATE_SYSTEM_NORMAL = 0;
static var STATE_SYSTEM_INVISIBLE = 32768;
static var STATE_SYSTEM_UNAVAILABLE = 1;
}
Symbol 204 MovieClip [__Packages.FlashPaper.Localization.Italian] Frame 0
class FlashPaper.Localization.Italian
{
function Italian () {
}
var DOCUMENT = "Documento Macromedia FlashPaper";
var TOOLBAR = "Barra degli strumenti di Macromedia FlashPaper";
var CONTENT = "Contenuto FlashPaper";
var PREV_PAGE = "Pagina precedente";
var NEXT_PAGE = "Pagina successiva";
var FIT_WIDTH = "Adatta larghezza";
var FIT_PAGE = "Adatta pagina";
var ZOOM_IN = "Ingrandisci";
var ZOOM_OUT = "Riduci";
var PRINT = "Stampa";
var FIND = "Trova";
var ZOOM = "Zoom";
var CURR_PAGE = "Pagina corrente";
var OVERFLOW = "Riversamento";
var PAN_TOOL = "Strumento Panoramica";
var SELECT_TEXT_TOOL = "Strumento Selezione";
var GOURL = "http://www.macromedia.com/go/flashpaper_it/";
var NOT_FOUND = "\"%\" non trovato";
}
Symbol 205 MovieClip [__Packages.FlashPaper.Localization.Spanish] Frame 0
class FlashPaper.Localization.Spanish
{
function Spanish () {
}
var DOCUMENT = "Macromedia Documento FlashPaper";
var TOOLBAR = "Macromedia Barra de herramientas de FlashPaper";
var CONTENT = "Contenido de FlashPaper";
var PREV_PAGE = "P\u00E1gina anterior";
var NEXT_PAGE = "P\u00E1gina siguiente";
var FIT_WIDTH = "Ajustar ancho";
var FIT_PAGE = "Ajustar p\u00E1gina";
var ZOOM_IN = "Acercar";
var ZOOM_OUT = "Alejar";
var PRINT = "Imprimir";
var FIND = "Buscar";
var ZOOM = "Zoom";
var CURR_PAGE = "P\u00E1gina actual";
var OVERFLOW = "Desbordamiento";
var PAN_TOOL = "Herramienta Panor\u00E1mica";
var SELECT_TEXT_TOOL = "Herramienta Selecci\u00F3n";
var GOURL = "http://www.macromedia.com/go/flashpaper_es/";
var NOT_FOUND = "\"%\" no encontrado";
}
Symbol 206 MovieClip [__Packages.FlashPaper.Localization.Korean] Frame 0
class FlashPaper.Localization.Korean
{
function Korean () {
}
var DOCUMENT = "Macromedia FlashPaper \uBB38\uC11C";
var TOOLBAR = "Macromedia FlashPaper \uB3C4\uAD6C \uBAA8\uC74C";
var CONTENT = "FlashPaper \uB0B4\uC6A9";
var PREV_PAGE = "\uC774\uC804 \uD398\uC774\uC9C0";
var NEXT_PAGE = "\uB2E4\uC74C \uD398\uC774\uC9C0";
var FIT_WIDTH = "\uB108\uBE44\uC5D0 \uB9DE\uCDA4";
var FIT_PAGE = "\uD398\uC774\uC9C0\uC5D0 \uB9DE\uCDA4";
var ZOOM_IN = "\uD655\uB300";
var ZOOM_OUT = "\uCD95\uC18C";
var PRINT = "\uC778\uC1C4";
var FIND = "\uCC3E\uAE30";
var ZOOM = "\uD655\uB300/\uCD95\uC18C";
var CURR_PAGE = "\uD604\uC7AC \uD398\uC774\uC9C0";
var OVERFLOW = "\uC624\uBC84\uD50C\uB85C";
var PAN_TOOL = "\uD328\uB2DD \uB3C4\uAD6C";
var SELECT_TEXT_TOOL = "\uC120\uD0DD \uB3C4\uAD6C";
var GOURL = "http://www.macromedia.com/go/flashpaper_kr/";
var NOT_FOUND = "\"%\"\uC774(\uAC00) \uC5C6\uC2B5\uB2C8\uB2E4.";
}
Symbol 207 MovieClip [__Packages.FlashPaper.Localization.French] Frame 0
class FlashPaper.Localization.French
{
function French () {
}
var DOCUMENT = "Document Macromedia FlashPaper";
var TOOLBAR = "Barre d'outils Macromedia FlashPaper";
var CONTENT = "Contenu FlashPaper";
var PREV_PAGE = "Page pr\u00E9c\u00E9dente";
var NEXT_PAGE = "Page suivante";
var FIT_WIDTH = "Ajuster la largeur";
var FIT_PAGE = "Ajuster la page";
var ZOOM_IN = "Zoom avant";
var ZOOM_OUT = "Zoom arri\u00E8re";
var PRINT = "Imprimer";
var FIND = "Rechercher";
var ZOOM = "Zoom";
var CURR_PAGE = "Page en cours";
var OVERFLOW = "D\u00E9bordement";
var PAN_TOOL = "Outil panoramique";
var SELECT_TEXT_TOOL = "S\u00E9lectionner un outil";
var GOURL = "http://www.macromedia.com/go/flashpaper_fr/";
var NOT_FOUND = "\"%\" est introuvable";
}
Symbol 208 MovieClip [__Packages.FlashPaper.Localization.English] Frame 0
class FlashPaper.Localization.English
{
function English () {
}
var DOCUMENT = "Macromedia FlashPaper Document";
var TOOLBAR = "Macromedia FlashPaper Toolbar";
var CONTENT = "FlashPaper Content";
var PREV_PAGE = "Previous Page";
var NEXT_PAGE = "Next Page";
var FIT_WIDTH = "Fit Width";
var FIT_PAGE = "Fit Page";
var ZOOM_IN = "Zoom In";
var ZOOM_OUT = "Zoom Out";
var PRINT = "Print";
var FIND = "Find";
var ZOOM = "Zoom";
var CURR_PAGE = "Current Page";
var OVERFLOW = "Overflow";
var PAN_TOOL = "Pan Tool";
var SELECT_TEXT_TOOL = "Select Tool";
var GOURL = "http://www.macromedia.com/go/flashpaper/";
var NOT_FOUND = "\"%\" not found";
}
Symbol 209 MovieClip [__Packages.FlashPaper.Localization.German] Frame 0
class FlashPaper.Localization.German
{
function German () {
}
var DOCUMENT = "Macromedia FlashPaper-Dokument";
var TOOLBAR = "Macromedia FlashPaper-Symbolleiste";
var CONTENT = "FlashPaper-Inhalt";
var PREV_PAGE = "Vorherige Seite";
var NEXT_PAGE = "N\u00E4chste Seite";
var FIT_WIDTH = "Breite anpassen";
var FIT_PAGE = "Seite einpassen";
var ZOOM_IN = "Vergr\u00F6\u00DFern";
var ZOOM_OUT = "Verkleinern";
var PRINT = "Drucken";
var FIND = "Suchen";
var ZOOM = "Zoom";
var CURR_PAGE = "Aktuelle Seite";
var OVERFLOW = "\u00DCberlauf";
var PAN_TOOL = "Schwenkwerkzeug";
var SELECT_TEXT_TOOL = "Auswahlwerkzeug";
var GOURL = "http://www.macromedia.com/go/flashpaper_de/";
var NOT_FOUND = "\"%\" nicht gefunden";
}
Symbol 210 MovieClip [__Packages.FlashPaper.Localization.Japanese] Frame 0
class FlashPaper.Localization.Japanese
{
function Japanese () {
}
var DOCUMENT = "Macromedia FlashPaper \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8";
var TOOLBAR = "Macromedia FlashPaper \u30C4\u30FC\u30EB\u30D0\u30FC";
var CONTENT = "FlashPaper \u30B3\u30F3\u30C6\u30F3\u30C4";
var PREV_PAGE = "\u524D\u306E\u30DA\u30FC\u30B8";
var NEXT_PAGE = "\u6B21\u306E\u30DA\u30FC\u30B8";
var FIT_WIDTH = "\u5E45\u306B\u5408\u308F\u305B\u308B";
var FIT_PAGE = "\u30DA\u30FC\u30B8\u306B\u5408\u308F\u305B\u308B";
var ZOOM_IN = "\u30BA\u30FC\u30E0\u30A4\u30F3";
var ZOOM_OUT = "\u30BA\u30FC\u30E0\u30A2\u30A6\u30C8";
var PRINT = "\u5370\u5237";
var FIND = "\u691C\u7D22";
var ZOOM = "\u30BA\u30FC\u30E0";
var CURR_PAGE = "\u73FE\u5728\u306E\u30DA\u30FC\u30B8";
var OVERFLOW = "\u30AA\u30FC\u30D0\u30FC\u30D5\u30ED\u30FC";
var PAN_TOOL = "\u30D1\u30F3\u30C4\u30FC\u30EB";
var SELECT_TEXT_TOOL = "\u9078\u629E\u30C4\u30FC\u30EB";
var GOURL = "http://www.macromedia.com/go/flashpaper_jp/";
var NOT_FOUND = "\"%\" \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093";
}
Instance of Symbol 116 MovieClip [FPUI_NButtonRound] "prevPg_mc" in Symbol 160 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconPrevPage";
m_clickHandler = "prevPageButton";
m_localName = "PREV_PAGE";
}
Instance of Symbol 116 MovieClip [FPUI_NButtonRound] "nextPg_mc" in Symbol 160 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconNextPage";
m_clickHandler = "nextPageButton";
m_localName = "NEXT_PAGE";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "findButton_mc" in Symbol 163 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconFind";
m_clickHandler = "findTextButton";
m_localName = "FIND";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "fitWidth_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconFitWidth";
m_clickHandler = "fitWidthButton";
m_localName = "FIT_WIDTH";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "fitPage_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconFitPage";
m_clickHandler = "fitPageButton";
m_localName = "FIT_PAGE";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "print_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconPrint";
m_clickHandler = "printButton";
m_localName = "PRINT";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "panTool_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconPan";
m_clickHandler = "panButton";
m_localName = "PAN_TOOL";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "selectTool_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconSelect";
m_clickHandler = "selectButton";
m_localName = "SELECT_TEXT_TOOL";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "hiddenToolsBtn_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconToolList";
m_clickHandler = "dropdownButton";
m_localName = "";
}
Instance of Symbol 121 MovieClip [FPUI_NButton] "popup_mc" in Symbol 164 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
m_iconName = "iconPopup";
m_clickHandler = "popUpWindowButton";
m_localName = "POPUP";
}
Symbol 169 Button
on (release) {
_parent._parent.controller.brandButton(this);
}
Symbol 65001 MovieClip [pageList] Frame 1
stop();