Section 1
//Action (com.adobe.indesign.Action)
package com.adobe.indesign {
public interface Action {
function get target():String;
function get eventType():String;
function execute(_arg1:IDMovieClipInternal):void;
}
}//package com.adobe.indesign
Section 2
//BaseAction (com.adobe.indesign.BaseAction)
package com.adobe.indesign {
public class BaseAction implements Action {
private var fEventType:String;
private var fTarget:String;
public function BaseAction(_arg1:String, _arg2:String){
fTarget = _arg1;
fEventType = _arg2;
}
public function set target(_arg1:String){
fTarget = _arg1;
}
public function execute(_arg1:IDMovieClipInternal):void{
}
public function get eventType():String{
return (fEventType);
}
public function get target():String{
return (fTarget);
}
}
}//package com.adobe.indesign
Section 3
//BlindsTransition (com.adobe.indesign.BlindsTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class BlindsTransition extends PDFTransition {
private var fCount:uint;
private var fHorizontal:Boolean;
public function BlindsTransition(_arg1:Boolean=true, _arg2:uint=10){
fHorizontal = _arg1;
fCount = _arg2;
}
public function get horizontal():Boolean{
return (fHorizontal);
}
public function set count(_arg1:uint):void{
fCount = _arg1;
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:uint;
var _local7:Rectangle;
var _local8:Rectangle;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
if (fCount){
if (fHorizontal){
_local9 = (_arg1.height / fCount);
_local10 = (_local9 * _arg4);
if (_local10 == 0){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
if (_local10 == _local9){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
_local6 = 0;
while (_local6 < fCount) {
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, (_local6 * _local9), _arg2.width, _local10);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, ((_local6 * _local9) + _local10), _arg1.width, (_local9 - _local10));
_arg3.endFill();
_local6++;
};
};
};
} else {
_local11 = (_arg1.width / fCount);
_local12 = (_local11 * _arg4);
if (_local12 == 0){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
if (_local12 == _local11){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
_local6 = 0;
while (_local6 < fCount) {
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect((_local6 * _local11), 0, _local12, _arg2.height);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(((_local6 * _local11) + _local12), 0, (_local11 - _local12), _arg1.height);
_arg3.endFill();
_local6++;
};
};
};
};
} else {
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
};
}
public function set horizontal(_arg1:Boolean):void{
fHorizontal = _arg1;
}
public function get count():uint{
return (fCount);
}
}
}//package com.adobe.indesign
Section 4
//CombTransition (com.adobe.indesign.CombTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class CombTransition extends PDFTransition {
private var fCount:uint;
private var fHorizontal:Boolean;
public function CombTransition(_arg1:Boolean=true, _arg2:uint=4){
fHorizontal = _arg1;
fCount = _arg2;
}
public function get horizontal():Boolean{
return (fHorizontal);
}
public function set count(_arg1:uint):void{
fCount = _arg1;
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:uint;
var _local7:uint;
var _local8:Matrix;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
if (fCount){
_local7 = (fCount * 2);
_local8 = new Matrix();
if (fHorizontal){
_local10 = (_arg2.height / _local7);
_local9 = (_arg2.width * _arg4);
_local11 = (_arg2.width - _local9);
if (_local9 == 0){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
if (_local9 == _arg2.width){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
_local8.identity();
_local8.translate(-(int(_local11)), 0);
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_local6 = 0;
while (_local6 < _local7) {
_arg3.drawRect(0, (_local6 * _local10), _local9, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(_local11, 0);
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_local6 = 1;
while (_local6 < _local7) {
_arg3.drawRect(_local11, (_local6 * _local10), _local9, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(_local9, 0);
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_local6 = 0;
while (_local6 < _local7) {
_arg3.drawRect(_local9, (_local6 * _local10), _local11, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(-(int(_local9)), 0);
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_local6 = 1;
while (_local6 < _local7) {
_arg3.drawRect(0, (_local6 * _local10), _local11, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
if ((_local7 * _local10) < _arg2.height){
_local8.identity();
_local8.translate(-(int(_local11)), 0);
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_arg3.drawRect(0, (_local7 * _local10), _local9, (_arg2.height - (_local7 * _local10)));
_arg3.endFill();
_local8.identity();
_local8.translate(_local9, 0);
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_arg3.drawRect(_local9, (_local7 * _local10), _local11, (_arg2.height - (_local7 * _local10)));
_arg3.endFill();
};
};
};
} else {
_local9 = (_arg2.width / _local7);
_local10 = (_arg2.height * _arg4);
_local12 = (_arg2.height - _local10);
if (_local10 == 0){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
if (_local10 == _arg2.height){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
_local8.identity();
_local8.translate(0, -(int(_local12)));
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_local6 = 0;
while (_local6 < _local7) {
_arg3.drawRect((_local6 * _local9), 0, _local9, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(0, _local12);
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_local6 = 1;
while (_local6 < _local7) {
_arg3.drawRect((_local6 * _local9), _local12, _local9, _local10);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(0, _local10);
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_local6 = 0;
while (_local6 < _local7) {
_arg3.drawRect((_local6 * _local9), _local10, _local9, _local12);
_local6 = (_local6 + 2);
};
_arg3.endFill();
_local8.identity();
_local8.translate(0, -(int(_local10)));
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_local6 = 1;
while (_local6 < _local7) {
_arg3.drawRect((_local6 * _local9), 0, _local9, _local12);
_local6 = (_local6 + 2);
};
_arg3.endFill();
if ((_local7 * _local9) < _arg2.width){
_local8.identity();
_local8.translate(0, -(int(_local12)));
_arg3.beginBitmapFill(_arg2, _local8, false, true);
_arg3.drawRect((_local7 * _local9), 0, (_arg2.width - (_local7 * _local9)), _local10);
_arg3.endFill();
_local8.identity();
_local8.translate(0, _local10);
_arg3.beginBitmapFill(_arg1, _local8, false, true);
_arg3.drawRect((_local7 * _local9), _local10, (_arg2.width - (_local7 * _local9)), _local12);
_arg3.endFill();
};
};
};
};
} else {
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
};
}
public function set horizontal(_arg1:Boolean):void{
fHorizontal = _arg1;
}
public function get count():uint{
return (fCount);
}
}
}//package com.adobe.indesign
Section 5
//CoverTransition (com.adobe.indesign.CoverTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class CoverTransition extends DirectionedPDFTransition {
public function CoverTransition(_arg1:uint=0){
super(_arg1);
}
private function calculateRects(_arg1:Rectangle, _arg2:Number, _arg3:Rectangle, _arg4:Point, _arg5:Rectangle, _arg6:Boolean):void{
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
_local7 = (_arg1.width * _arg2);
_local8 = (_arg1.height * _arg2);
_local9 = (_arg1.width - _local7);
_local10 = (_arg1.height - _local8);
switch (getEffectiveDirection(_arg6)){
case kRightToLeft:
_arg3.x = _local9;
_arg3.y = 0;
_arg3.width = _local7;
_arg3.height = _arg1.height;
_arg4.x = -(_arg3.x);
_arg4.y = 0;
_arg5.x = (_arg5.y = 0);
_arg5.width = _local9;
_arg5.height = _arg1.height;
break;
case kLeftToRight:
default:
_arg3.x = (_arg3.y = 0);
_arg3.width = _local7;
_arg3.height = _arg1.height;
_arg4.x = _local9;
_arg4.y = 0;
_arg5.x = _local7;
_arg5.y = 0;
_arg5.width = _local9;
_arg5.height = _arg1.height;
break;
case kBottomToTop:
_arg3.x = 0;
_arg3.y = _local10;
_arg3.width = _arg1.width;
_arg3.height = _local8;
_arg4.x = 0;
_arg4.y = -(_local10);
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _local10;
break;
case kTopToBottom:
_arg3.x = (_arg3.y = 0);
_arg3.width = _arg1.width;
_arg3.height = _local8;
_arg4.x = 0;
_arg4.y = _local10;
_arg5.x = 0;
_arg5.y = _local8;
_arg5.width = _arg1.width;
_arg5.height = _local10;
break;
case kTopLeftToBottomRight:
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _arg1.height;
_arg3.x = (_arg3.y = 0);
_arg3.width = _local7;
_arg3.height = _local8;
_arg4.x = _local9;
_arg4.y = _local10;
break;
case kBottomRightToTopLeft:
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _arg1.height;
_arg3.x = _local9;
_arg3.y = _local10;
_arg3.width = _local7;
_arg3.height = _local8;
_arg4.x = -(_arg3.x);
_arg4.y = -(_arg3.y);
break;
case kTopRightToBottomLeft:
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _arg1.height;
_arg3.x = _local9;
_arg3.y = 0;
_arg3.width = _local7;
_arg3.height = _local8;
_arg4.x = -(_arg3.x);
_arg4.y = _local10;
break;
case kBottomLeftToTopRight:
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _arg1.height;
_arg3.x = 0;
_arg3.y = _local10;
_arg3.width = _local7;
_arg3.height = _local8;
_arg4.x = _local9;
_arg4.y = -(_local10);
break;
};
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:Point;
var _local8:Rectangle;
var _local9:Matrix;
_local6 = new Rectangle();
_local7 = new Point();
_local8 = new Rectangle();
calculateRects(_arg1.rect.union(_arg2.rect), _arg4, _local8, _local7, _local6, _arg5);
_local9 = new Matrix();
if (!_local6.isEmpty()){
_arg3.beginBitmapFill(_arg1, _local9, false);
_arg3.drawRect(_local6.left, _local6.top, _local6.width, _local6.height);
_arg3.endFill();
};
if (!_local8.isEmpty()){
_local9.identity();
_local9.translate(-(_local7.x), -(_local7.y));
_arg3.beginBitmapFill(_arg2, _local9, false);
_arg3.drawRect(_local8.left, _local8.top, _local8.width, _local8.height);
_arg3.endFill();
};
}
}
}//package com.adobe.indesign
Section 6
//CurlTransition (com.adobe.indesign.CurlTransition)
package com.adobe.indesign {
import flash.display.*;
public class CurlTransition extends PDFTransition {
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
}
}
}//package com.adobe.indesign
Section 7
//DirectionedPDFTransition (com.adobe.indesign.DirectionedPDFTransition)
package com.adobe.indesign {
public class DirectionedPDFTransition extends PDFTransition {
private var fDirection:uint;
public static const kBottomToTop:uint = 90;
public static const kTopLeftToBottomRight:uint = 315;
public static const kBottomLeftToTopRight:uint = 45;
public static const kLeftToRight:uint = 0;
public static const kTopToBottom:uint = 270;
public static const kRightToLeft:uint = 180;
public static const kBottomRightToTopLeft:uint = 135;
public static const kTopRightToBottomLeft:uint = 225;
public function DirectionedPDFTransition(_arg1:uint=0){
fDirection = _arg1;
}
public function get direction():uint{
return (fDirection);
}
protected function getEffectiveDirection(_arg1:Boolean=false):uint{
if (_arg1){
switch (fDirection){
case kLeftToRight:
default:
return (kRightToLeft);
case kBottomLeftToTopRight:
return (kTopRightToBottomLeft);
case kBottomToTop:
return (kTopToBottom);
case kBottomRightToTopLeft:
return (kTopLeftToBottomRight);
case kRightToLeft:
return (kLeftToRight);
case kTopRightToBottomLeft:
return (kBottomLeftToTopRight);
case kTopToBottom:
return (kBottomToTop);
case kTopLeftToBottomRight:
return (kBottomRightToTopLeft);
};
};
return (fDirection);
}
public function set direction(_arg1:uint):void{
fDirection = _arg1;
}
}
}//package com.adobe.indesign
Section 8
//DissolveTransition (com.adobe.indesign.DissolveTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class DissolveTransition extends PDFTransition {
private var fSquareSize:Point;
private var fDissolveMap:Array;
private var fCount:uint;
private var fRows:uint;
private var fColumns:uint;
public function DissolveTransition(_arg1:uint=50){
fCount = _arg1;
}
override public function endRender():void{
fDissolveMap = null;
fSquareSize = null;
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local6 = _arg1.rect.union(_arg2.rect);
if (((((!(fDissolveMap)) && ((_local6.width > 0)))) && ((_local6.height > 0)))){
fRows = (fColumns = fCount);
if ((((fRows > 0)) && ((fColumns > 0)))){
fSquareSize = new Point(Math.min((_local6.width / fRows), 10), Math.min((_local6.height / fColumns), 10));
fRows = (_local6.width / fSquareSize.x);
fColumns = (_local6.height / fSquareSize.y);
if ((fSquareSize.x * fRows) < _local6.width){
fRows++;
};
if ((fSquareSize.y * fColumns) < _local6.height){
fColumns++;
};
fDissolveMap = new Array((fRows * fColumns));
_local7 = 0;
while (_local7 < fDissolveMap.length) {
fDissolveMap[_local7] = uint((Math.random() * 100));
_local7++;
};
};
};
if (_arg4 != 1){
_arg3.beginBitmapFill(_arg2);
_arg3.drawRect(_local6.left, _local6.top, _local6.width, _local6.height);
_arg3.endFill();
};
if (fDissolveMap){
_local8 = uint((_arg4 * 100));
_arg3.beginBitmapFill(_arg1);
_local9 = 0;
while (_local9 < fRows) {
_local10 = 0;
while (_local10 < fColumns) {
if (fDissolveMap[((_local9 * fColumns) + _local10)] >= _local8){
_local11 = (_local9 * fSquareSize.x);
_local12 = (_local10 * fSquareSize.y);
_local13 = fSquareSize.x;
_local14 = fSquareSize.y;
if ((_local11 + _local13) > _local6.width){
_local13 = ((_local6.width - _local11) - 1);
};
if ((_local12 + _local14) > _local6.height){
_local14 = ((_local6.height - _local12) - 1);
};
_arg3.drawRect(_local11, _local12, _local13, _local14);
};
_local10++;
};
_local9++;
};
_arg3.endFill();
};
}
override public function beginRender():void{
fDissolveMap = null;
fSquareSize = null;
}
}
}//package com.adobe.indesign
Section 9
//FadeTransition (com.adobe.indesign.FadeTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class FadeTransition extends PDFTransition {
private var fWorkBitmap:BitmapData;
private var fFadeIn:Boolean;
public function FadeTransition(_arg1:Boolean=true){
fFadeIn = _arg1;
}
public function set fadeIn(_arg1:Boolean):void{
fFadeIn = _arg1;
}
public function get fadeIn():Boolean{
return (fFadeIn);
}
override public function endRender():void{
if (fWorkBitmap){
fWorkBitmap.dispose();
};
fWorkBitmap = null;
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:Boolean;
_local6 = _arg1.rect.union(_arg2.rect);
if (((((!(fWorkBitmap)) || (!((fWorkBitmap.width == _local6.width))))) || (!((fWorkBitmap.height == _local6.height))))){
fWorkBitmap = new BitmapData(_local6.width, _local6.height, true, 0xFFFFFF);
};
_local7 = fFadeIn;
if (_arg5){
_local7 = !(_local7);
};
if (_local7){
fWorkBitmap.copyPixels(_arg1, _arg1.rect, _arg1.rect.topLeft);
fWorkBitmap.draw(_arg2, null, new ColorTransform(1, 1, 1, _arg4));
} else {
fWorkBitmap.copyPixels(_arg2, _arg2.rect, _arg2.rect.topLeft);
fWorkBitmap.draw(_arg1, null, new ColorTransform(1, 1, 1, (1 - _arg4)));
};
_arg3.beginBitmapFill(fWorkBitmap);
_arg3.drawRect(_local6.left, _local6.top, _local6.width, _local6.height);
_arg3.endFill();
}
override public function beginRender():void{
fWorkBitmap = null;
}
}
}//package com.adobe.indesign
Section 10
//GoToFirstFrameAction (com.adobe.indesign.GoToFirstFrameAction)
package com.adobe.indesign {
public class GoToFirstFrameAction extends BaseAction {
public function GoToFirstFrameAction(_arg1:String, _arg2:String){
super(_arg1, _arg2);
}
override public function execute(_arg1:IDMovieClipInternal):void{
_arg1.goToFirstFrame();
}
}
}//package com.adobe.indesign
Section 11
//GoToFrameAction (com.adobe.indesign.GoToFrameAction)
package com.adobe.indesign {
public class GoToFrameAction extends BaseAction {
private var fFrame:uint;
public function GoToFrameAction(_arg1:String, _arg2:String, _arg3:uint){
super(_arg1, _arg2);
fFrame = _arg3;
}
override public function execute(_arg1:IDMovieClipInternal):void{
_arg1.goToFrame(fFrame);
}
}
}//package com.adobe.indesign
Section 12
//GoToLastFrameAction (com.adobe.indesign.GoToLastFrameAction)
package com.adobe.indesign {
public class GoToLastFrameAction extends BaseAction {
public function GoToLastFrameAction(_arg1:String, _arg2:String){
super(_arg1, _arg2);
}
override public function execute(_arg1:IDMovieClipInternal):void{
_arg1.goToLastFrame();
}
}
}//package com.adobe.indesign
Section 13
//GoToNextFrameAction (com.adobe.indesign.GoToNextFrameAction)
package com.adobe.indesign {
public class GoToNextFrameAction extends BaseAction {
public function GoToNextFrameAction(_arg1:String, _arg2:String){
super(_arg1, _arg2);
}
override public function execute(_arg1:IDMovieClipInternal):void{
_arg1.goToNextFrame();
}
}
}//package com.adobe.indesign
Section 14
//GoToPreviousFrameAction (com.adobe.indesign.GoToPreviousFrameAction)
package com.adobe.indesign {
public class GoToPreviousFrameAction extends BaseAction {
public function GoToPreviousFrameAction(_arg1:String, _arg2:String){
super(_arg1, _arg2);
}
override public function execute(_arg1:IDMovieClipInternal):void{
_arg1.goToPreviousFrame();
}
}
}//package com.adobe.indesign
Section 15
//GoToURLAction (com.adobe.indesign.GoToURLAction)
package com.adobe.indesign {
import flash.net.*;
public class GoToURLAction extends BaseAction {
private var fURL:String;
public function GoToURLAction(_arg1:String, _arg2:String, _arg3:String){
super(_arg1, _arg2);
fURL = _arg3;
}
override public function execute(_arg1:IDMovieClipInternal):void{
var mc = _arg1;
try {
if (fURL){
navigateToURL(new URLRequest(fURL));
};
} catch(error:Error) {
};
}
}
}//package com.adobe.indesign
Section 16
//HyperlinkButton (com.adobe.indesign.HyperlinkButton)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
public class HyperlinkButton extends SimpleButton {
public function HyperlinkButton(){
addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
}
private function handleMouseDown(_arg1:MouseEvent):void{
var bounds:Rectangle;
var b:BitmapData;
var m:Matrix;
var p:DisplayObject;
var e = _arg1;
try {
bounds = getBounds(this);
if (!bounds.isEmpty()){
b = new BitmapData(bounds.width, bounds.height, false);
m = transform.matrix;
p = parent;
while (p != stage) {
m.concat(p.transform.matrix);
p = p.parent;
};
m.invert();
b.draw(stage, m);
installBitmap(b);
};
} finally {
removeEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
};
}
protected function installBitmap(_arg1:BitmapData):void{
}
}
}//package com.adobe.indesign
Section 17
//IDMovieClip (com.adobe.indesign.IDMovieClip)
package com.adobe.indesign {
import flash.display.*;
public interface IDMovieClip {
function goToFirstFrame(_arg1:Boolean=true):void;
function getLabelForFrame(_arg1:uint):String;
function getCurrentFrame():uint;
function goToFrame(_arg1:uint, _arg2:Boolean=true):void;
function goToPreviousFrame(_arg1:Boolean=true):void;
function goToLastFrame(_arg1:Boolean=true):void;
function goToNextFrame(_arg1:Boolean=true):void;
function getFrameCount():uint;
function getThumbnailForFrame(_arg1:uint, _arg2:uint=32, _arg3:uint=32):BitmapData;
}
}//package com.adobe.indesign
Section 18
//IDMovieClipInternal (com.adobe.indesign.IDMovieClipInternal)
package com.adobe.indesign {
import flash.display.*;
import com.adobe.indesign.*;
interface IDMovieClipInternal extends IDMovieClip {
function getNamedChild(_arg1:String):DisplayObject;
}
}//package com.adobe.indesign
Section 19
//IDSWF_Frame_1 (com.adobe.indesign.IDSWF_Frame_1)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_1 extends MovieClip {
}
}//package com.adobe.indesign
Section 20
//IDSWF_Frame_10 (com.adobe.indesign.IDSWF_Frame_10)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_10 extends MovieClip {
}
}//package com.adobe.indesign
Section 21
//IDSWF_Frame_11 (com.adobe.indesign.IDSWF_Frame_11)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_11 extends MovieClip {
}
}//package com.adobe.indesign
Section 22
//IDSWF_Frame_12 (com.adobe.indesign.IDSWF_Frame_12)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_12 extends MovieClip {
}
}//package com.adobe.indesign
Section 23
//IDSWF_Frame_13 (com.adobe.indesign.IDSWF_Frame_13)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_13 extends MovieClip {
}
}//package com.adobe.indesign
Section 24
//IDSWF_Frame_14 (com.adobe.indesign.IDSWF_Frame_14)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_14 extends MovieClip {
}
}//package com.adobe.indesign
Section 25
//IDSWF_Frame_15 (com.adobe.indesign.IDSWF_Frame_15)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_15 extends MovieClip {
}
}//package com.adobe.indesign
Section 26
//IDSWF_Frame_16 (com.adobe.indesign.IDSWF_Frame_16)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_16 extends MovieClip {
}
}//package com.adobe.indesign
Section 27
//IDSWF_Frame_2 (com.adobe.indesign.IDSWF_Frame_2)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_2 extends MovieClip {
}
}//package com.adobe.indesign
Section 28
//IDSWF_Frame_3 (com.adobe.indesign.IDSWF_Frame_3)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_3 extends MovieClip {
}
}//package com.adobe.indesign
Section 29
//IDSWF_Frame_4 (com.adobe.indesign.IDSWF_Frame_4)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_4 extends MovieClip {
}
}//package com.adobe.indesign
Section 30
//IDSWF_Frame_5 (com.adobe.indesign.IDSWF_Frame_5)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_5 extends MovieClip {
}
}//package com.adobe.indesign
Section 31
//IDSWF_Frame_6 (com.adobe.indesign.IDSWF_Frame_6)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_6 extends MovieClip {
}
}//package com.adobe.indesign
Section 32
//IDSWF_Frame_7 (com.adobe.indesign.IDSWF_Frame_7)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_7 extends MovieClip {
}
}//package com.adobe.indesign
Section 33
//IDSWF_Frame_8 (com.adobe.indesign.IDSWF_Frame_8)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_8 extends MovieClip {
}
}//package com.adobe.indesign
Section 34
//IDSWF_Frame_9 (com.adobe.indesign.IDSWF_Frame_9)
package com.adobe.indesign {
import flash.display.*;
public dynamic class IDSWF_Frame_9 extends MovieClip {
}
}//package com.adobe.indesign
Section 35
//IDSWFEmbeddedData (com.adobe.indesign.IDSWFEmbeddedData)
package com.adobe.indesign {
import flash.utils.*;
public class IDSWFEmbeddedData extends ByteArray {
}
}//package com.adobe.indesign
Section 36
//IDSWFFile (com.adobe.indesign.IDSWFFile)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
import flash.system.*;
public class IDSWFFile extends MovieClip implements IDMovieClipInternal {
private var fGrabPercent:Number;// = 0.1
private var fGrabberWidget:Sprite;
private var fTargetPoint:Point;
private var fCurrentPDFTransition:PDFTransition;
private var fTimer:Timer;
private var fShowCornerTease:Boolean;// = true
private var fStartTime:Number;
private var fSlopeAtTurn:Boolean;// = false
private var fPageSlope:Number;// = 1
private var fOriginalClickPoint:Point;
private var fPageBottom:Number;
private var fCurveShadow:Number;// = 5
private var fPageWidth:Number;
private var fTurnDuration:uint;// = 1000
private var fTurnPercent:Number;// = 0
private var fPageCenter:Number;
private var fTurnedCorner:uint;// = 0
private var fAnimatePageTurns:Boolean;// = true
private var fFrameData:Array;
private var fGrabSize:Point;
private var fPageTop:Number;
private var fShowPageSlopeAtRest:Boolean;// = false
private var fPageRight:Number;
private var fCurrentPoint:Point;
private var fTotalHeight:Number;// = 0
private var fCurrentPageBitmap:BitmapData;// = null
private var fMouseEventTarget:DisplayObject;
private var fSlopeAtTease:Boolean;// = false
private var fPDFTransitions:Array;
private var fShadowStrength:Number;// = 1.4
private var fBackgroundColor:uint;// = 0xFFFFFF
private var fAutoReverseTransitions:Boolean;// = false
private var fTargetPageBitmap:BitmapData;// = null
private var fPageHeight:Number;
private var fGrabLocation:uint;// = 1
private var fTargetPageIndex:uint;// = 0
private var fDirection:uint;// = 0
private var fPageLeft:Number;
private var fDefaultTurnDuration:uint;// = 1000
private var fState:uint;// = 0
private var fTotalWidth:Number;// = 0
private var fCornerPoint:Point;
private var fDragState:uint;// = 0
private var fConfigurationData:XML;// = null
private var fOverlayWidget:Shape;
private static const kNoCorner:uint = 0;
private static const kDragClick:uint = 1;
private static const kTurnBackward:uint = 1;
private static const kGrabCorner:uint = 1;
private static const kDragNone:uint = 0;
private static const kTurnForward:uint = 0;
private static const kGrabNone:uint = 0;
private static const kDragDragging:uint = 2;
private static const kIsCornerFlag:uint = 16;
private static const kStateReverting:uint = 3;
private static const kBottomRightCorner:uint = ((kRightEdge | kBottomEdge) | kIsCornerFlag);
private static const kStateCompleting:uint = 2;
private static const kStateNone:uint = 0;
private static const kEndingYAcceleration:Number = 0.2;
private static const kStateAutoReverting:uint = 7;
private static const kStateAutoCompleting:uint = 6;
private static const kTopLeftCorner:uint = ((kLeftEdge | kTopEdge) | kIsCornerFlag);
private static const kRightEdge:uint = 2;
private static const kStateAutoTurning:uint = 5;
private static const kBottomLeftCorner:uint = ((kLeftEdge | kBottomEdge) | kIsCornerFlag);
private static const kBottomEdge:uint = 8;
private static const kTopEdge:uint = 4;
private static const kStateTeasing:uint = 4;
private static const kTopRightCorner:uint = ((kRightEdge | kTopEdge) | kIsCornerFlag);
private static const kMouseDragDistance:Number = 4;
private static const kXAcceleration:Number = 0.2;
private static const kYAcceleration:Number = 0.4;
private static const kLeftEdge:uint = 1;
private static const kStateTurning:uint = 1;
public function IDSWFFile(){
var i:uint;
var count:uint;
fGrabPercent = 0.1;
fGrabSize = new Point();
fGrabLocation = kGrabCorner;
fShadowStrength = 1.4;
fCurveShadow = 5;
fPageSlope = 1;
fDefaultTurnDuration = 1000;
fShowCornerTease = true;
fShowPageSlopeAtRest = false;
fAutoReverseTransitions = false;
fAnimatePageTurns = true;
fSlopeAtTease = false;
fSlopeAtTurn = false;
fBackgroundColor = 0xFFFFFF;
fConfigurationData = null;
fDragState = kDragNone;
fCornerPoint = new Point();
fCurrentPoint = new Point();
fTargetPoint = new Point();
fTurnDuration = 1000;
fTurnPercent = 0;
fTurnedCorner = kNoCorner;
fTargetPageIndex = 0;
fOriginalClickPoint = new Point();
fDirection = kTurnForward;
fState = kStateNone;
fCurrentPageBitmap = null;
fTargetPageBitmap = null;
fTimer = new Timer(10);
fTotalWidth = 0;
fTotalHeight = 0;
fFrameData = [];
super();
if (stage){
stage.scaleMode = StageScaleMode.NO_SCALE;
};
InvertHyperlinkButton.kName;
InsetHyperlinkButton.kName;
readConfigurationData();
cachePageSizes();
fTimer.addEventListener(TimerEvent.TIMER, handleTimer);
addEventListener(Event.RENDER, handleRender);
if (stage){
stage.addEventListener(KeyboardEvent.KEY_UP, function (_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == Keyboard.LEFT)) || ((_arg1.keyCode == Keyboard.UP)))){
goToPreviousFrame();
} else {
if ((((_arg1.keyCode == Keyboard.RIGHT)) || ((_arg1.keyCode == Keyboard.DOWN)))){
goToNextFrame();
};
};
});
};
i = 0;
count = totalFrames;
while (i < count) {
addFrameScript(i, makeProxy(onInstallFrameStuff, (i + 1)));
i = (i + 1);
};
stop();
}
function startTimer():void{
fStartTime = NaN;
fTimer.start();
}
function handleTimer(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (fState == kStateAutoTurning){
if (isNaN(fStartTime)){
fStartTime = getTimer();
if (fCurrentPDFTransition){
fCurrentPDFTransition.beginRender();
};
};
if (fTurnDuration){
fTurnPercent = Math.min(((getTimer() - fStartTime) / fTurnDuration), 1);
} else {
fTurnPercent = 1;
};
if (!fCurrentPDFTransition){
_local2 = (fTurnPercent * Math.PI);
_local3 = (fPageWidth * Math.cos(_local2));
if (fDirection == kTurnForward){
fCurrentPoint.x = (fPageCenter + _local3);
} else {
fCurrentPoint.x = (fPageCenter - _local3);
};
_local3 = ((fPageHeight / 5) * Math.sin(_local2));
if (fTargetPoint.y < (fPageHeight / 2)){
fCurrentPoint.y = (fPageTop + _local3);
} else {
fCurrentPoint.y = (fPageBottom - _local3);
};
};
if (fTurnPercent == 1){
finishTurn();
};
} else {
_local4 = 1;
_local5 = 1;
if ((((((fState == kStateCompleting)) || ((fState == kStateReverting)))) || ((fState == kStateAutoReverting)))){
_local4 = 1.5;
} else {
if (fState == kStateAutoCompleting){
_local4 = 1.2;
_local5 = 1.5;
};
};
_local6 = (fTargetPoint.x - fCurrentPoint.x);
_local7 = (fTargetPoint.y - fCurrentPoint.y);
if (Math.abs(_local6) <= 1){
if (Math.abs(_local7) <= 0.1){
fCurrentPoint.x = (fCurrentPoint.x + _local6);
fCurrentPoint.y = (fCurrentPoint.y + _local7);
if ((((((((fState == kStateCompleting)) || ((fState == kStateReverting)))) || ((fState == kStateAutoReverting)))) || ((fState == kStateAutoCompleting)))){
finishTurn();
};
} else {
fCurrentPoint.y = (fCurrentPoint.y + ((_local7 * kEndingYAcceleration) * _local5));
};
} else {
fCurrentPoint.x = (fCurrentPoint.x + ((_local6 * kXAcceleration) * _local4));
fCurrentPoint.y = (fCurrentPoint.y + ((_local7 * kYAcceleration) * _local5));
};
};
drawPageSlopes();
performPageFlip(fCurrentPoint, fCornerPoint);
if (_arg1){
_arg1.updateAfterEvent();
};
}
private function drawPageSlopes():void{
var _local1:Graphics;
var _local2:Matrix;
if (((!(fCurrentPDFTransition)) && (((((((fShowPageSlopeAtRest) && ((fState == kStateNone)))) || (((fSlopeAtTease) && ((fState == kStateTeasing)))))) || (((((fSlopeAtTurn) && (!((fState == kStateNone))))) && (!((fState == kStateTeasing))))))))){
_local1 = fOverlayWidget.graphics;
_local2 = new Matrix();
_local2.createGradientBox((fPageWidth / 2), fPageHeight, 0, fPageCenter, fPageTop);
_local1.lineStyle();
beginRightSideGradient(_local1, _local2, 1, false);
_local1.moveTo(fPageCenter, fPageTop);
_local1.lineTo(fPageRight, fPageTop);
_local1.lineTo(fPageRight, fPageBottom);
_local1.lineTo(fPageCenter, fPageBottom);
_local1.lineTo(fPageCenter, fPageTop);
_local1.endFill();
_local2.createGradientBox(fPageWidth, fPageHeight, Math.PI, fPageLeft, fPageTop);
_local1.lineStyle();
beginLeftSideGradient(_local1, _local2, 1, false);
_local1.moveTo(fPageCenter, fPageTop);
_local1.lineTo(fPageLeft, fPageTop);
_local1.lineTo(fPageLeft, fPageBottom);
_local1.lineTo(fPageCenter, fPageBottom);
_local1.lineTo(fPageCenter, fPageTop);
_local1.endFill();
_local1.beginFill(0xFFFFFF, 0);
};
}
private function beginLeftSideGradient(_arg1:Graphics, _arg2:Matrix, _arg3:Number, _arg4:Boolean=false):void{
_arg1.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0], [(((_arg4) ? 0.08 : 0.19 * fPageSlope) * _arg3), 0], [0, 65.8], _arg2);
}
private function performPageFlip(_arg1:Point, _arg2:Point):void{
var _local3:Graphics;
_local3 = fOverlayWidget.graphics;
_local3.clear();
if (((fCurrentPDFTransition) && ((((fState == kStateAutoCompleting)) || ((fState == kStateAutoTurning)))))){
turnPageWithTransition(fCurrentPDFTransition, _local3);
} else {
handleFlipForFlexiblePages(_arg1, _arg2, _local3);
};
}
private function hitTestRegion(_arg1:Number, _arg2:Number):uint{
if ((((_arg1 >= 0)) && ((_arg1 < fGrabSize.x)))){
if ((((_arg2 >= 0)) && ((_arg2 < fGrabSize.y)))){
return (kTopLeftCorner);
};
if ((((_arg2 < fPageHeight)) && ((_arg2 >= ((fPageHeight - fGrabSize.y) - 1))))){
return (kBottomLeftCorner);
};
return (kLeftEdge);
};
if ((((_arg1 < fTotalWidth)) && ((_arg1 >= (fTotalWidth - fGrabSize.x))))){
if ((((_arg2 >= 0)) && ((_arg2 < fGrabSize.y)))){
return (kTopRightCorner);
};
if ((((_arg2 < fPageHeight)) && ((_arg2 >= ((fPageHeight - fGrabSize.y) - 1))))){
return (kBottomRightCorner);
};
return (kRightEdge);
};
return (kNoCorner);
}
private function onHandleEvent(_arg1:Event, _arg2:Action):void{
if (((_arg2) && ((fDragState == kDragNone)))){
_arg2.execute(this);
};
}
private function rasterizeFrameContents(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:Boolean=true):BitmapData{
var frameContents:DisplayObject;
var frameContentsClassName:String;
var frameContentsClass:Class;
var scale:Number;
var color:uint;
var bitmap:BitmapData;
var m:Matrix;
var sx:Number;
var sy:Number;
var frame = _arg1;
var w = _arg2;
var h = _arg3;
var opaque = _arg4;
frameContents = null;
if ((((frame == currentFrame)) && ((numChildren > 0)))){
frameContents = getChildAt(0);
};
if (((((!(frameContents)) && ((frame >= 1)))) && ((frame <= fFrameData.length)))){
frameContentsClassName = fFrameData[(frame - 1)].clsName;
try {
if (ApplicationDomain.currentDomain.hasDefinition(frameContentsClassName)){
frameContentsClass = (ApplicationDomain.currentDomain.getDefinition(frameContentsClassName) as Class);
if (frameContentsClass){
frameContents = (new (frameContentsClass) as DisplayObject);
};
};
} catch(e:Error) {
};
};
if (frameContents){
scale = 1;
if (((!((w == 0))) && (!((h == 0))))){
sx = (Number(w) / Number(fTotalWidth));
sy = (Number(h) / Number(fTotalHeight));
if (sx < sy){
scale = sx;
h = (scale * fTotalHeight);
} else {
scale = sy;
w = (scale * fTotalWidth);
};
} else {
w = fTotalWidth;
h = fTotalHeight;
};
color = fBackgroundColor;
if (opaque){
color = (color | 4278190080);
};
bitmap = new BitmapData(w, h, !(opaque), color);
m = new Matrix();
m.scale(scale, scale);
m.translate(frameContents.x, frameContents.y);
if (bitmap){
bitmap.draw(frameContents, m);
};
return (bitmap);
};
return (null);
}
public function goToLastFrame(_arg1:Boolean=true):void{
turnToPage(totalFrames, _arg1);
}
private function beginForwardUndersideCurveGradient(_arg1:Graphics, _arg2:Matrix, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
_local4 = fCurveShadow;
_local5 = (_local4 + ((fPageSlope - _local4) * _arg3));
_arg1.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0], [(0.19 * _local5), 0], [0, 65.8], _arg2, SpreadMethod.PAD);
}
private function beginRightSideGradient(_arg1:Graphics, _arg2:Matrix, _arg3:Number, _arg4:Boolean=false):void{
_arg1.beginGradientFill(GradientType.LINEAR, [0, 0xFFFFFF], [(((_arg4) ? 0.08 : 0.27 * fPageSlope) * _arg3), 0], [0, 86], _arg2);
}
private function onInstallFrameStuff(_arg1:uint):void{
var _local2:Array;
var _local3:Action;
var _local4:DisplayObject;
var _local5:Function;
hookUpHelperWidgets();
drawPageSlopes();
_local2 = getFrameActions(_arg1);
if (_local2){
for each (_local3 in _local2) {
_local4 = getNamedChild(_local3.target);
if (_local4){
_local5 = makeProxy(onHandleEvent, _local3);
_local4.addEventListener(_local3.eventType, _local5);
};
};
};
}
private function beginBackwardsUndersideCurveGradient(_arg1:Graphics, _arg2:Matrix, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
_local4 = fCurveShadow;
_local5 = (_local4 + ((fPageSlope - _local4) * _arg3));
_arg1.beginGradientFill(GradientType.LINEAR, [0, 0xFFFFFF], [(0.27 * _local5), 0], [0, 86], _arg2);
}
public function goToFirstFrame(_arg1:Boolean=true):void{
turnToPage(1, _arg1);
}
private function setCurrentPageIndex(_arg1:uint):void{
if (((!((_arg1 == currentFrame))) && ((_arg1 <= totalFrames)))){
gotoAndStop(_arg1);
dispatchEvent(new Event(Event.CHANGE));
};
}
private function hookUpHelperWidgets():void{
installOverlayWidget();
installGrabberWidget();
}
private function setUpForPageFlip(_arg1:Number, _arg2:Number, _arg3:Number=NaN):void{
fCornerPoint = findClosestCorner(_arg1, _arg2);
fCurrentPoint.x = fCornerPoint.x;
fCurrentPoint.y = fCornerPoint.y;
if (!isNaN(_arg3)){
fTargetPageIndex = _arg3;
} else {
if (fCornerPoint.x < fPageCenter){
if (!canTurnBackward()){
return;
};
fTargetPageIndex = (currentFrame - 1);
} else {
if (!canTurnForward()){
return;
};
fTargetPageIndex = (currentFrame + 1);
};
};
fCurrentPDFTransition = getPDFTransitionForPage(fTargetPageIndex);
if (fCurrentPDFTransition){
fTurnDuration = fCurrentPDFTransition.duration;
if ((fCurrentPDFTransition is CurlTransition)){
fCurrentPDFTransition = null;
};
} else {
fTurnDuration = fDefaultTurnDuration;
};
fDirection = ((fTargetPageIndex)>currentFrame) ? kTurnForward : kTurnBackward;
if (fCurrentPageBitmap){
fCurrentPageBitmap.dispose();
};
fCurrentPageBitmap = rasterizeFrameContents(currentFrame);
if (fTargetPageBitmap){
fTargetPageBitmap.dispose();
};
fTargetPageBitmap = rasterizeFrameContents(fTargetPageIndex);
startTimer();
}
public function getThumbnailForFrame(_arg1:uint, _arg2:uint=32, _arg3:uint=32):BitmapData{
return (rasterizeFrameContents(_arg1, _arg2, _arg3, false));
}
private function getEventLocation(_arg1:MouseEvent):Point{
return (globalToLocal(new Point(_arg1.stageX, _arg1.stageY)));
}
public function turnToPage(_arg1:uint, _arg2:Boolean=true):void{
if (_arg1 != currentFrame){
if (((((!(fAnimatePageTurns)) || (!(_arg2)))) || ((getPDFTransitionForPage(_arg1) is NoneTransition)))){
setCurrentPageIndex(_arg1);
} else {
finishTurn();
fTargetPoint.y = fPageHeight;
fTurnPercent = 0;
setState(kStateAutoTurning);
if (_arg1 > currentFrame){
fTargetPoint.x = (fPageCenter - fPageWidth);
setUpForPageFlip((fPageCenter + fPageWidth), fPageHeight, _arg1);
} else {
fTargetPoint.x = (fPageCenter + fPageWidth);
setUpForPageFlip((fPageCenter - fPageWidth), fPageHeight, _arg1);
};
handleTimer(null);
};
};
}
private function readConfigurationData():void{
var _local1:ByteArray;
var _local2:XMLList;
var _local3:XMLList;
var _local4:XMLList;
var _local5:XML;
var _local6:String;
var _local7:uint;
var _local8:XML;
var _local9:String;
var _local10:String;
var _local11:PDFTransition;
_local1 = new IDSWFEmbeddedData();
if (((_local1) && (_local1.length))){
fConfigurationData = new XML(_local1.readUTFBytes(_local1.length));
};
if (fConfigurationData){
_local2 = fConfigurationData.Frames;
_local3 = fConfigurationData.Book;
_local4 = fConfigurationData.Transitions.*;
if (_local2.length()){
_local6 = _local2.@ns;
_local7 = 1;
_local2 = _local2.Frame;
for each (_local8 in _local2) {
_local9 = _local8.@c;
_local10 = _local8.@l;
if (_local6.length){
_local9 = ((_local6 + ".") + _local9);
};
if (!_local10.length){
_local10 = String(_local7);
};
fFrameData.push({clsName:_local9, frameLabel:_local10});
_local7++;
};
};
if (_local3.length()){
if (_local3.hasOwnProperty("@w")){
fTotalWidth = Number(_local3.@w);
};
if (_local3.hasOwnProperty("@h")){
fTotalHeight = Number(_local3.@h);
};
if (_local3.hasOwnProperty("@grabpct")){
fGrabPercent = (Number(_local3.@grabpct) / 100);
};
if (_local3.hasOwnProperty("@shadowstrength")){
fShadowStrength = Number(_local3.@shadowstrength);
};
if (_local3.hasOwnProperty("@curveshadow")){
fCurveShadow = Number(_local3.@curveshadow);
};
if (_local3.hasOwnProperty("@pageslope")){
fPageSlope = Number(_local3.@pageslope);
};
if (_local3.hasOwnProperty("@duration")){
fDefaultTurnDuration = Number(_local3.@duration);
};
if (_local3.hasOwnProperty("@tease")){
fShowCornerTease = isTrue(_local3.@tease);
};
if (_local3.hasOwnProperty("@slopeatrest")){
fShowPageSlopeAtRest = isTrue(_local3.@slopeatrest);
};
if (_local3.hasOwnProperty("@autoreverse")){
fAutoReverseTransitions = isTrue(_local3.@autoreverse);
};
if (_local3.hasOwnProperty("@animateturns")){
fAnimatePageTurns = isTrue(_local3.@animateturns);
};
if (_local3.hasOwnProperty("@slopeattease")){
fSlopeAtTease = isTrue(_local3.@slopeattease);
};
if (_local3.hasOwnProperty("@slopeatturn")){
fSlopeAtTurn = isTrue(_local3.@slopeatturn);
};
if (_local3.hasOwnProperty("@bgcolor")){
fBackgroundColor = (uint(_local3.@bgcolor) & 0xFFFFFF);
};
} else {
fShowCornerTease = false;
fShowPageSlopeAtRest = false;
fGrabLocation = kGrabNone;
};
for each (_local5 in _local4) {
_local11 = null;
switch (_local5.name().toString().toLowerCase()){
case "blinds":
_local11 = new BlindsTransition(isHorizontalOrientation(_local5.@o), (_local5.hasOwnProperty("@c")) ? int(_local5.@c) : 10);
break;
case "cover":
_local11 = new CoverTransition(getDirection(_local5.@d));
break;
case "push":
_local11 = new PushTransition(getDirection(_local5.@d));
break;
case "uncover":
_local11 = new UncoverTransition(getDirection(_local5.@d));
break;
case "wipe":
_local11 = new WipeTransition(getDirection(_local5.@d));
break;
case "fade":
_local11 = new FadeTransition();
break;
case "iris":
_local11 = new IrisTransition(isInward(_local5.@d));
break;
case "split":
_local11 = new SplitTransition(isHorizontalOrientation(_local5.@o), isInward(_local5.@d));
break;
case "comb":
_local11 = new CombTransition(isHorizontalOrientation(_local5.@o), (_local5.hasOwnProperty("@c")) ? int(_local5.@c) : 4);
break;
case "dissolve":
_local11 = new DissolveTransition();
break;
case "zoom":
_local11 = new ZoomTransition(getDirection(_local5.@d), isInward(_local5.@i));
break;
case "none":
_local11 = new NoneTransition();
break;
case "curl":
_local11 = new CurlTransition();
break;
};
if (_local11){
if (_local5.hasOwnProperty("@f")){
_local11.pageIndex = int(_local5.@f);
};
if (_local5.hasOwnProperty("@s")){
_local11.duration = int(_local5.@s);
};
if (!fPDFTransitions){
fPDFTransitions = [];
};
fPDFTransitions.push(_local11);
};
};
};
}
private function findClosestCorner(_arg1:Number, _arg2:Number):Point{
var _local3:Number;
var _local4:Number;
var _local5:Point;
_local3 = (fTotalWidth / 2);
_local4 = (fPageHeight / 2);
_local5 = new Point();
_local5.x = ((_arg1)<_local3) ? 0 : fTotalWidth;
_local5.y = ((_arg2)<_local4) ? 0 : fPageHeight;
return (_local5);
}
private function installOverlayWidget():void{
if (!fOverlayWidget){
fOverlayWidget = new Shape();
};
addChild(fOverlayWidget);
fOverlayWidget.graphics.clear();
}
private function handleGrabberMouseMove(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:uint;
_local2 = getEventLocation(_arg1);
_local3 = ((_arg1.type)!=MouseEvent.ROLL_OUT) ? hitTestRegion(_local2.x, _local2.y) : kNoCorner;
if ((((fState == kStateNone)) && (!((_local3 == kNoCorner))))){
if (((((((!(fShowCornerTease)) || (!(isCorner(_local3))))) || (((isLeftEdge(_local3)) && (!(canTurnBackward())))))) || (((isRightEdge(_local3)) && (!(canTurnForward())))))){
return;
};
setState(kStateTeasing);
fTurnedCorner = _local3;
fTargetPoint.x = _local2.x;
fTargetPoint.y = _local2.y;
setUpForPageFlip(_local2.x, _local2.y);
handleTimer(null);
};
if (fState == kStateTeasing){
if (_local3 == fTurnedCorner){
fTargetPoint.x = _local2.x;
fTargetPoint.y = _local2.y;
} else {
switch (fTurnedCorner){
case kTopLeftCorner:
fTargetPoint.x = (fPageLeft + 1);
fTargetPoint.y = (fPageTop + 1);
break;
case kTopRightCorner:
fTargetPoint.x = (fPageRight - 1);
fTargetPoint.y = (fPageTop + 1);
break;
case kBottomLeftCorner:
fTargetPoint.x = (fPageLeft + 1);
fTargetPoint.y = (fPageBottom - 1);
break;
case kBottomRightCorner:
fTargetPoint.x = (fPageRight - 1);
fTargetPoint.y = (fPageBottom - 1);
break;
};
setState(kStateAutoReverting);
handleTimer(null);
};
_arg1.updateAfterEvent();
};
}
function handleMouseMove(_arg1:MouseEvent):void{
var _local2:Point;
if (fDragState != kDragNone){
_local2 = getEventLocation(_arg1);
if ((((fDragState == kDragClick)) && (isMouseDrag(_arg1)))){
fDragState = kDragDragging;
};
fTargetPoint.x = _local2.x;
fTargetPoint.y = _local2.y;
handleTimer(null);
};
_arg1.updateAfterEvent();
}
private function turnPageWithTransition(_arg1:PDFTransition, _arg2:Graphics):void{
var _local3:Boolean;
if (_arg1){
if (((fCurrentPageBitmap) && (fTargetPageBitmap))){
_local3 = ((fAutoReverseTransitions) && ((fDirection == kTurnBackward)));
_arg1.render(fCurrentPageBitmap, fTargetPageBitmap, _arg2, fTurnPercent, _local3);
} else {
finishTurn();
};
};
}
private function beginTopPageGradient(_arg1:Graphics, _arg2:Matrix):void{
_arg1.beginGradientFill(GradientType.LINEAR, [0, 0], [(0.9 * fShadowStrength), 0], [0, 131.61], _arg2, SpreadMethod.PAD);
}
private function beginShadowOnRevealedPage(_arg1:Graphics, _arg2:Matrix, _arg3:Number):void{
_arg1.beginGradientFill(GradientType.LINEAR, [0, 0], [((1.8 * (1 - _arg3)) * fShadowStrength), 0], [0, 200], _arg2);
}
private function installGrabberWidget():void{
var _local1:Graphics;
if (!fGrabberWidget){
fGrabberWidget = new Sprite();
fGrabberWidget.addEventListener(MouseEvent.MOUSE_DOWN, handleGrabberMouseDown);
fGrabberWidget.addEventListener(MouseEvent.MOUSE_MOVE, handleGrabberMouseMove);
fGrabberWidget.addEventListener(MouseEvent.ROLL_OVER, handleGrabberMouseMove);
fGrabberWidget.addEventListener(MouseEvent.ROLL_OUT, handleGrabberMouseMove);
};
_local1 = fGrabberWidget.graphics;
_local1.clear();
_local1.beginFill(0xFFFF00, 0);
fGrabSize.x = (fTotalWidth * fGrabPercent);
fGrabSize.y = (fPageHeight * fGrabPercent);
switch (fGrabLocation){
case kGrabNone:
break;
case kGrabCorner:
_local1.drawRect(fPageLeft, fPageTop, fGrabSize.x, fGrabSize.y);
_local1.drawRect(fPageLeft, (fPageBottom - fGrabSize.y), fGrabSize.x, fGrabSize.y);
_local1.drawRect((fPageRight - fGrabSize.x), fPageTop, fGrabSize.x, fGrabSize.y);
_local1.drawRect((fPageRight - fGrabSize.x), (fPageBottom - fGrabSize.y), fGrabSize.x, fGrabSize.y);
break;
};
_local1.endFill();
addChild(fGrabberWidget);
setChildIndex(fGrabberWidget, (numChildren - 1));
}
private function makeProxy(_arg1:Function, ... _args):Function{
var f = _arg1;
var args = _args;
return (function (... _args):void{
f.apply(this, _args.concat(args));
});
}
private function drawPoly(_arg1:Graphics, _arg2:Array):void{
var _local3:uint;
_arg1.moveTo(_arg2[0].x, _arg2[0].y);
_local3 = 1;
while (_local3 < _arg2.length) {
_arg1.lineTo(_arg2[_local3].x, _arg2[_local3].y);
_local3++;
};
_arg1.lineTo(_arg2[0].x, _arg2[0].y);
}
private function isImpossibleDrag(_arg1:Point, _arg2:Point, _arg3:uint):Boolean{
switch (_arg3){
case kTopLeftCorner:
if ((((_arg1.x < _arg2.x)) && ((_arg1.y < _arg2.y)))){
return (true);
};
break;
case kTopRightCorner:
if ((((_arg1.x > _arg2.x)) && ((_arg1.y < _arg2.y)))){
return (true);
};
break;
case kBottomLeftCorner:
if ((((_arg1.x < _arg2.x)) && ((_arg1.y > _arg2.y)))){
return (true);
};
break;
case kBottomRightCorner:
if ((((_arg1.x > _arg2.x)) && ((_arg1.y > _arg2.y)))){
return (true);
};
break;
};
return (false);
}
function handleMouseUp(_arg1:MouseEvent):void{
var _local2:Point;
if (fDragState != kDragNone){
_local2 = getEventLocation(_arg1);
if (fMouseEventTarget){
fMouseEventTarget.removeEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove);
fMouseEventTarget.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
fMouseEventTarget = null;
};
if (isImpossibleDrag(_local2, fCornerPoint, fTurnedCorner)){
finishTurn();
} else {
if (fDragState == kDragClick){
setState(kStateAutoTurning);
fTargetPoint.x = ((fDirection)==kTurnForward) ? fPageLeft : fPageRight;
} else {
if (fDirection == kTurnForward){
if (_local2.x < (fPageCenter + (fPageWidth / 2))){
fTargetPoint.x = fPageLeft;
setState(kStateCompleting);
} else {
fTargetPoint.x = fPageRight;
setState(kStateReverting);
};
} else {
if (_local2.x > (fPageWidth / 2)){
fTargetPoint.x = fPageRight;
setState(kStateCompleting);
} else {
fTargetPoint.x = fPageLeft;
setState(kStateReverting);
};
};
};
};
fTargetPoint.y = fCornerPoint.y;
_arg1.updateAfterEvent();
fDragState = kDragNone;
};
}
private function handleFlipForFlexiblePages(_arg1:Point, _arg2:Point, _arg3:Graphics):void{
var _local4:Number;
var _local5:Number;
var _local6:Point;
var _local7:Point;
var _local8:Point;
var _local9:Point;
var _local10:Point;
var _local11:Point;
var _local12:Point;
var _local13:Number;
var _local14:Vector;
var _local15:Number;
var _local16:Vector;
var _local17:Vector;
var _local18:Point;
var _local19:Point;
var _local20:Point;
var _local21:Point;
var _local22:Point;
var _local23:Point;
var _local24:Number;
var _local25:Number;
var _local26:Array;
var _local27:Array;
var _local28:Array;
var _local29:Array;
var _local30:Point;
var _local31:Vector;
var _local32:Number;
var _local33:Matrix;
var _local34:Boolean;
var _local35:Vector;
var _local36:Number;
var _local37:Vector;
var _local38:Vector;
var _local39:Vector;
var _local40:Point;
var _local41:Vector;
var _local42:Number;
var _local43:Vector;
var _local44:Number;
if (_arg2.x > fPageCenter){
_local4 = fPageRight;
_local5 = fPageLeft;
} else {
_local4 = fPageLeft;
_local5 = fPageRight;
};
if (fState == kStateTurning){
if (isImpossibleDrag(_arg1, _arg2, fTurnedCorner)){
return;
};
};
if (_arg1.x > fPageRight){
_arg1.x = fPageRight;
} else {
if (_arg1.x < fPageLeft){
_arg1.x = fPageLeft;
};
};
_local6 = new Point(fPageCenter, fPageTop);
_local7 = new Point(fPageCenter, fPageHeight);
_local8 = new Point(_local4, fPageTop);
_local9 = new Point(_local5, fPageTop);
_local10 = new Point(_local4, fPageHeight);
_local11 = new Point(_local5, fPageHeight);
_local12 = ((_arg1.y)<=_arg2.y) ? _local7 : _local6;
_local13 = new Vector(_local12, _arg2).length;
_local14 = new Vector(_local12, _arg1);
_local15 = _local14.length;
if (_local15 > _local13){
_local14.length = _local13;
_arg1 = _local14.fP1.clone();
};
_local16 = new Vector(_arg1, _arg2);
_local17 = _local16.clone();
_local16.clone().length = (_local17.length / 2);
_local18 = _local17.fP1.clone();
_local17.perp();
_local17.moveTo(_local18);
_local17.normalize();
_local24 = _local17.xForY(fPageTop);
if (Math.abs((_local24 - fPageCenter)) < Math.abs((_local4 - fPageCenter))){
_local37 = new Vector(new Point(_local24, fPageTop), _local8);
_local37.reflect(_local17);
_local23 = _local37.fP1;
_local20 = _local23;
_local19 = _local37.fP0;
} else {
_local19 = new Point(_local4, _local17.yForX(_local4));
_local20 = _local19;
_local38 = new Vector(_local20, _local8);
_local38.reflect(_local17);
_local23 = _local38.fP1;
};
_local25 = _local17.xForY(fPageHeight);
if (Math.abs((_local25 - fPageCenter)) < Math.abs((_local4 - fPageCenter))){
_local39 = new Vector(new Point(_local25, fPageHeight), _local10);
_local39.reflect(_local17);
_local22 = _local39.fP1;
_local21 = _local39.fP0;
} else {
_local21 = new Point(_local4, _local17.yForX(_local4));
_local22 = _local21;
};
_local26 = [];
_local27 = [];
_local28 = [];
_local29 = [];
if (_local16.length2 > 0.1){
if (_local19.y > fPageTop){
_local27.push(_local8);
};
_local27.push(_local19);
_local27.push(_local21);
if (_local21.y < fPageHeight){
_local27.push(_local10);
};
} else {
_local27.push(_local8);
_local27.push(_local10);
};
for each (_local30 in _local27) {
_local26.push(_local30);
};
_local26.unshift(_local6);
_local26.push(_local7);
_local27.unshift(_local9);
_local27.push(_local11);
_local28.push(_local19);
if (_local19.y == fPageTop){
_local28.push(_local8);
};
if (_local21.y == fPageHeight){
_local28.push(_local10);
};
_local28.push(_local21);
if (fDirection == kTurnForward){
_local31 = new Vector(_local22, _local20);
} else {
_local40 = _local20;
_local20 = _local19;
_local19 = _local40;
_local40 = _local22;
_local22 = _local21;
_local21 = _local40;
_local31 = new Vector(_local21, _local19);
_local41 = _local31.clone();
_local41.perp();
_local41.length = (fPageWidth * 2);
_local41.moveTo(_local23);
_local23 = _local41.fP1;
};
_local29.push(_local20);
_local29.push(_local19);
_local29.push(_local21);
_local29.push(_local22);
if (fDirection == kTurnForward){
_local32 = (1 - ((_arg1.x - fPageLeft) / (2 * fPageWidth)));
} else {
_local32 = ((_arg1.x - fPageLeft) / (2 * fPageWidth));
};
_local33 = new Matrix();
_local33.identity();
if (fCurrentPageBitmap != null){
if (fDirection == kTurnForward){
_local33.tx = fPageLeft;
_local33.ty = fPageTop;
_arg3.beginBitmapFill(fCurrentPageBitmap, _local33, false, true);
} else {
_local33.tx = _local4;
_local33.ty = fPageTop;
_arg3.beginBitmapFill(fCurrentPageBitmap, _local33, false, true);
};
} else {
_arg3.beginFill(fBackgroundColor);
};
drawPoly(_arg3, _local26);
_arg3.endFill();
_local34 = false;
if (((fSlopeAtTease) && ((fState == kStateTeasing)))){
_local34 = true;
} else {
if (((((((fSlopeAtTurn) && (!((fState == kStateNone))))) && (!((fState == kStateTeasing))))) && (!((fState == kStateAutoReverting))))){
_local34 = true;
};
};
if (_local34){
_local42 = Math.min(((Math.abs((_arg1.x - _arg2.x)) / fPageWidth) * 2), 1);
if (fDirection == kTurnForward){
_local33.createGradientBox(fPageWidth, fPageHeight, 0, fPageCenter, fPageTop);
beginRightSideGradient(_arg3, _local33, _local42);
} else {
_local33.createGradientBox(fPageWidth, fPageHeight, Math.PI, fPageLeft, fPageTop);
beginLeftSideGradient(_arg3, _local33, _local42);
};
drawPoly(_arg3, _local26);
_arg3.endFill();
};
if (_local16.length2 > 0.1){
_local35 = new Vector(_local18, _arg1);
_local36 = (_local35.length * 1.2);
_local33.identity();
if (_local36 > 12){
_local33.scale((_local36 / 1638.4), (50 / 1638.4));
_local33.rotate((_local17.angle + Math.PI));
_local33.translate((_local18.x + (_local35.x / 2)), (_local18.y + (_local35.y / 2)));
beginTopPageGradient(_arg3, _local33);
drawPoly(_arg3, _local27);
_arg3.endFill();
};
_local43 = new Vector(_local18, _arg2);
_local44 = _local43.length;
_local33.identity();
if (_local44 > 1){
_local33.scale((_local44 / 1638.4), (50 / 1638.4));
if (fDirection == kTurnForward){
_local33.rotate(_local17.angle);
_local33.translate((_local18.x + (_local43.x / 2)), (_local18.y + (_local43.y / 2)));
beginShadowOnRevealedPage(_arg3, _local33, _local32);
} else {
_local33.rotate(_local17.angle);
_local33.translate((_local18.x + (_local43.x / 2)), (_local18.y + (_local43.y / 2)));
beginShadowOnRevealedPage(_arg3, _local33, _local32);
};
drawPoly(_arg3, _local28);
_arg3.endFill();
};
if (fTargetPageBitmap != null){
_local33.identity();
_local33.rotate(Math.atan2(_local31.x, -(_local31.y)));
_local33.tx = _local23.x;
_local33.ty = _local23.y;
_arg3.beginBitmapFill(fTargetPageBitmap, _local33, true, true);
drawPoly(_arg3, _local29);
_arg3.endFill();
_local33.identity();
_local33.tx = fPageLeft;
_local33.ty = fPageTop;
_arg3.beginBitmapFill(fTargetPageBitmap, _local33, true, true);
drawPoly(_arg3, _local28);
_arg3.endFill();
} else {
_arg3.beginFill(fBackgroundColor);
drawPoly(_arg3, _local29);
drawPoly(_arg3, _local28);
_arg3.endFill();
};
_arg3.lineStyle();
_local35 = new Vector(_local18, _arg1);
_local36 = _local35.length;
if (_local36 > 10){
_local33.identity();
_local33.scale((_local36 / 1638.4), (50 / 1638.4));
_local33.rotate((_local17.angle + Math.PI));
_local33.translate((_local18.x + (_local35.x / 2)), (_local18.y + (_local35.y / 2)));
if (fDirection == kTurnForward){
beginForwardUndersideCurveGradient(_arg3, _local33, _local32);
} else {
beginBackwardsUndersideCurveGradient(_arg3, _local33, _local32);
};
drawPoly(_arg3, _local29);
_arg3.endFill();
};
};
}
private function getFrameActions(_arg1:uint):Array{
var actions:Array;
var actionList:XMLList;
var eventType:String;
var unknown:String;
var a:XML;
var frame = _arg1;
actions = new Array();
if (fConfigurationData){
actionList = fConfigurationData.Actions.*.(@f == frame);
for each (a in actionList) {
if (a.hasOwnProperty("@e")){
switch (a.@e.toLowerCase()){
case "u":
default:
eventType = MouseEvent.CLICK;
break;
case "d":
eventType = MouseEvent.MOUSE_DOWN;
break;
case "o":
eventType = MouseEvent.MOUSE_OVER;
break;
case "x":
eventType = MouseEvent.MOUSE_OUT;
break;
case "b":
eventType = FocusEvent.FOCUS_OUT;
break;
case "f":
eventType = FocusEvent.FOCUS_IN;
break;
};
} else {
eventType = MouseEvent.CLICK;
};
switch (a.name().localName.toLowerCase()){
case "last":
actions.push(new GoToLastFrameAction(a.@t, eventType));
break;
case "first":
actions.push(new GoToFirstFrameAction(a.@t, eventType));
break;
case "next":
actions.push(new GoToNextFrameAction(a.@t, eventType));
break;
case "previous":
actions.push(new GoToPreviousFrameAction(a.@t, eventType));
break;
case "goto":
actions.push(new GoToFrameAction(a.@t, eventType, uint(a.@i)));
break;
case "url":
actions.push(new GoToURLAction(a.@t, eventType, a.@u));
break;
case "show":
actions.push(createShowHideAction(a.@t, eventType, a));
break;
default:
break;
};
};
};
return (actions);
}
private function setState(_arg1:uint):void{
fState = _arg1;
}
private function createShowHideAction(_arg1:String, _arg2:String, _arg3:XML):Action{
var _local4:XMLList;
var _local5:Array;
var _local6:XML;
var _local7:Dictionary;
var _local8:String;
_local4 = _arg3.Fields.Field;
_local5 = new Array();
for each (_local6 in _local4) {
_local7 = new Dictionary();
_local7["n"] = _local6.@n;
_local8 = _local6.@v;
if (!_local8){
_local8 = "h";
};
switch (_local8.toLowerCase()){
case "s":
default:
_local7["v"] = ShowHideAction.kShow;
break;
case "h":
_local7["v"] = ShowHideAction.kHide;
break;
case "t":
_local7["v"] = ShowHideAction.kToggle;
break;
};
_local5.push(_local7);
};
return (new ShowHideAction(_arg1, _arg2, _local5));
}
function isMouseDrag(_arg1:MouseEvent):Boolean{
var _local2:Point;
var _local3:int;
var _local4:int;
_local2 = getEventLocation(_arg1);
_local3 = (_local2.x - fOriginalClickPoint.x);
_local4 = (_local2.y - fOriginalClickPoint.y);
return ((Math.sqrt(((_local3 * _local3) + (_local4 * _local4))) > kMouseDragDistance));
}
private function canTurnBackward():Boolean{
return ((currentFrame > 1));
}
public function getNamedChild(_arg1:String):DisplayObject{
var _local2:DisplayObject;
var _local3:DisplayObjectContainer;
_local2 = getChildByName(_arg1);
if (((!(_local2)) && ((numChildren > 0)))){
_local3 = (getChildAt(0) as DisplayObjectContainer);
if (_local3){
_local2 = _local3.getChildByName(_arg1);
};
};
return (_local2);
}
public function getLabelForFrame(_arg1:uint):String{
if ((((_arg1 >= 1)) && ((_arg1 <= totalFrames)))){
return (fFrameData[(_arg1 - 1)].frameLabel);
};
return ("");
}
private function getPDFTransitionForPage(_arg1:uint):PDFTransition{
var _local2:PDFTransition;
if ((((_arg1 >= 0)) && (!((fPDFTransitions == null))))){
for each (_local2 in fPDFTransitions) {
if (_local2.pageIndex == _arg1){
return (_local2);
};
};
for each (_local2 in fPDFTransitions) {
if (_local2.pageIndex == -1){
return (_local2);
};
};
};
return (null);
}
public function getFrameCount():uint{
return (totalFrames);
}
public function goToFrame(_arg1:uint, _arg2:Boolean=true):void{
turnToPage(_arg1, _arg2);
}
function handleGrabberMouseDown(_arg1:MouseEvent):void{
var _local2:Point;
var _local3:uint;
_local2 = getEventLocation(_arg1);
if (_local2.x < fPageCenter){
if (!canTurnBackward()){
return;
};
} else {
if (!canTurnForward()){
return;
};
};
fOriginalClickPoint.x = _local2.x;
fOriginalClickPoint.y = _local2.y;
fDragState = kDragClick;
if (fState != kStateTeasing){
_local3 = hitTestRegion(_local2.x, _local2.y);
switch (fGrabLocation){
case kGrabNone:
return;
case kGrabCorner:
if (!isCorner(_local3)){
return;
};
break;
};
finishTurn();
setUpForPageFlip(_local2.x, _local2.y);
};
fMouseEventTarget = (stage) ? stage : parent;
fMouseEventTarget.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove);
fMouseEventTarget.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
setState(kStateTurning);
fTargetPoint.x = _local2.x;
fTargetPoint.y = _local2.y;
handleTimer(null);
}
private function finishTurn():void{
fTimer.stop();
if ((((((fState == kStateCompleting)) || ((fState == kStateAutoTurning)))) || ((fState == kStateAutoCompleting)))){
setCurrentPageIndex(fTargetPageIndex);
};
setState(kStateNone);
if (fCurrentPageBitmap){
fCurrentPageBitmap.dispose();
fCurrentPageBitmap = null;
};
if (fTargetPageBitmap){
fTargetPageBitmap.dispose();
fTargetPageBitmap = null;
};
if (stage){
stage.invalidate();
};
}
private function canTurnForward():Boolean{
return ((currentFrame < totalFrames));
}
function handleRender(_arg1:Event):void{
fOverlayWidget.graphics.clear();
drawPageSlopes();
}
private function cachePageSizes():void{
if ((((fTotalWidth == 0)) || ((fTotalHeight == 0)))){
if (stage){
fTotalWidth = stage.stageWidth;
fTotalHeight = stage.stageHeight;
} else {
fTotalWidth = width;
fTotalHeight = height;
};
};
fPageWidth = (fTotalWidth / 2);
fPageHeight = (fTotalHeight - 1);
fPageCenter = (fTotalWidth / 2);
fPageLeft = 0;
fPageTop = 0;
fPageRight = ((fPageLeft + fTotalWidth) - 1);
fPageBottom = ((fPageTop + fTotalHeight) - 1);
}
public function goToPreviousFrame(_arg1:Boolean=true):void{
if (currentFrame > 1){
turnToPage((currentFrame - 1), _arg1);
};
}
public function getCurrentFrame():uint{
return (currentFrame);
}
public function goToNextFrame(_arg1:Boolean=true):void{
if (currentFrame < totalFrames){
turnToPage((currentFrame + 1), _arg1);
};
}
private static function isRightEdge(_arg1:uint):Boolean{
return (!(((_arg1 & kRightEdge) == 0)));
}
private static function isHorizontalOrientation(_arg1:String):Boolean{
return (((_arg1) && ((_arg1.toLowerCase() == "h"))));
}
private static function isCorner(_arg1:uint):Boolean{
return (!(((_arg1 & kIsCornerFlag) == 0)));
}
private static function isEdge(_arg1:uint):Boolean{
return (!(((_arg1 & (kLeftEdge | kRightEdge)) == 0)));
}
private static function isLeftEdge(_arg1:uint):Boolean{
return (!(((_arg1 & kLeftEdge) == 0)));
}
private static function isTrue(_arg1:String):Boolean{
return (((_arg1) && ((_arg1.toLowerCase() == "t"))));
}
private static function getDirection(_arg1:String):uint{
switch (_arg1.toLowerCase()){
case "r":
default:
return (DirectionedPDFTransition.kLeftToRight);
case "l":
return (DirectionedPDFTransition.kRightToLeft);
case "d":
return (DirectionedPDFTransition.kTopToBottom);
case "u":
return (DirectionedPDFTransition.kBottomToTop);
case "rd":
return (DirectionedPDFTransition.kTopLeftToBottomRight);
case "ld":
return (DirectionedPDFTransition.kTopRightToBottomLeft);
case "ru":
return (DirectionedPDFTransition.kBottomLeftToTopRight);
case "lu":
return (DirectionedPDFTransition.kBottomRightToTopLeft);
};
}
private static function isInward(_arg1:String):Boolean{
return (((_arg1) && ((_arg1.toLowerCase() == "i"))));
}
}
}//package com.adobe.indesign
Section 37
//InsetHyperlinkButton (com.adobe.indesign.InsetHyperlinkButton)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class InsetHyperlinkButton extends HyperlinkButton {
private static const kDarkShadow:uint = 4278190080;
public static const kName:String = "inset";
private static const kHilight:uint = 4294967295;
private static const kLightShadow:uint = 4278190080;
override protected function installBitmap(_arg1:BitmapData):void{
var _local2:BitmapData;
_local2 = new BitmapData(_arg1.width, _arg1.height, false, kLightShadow);
_local2.copyPixels(_arg1, new Rectangle(0, 0, _arg1.width, _arg1.height), new Point(2, 2));
_local2.fillRect(new Rectangle(0, 0, _arg1.width, 1), kDarkShadow);
_local2.fillRect(new Rectangle(0, 1, 1, _arg1.height), kDarkShadow);
_local2.fillRect(new Rectangle((_arg1.width - 1), 1, 1, _arg1.height), kHilight);
_local2.fillRect(new Rectangle(1, (_arg1.height - 1), _arg1.width, 1), kHilight);
downState = new Bitmap(_local2, PixelSnapping.AUTO, true);
}
}
}//package com.adobe.indesign
Section 38
//InvertHyperlinkButton (com.adobe.indesign.InvertHyperlinkButton)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class InvertHyperlinkButton extends HyperlinkButton {
public static const kName:String = "invert";
override protected function installBitmap(_arg1:BitmapData):void{
_arg1.colorTransform(new Rectangle(0, 0, _arg1.width, _arg1.height), new ColorTransform(-1, -1, -1, 1, 0xFF, 0xFF, 0xFF));
downState = new Bitmap(_arg1, PixelSnapping.NEVER, true);
}
}
}//package com.adobe.indesign
Section 39
//IrisTransition (com.adobe.indesign.IrisTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class IrisTransition extends PDFTransition {
private var fInward:Boolean;
public function IrisTransition(_arg1:Boolean=true){
fInward = _arg1;
}
public function set inward(_arg1:Boolean):void{
fInward = _arg1;
}
public function get inward():Boolean{
return (fInward);
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Boolean;
var _local7:Rectangle;
var _local8:uint;
var _local9:uint;
var _local10:BitmapData;
var _local11:Rectangle;
var _local12:uint;
var _local13:uint;
_local6 = fInward;
if (_arg5){
_local6 = !(_local6);
};
if (_local6){
_local10 = _arg2;
_arg2 = _arg1;
_arg1 = _local10;
_arg4 = (1 - _arg4);
};
_local7 = _arg1.rect.union(_arg2.rect);
_local8 = (_arg4 * _local7.width);
_local9 = (_arg4 * _local7.height);
if (((!(_local8)) || (!(_local9)))){
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(_local7.left, _local7.top, _local7.width, _local7.height);
_arg3.endFill();
} else {
_local11 = new Rectangle(Math.floor(((_local7.width - _local8) / 2)), Math.floor(((_local7.height - _local9) / 2)), _local8, _local9);
_arg3.beginBitmapFill(_arg2);
_arg3.drawRect(_local11.left, _local11.top, _local11.width, _local11.height);
_arg3.endFill();
if (!_local11.equals(_local7)){
_local12 = ((_local7.width - _local8) / 2);
_local13 = ((_local7.height - _local9) / 2);
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(0, 0, _local7.width, _local13);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(0, _local11.top, _local12, _local11.height);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(_local11.right, _local11.top, _local12, _local11.height);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(0, ((_local7.bottom - _local13) - 1), _local7.width, _local13);
_arg3.endFill();
};
};
}
}
}//package com.adobe.indesign
Section 40
//NoneTransition (com.adobe.indesign.NoneTransition)
package com.adobe.indesign {
import flash.display.*;
public class NoneTransition extends PDFTransition {
private var fPageIndex:int;// = -1
public function NoneTransition(){
fPageIndex = -1;
super();
}
override public function set duration(_arg1:uint):void{
}
override public function get duration():uint{
return (0);
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
}
}
}//package com.adobe.indesign
Section 41
//PDFTransition (com.adobe.indesign.PDFTransition)
package com.adobe.indesign {
import flash.display.*;
public class PDFTransition {
private var fDuration:uint;// = 1000
private var fPageIndex:int;// = -1
public function PDFTransition(){
fPageIndex = -1;
fDuration = 1000;
super();
}
public function get pageIndex():int{
return (fPageIndex);
}
public function set pageIndex(_arg1:int):void{
fPageIndex = _arg1;
}
public function set duration(_arg1:uint):void{
fDuration = _arg1;
}
public function endRender():void{
}
public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
throw (new Error("PDFTransition.render() is abstract"));
}
public function get duration():uint{
return (fDuration);
}
public function beginRender():void{
}
}
}//package com.adobe.indesign
Section 42
//PushTransition (com.adobe.indesign.PushTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class PushTransition extends DirectionedPDFTransition {
public function PushTransition(_arg1:uint=0){
super(_arg1);
}
private function calculateRects(_arg1:Rectangle, _arg2:Number, _arg3:Rectangle, _arg4:Point, _arg5:Rectangle, _arg6:Point, _arg7:Rectangle, _arg8:Rectangle, _arg9:Boolean):void{
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
_local10 = (_arg1.width * _arg2);
_local11 = (_arg1.height * _arg2);
_local12 = (_arg1.width - _local10);
_local13 = (_arg1.height - _local11);
switch (getEffectiveDirection(_arg9)){
case kRightToLeft:
_arg3.x = _local12;
_arg3.y = 0;
_arg3.width = _local10;
_arg3.height = _arg1.height;
_arg4.x = -(_local12);
_arg4.y = 0;
_arg5.x = 0;
_arg5.y = 0;
_arg5.width = _local12;
_arg5.height = _arg1.height;
_arg6.x = _local10;
_arg6.y = 0;
break;
case kLeftToRight:
default:
_arg3.y = (_arg5.y = 0);
_arg3.height = (_arg5.height = _arg1.height);
_arg4.x = _local12;
_arg3.width = _local10;
_arg3.x = 0;
_arg5.x = _local10;
_arg6.x = -(_local10);
_arg5.width = _local12;
break;
case kBottomToTop:
_arg3.x = 0;
_arg3.y = _local13;
_arg3.width = _arg1.width;
_arg3.height = _local11;
_arg4.x = 0;
_arg4.y = -(_local13);
_arg5.x = (_arg5.y = 0);
_arg5.width = _arg1.width;
_arg5.height = _local13;
_arg6.x = 0;
_arg6.y = _local11;
break;
case kTopToBottom:
_arg3.x = (_arg5.x = 0);
_arg3.width = (_arg5.width = _arg1.width);
_arg4.y = _local13;
_arg3.height = _local11;
_arg3.y = 0;
_arg5.y = _local11;
_arg6.y = -(_local11);
_arg5.height = _local13;
break;
case kTopLeftToBottomRight:
_arg3.x = (_arg3.y = 0);
_arg3.width = _local10;
_arg3.height = _local11;
_arg4.x = _local12;
_arg4.y = _local13;
_arg5.x = _local10;
_arg5.y = _local11;
_arg5.width = _local12;
_arg5.height = _local13;
_arg6.x = -(_local10);
_arg6.y = -(_local11);
_arg7.x = 0;
_arg7.y = _local11;
_arg7.width = _local10;
_arg7.height = _local13;
_arg8.x = _local10;
_arg8.y = 0;
_arg8.width = _local12;
_arg8.height = _local11;
break;
case kTopRightToBottomLeft:
_arg3.x = _local12;
_arg3.y = 0;
_arg3.width = _local10;
_arg3.height = _local11;
_arg4.x = -(_local12);
_arg4.y = _local13;
_arg5.x = 0;
_arg5.y = _local11;
_arg5.width = _local12;
_arg5.height = _local13;
_arg6.x = _local10;
_arg6.y = -(_local11);
_arg7.x = 0;
_arg7.y = 0;
_arg7.width = _local12;
_arg7.height = _local11;
_arg8.x = _local12;
_arg8.y = _local11;
_arg8.width = _local10;
_arg8.height = _local13;
break;
case kBottomLeftToTopRight:
_arg3.x = 0;
_arg3.y = _local13;
_arg3.width = _local10;
_arg3.height = _local11;
_arg4.x = _local12;
_arg4.y = -(_local13);
_arg5.x = _local10;
_arg5.y = 0;
_arg5.width = _local12;
_arg5.height = _local13;
_arg6.x = -(_local10);
_arg6.y = _local11;
_arg7.x = (_arg7.y = 0);
_arg7.width = _local10;
_arg7.height = _local13;
_arg8.x = _local10;
_arg8.y = _local13;
_arg8.width = _local12;
_arg8.height = _local11;
break;
case kBottomRightToTopLeft:
_arg3.x = _local12;
_arg3.y = _local13;
_arg3.width = _local10;
_arg3.height = _local11;
_arg4.x = -(_local12);
_arg4.y = -(_local13);
_arg5.x = (_arg5.y = 0);
_arg5.width = _local12;
_arg5.height = _local13;
_arg6.x = _local10;
_arg6.y = _local11;
_arg7.x = 0;
_arg7.y = _local13;
_arg7.width = _local12;
_arg7.height = _local11;
_arg8.x = _local12;
_arg8.y = 0;
_arg8.width = _local10;
_arg8.height = _local13;
break;
};
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Point;
var _local7:Rectangle;
var _local8:Point;
var _local9:Rectangle;
var _local10:Rectangle;
var _local11:Rectangle;
var _local12:Matrix;
_local6 = new Point();
_local7 = new Rectangle();
_local8 = new Point();
_local9 = new Rectangle();
_local10 = new Rectangle();
_local11 = new Rectangle();
calculateRects(_arg1.rect.union(_arg2.rect), _arg4, _local9, _local8, _local7, _local6, _local10, _local11, _arg5);
_local12 = new Matrix();
if (!_local10.isEmpty()){
_arg3.beginFill(0xFFFFFF);
_arg3.drawRect(_local10.x, _local10.y, _local10.width, _local10.height);
_arg3.endFill();
};
if (!_local11.isEmpty()){
_arg3.beginFill(0xFFFFFF);
_arg3.drawRect(_local11.x, _local11.y, _local11.width, _local11.height);
_arg3.endFill();
};
if (!_local7.isEmpty()){
_local12.identity();
_local12.translate(-(_local6.x), -(_local6.y));
_arg3.beginBitmapFill(_arg1, _local12, false);
_arg3.drawRect(_local7.left, _local7.top, _local7.width, _local7.height);
_arg3.endFill();
};
if (!_local9.isEmpty()){
_local12.identity();
_local12.translate(-(_local8.x), -(_local8.y));
_arg3.beginBitmapFill(_arg2, _local12, false);
_arg3.drawRect(_local9.left, _local9.top, _local9.width, _local9.height);
_arg3.endFill();
};
}
}
}//package com.adobe.indesign
Section 43
//ShowHideAction (com.adobe.indesign.ShowHideAction)
package com.adobe.indesign {
import flash.display.*;
import flash.utils.*;
public class ShowHideAction extends BaseAction {
private var fParams:Array;
public static const kShow:uint = 1;
public static const kHide:uint = 0;
public static const kToggle:uint = 2;
public function ShowHideAction(_arg1:String, _arg2:String, _arg3:Array){
super(_arg1, _arg2);
fParams = _arg3;
}
override public function execute(_arg1:IDMovieClipInternal):void{
var _local2:Dictionary;
var _local3:String;
var _local4:DisplayObject;
for each (_local2 in fParams) {
_local3 = _local2["n"];
_local4 = _arg1.getNamedChild(_local3);
if (_local4){
switch (_local2["v"]){
case kHide:
_local4.visible = false;
break;
case kShow:
_local4.visible = true;
break;
case kToggle:
_local4.visible = !(_local4.visible);
break;
};
};
};
}
}
}//package com.adobe.indesign
Section 44
//SplitTransition (com.adobe.indesign.SplitTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class SplitTransition extends PDFTransition {
private var fHorizontal:Boolean;
private var fInward:Boolean;
public function SplitTransition(_arg1:Boolean=true, _arg2:Boolean=true){
fInward = _arg1;
fHorizontal = _arg2;
}
public function set inward(_arg1:Boolean):void{
fInward = _arg1;
}
public function get horizontal():Boolean{
return (fHorizontal);
}
public function get inward():Boolean{
return (fInward);
}
public function set horizontal(_arg1:Boolean):void{
fHorizontal = _arg1;
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:Boolean;
var _local8:BitmapData;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
_local6 = _arg1.rect.union(_arg2.rect);
_local7 = fInward;
if (_arg5){
_local7 = !(_local7);
};
if (_local7){
_arg4 = (1 - _arg4);
} else {
_local8 = _arg2;
_arg2 = _arg1;
_arg1 = _local8;
};
if (fHorizontal){
_local9 = (_arg4 * _local6.height);
if (_local9 == 0){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
if (_local9 == _local6.height){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
_local10 = ((_local6.height - _local9) / 2);
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _local6.width, _local10);
_arg3.endFill();
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, (_local10 + _local9), _local6.width, ((_local6.height - _local10) - _local9));
_arg3.endFill();
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, _local10, _local6.width, _local9);
_arg3.endFill();
};
};
} else {
_local11 = (_arg4 * _local6.width);
if (_local11 == 0){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
if (_local11 == _local6.width){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
_local12 = ((_local6.width - _local11) / 2);
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _local12, _local6.height);
_arg3.endFill();
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect((_local12 + _local11), 0, ((_local6.width - _local12) - _local11), _local6.height);
_arg3.endFill();
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(_local12, 0, _local11, _local6.height);
_arg3.endFill();
};
};
};
}
}
}//package com.adobe.indesign
Section 45
//UncoverTransition (com.adobe.indesign.UncoverTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class UncoverTransition extends DirectionedPDFTransition {
public function UncoverTransition(_arg1:uint=0){
super(_arg1);
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Matrix;
var _local7:Rectangle;
var _local8:uint;
var _local9:uint;
_local6 = new Matrix();
_local7 = _arg1.rect.union(_arg2.rect);
_local8 = (_local7.width * _arg4);
_local9 = (_local7.height * _arg4);
switch (getEffectiveDirection(_arg5)){
case kRightToLeft:
_arg3.beginFill(0xFFFFFF);
_arg3.drawRect(0, 0, _local7.width, _local7.height);
_arg3.endFill();
if (_local8 != _local7.width){
_local6.identity();
_local6.translate(-(_local8), 0);
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(0, 0, (_local7.width - _local8), _local7.height);
_arg3.endFill();
};
if (_local8 != 0){
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect((_local7.width - _local8), 0, _local8, _local7.height);
_arg3.endFill();
};
break;
case kLeftToRight:
default:
if (_local8 != _local7.width){
_local6.identity();
_local6.translate(_local8, 0);
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(_local8, 0, (_local7.width - _local8), _local7.height);
_arg3.endFill();
};
if (_local8 != 0){
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local8, _local7.height);
_arg3.endFill();
};
break;
case kBottomToTop:
if (_local9 != _local7.height){
_local6.identity();
_local6.translate(0, -(_local9));
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(0, 0, _local7.width, (_local7.height - _local9));
_arg3.endFill();
};
if (_local9 != 0){
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, (_local7.height - _local9), _local7.width, _local9);
_arg3.endFill();
};
break;
case kTopToBottom:
if (_local9 != _local7.height){
_local6.identity();
_local6.translate(0, _local9);
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(0, _local9, _local7.width, (_local7.height - _local9));
_arg3.endFill();
};
if (_local9 != 0){
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local7.width, _local9);
_arg3.endFill();
};
break;
case kTopLeftToBottomRight:
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local7.width, _local7.height);
_arg3.endFill();
if (_local8 != 0){
_local6.identity();
_local6.translate(_local8, _local9);
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(_local8, _local9, (_local7.width - _local8), (_local7.height - _local9));
_arg3.endFill();
};
break;
case kTopRightToBottomLeft:
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local7.width, _local7.height);
_arg3.endFill();
if (_local8 != _local7.width){
_local6.identity();
_local6.translate(-(_local8), _local9);
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(0, _local9, (_local7.width - _local8), (_local7.height - _local9));
_arg3.endFill();
};
break;
case kBottomLeftToTopRight:
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local7.width, _local7.height);
_arg3.endFill();
if (_local8 != _local7.width){
_local6.identity();
_local6.translate(_local8, -(_local9));
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(_local8, 0, (_local7.width - _local8), (_local7.height - _local9));
_arg3.endFill();
};
break;
case kBottomRightToTopLeft:
_arg3.beginBitmapFill(_arg2, null, false);
_arg3.drawRect(0, 0, _local7.width, _local7.height);
_arg3.endFill();
if (_local8 != 0){
_local6.identity();
_local6.translate(-(_local8), -(_local9));
_arg3.beginBitmapFill(_arg1, _local6, false);
_arg3.drawRect(0, 0, (_local7.width - _local8), (_local7.height - _local9));
_arg3.endFill();
};
break;
};
}
}
}//package com.adobe.indesign
Section 46
//Vector (com.adobe.indesign.Vector)
package com.adobe.indesign {
import flash.geom.*;
class Vector {
public var fP0:Point;
public var fP1:Point;
function Vector(_arg1:Point, _arg2:Point){
fP0 = _arg1.clone();
fP1 = _arg2.clone();
}
public function xForY(_arg1:Number):Number{
var _local2:Number;
_local2 = ((_arg1 - fP0.y) / y);
return ((fP0.x + (_local2 * x)));
}
public function dot(_arg1:Vector):Number{
return (((x * _arg1.x) + (y * _arg1.y)));
}
public function get length2():Number{
return ((((fP1.x - fP0.x) * (fP1.x - fP0.x)) + ((fP1.y - fP0.y) * (fP1.y - fP0.y))));
}
public function normalize():void{
length = (length / length);
}
public function set length(_arg1:Number):void{
var _local2:Number;
_local2 = length;
fP1.x = (fP0.x + (((fP1.x - fP0.x) * _arg1) / _local2));
fP1.y = (fP0.y + (((fP1.y - fP0.y) * _arg1) / _local2));
}
public function yForX(_arg1:Number):Number{
var _local2:Number;
_local2 = ((_arg1 - fP0.x) / x);
return ((fP0.y + (_local2 * y)));
}
public function get angle():Number{
return (Math.atan2(x, -(y)));
}
public function clone():Vector{
return (new Vector(fP0, fP1));
}
public function add(_arg1:Vector):void{
fP1.x = (fP1.x + _arg1.x);
fP1.y = (fP1.y + _arg1.y);
}
public function invert():void{
var _local1:Point;
_local1 = fP0;
fP0 = fP1;
fP1 = _local1;
}
public function get length():Number{
return (Math.sqrt((((fP1.x - fP0.x) * (fP1.x - fP0.x)) + ((fP1.y - fP0.y) * (fP1.y - fP0.y)))));
}
public function moveTo(_arg1:Point):void{
fP1.x = (_arg1.x + x);
fP1.y = (_arg1.y + y);
fP0.x = _arg1.x;
fP0.y = _arg1.y;
}
public function set x(_arg1:Number):void{
fP1.x = (fP0.x + _arg1);
}
public function set y(_arg1:Number):void{
fP1.y = (fP0.y + _arg1);
}
public function mult(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function get x():Number{
return ((fP1.x - fP0.x));
}
public function get y():Number{
return ((fP1.y - fP0.y));
}
public function perp():void{
var _local1:Number;
var _local2:Number;
_local1 = x;
_local2 = y;
x = _local2;
y = -(_local1);
}
public function reflect(_arg1:Vector):void{
_arg1 = _arg1.clone();
_arg1.mult((2 * dot(_arg1)));
fP1.x = (fP1.x - _arg1.x);
fP1.y = (fP1.y - _arg1.y);
fP1.x = (fP0.x - (fP1.x - fP0.x));
fP1.y = (fP0.y - (fP1.y - fP0.y));
}
}
}//package com.adobe.indesign
Section 47
//WipeTransition (com.adobe.indesign.WipeTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class WipeTransition extends DirectionedPDFTransition {
public function WipeTransition(_arg1:uint=0){
super(_arg1);
}
protected function calculateRects(_arg1:Rectangle, _arg2:Number, _arg3:Rectangle, _arg4:Rectangle, _arg5:Boolean):void{
var _local6:uint;
var _local7:uint;
var _local8:Rectangle;
switch (getEffectiveDirection(_arg5)){
case kRightToLeft:
_local8 = _arg3;
_arg3 = _arg4;
_arg4 = _local8;
_arg2 = (1 - _arg2);
case kLeftToRight:
default:
_local6 = (_arg1.width * _arg2);
_arg3.y = (_arg4.y = 0);
_arg3.height = (_arg4.height = _arg1.height);
_arg4.x = _local6;
_arg4.width = (_arg1.width - _local6);
_arg3.x = 0;
_arg3.width = _local6;
break;
case kBottomToTop:
_local8 = _arg3;
_arg3 = _arg4;
_arg4 = _local8;
_arg2 = (1 - _arg2);
case kTopToBottom:
_local7 = (_arg1.height * _arg2);
_arg3.x = (_arg4.x = 0);
_arg3.width = (_arg4.width = _arg1.width);
_arg4.y = _local7;
_arg4.height = (_arg1.height - _local7);
_arg3.y = 0;
_arg3.height = _local7;
break;
case kTopLeftToBottomRight:
_local6 = (_arg1.width * _arg2);
_local7 = (_arg1.height * _arg2);
_arg4.x = (_arg4.y = 0);
_arg4.width = _arg1.width;
_arg4.height = _arg1.height;
_arg3.x = (_arg3.y = 0);
_arg3.width = _local6;
_arg3.height = _local7;
break;
case kTopRightToBottomLeft:
_local6 = (_arg1.width * _arg2);
_local7 = (_arg1.height * _arg2);
_arg4.x = (_arg4.y = 0);
_arg4.width = _arg1.width;
_arg4.height = _arg1.height;
_arg3.x = (_arg1.width - _local6);
_arg3.y = 0;
_arg3.width = _local6;
_arg3.height = _local7;
break;
case kBottomLeftToTopRight:
_local6 = (_arg1.width * _arg2);
_local7 = (_arg1.height * _arg2);
_arg4.x = (_arg4.y = 0);
_arg4.width = _arg1.width;
_arg4.height = _arg1.height;
_arg3.x = 0;
_arg3.y = (_arg1.height - _local7);
_arg3.width = _local6;
_arg3.height = _local7;
break;
case kBottomRightToTopLeft:
_local6 = (_arg1.width * _arg2);
_local7 = (_arg1.height * _arg2);
_arg4.x = (_arg4.y = 0);
_arg4.width = _arg1.width;
_arg4.height = _arg1.height;
_arg3.x = (_arg1.width - _local6);
_arg3.y = (_arg1.height - _local7);
_arg3.width = _local6;
_arg3.height = _local7;
break;
};
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:Rectangle;
_local6 = new Rectangle();
_local7 = new Rectangle();
calculateRects(_arg1.rect.union(_arg2.rect), _arg4, _local7, _local6, _arg5);
if (!_local6.isEmpty()){
_arg3.beginBitmapFill(_arg1);
_arg3.drawRect(_local6.left, _local6.top, _local6.width, _local6.height);
_arg3.endFill();
};
if (!_local7.isEmpty()){
_arg3.beginBitmapFill(_arg2);
_arg3.drawRect(_local7.left, _local7.top, _local7.width, _local7.height);
_arg3.endFill();
};
}
}
}//package com.adobe.indesign
Section 48
//ZoomTransition (com.adobe.indesign.ZoomTransition)
package com.adobe.indesign {
import flash.display.*;
import flash.geom.*;
public class ZoomTransition extends DirectionedPDFTransition {
private var fInward:Boolean;
public function ZoomTransition(_arg1:uint=0, _arg2:Boolean=true){
super(_arg1);
fInward = _arg2;
}
public function set inward(_arg1:Boolean):void{
fInward = _arg1;
}
public function get inward():Boolean{
return (fInward);
}
override public function render(_arg1:BitmapData, _arg2:BitmapData, _arg3:Graphics, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Rectangle;
var _local7:Boolean;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:Matrix;
var _local13:BitmapData;
_local6 = _arg1.rect.union(_arg2.rect);
_local7 = fInward;
if (_arg5){
_local7 = !(_local7);
};
if (!_local7){
_arg4 = (1 - _arg4);
};
_local8 = (_local6.width * _arg4);
_local9 = (_local6.height * _arg4);
_local12 = new Matrix();
if ((((_local8 == 0)) || ((_local9 == 0)))){
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
} else {
if ((((_local8 == _local6.width)) && ((_local9 == _local6.height)))){
_arg3.beginBitmapFill(_arg2, null, false, true);
_arg3.drawRect(0, 0, _arg2.width, _arg2.height);
_arg3.endFill();
} else {
if (!_local7){
_local13 = _arg2;
_arg2 = _arg1;
_arg1 = _local13;
};
_arg3.beginBitmapFill(_arg1, null, false, true);
_arg3.drawRect(0, 0, _arg1.width, _arg1.height);
_arg3.endFill();
if (_arg5){
_local7 = !(_local7);
};
switch (getEffectiveDirection(!(_local7))){
case kLeftToRight:
_local10 = 0;
_local11 = ((_local6.height - _local9) / 2);
break;
case kRightToLeft:
_local10 = (_local6.width - _local8);
_local11 = ((_local6.height - _local9) / 2);
break;
case kTopToBottom:
_local10 = ((_local6.width - _local8) / 2);
_local11 = 0;
break;
case kBottomToTop:
_local10 = ((_local6.width - _local8) / 2);
_local11 = (_local6.height - _local9);
break;
case kTopLeftToBottomRight:
_local10 = 0;
_local11 = 0;
break;
case kTopRightToBottomLeft:
_local10 = (_local6.width - _local8);
_local11 = 0;
break;
case kBottomLeftToTopRight:
_local10 = 0;
_local11 = (_local6.height - _local9);
break;
case kBottomRightToTopLeft:
_local10 = (_local6.width - _local8);
_local11 = (_local6.height - _local9);
break;
};
_local12.identity();
_local12.scale(_arg4, _arg4);
_local12.translate(_local10, _local11);
_arg3.beginBitmapFill(_arg2, _local12, false, true);
_arg3.drawRect(_local10, _local11, _local8, _local9);
_arg3.endFill();
};
};
}
}
}//package com.adobe.indesign