Section 1
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 2
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 3
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 4
//Audio (Audio)
package {
public class Audio {
public static const RATE5512:uint = 5512;
public static const MONO:uint = 1;
public static const BIT8:uint = 8;
public static const RATE44100:uint = 44100;
public static const BIT16:uint = 16;
public static const RATE11025:uint = 11025;
public static const STEREO:uint = 2;
public static const RATE22050:uint = 22050;
public static function checkRate(_arg1:uint):void{
switch (_arg1){
case RATE44100:
case RATE22050:
case RATE11025:
case RATE5512:
break;
default:
throw (new Error((_arg1.toString() + "is not supported.")));
};
}
public static function checkBits(_arg1:uint):void{
switch (_arg1){
case BIT8:
case BIT16:
break;
default:
throw (new Error("Only 8 and 16 bit is supported."));
};
}
public static function checkAll(_arg1:uint, _arg2:uint, _arg3:uint):void{
checkChannels(_arg1);
checkBits(_arg2);
checkRate(_arg3);
}
public static function checkChannels(_arg1:uint):void{
switch (_arg1){
case MONO:
case STEREO:
break;
default:
throw (new Error("Only mono or stereo is supported."));
};
}
}
}//package
Section 5
//BitmapEx (BitmapEx)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class BitmapEx {
public var FMonID:String;
public var FPlayMonFun:Function;
private var FHeight:int;
public var FBitmap:Bitmap;
public var FAddImgFun:Function;
private var FWidth:int;
public var FSendValue:Function;
private var FScale:Number;// = 0.2
private var FMCParent:MovieClip;
public var FDowned:Boolean;
public var FbMotion:Boolean;
private var FFrameWidth:int;// = 0
private var FFrameRate:int;// = 24
public var FPriMon:String;
public var FLength:Number;
private var FObj:Object;
private var FMCRoot:MovieClip;
private var FCusPriMon:Object;
private var FMCCk:MovieClip;
private var FTotalFrame:Number;
private var FCusMon:Object;
private var FCurFrame:int;// = 1
public var FBkColor:Number;// = -1
public function BitmapEx(_arg1:Bitmap):void{
FObj = {_x:Number, _y:Number, _scale:Number, _width:Number, _Height:Number};
FCusMon = {_StartPosX:Number, _StartPosY:Number, _StartPosW:Number, _StartPosH:Number, _EndPosX:Number, _EndPosY:Number, _EndPosW:Number, _EndPosH:Number};
FCusPriMon = {_StartPosX:Number, _StartPosY:Number, _StartPosW:Number, _StartPosH:Number, _EndPosX:Number, _EndPosY:Number, _EndPosW:Number, _EndPosH:Number};
super();
FBitmap = _arg1;
FDowned = true;
FPlayMonFun = PlayMontion;
FSendValue = SendValue;
FAddImgFun = LoadImage;
FWidth = _arg1.width;
FHeight = _arg1.height;
}
public function SetMonID(_arg1:String):void{
FMonID = _arg1;
}
private function ROOMSET(_arg1:Bitmap):void{
FBitmap.scaleY = (FBitmap.scaleX = (1 + FScale));
FBitmap.x = (FMCCk.x + ((FMCCk.width - FBitmap.width) / 2));
FBitmap.y = (FMCCk.y + ((FMCCk.height - FBitmap.height) / 2));
}
public function StopMontion():void{
FMCParent.removeEventListener(Event.ENTER_FRAME, onChange);
}
private function SendValue(_arg1:MovieClip, _arg2:MovieClip, _arg3:Boolean):void{
var _local4:ColorTransform;
FMCRoot = _arg1;
FMCParent = _arg2;
FMCCk = MovieClip(_arg2.getChildByName("cankao"));
FbMotion = _arg3;
trace(("FMCCk:" + FMCCk));
if (FBkColor != -1){
_local4 = FMCCk.transform.colorTransform;
_local4.color = FBkColor;
FMCCk.transform.colorTransform = _local4;
};
}
public function PlayMontion():void{
FMCParent.addEventListener(Event.ENTER_FRAME, onChange);
}
public function SetDowned(_arg1:Boolean):void{
FDowned = _arg1;
}
private function TTB(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.height - FObj._height) / 2);
var _local4:Number = (_local3 * _local2);
FBitmap.y = (FBitmap.y + _local4);
}
public function setCusPriMonPara(_arg1:Object):void{
FPriMon = "Custom";
FCusPriMon = _arg1;
}
private function BTT(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.height - FObj._height) / 2);
var _local4:Number = (_local3 * _local2);
FBitmap.y = (FBitmap.y - _local4);
}
private function LTR(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = (_local3 * _local2);
FBitmap.x = (FBitmap.x + _local4);
}
private function chosefunction(_arg1:String):Function{
switch (_arg1){
case "Zoom In":
return (ZoomIn);
case "Zoom Out":
return (ZoomOut);
case "Left to Right":
return (LTR);
case "Right to Left":
return (RTL);
case "Top to Bottom":
return (TTB);
case "Bottom to Top":
return (BTT);
case "LeftTop to RightBottom":
return (LTTRB);
case "LeftBottom to RightTop":
return (LBTRT);
case "RightTop to LeftBottom":
return (RTTLB);
case "RightBottom to LeftTop":
return (RBTLT);
case "Custom":
return (CusMontion);
};
return (Rest);
}
public function SetPriMon(_arg1:String):void{
FPriMon = _arg1;
}
public function SetLength(_arg1:Number):void{
FLength = _arg1;
FTotalFrame = (FLength * FFrameRate);
}
private function RTL(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = (_local3 * _local2);
FBitmap.x = (FBitmap.x - _local4);
}
private function ProMontion():void{
var _local1:Function = chosefunction(FMonID);
_local1();
}
private function ZoomOut(_arg1:Boolean=true):void{
var _local2:Number;
if (_arg1){
_local2 = (FScale * (FCurFrame / FTotalFrame));
FBitmap.scaleX = (FBitmap.scaleY = (1.2 - _local2));
FBitmap.x = (FMCCk.x + ((FMCCk.width - FBitmap.width) / 2));
FBitmap.y = (FMCCk.y + ((FMCCk.height - FBitmap.height) / 2));
} else {
FBitmap.scaleX = (FBitmap.scaleY = 1);
FBitmap.x = (FMCCk.x + ((FMCCk.width - FBitmap.width) / 2));
FBitmap.y = (FMCCk.y + ((FMCCk.height - FBitmap.height) / 2));
};
}
private function CusMontion(_arg1:Boolean=true):void{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local2:Number = (720 / (FWidth * FCusMon._StartPosW));
var _local3:Number = -(((FWidth * _local2) * FCusMon._StartPosX));
var _local4:Number = -(((FHeight * _local2) * FCusMon._StartPosY));
var _local5:Number = (720 / (FWidth * FCusMon._EndPosW));
var _local6:Number = -(((FWidth * _local5) * FCusMon._EndPosX));
var _local7:Number = -(((FHeight * _local5) * FCusMon._EndPosY));
if (_arg1){
FBitmap.scaleX = (FBitmap.scaleY = ((((_local5 - _local2) * FCurFrame) / FTotalFrame) + _local2));
FBitmap.x = ((((_local6 - _local3) * FCurFrame) / FTotalFrame) + _local3);
FBitmap.y = ((((_local7 - _local4) * FCurFrame) / FTotalFrame) + _local4);
} else {
_local8 = (720 / (FWidth * FCusPriMon._EndPosW));
_local9 = -(((FWidth * _local8) * FCusPriMon._EndPosX));
_local10 = -(((FHeight * _local8) * FCusPriMon._EndPosY));
FBitmap.scaleX = (FBitmap.scaleY = _local8);
FBitmap.x = _local9;
FBitmap.y = _local10;
};
}
private function LBTRT(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = ((FBitmap.height - FObj._height) / 2);
var _local5:Number = (_local3 * _local2);
var _local6:Number = (_local4 * _local2);
FBitmap.x = (FBitmap.x + _local5);
FBitmap.y = (FBitmap.y - _local6);
}
private function RTTLB(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = ((FBitmap.height - FObj._height) / 2);
var _local5:Number = (_local3 * _local2);
var _local6:Number = (_local4 * _local2);
FBitmap.x = (FBitmap.x - _local5);
FBitmap.y = (FBitmap.y + _local6);
}
public function SetCusMonPara(_arg1:Object):void{
FMonID = "Custom";
FCusMon = _arg1;
}
private function RBTLT(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = ((FBitmap.height - FObj._height) / 2);
var _local5:Number = (_local3 * _local2);
var _local6:Number = (_local4 * _local2);
FBitmap.x = (FBitmap.x - _local5);
FBitmap.y = (FBitmap.y - _local6);
}
private function LoadImage():void{
trace(("LoadImage" + FBitmap));
if (FBitmap == null){
return;
};
FBitmap = new Bitmap(FBitmap.bitmapData);
FObj = new Object();
FBitmap.scaleX = (FBitmap.scaleY = 1);
FBitmap.smoothing = true;
var _local1:int = FBitmap.width;
var _local2:int = FBitmap.height;
var _local3:int = FMCCk.width;
var _local4:int = FMCCk.height;
var _local5:Number = 1;
if ((((FMCCk.width > FBitmap.width)) || ((FMCCk.height > FBitmap.height)))){
if ((_local1 * _local4) > (_local3 * _local2)){
_local5 = (_local3 / _local1);
_local2 = int((_local2 * _local5));
FBitmap.scaleX = (FBitmap.scaleY = _local5);
FBitmap.y = (((_local4 - _local2) / 2) + FMCCk.y);
} else {
_local5 = (_local4 / _local2);
_local1 = int((_local1 * _local5));
FBitmap.scaleX = (FBitmap.scaleY = _local5);
FBitmap.x = (((_local3 - _local1) / 2) + FMCCk.x);
};
} else {
if ((_local1 * _local4) > (_local3 * _local2)){
_local5 = (_local3 / _local1);
_local2 = int((_local2 * _local5));
FBitmap.scaleX = (FBitmap.scaleY = _local5);
FBitmap.y = (((_local4 - _local2) / 2) + FMCCk.y);
} else {
_local5 = (_local4 / _local2);
_local1 = int((_local1 * _local5));
FBitmap.scaleX = (FBitmap.scaleY = _local5);
FBitmap.x = (((_local3 - _local1) / 2) + FMCCk.x);
};
};
FMCParent.addChild(FBitmap);
FObj._x = FBitmap.x;
FObj._y = FBitmap.y;
FObj._scale = FBitmap.scaleX;
FObj._width = FBitmap.width;
FObj._height = FBitmap.height;
if (!FbMotion){
SetImgPos();
};
}
private function onChange(_arg1:Event):void{
trace(("FCurFrame:" + FCurFrame));
if (FbMotion){
ProMontion();
FCurFrame = (FCurFrame + 1);
FMCRoot.FCurFrame = FCurFrame;
if (FCurFrame == FTotalFrame){
FMCParent.removeEventListener(Event.ENTER_FRAME, onChange);
FCurFrame = 0;
};
};
}
public function SetBkColor(_arg1:Number):void{
FBkColor = _arg1;
}
private function SetImgPos():void{
var _local1:Function = chosefunction(FPriMon);
_local1(false);
}
private function Rest(_arg1:Boolean=true):void{
}
private function LTTRB(_arg1:Boolean=true):void{
var _local2:Number;
ROOMSET(FBitmap);
if (_arg1){
_local2 = (FCurFrame / FTotalFrame);
} else {
_local2 = 1;
};
var _local3:Number = ((FBitmap.width - FObj._width) / 2);
var _local4:Number = ((FBitmap.height - FObj._height) / 2);
var _local5:Number = (_local3 * _local2);
var _local6:Number = (_local4 * _local2);
FBitmap.x = (FBitmap.x + _local5);
FBitmap.y = (FBitmap.y + _local6);
}
private function ZoomIn(_arg1:Boolean=true):void{
var _local2:Number;
if (_arg1){
_local2 = (FScale * (FCurFrame / FTotalFrame));
FBitmap.scaleX = (FBitmap.scaleY = (1 + _local2));
FBitmap.x = (FMCCk.x + ((FMCCk.width - FBitmap.width) / 2));
FBitmap.y = (FMCCk.y + ((FMCCk.height - FBitmap.height) / 2));
} else {
_local2 = FScale;
FBitmap.scaleX = (FBitmap.scaleX + _local2);
FBitmap.scaleY = (FBitmap.scaleY + _local2);
FBitmap.x = (FMCCk.x + ((FMCCk.width - FBitmap.width) / 2));
FBitmap.y = (FMCCk.y + ((FMCCk.height - FBitmap.height) / 2));
};
}
}
}//package
Section 6
//CLineDraw (CLineDraw)
package {
import flash.display.*;
import flash.geom.*;
public class CLineDraw {
public function CLineDraw(_arg1:Graphics, _arg2:Rectangle){
var _local3:Number = 5;
_arg1.clear();
_arg1.beginFill(0xFF, 0);
_arg1.drawRect(_arg2.x, _arg2.y, _arg2.width, _arg2.height);
_arg1.endFill();
_arg1.lineStyle(1, 0xFFFFFF, 1);
_arg1.moveTo(_arg2.x, _arg2.y);
_arg1.lineTo(_arg2.x, (_arg2.height + _arg2.y));
_arg1.lineTo((_arg2.width + _arg2.x), (_arg2.y + _arg2.height));
_arg1.lineTo((_arg2.width + _arg2.x), _arg2.y);
_arg1.lineTo(_arg2.x, _arg2.y);
_arg1.lineStyle(1, 0xFF, 100);
var _local4:Number = Math.ceil((Math.abs((_arg2.right - _arg2.left)) / (_local3 * 2)));
var _local5:int;
var _local6:Number = 0;
var _local7:Number = 0;
_local5 = 0;
while (_local5 < _local4) {
if (_arg2.right < _arg2.left){
_local6 = -(((_local3 * 2) * _local5));
_local7 = -(_local3);
} else {
_local6 = ((_local3 * 2) * _local5);
_local7 = _local3;
};
_arg1.moveTo((_arg2.left + _local6), _arg2.top);
if (_local5 == (_local4 - 1)){
_arg1.lineTo(_arg2.right, _arg2.top);
} else {
_arg1.lineTo(((_arg2.left + _local6) + _local7), _arg2.top);
};
_local5++;
};
_local5 = 0;
while (_local5 < _local4) {
if (_arg2.right < _arg2.left){
_local6 = -(((_local3 * 2) * _local5));
_local7 = -(_local3);
} else {
_local6 = ((_local3 * 2) * _local5);
_local7 = _local3;
};
_arg1.moveTo((_arg2.left + _local6), _arg2.bottom);
if (_local5 == (_local4 - 1)){
_arg1.lineTo(_arg2.right, _arg2.bottom);
} else {
_arg1.lineTo(((_arg2.left + _local6) + _local7), _arg2.bottom);
};
_local5++;
};
_local4 = Math.ceil((Math.abs((_arg2.bottom - _arg2.top)) / (_local3 * 2)));
_local5 = 0;
while (_local5 < _local4) {
if (_arg2.top > _arg2.bottom){
_local6 = -(((_local3 * 2) * _local5));
_local7 = -(_local3);
} else {
_local6 = ((_local3 * 2) * _local5);
_local7 = _local3;
};
_arg1.moveTo(_arg2.left, (_arg2.top + _local6));
if (_local5 == (_local4 - 1)){
_arg1.lineTo(_arg2.left, _arg2.bottom);
} else {
_arg1.lineTo(_arg2.left, ((_arg2.top + _local6) + _local7));
};
_local5++;
};
_local5 = 0;
while (_local5 < _local4) {
if (_arg2.top > _arg2.bottom){
_local6 = -(((_local3 * 2) * _local5));
_local7 = -(_local3);
} else {
_local6 = ((_local3 * 2) * _local5);
_local7 = _local3;
};
_arg1.moveTo(_arg2.right, (_arg2.top + _local6));
if (_local5 == (_local4 - 1)){
_arg1.lineTo(_arg2.right, _arg2.bottom);
} else {
_arg1.lineTo(_arg2.right, ((_arg2.top + _local6) + _local7));
};
_local5++;
};
}
}
}//package
Section 7
//CusMotion (CusMotion)
package {
import flash.display.*;
import flash.geom.*;
public class CusMotion {
public var _contentAppearance:Object;
private var _height:Number;
private var _direction:Number;// = 0
private var _easing:Object;
private var FStartFrame:Number;// = 1
private var _width:Number;
private var _visualPropList:Object;
public var _innerBounds:Rectangle;
public var _content:DisplayObject;
public static var IN:Number = 0;
public static var OUT:Number = 1;
public function CusMotion(_arg1:DisplayObject, _arg2:Object){
_visualPropList = {_x:null, _y:null, _xscale:null, _yscale:null, _alpha:null, _rotation:null};
super();
}
public function cleanUp():void{
}
public function get StartFrame():Number{
return (FStartFrame);
}
public function GetEffectFrame():Number{
return ((24 * 3));
}
public function init(_arg1:DisplayObject, _arg2:Object):void{
_content = _arg1;
_innerBounds = _arg1.getBounds(_arg1);
_width = _arg1.width;
_height = _arg1.height;
_direction = _arg2.direction;
}
public function set StartFrame(_arg1:Number):void{
FStartFrame = _arg1;
}
public function set easing(_arg1:Object):void{
_easing = _arg1;
}
private function start():void{
}
public function get easing():Object{
return (_easing);
}
private function _noEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public function IsNeedEffect(_arg1:Number):Boolean{
return ((_arg1 <= (24 * 3)));
}
public function _render(_arg1:Number):void{
}
private function get contentAppearance():Object{
return (_contentAppearance);
}
private function set direction(_arg1:Number):void{
_direction = (_arg1) ? 1 : 0;
}
private function get direction():Number{
return (_direction);
}
}
}//package
Section 8
//CutIn (CutIn)
package {
import flash.display.*;
import flash.text.*;
public class CutIn extends CusMotion {
private var FinitX:Number;
private var FinitY:Number;
private var FOldWidth:Number;
private var FPara:Object;
private var FOldHeight:Number;
private var LeaveFrame:Number;
private var FSpeedX:Number;
private var FSpeedY:Number;
private var square:Sprite;
public var className:String;// = "CutIn"
private var FOldObj:TextField;
private var FOldY:Number;
public var type:Object;
private var EntryFrame:Number;
private var FOldX:Number;
public function CutIn(_arg1:DisplayObject, _arg2:Object){
type = Fade;
super(_arg1, _arg2);
FPara = _arg2;
init(_arg1, _arg2);
}
override public function cleanUp():void{
FOldObj.mask = null;
square.parent.removeChild(square);
}
override public function init(_arg1:DisplayObject, _arg2:Object):void{
super.init(_arg1, _arg2);
FOldObj = TextField(_arg1);
FOldX = FOldObj.x;
FOldY = FOldObj.y;
FOldWidth = FOldObj.width;
FOldHeight = FOldObj.height;
square = new Sprite();
square.graphics.beginFill(0xFFFFFF);
square.graphics.drawRect(FOldObj.x, FOldObj.y, FOldObj.width, FOldObj.height);
FOldObj.parent.addChild(square);
FOldObj.mask = square;
square.alpha = 1;
if (FPara.duration > 3){
EntryFrame = (24 / (FPara.duration * FPara.FPS));
LeaveFrame = (1 - EntryFrame);
} else {
EntryFrame = 0.3;
LeaveFrame = 0.7;
};
switch (FPara.effectname){
case "CutIn_Right":
FinitX = (FOldX - FOldWidth);
FinitY = 0;
FSpeedX = (FOldWidth / EntryFrame);
FSpeedY = 0;
break;
case "CutIn_Left":
FinitX = (FOldX + FOldWidth);
FinitY = 0;
FSpeedX = (-(FOldWidth) / EntryFrame);
FSpeedY = 0;
break;
case "CutIn_Top":
FinitX = 0;
FinitY = (FOldY + FOldHeight);
FSpeedX = 0;
FSpeedY = (-(FOldHeight) / EntryFrame);
break;
case "CutIn_Bottom":
FinitX = 0;
FinitY = (FOldY - FOldHeight);
FSpeedX = 0;
FSpeedY = (FOldHeight / EntryFrame);
break;
};
}
override public function _render(_arg1:Number):void{
if (_arg1 <= EntryFrame){
FOldObj.x = (FinitX + (FSpeedX * _arg1));
FOldObj.y = (FinitY + (FSpeedY * _arg1));
} else {
if (_arg1 >= LeaveFrame){
FOldObj.x = (FinitX + (FSpeedX * ((_arg1 - LeaveFrame) + EntryFrame)));
FOldObj.y = (FinitY + (FSpeedY * ((_arg1 - LeaveFrame) + EntryFrame)));
};
};
}
}
}//package
Section 9
//ElementSprite (ElementSprite)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.system.*;
import flash.external.*;
public class ElementSprite extends MovieClip {
private var FTextMC:Array;
private var FAryMc:Array;
public var FHeight:int;
private var FXMLDecoder:XMLDecoder;
public var FWidth:int;
public var FsState:String;// = "Play"
private var FTextSetMC:MovieClip;
private var FSelformat:TextFormat;
public var FPubType:String;// = "Preview"
private var FMusicImg:Bitmap;
private var TS_BOLD:int;// = 1
public var FFrameRate:int;// = 24
public var FnIndex:int;
private var CONST_FRAMENAME:String;// = "frameshape"
private var TS_SHADOW:int;// = 8
public var FnFrame:int;
private var FSound:Array;
private var FSetMC:MovieClip;
private var FbMouseDown:Boolean;// = false
private var TS_UNDERLINE:int;// = 16
private var TS_SMOOTH:int;// = 4
private var TS_STRIKE:int;// = 32
public var FLineMC:MovieClip;
private var FSelectMC:MovieClipEx;
private var TS_ITALIC:int;// = 2
public function ElementSprite(_arg1:XMLDecoder, _arg2:String="Preview"):void{
FXMLDecoder = _arg1;
FPubType = _arg2;
}
private function StartDragMC(_arg1:MouseEvent):void{
var _local3:MovieClipEx;
var _local2:DisplayObject = DisplayObject(_arg1.currentTarget);
FbMouseDown = true;
if ((_arg1.currentTarget is SimpleButton)){
_local3 = MovieClipEx(_arg1.currentTarget.parent);
} else {
_local3 = MovieClipEx(_arg1.currentTarget);
};
_local3.startDrag();
}
public function SetSetMC(_arg1:MovieClip, _arg2:MovieClip):void{
FSetMC = _arg1;
FTextSetMC = _arg2;
FTextSetMC.CallReDrawFrame = DrawFrame;
}
public function SetLastEleMent():void{
if (this.numChildren == 0){
return;
};
HideAllFrame();
var _local1:int = this.numChildren;
var _local2:MovieClipEx = MovieClipEx(this.getChildAt((_local1 - 1)));
FSelectMC = _local2;
var _local3:Shape = Shape(_local2.getChildByName(CONST_FRAMENAME));
if (_local3 != null){
_local3.visible = true;
};
}
public function AddMusicDefaultImg(_arg1:int):void{
var _local4:XML;
var _local5:MovieClipEx;
var _local6:BitmapData;
var _local7:Bitmap;
var _local2:int = FXMLDecoder.GetSoundCount(_arg1);
var _local3:int;
while (_local3 < _local2) {
_local4 = FXMLDecoder.GetSoundObj(_arg1, _local3);
_local5 = new MovieClipEx();
_local6 = FMusicImg.bitmapData.clone();
_local7 = new Bitmap(_local6);
_local5.addChild(_local7);
_local5.x = _local4.X;
_local5.y = _local4.Y;
_local5.CusName = ((("Sound_Img" + String(_arg1)) + "_nIndex") + String(_local3));
_local5.CusType = "sound";
_local5.CusIndex = _local3;
DrawFrame(_local7, false);
this.addChild(_local5);
_local5.addEventListener(MouseEvent.MOUSE_DOWN, StartDragMC);
_local5.addEventListener(MouseEvent.MOUSE_UP, StopDragMC);
_local5.addEventListener(MouseEvent.MOUSE_DOWN, OnMusicClick);
_local3++;
};
}
public function SetStopFrame(_arg1:int):void{
FnFrame = _arg1;
OnEnterFrame(null);
}
private function StopDragMC(_arg1:MouseEvent):void{
var _local2:MovieClipEx;
FbMouseDown = false;
if ((_arg1.currentTarget is SimpleButton)){
_local2 = MovieClipEx(_arg1.currentTarget.parent);
} else {
_local2 = MovieClipEx(_arg1.currentTarget);
};
_local2.stopDrag();
var _local3:int = GetIndex(_local2);
if (_local2.CusType == "clipart"){
ExternalInterface.call("MoveClipartPos", FnIndex, _local3, _local2.x, _local2.y);
} else {
if (_local2.CusType == "sound"){
ExternalInterface.call("MoveSoundPos", FnIndex, _local3, _local2.x, _local2.y);
} else {
ExternalInterface.call("MoveTextPos", FnIndex, _local3, _local2.x, _local2.y);
};
};
}
public function SetXMLDecoder(_arg1:XMLDecoder):void{
FXMLDecoder = _arg1;
}
private function OnLinkClick(_arg1:MouseEvent):void{
var _local2:MovieClipEx = MovieClipEx(_arg1.currentTarget);
OpenURL(_local2.CusURL);
}
private function GetItalic(_arg1:int):Boolean{
if ((_arg1 & TS_ITALIC) == TS_ITALIC){
return (true);
};
return (false);
}
private function DrawFrame(_arg1:DisplayObject, _arg2:Boolean):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:int;
var _local10:SimpleButton;
var _local11:Shape;
var _local12:Rectangle;
var _local3:Shape = new Shape();
if (_arg2){
_local11 = Shape(_arg1.parent.getChildByName(CONST_FRAMENAME));
if (_local11 != null){
_arg1.parent.removeChild(_local11);
};
_local4 = 0;
_local5 = 0;
_local6 = _arg1.width;
_local7 = _arg1.height;
} else {
_local12 = _arg1.getRect(_arg1.parent);
_local4 = _local12.x;
_local5 = _local12.y;
_local6 = _local12.width;
_local7 = _local12.height;
};
_local3.x = _arg1.x;
_local3.y = _arg1.y;
var _local8:Rectangle = new Rectangle(_local4, _local5, _local6, _local7);
var _local9:CLineDraw = new CLineDraw(_local3.graphics, _local8);
_local3.name = CONST_FRAMENAME;
_arg1.parent.addChildAt(_local3, 0);
if (_arg1.parent.getChildByName("BUTTON") == null){
_local10 = new SimpleButton();
_local10.name = "BUTTON";
_local10.hitTestState = _local3;
_arg1.parent.addChild(_local10);
} else {
_local10 = SimpleButton(_arg1.parent.getChildByName("BUTTON"));
_local10.hitTestState = _local3;
};
}
public function PlayElement():void{
FsState = "Play";
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
}
public function ChangeTextContent(_arg1:int, _arg2:String):void{
var _local3:TextField;
var _local4:TextFormat;
if (FSelectMC == null){
return;
};
if (FSelectMC.CusType == "text"){
_local3 = TextField(FSelectMC.getChildByName("textcon"));
if (_local3 != null){
if (_local3.length < 1){
_local4 = FSelformat;
} else {
_local4 = _local3.getTextFormat();
};
_local3.text = _arg2;
_local3.setTextFormat(_local4);
DrawFrame(_local3, true);
};
};
}
private function AddallMC():void{
var _local3:Object;
var _local4:int;
var _local5:TextItem;
var _local1:int;
while (_local1 < FAryMc.length) {
if ((FAryMc[_local1] is MovieClipEx)){
AddElement(FAryMc[_local1], _local1);
};
_local1++;
};
var _local2:int;
while (_local2 < FSound.length) {
_local3 = FSound[_local2];
_local3.CusBLoad = true;
_local2++;
};
if (FTextMC != null){
_local4 = 0;
while (_local4 < FTextMC.length) {
_local5 = FTextMC[_local4];
AddTextElement(_local5, _local4);
_local4++;
};
};
FSelectMC = null;
HideAllFrame();
}
private function OnTextClick(_arg1:MouseEvent):void{
var _local4:int;
var _local5:SimpleButton;
var _local6:int;
var _local2:MovieClipEx = MovieClipEx(_arg1.currentTarget);
FSelectMC = _local2;
var _local3:TextField = TextField(_local2.getChildByName("textcon"));
if (_local3 != null){
HideAllFrame();
FSetMC.HideFrom();
_local4 = GetIndex(_local2);
FTextSetMC.showsetting(_local3, FnIndex, _local4);
_local3.parent.getChildAt(0).visible = true;
_local5 = SimpleButton(_local3.parent.getChildByName("BUTTON"));
if (_local5 != null){
_local6 = _local3.parent.numChildren;
_local3.parent.setChildIndex(_local5, (_local6 - 1));
};
FSelformat = _local3.getTextFormat();
};
}
public function EditInitInfo():void{
this.addChild(FLineMC);
FLineMC.visible = false;
}
private function OpenURL(_arg1:String):void{
OpenLink.OpenWindow(_arg1);
}
private function SetElementInfo(_arg1:Object, _arg2:int, _arg3:Array):void{
var _local4:XML;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:Number;
var _local9:MovieClipEx;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:int;
if ((_arg1 is MovieClipEx)){
_local9 = MovieClipEx(_arg1);
_local10 = _local9.CusIndex;
switch (_local9.CusType){
case "clipart":
_local4 = FXMLDecoder.GetClipartObj(FnIndex, _local10);
break;
case "scene":
_local4 = FXMLDecoder.GetSceneObj(FnIndex, _local10);
break;
};
_local5 = _local4.PosInfo.Length;
if (_local5 < 1){
_local5 = 1;
};
_local6 = _local4.PosInfo.BeginTime;
_local7 = _local4.X;
_local8 = _local4.Y;
_local11 = _local4.Scale;
_local12 = _local4.Rotate;
_local13 = _local4.Alpha;
_local9.CusBLoad = false;
_local9.CusCurFrame = 0;
_local9.CusTotalFrame = (_local5 * FFrameRate);
_local9.CusBeginFrame = (_local6 * FFrameRate);
_local9.CusURL = _local4.Hyperlink;
if (_local9.CusType != "scene"){
_local9.x = _local7;
_local9.y = _local8;
};
_local9.rotation = _local12;
_local9.scaleX = (_local9.scaleY = _local11);
if (_local13 != 0){
_local9.CusAlpha = _local13;
_local9.alpha = _local13;
};
} else {
_local14 = _arg1.CusIndex;
_local4 = FXMLDecoder.GetSoundObj(FnIndex, _local14);
_local5 = _local4.PosInfo.Length;
_local6 = _local4.PosInfo.BeginTime;
_local7 = _local4.X;
_local8 = _local4.Y;
_arg1.CusBLoad = false;
_arg1.CusCurFrame = 0;
_arg1.CusTotalFrame = (_local5 * FFrameRate);
_arg1.CusBeginFrame = (_local6 * FFrameRate);
_arg1.x = _local7;
_arg1.y = _local8;
FSound.push(_arg1);
};
}
private function GetUnderline(_arg1:int):Boolean{
if ((_arg1 & TS_UNDERLINE) == TS_UNDERLINE){
return (true);
};
return (false);
}
private function AddElement(_arg1:MovieClipEx, _arg2:int):void{
var _local3:DisplayObject;
var _local4:SimpleButton;
var _local5:Number;
var _local6:int;
_arg1.CusBLoad = true;
if (FPubType == "Preview"){
_arg1.alpha = 0;
_arg1.addEventListener(Event.ENTER_FRAME, OnClipFrame);
if (_arg1.CusType == "clipart"){
SetObjLink(_arg1);
};
};
this.addChild(_arg1);
if ((((FPubType == "Edit")) && ((_arg1.CusType == "clipart")))){
if (_arg1.width > 400){
_local5 = (400 / _arg1.width);
_arg1.scaleX = (_arg1.scaleY = _local5);
_local6 = GetIndex(_arg1);
ExternalInterface.call("ClipartChange", FnIndex, _local6, 0, _local5, 1);
};
_local3 = _arg1.getChildAt(0);
DrawFrame(_local3, false);
_local4 = SimpleButton(_arg1.getChildByName("BUTTON"));
_local4.addEventListener(MouseEvent.MOUSE_DOWN, StartDragMC);
_local4.addEventListener(MouseEvent.MOUSE_UP, StopDragMC);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, OnMCClick);
FSelectMC = _arg1;
};
}
private function GetIndex(_arg1:MovieClipEx):int{
var _local6:MovieClipEx;
var _local2:MovieClip = MovieClip(_arg1.parent);
var _local3:int;
var _local4:String = _arg1.CusType;
var _local5:int;
while (_local5 < _local2.numChildren) {
_local6 = MovieClipEx(_local2.getChildAt(_local5));
if (_local6.CusType == _local4){
if (_local6 == _arg1){
return (_local3);
};
_local3++;
};
_local5++;
};
return (_arg1.CusIndex);
}
public function PlayStepEle(_arg1:int):void{
var _local2:MovieClip = new MovieClip();
this.addChild(_local2);
var _local3:int = (this.getChildIndex(_local2) + 1);
this.removeChild(_local2);
_local2 = null;
}
private function OnMusicClick(_arg1:MouseEvent):void{
HideAllFrame();
var _local2:MovieClipEx = MovieClipEx(_arg1.currentTarget);
FSelectMC = _local2;
var _local3:int = GetIndex(_local2);
ExternalInterface.call("SoundClick", FnIndex, _local3);
_local2.getChildAt(0).visible = true;
}
public function RemoveAllMovieClip():void{
while (this.numChildren) {
this.removeChildAt((this.numChildren - 1));
};
}
public function DeleteElement(_arg1:int):void{
if (FSelectMC != null){
FSelectMC.parent.removeChild(FSelectMC);
FSelectMC = null;
FSetMC.HideFrom();
FTextSetMC.HideFrom();
};
}
private function OnMCClick(_arg1:MouseEvent):void{
HideAllFrame();
FTextSetMC.HideFrom();
var _local2:MovieClipEx = MovieClipEx(_arg1.currentTarget);
FSelectMC = _local2;
var _local3:int = GetIndex(_local2);
fscommand("当前选择Clipart索引:", String(_local3));
FSetMC.showsetting(_local2, FnIndex, _local3);
_local2.getChildAt(0).visible = true;
}
private function OnClipFrame(_arg1:Event):void{
var _local2:MovieClip;
if (FsState != "Play"){
return;
};
if ((_arg1.currentTarget is MovieClip)){
_local2 = MovieClip(_arg1.currentTarget);
if (_local2.CusCurFrame < 10){
_local2.alpha = (_local2.CusAlpha * (_local2.CusCurFrame / 10));
};
if (_local2.CusCurFrame > (_local2.CusTotalFrame - 10)){
_local2.alpha = (_local2.alpha - 0.1);
};
_local2.CusCurFrame++;
if (_local2.CusCurFrame == _local2.CusTotalFrame){
_local2.removeEventListener(Event.ENTER_FRAME, OnClipFrame);
this.removeChild(_local2);
};
};
}
public function AddText(_arg1:int):void{
var _local4:XML;
var _local5:int;
var _local6:Number;
var _local7:TextFormat;
var _local8:int;
var _local9:TextField;
var _local10:TextItem;
if (FTextMC == null){
FTextMC = new Array();
} else {
FTextMC.splice(0);
};
var _local2:int = FXMLDecoder.GetTextCount(_arg1);
if (_local2 < 1){
return;
};
FSelformat = new TextFormat();
var _local3:int;
while (_local3 < _local2) {
_local4 = FXMLDecoder.GetTextObj(_arg1, _local3);
_local5 = _local4.PosInfo.Length;
_local6 = _local4.PosInfo.BeginTime;
_local7 = new TextFormat();
_local7.font = _local4.FontName;
_local7.color = _local4.FontColor;
_local7.size = _local4.FontSize;
_local8 = _local4.Style;
_local7.bold = GetBold(_local8);
_local7.italic = GetItalic(_local8);
_local7.underline = GetUnderline(_local8);
_local9 = new TextField();
_local9.text = _local4.Text;
_local9.x = _local4.X;
_local9.y = _local4.Y;
_local9.alpha = _local4.FontAlpha;
_local9.selectable = false;
_local9.autoSize = TextFieldAutoSize.LEFT;
_local9.setTextFormat(_local7);
_local10 = new TextItem(_local9);
_local10.FCusBLoad = false;
_local10.FCusCurFrame = 0;
_local10.FCusTotalFrame = (_local5 * FFrameRate);
_local10.FCusBeginFrame = (_local6 * FFrameRate);
_local10.FEffectName = _local4.EffectID;
_local10.FCusIndex = _local3;
_local10.FParent = MovieClip(this.parent);
FTextMC.push(_local10);
_local3++;
};
}
private function OnEnterFrame(_arg1:Event):void{
var _local4:MovieClipEx;
var _local5:Object;
var _local6:Sound;
var _local7:int;
var _local8:TextItem;
trace(("FnFrame:" + FnFrame));
FnFrame++;
var _local2:int;
while (_local2 < FAryMc.length) {
if ((FAryMc[_local2] is MovieClipEx)){
_local4 = FAryMc[_local2];
if ((((FnFrame >= _local4.CusBeginFrame)) && (!(_local4.CusBLoad)))){
AddElement(_local4, _local2);
};
};
_local2++;
};
var _local3:int;
while (_local3 < FSound.length) {
_local5 = FSound[_local3];
if ((((FnFrame >= _local5.CusBeginFrame)) && (!(_local5.CusBLoad)))){
_local5.CusBLoad = true;
if (FPubType == "Preview"){
_local6 = _local5.CusSound;
_local6.play();
};
};
_local3++;
};
if (FTextMC != null){
_local7 = 0;
while (_local7 < FTextMC.length) {
_local8 = FTextMC[_local7];
if ((((FnFrame >= _local8.FCusBeginFrame)) && (!(_local8.FCusBLoad)))){
AddTextElement(_local8, _local7);
};
_local7++;
};
};
}
private function AddTextElement(_arg1:TextItem, _arg2:int):void{
var _local5:SimpleButton;
_arg1.FCusBLoad = true;
var _local3:TextField = _arg1.FText;
_local3.name = "textcon";
var _local4:MovieClipEx = new MovieClipEx();
_local4.addChildAt(_local3, 0);
_local4.x = _local3.x;
_local4.y = _local3.y;
_local3.x = 0;
_local3.y = 0;
_local4.blendMode = BlendMode.LAYER;
_local4.CusType = "text";
if (FPubType == "Edit"){
_local4.CusIndex = _arg2;
_local4.CusName = ((("Text_Img" + String(FnIndex)) + "_nIndex") + String(_arg2));
this.addChild(_local4);
DrawFrame(_local3, true);
_local5 = SimpleButton(_local4.getChildByName("BUTTON"));
_local5.addEventListener(MouseEvent.MOUSE_DOWN, StartDragMC);
_local5.addEventListener(MouseEvent.MOUSE_UP, StopDragMC);
_local4.addEventListener(MouseEvent.MOUSE_DOWN, OnTextClick);
FSelformat = _local3.getTextFormat();
FSelectMC = _local4;
} else {
_local4.CusURL = FXMLDecoder.GetTextLink(FnIndex, _arg2);
this.addChild(_local4);
SetObjLink(_local4);
_arg1.PlayEffect(FPubType);
};
}
public function SelectTextEffect(_arg1:int, _arg2:String):void{
var _local3:TextField;
var _local4:Array;
var _local5:TextItem;
if (FSelectMC == null){
return;
};
if (FSelectMC.CusType == "text"){
_local3 = TextField(FSelectMC.getChildByName("textcon"));
if (_local3 != null){
_local4 = FTextMC.filter(IsSelectedText);
if (_local4.length == 1){
_local5 = _local4[0];
_local5.StopEffect();
DrawFrame(_local3, true);
_local5.FEffectName = _arg2;
_local5.Init();
_local5.PlayEffect("Edit");
};
};
};
}
private function GetBold(_arg1:int):Boolean{
if ((_arg1 & TS_BOLD) == TS_BOLD){
return (true);
};
return (false);
}
private function HideAllFrame():void{
var _local2:MovieClip;
var _local3:Shape;
var _local1:int;
while (_local1 < this.numChildren) {
_local2 = MovieClip(this.getChildAt(_local1));
_local3 = Shape(_local2.getChildByName(CONST_FRAMENAME));
if (_local3 != null){
_local3.visible = false;
};
_local1++;
};
}
public function SetMusicImg(_arg1:Bitmap):void{
FMusicImg = _arg1;
}
private function IsSelectedText(_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:TextField = TextField(FSelectMC.getChildByName("textcon"));
return ((_arg1.FText == _local4));
}
private function SetObjLink(_arg1:MovieClipEx):void{
if (_arg1.CusURL == ""){
return;
};
var _local2:SimpleButton = new SimpleButton();
_local2.name = "BUTTON";
_local2.hitTestState = _arg1.getChildAt(0);
_arg1.addEventListener(MouseEvent.CLICK, OnLinkClick);
_arg1.addChild(_local2);
}
public function SelectElement(_arg1:String, _arg2:int):void{
var _local5:MovieClipEx;
var _local6:Shape;
var _local7:TextField;
HideAllFrame();
var _local3:int;
fscommand("当前数量:", String(this.numChildren));
var _local4:int;
while (_local4 < this.numChildren) {
_local5 = MovieClipEx(this.getChildAt(_local4));
if (_arg1 == _local5.CusType){
if (_local3 == _arg2){
FSelectMC = _local5;
if (FSelectMC.CusType == "text"){
_local7 = TextField(FSelectMC.getChildByName("textcon"));
FSelformat = _local7.getTextFormat();
};
_local6 = Shape(_local5.getChildByName(CONST_FRAMENAME));
if (_local6 != null){
_local6.visible = true;
};
break;
} else {
_local3++;
};
};
_local4++;
};
}
public function StopElement():void{
this.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
FsState = "Stop";
}
private function GetMovieClipTraget(_arg1:DisplayObject):String{
var _local2:String;
if (_arg1 == null){
_local2 = "";
return (_local2);
};
if (_arg1.parent != null){
_local2 = ((GetMovieClipTraget(_arg1.parent) + ".") + _arg1.name);
};
return (_local2);
}
public function SetPlayIndex(_arg1:Array, _arg2:int):void{
FnIndex = _arg2;
FAryMc = _arg1;
FnFrame = 0;
if (FSound == null){
FSound = new Array();
} else {
FSound.splice(0);
};
AddText(FnIndex);
if (FAryMc.length > 0){
FAryMc.forEach(SetElementInfo);
};
if (FPubType == "Preview"){
StopElement();
PlayElement();
} else {
FSetMC.HideFrom();
FTextSetMC.HideFrom();
AddMusicDefaultImg(FnIndex);
AddallMC();
};
}
}
}//package
Section 10
//Fade (Fade)
package {
import flash.display.*;
import flash.text.*;
public class Fade extends CusMotion {
private var textmc:StaticText;
private var FPara:Object;
public var className:String;// = "Fade"
private var _alphaFinal:Number;
public var type:Object;
public function Fade(_arg1:DisplayObject, _arg2:Object){
type = Fade;
super(_arg1, _arg2);
FPara = _arg2;
init(_arg1, _arg2);
}
override public function init(_arg1:DisplayObject, _arg2:Object):void{
super.init(_arg1, _arg2);
_alphaFinal = _arg1.alpha;
}
override public function _render(_arg1:Number):void{
if (_arg1 <= 0.3){
_content.alpha = (((_arg1 * 100) / 30) * _alphaFinal);
} else {
if (_arg1 >= 0.7){
_content.alpha = ((((1 - _arg1) * 100) / 30) * _alphaFinal);
};
};
}
}
}//package
Section 11
//FlyIn (FlyIn)
package {
import flash.display.*;
import flash.geom.*;
public class FlyIn extends CusMotion {
public var className:String;// = "FlyIn"
private var sx:Number;
private var _yInitial:Number;
private var _xInitial:Number;
private var _startPoint:Number;// = 4
private var FTotalFrame:Number;
private var sy:Number;
private var _yFinal:Number;
private var _xFinal:Number;
private var FPara:Object;
public function FlyIn(_arg1:DisplayObject, _arg2:Object){
super(_arg1, _arg2);
FPara = _arg2;
init(_arg1, _arg2);
}
override public function _render(_arg1:Number):void{
var _local2:Number;
if (FPara.duration > 3){
if (IsNeedEffect((_arg1 * FTotalFrame))){
_local2 = (1 - ((_arg1 * FTotalFrame) / GetEffectFrame()));
};
} else {
_local2 = (1 - _arg1);
};
_content.x = (_xFinal + (sx * _local2));
_content.y = (_yFinal + (sy * _local2));
}
override public function init(_arg1:DisplayObject, _arg2:Object):void{
super.init(_arg1, _arg2);
_xFinal = 0;
_yFinal = 0;
var _local3:MovieClip = MovieClip(FPara.ParentMC);
var _local4:Rectangle = _arg1.getBounds(_local3);
var _local5:int = FPara.duration;
FTotalFrame = (FPara.duration * FPara.FPS);
switch (FPara.dimension){
case 1:
_xInitial = -(_local4.x);
_yInitial = -(_local4.y);
break;
case 2:
_xInitial = 0;
_yInitial = -(_local4.y);
break;
case 3:
_xInitial = (FPara.width - _local4.x);
_yInitial = -(_local4.y);
break;
case 4:
_xInitial = -(_local4.x);
_yInitial = 0;
break;
case 5:
_xInitial = _xFinal;
_yInitial = _yFinal;
break;
case 6:
_xInitial = (FPara.width - _local4.x);
_yInitial = _yFinal;
break;
case 7:
_xInitial = -(_local4.x);
_yInitial = (FPara.height - _local4.y);
break;
case 8:
_xInitial = _xFinal;
_yInitial = (FPara.height - _local4.y);
break;
case 9:
_xInitial = (FPara.width - _local4.x);
_yInitial = (FPara.height - _local4.y);
break;
};
sx = (_xInitial - _xFinal);
sy = (_yInitial - _yFinal);
}
}
}//package
Section 12
//FSBTemplate (FSBTemplate)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.geom.*;
import flash.system.*;
import flash.net.*;
public class FSBTemplate extends MovieClip {
private const sPlayMC:String = "playmc";
private const sCusflash:String = "customflash";
private var fID:int;
private var fAddInit:Boolean;// = false
private var FBKPlaying:Boolean;
private var _ProPlay:Function;
private var FTemplateHeight:int;
private var LF_PLAY_ONCE:String;// = "LF_PLAY_ONCE"
private var FlabHidePalyWindows:String;// = "hideplaywindow"
public var FTemplateType:String;// = "nomal"
public var FThumbNext:MovieClip;
public var FBtnNext:MovieClip;
public var FLabTotalPage:TextField;
public var FNumThumb:int;
private var FPreXML:PreLoadXML;
private var FBKMusic:Sound;
public var FPlayHeight:int;// = 540
public var FLabTotalImg:TextField;
public var FBGImgMC:MovieClip;
private var FBegMC:MovieClip;
private var FResource:ReadAllRES;
private var DEF_ENDIMAGEINDEX:Number;// = 0xFFFF
private var Fxmlstr:String;
private var LF_REPLAY_BUTTON:String;// = "LF_REPLAY_BUTTON"
public var FBtnPlay:MovieClip;
public var FbAutoPlay:Boolean;// = true
private var FbRead:Boolean;// = false
private var FFlashWidth:int;// = 720
public var FthumbType:String;// = "image"
private var LF_AUTO_LOOP:String;// = "LF_AUTO_LOOP"
private var FBKPlayed:Boolean;// = false
private var fb:Boolean;// = false
private var FBKPos:Number;// = 0
private var FnIndex:int;// = 0
private var FTemplate:MovieClip;
public var FLoadMC:MovieClip;
public var FBtnPior:MovieClip;
public var FThumbPior:MovieClip;
private var FBKChannel:SoundChannel;
private var FOldEffect:MovieClip;
private var FEndMC:MovieClip;
private var FMCEffect:MovieClip;
private var FFlashHeight:int;// = 540
private var sTemplateBG:String;// = "bgcolor"
private var FXMLDecoder:XMLDecoder;
private var FThumbAry:Array;
private var FSWFDecord:SWFDecoder;
public var FThumb:MovieClip;
private var FBECurFrame:int;
private var Fpercent:Number;
private var FBShowRePlay:Boolean;// = false
public var FPlayWidth:int;// = 720
public var FWindows:MovieClip;
private var FTemplateWidht:int;
private var FMaskMC:MovieClip;
public var FBtnMusic:MovieClip;
private var FnPage:int;// = 0
private var FlashDate:ByteArray;
private var FlabShowPalyWindows:String;// = "showplaywindow"
private var FbReadAll:Boolean;// = false
public var FPlayMC:MovieClip;
public var FPlayWidows:MovieClip;
private var DEF_OPENIMAGEINDEX:Number;// = 65534
private var FPreDate:ByteArray;
private var FElement:ElementSprite;
public var FRootMC:MovieClip;
public var _BeginPlay:Function;
private var FScene:Scene;
private var FnTotalPage:int;
private var FThumbBmpAry:Array;
private var FPlayStae:String;// = "play"
public function FSBTemplate(){
Security.allowDomain("*");
FRootMC = new MovieClip();
this.addChild(FRootMC);
LoadSelf();
}
public function ProThumbPiorClick(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
if (!_local2.enabled){
return;
};
if (FBShowRePlay){
return;
};
FnPage--;
if (FnPage <= 0){
FnPage = 0;
FThumbPior.enabled = false;
};
FThumbNext.enabled = true;
ShowThumb(FnPage);
PlayCustomflash();
if (FThumb != null){
FThumb.play();
};
}
private function PlayTemplateMC():void{
if (FBegMC != null){
if (FBegMC.parent == FRootMC){
FRootMC.removeChild(FBegMC);
};
};
var _local1:int = FRootMC.getChildIndex(FElement);
FRootMC.addChildAt(FTemplate, _local1);
FTemplate.gotoAndPlay(1);
if (FWindows != null){
BeginMovie();
FWindows.gotoAndStop(1);
FWindows.addEventListener(Event.ENTER_FRAME, OnFWindowsEnter);
};
if (FThumb != null){
FThumb.gotoAndStop(1);
};
FTemplate.MainPlay();
CheckPlayFrame();
}
private function FWindowExit(_arg1:Function=null):void{
if (FWindows != null){
FPlayWidows.visible = false;
FWindows.gotoAndPlay(FlabHidePalyWindows);
if (FbAutoPlay){
FWindows.addEventListener(Event.ENTER_FRAME, FWindowsEnterframe);
};
};
}
private function PlayBegMC():void{
if (FBShowRePlay){
FBShowRePlay = false;
SetBtnState(true);
if (((FBKPlayed) && (!(FXMLDecoder.GetBKMusicLoop())))){
PlayMusic(true);
};
};
FRootMC.addChild(FBegMC);
if (FEndMC.parent == FRootMC){
FRootMC.removeChild(FEndMC);
};
FRootMC.setChildIndex(FElement, (FRootMC.numChildren - 1));
FElement.SetPlayIndex(FResource.FIntroAry, DEF_OPENIMAGEINDEX);
FBECurFrame = 1;
FBegMC.gotoAndPlay(1);
FBegMC.addEventListener(Event.ENTER_FRAME, OnBegMCFrame);
}
public function ProBtnNext(_arg1:MouseEvent):void{
var _local3:ReplayBtn;
if (FBShowRePlay){
return;
};
if (FPlayMC != null){
FPlayMC.removeEventListener(Event.ENTER_FRAME, onEffectEnterFrame);
};
var _local2:int = FXMLDecoder.GetSwfCount();
fID = (fID + 1);
if (FBtnPior != null){
FBtnPior.enabled = true;
};
if (FBtnNext != null){
if (fID == _local2){
FBtnNext.enabled = false;
} else {
FBtnNext.enabled = true;
};
};
if (((!((FEndMC == null))) && ((fID >= _local2)))){
PlayEndMC();
fID = 0;
return;
};
if (fID >= _local2){
OpenEndURL();
switch (FXMLDecoder.GetLoopType()){
case LF_AUTO_LOOP:
fID = 0;
RePlayOnClick(_arg1);
return;
case LF_PLAY_ONCE:
fID = (_local2 - 1);
return;
case LF_REPLAY_BUTTON:
if ((((FTemplateType == "advanced")) && (!(FbAutoPlay)))){
fID = (_local2 - 1);
return;
};
fID = 0;
FBShowRePlay = true;
SetBtnState(false);
_local3 = new ReplayBtn();
_local3.ShowBtn(this, RePlayOnClick);
return;
};
};
RePlayOnClick(_arg1);
}
public function BeginMovie():void{
PlayProc(fID);
}
private function StepPlay(_arg1:int):void{
PlayProc(fID, true);
}
private function LoadPreLoad(_arg1:MovieClip):void{
var _local5:uint;
var _local6:TextFormat;
FLoadMC = _arg1;
if (FResource != null){
FResource.SetPreLoader(FLoadMC);
};
var _local2:uint = FPreXML.GetPreLoadTextColor();
var _local3:MovieClip = MovieClip(FLoadMC.getChildByName("bgmc"));
var _local4:TextField = TextField(FLoadMC.getChildByName("loadtext"));
if (FPreXML.GetPreLoadUse()){
_local5 = FPreXML.GetPreLoadBGColor();
if (_local3 != null){
_arg1 = new MovieClip();
_arg1.graphics.beginFill(_local5, 1);
_arg1.graphics.drawRect(0, 0, _local3.width, _local3.height);
_arg1.graphics.endFill();
_local3.addChild(_arg1);
};
};
if (_local4 != null){
_local6 = _local4.getTextFormat();
_local6.color = _local2;
_local4.text = "0%";
_local4.setTextFormat(_local6);
};
FRootMC.addChild(FLoadMC);
}
private function ProBtnPlay(_arg1:MouseEvent):void{
if (FBShowRePlay){
return;
};
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
if ((((_local2.currentFrame == 1)) || ((_local2.currentFrame == 2)))){
_local2.gotoAndStop(3);
if (FMCEffect != null){
FMCEffect.PlayEffect();
if (FPlayMC != null){
FPlayMC.addEventListener(Event.ENTER_FRAME, onEffectEnterFrame);
};
};
PlayMusic(false);
FPlayStae = "play";
} else {
_local2.gotoAndStop(1);
PauseMusic();
if (FMCEffect != null){
FMCEffect.PauseEffect();
if (FPlayMC != null){
FPlayMC.removeEventListener(Event.ENTER_FRAME, onEffectEnterFrame);
};
};
FPlayStae = "pause";
};
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local4:ByteArray;
var _local5:MovieClip;
var _local6:TextField;
var _local7:TextFormat;
var _local2:URLStream = URLStream(_arg1.target);
if ((((_local2.bytesAvailable > 0xC800)) && (!(fb)))){
fb = true;
FPreDate = new ByteArray();
_local4 = new ByteArray();
_local2.readBytes(_local4);
FPreDate.writeBytes(_local4);
ReadPreLoader(_local4);
};
var _local3:Number = (_arg1.bytesLoaded / _arg1.bytesTotal);
Fpercent = Math.round((_local3 * 80));
if (FLoadMC != null){
_local5 = MovieClip(FLoadMC.getChildByName("bgmc"));
_local6 = TextField(FLoadMC.getChildByName("loadtext"));
_local7 = _local6.getTextFormat();
_local6.text = (String(Fpercent) + "%");
_local6.setTextFormat(_local7);
};
}
private function TemplateOnEnterFrame(_arg1:Event):void{
var _local3:FrameLabel;
var _local2:Array = FTemplate.currentLabels;
if (_local2.length > 0){
_local3 = _local2[0];
if (FTemplate.currentFrame == _local3.frame){
FTemplate.removeEventListener(Event.ENTER_FRAME, TemplateOnEnterFrame);
BeginMovie();
};
};
}
private function OnLinkClick(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
var _local3:String = FXMLDecoder.GetImgLink(fID);
OpenURL(_local3);
}
private function ShowLabelImg():void{
var _local1:int = FXMLDecoder.GetSwfCount();
if (FLabTotalImg != null){
FLabTotalImg.visible = true;
FLabTotalImg.text = ((String((fID + 1)) + "/") + String(_local1));
};
}
private function SelfLoadComplated(_arg1:Event):void{
var _local2:String = FRootMC.loaderInfo.url;
var _local3:int = _local2.lastIndexOf("/");
var _local4:String = _local2.slice((_local3 + 1));
var _local5:URLRequest = new URLRequest(_local2);
var _local6:URLLoader = new URLLoader();
_local6.dataFormat = URLLoaderDataFormat.BINARY;
_local6.addEventListener(Event.COMPLETE, loadComplated);
_local6.load(_local5);
}
public function loadComplated(_arg1:Event):void{
FlashDate = (_arg1.target as URLLoader).data;
StreamCom(FlashDate);
}
private function CheckPlayFrame():void{
var _local1:Array = FTemplate.currentLabels;
if (_local1.length > 0){
FTemplate.addEventListener(Event.ENTER_FRAME, TemplateOnEnterFrame);
} else {
BeginMovie();
};
}
private function CheckBtnState():void{
var _local1:int = FXMLDecoder.GetSwfCount();
var _local2:int = FnTotalPage;
if (fID == (_local1 - 1)){
FBtnNext.enabled = false;
} else {
FBtnNext.enabled = true;
};
if (fID == 0){
FBtnPior.enabled = false;
} else {
FBtnPior.enabled = true;
};
}
private function ChangeBkImage():void{
var _local1:Bitmap = FResource.FTemplateImg;
if ((((FBGImgMC == null)) || ((_local1 == null)))){
return;
};
_local1.smoothing = true;
var _local2:int = _local1.width;
var _local3:int = _local1.height;
var _local4:int = FFlashWidth;
var _local5:int = FFlashHeight;
var _local6:Number = 1;
if ((((FFlashWidth > _local1.width)) || ((FFlashHeight > _local1.height)))){
if ((_local2 * _local5) > (_local4 * _local3)){
_local6 = (_local4 / _local2);
_local3 = int((_local3 * _local6));
_local1.scaleX = (_local1.scaleY = _local6);
_local1.y = ((_local5 - _local3) / 2);
} else {
_local6 = (_local5 / _local3);
_local2 = int((_local2 * _local6));
_local1.scaleX = (_local1.scaleY = _local6);
_local1.x = ((_local4 - _local2) / 2);
};
} else {
if ((_local2 * _local5) > (_local4 * _local3)){
_local6 = (_local4 / _local2);
_local3 = int((_local3 * _local6));
_local1.scaleX = (_local1.scaleY = _local6);
_local1.y = ((_local5 - _local3) / 2);
} else {
_local6 = (_local5 / _local3);
_local2 = int((_local2 * _local6));
_local1.scaleX = (_local1.scaleY = _local6);
_local1.x = ((_local4 - _local2) / 2);
};
};
FBGImgMC.addChild(_local1);
}
private function OpenURL(_arg1:String):void{
if (_arg1 != ""){
OpenLink.OpenWindow(_arg1);
};
}
public function GetThumbCount():int{
return (FThumbAry.length);
}
public function ShowThumb(_arg1:int):void{
FnPage = _arg1;
ShowLabPage();
FnIndex = (FnPage * FThumbAry.length);
FThumbBmpAry = FResource.GetBMP(FnIndex, FThumbAry.length);
FThumbAry.forEach(ReplaceImage);
ThumbBtnState();
}
private function OnPreLoaderComplate(_arg1:Event):void{
var _local2:Loader = (_arg1.target.loader as Loader);
_local2.contentLoaderInfo.removeEventListener(Event.COMPLETE, OnPreLoaderComplate);
LoadPreLoad((_local2.content as MovieClip));
}
private function PlayEndMC():void{
var _local1:int = FRootMC.getChildIndex(FElement);
FRootMC.addChildAt(FEndMC, _local1);
if (FTemplate.parent == FRootMC){
FRootMC.removeChild(FTemplate);
};
FElement.SetPlayIndex(FResource.FEndAry, DEF_ENDIMAGEINDEX);
FBECurFrame = 1;
FEndMC.gotoAndPlay(1, FEndMC.scenes[2].name);
FEndMC.addEventListener(Event.ENTER_FRAME, OnEndMCFrame);
}
private function StreamLoadComplated(_arg1:Event):void{
var _local2:URLStream = URLStream(_arg1.target);
var _local3:ByteArray = new ByteArray();
trace(_local2.bytesAvailable);
_local2.readBytes(_local3);
if (FPreDate != null){
FPreDate.writeBytes(_local3);
StreamCom(FPreDate);
_local2.removeEventListener(Event.COMPLETE, StreamLoadComplated);
};
}
private function PlayProc(_arg1:int, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:Bitmap;
var _local5:int;
var _local6:String;
var _local7:MovieClip;
if (FPlayWidows != null){
_local3 = FResource.GetBMP(_arg1, 1);
_local4 = _local3[0];
if (_local4 != null){
_local5 = FXMLDecoder.GetImgShowTime(_arg1);
FPlayWidows.SetBmp(_arg1, _local4, _local5);
_local6 = FXMLDecoder.GetImgLink(_arg1);
if (_local6 != ""){
SetObjLink(FPlayWidows);
};
ShowPageThumb();
PlayCustomflash();
};
} else {
if (FPlayMC == null){
} else {
if (FbReadAll){
_local7 = FResource.GetMC(_arg1);
if (_local7 != null){
AddMovieClip(_local7, _arg2);
};
ShowLabelImg();
};
};
};
}
public function ProBtnPior(_arg1:MouseEvent):void{
if (FBShowRePlay){
return;
};
fID = (fID - 1);
if (FBtnNext != null){
FBtnNext.enabled = true;
};
if (FBtnPior != null){
if (fID == 0){
FBtnPior.enabled = false;
} else {
FBtnPior.enabled = true;
};
};
if (fID <= 0){
fID = 0;
};
StepPlay(fID);
if (FPlayWidows != null){
FPlayWidows.playeffect();
};
}
private function FWindowsEnterframe(_arg1:Event):void{
if (FWindows.currentFrame == FWindows.totalFrames){
FWindows.removeEventListener(Event.ENTER_FRAME, FWindowsEnterframe);
AutoPlayTemplate();
};
}
private function ProBtnMusic(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
if ((((_local2.currentFrame == 1)) || ((_local2.currentFrame == 2)))){
_local2.gotoAndPlay(3);
PauseMusic();
} else {
_local2.gotoAndPlay(1);
PlayMusic(false);
};
}
private function RePlayOnClick(_arg1:Event=null):void{
if (FBShowRePlay){
SetBtnState(true);
FBShowRePlay = false;
if (((FBKPlayed) && (!(FXMLDecoder.GetBKMusicLoop())))){
PlayMusic(true);
};
};
FOldEffect = FMCEffect;
if (_arg1 == null){
PlayProc(fID);
} else {
PlayProc(fID, true);
};
if (FPlayWidows != null){
FPlayWidows.playeffect();
};
}
private function CallBackTemplateCom(_arg1:String, _arg2:Object):void{
switch (_arg1){
case "RadioClick":
if (_arg2.bAutoPlay != FbAutoPlay){
FbAutoPlay = _arg2.bAutoPlay;
if (FPlayWidows != null){
FPlayWidows.FAutoPlay = FbAutoPlay;
FPlayWidows.FCurFrame = 1;
};
};
break;
};
}
private function TemplateInit():void{
FTemplate = FResource.FTemplate;
FBegMC = FResource.FBegMC;
FEndMC = FResource.FEndMC;
FBGImgMC = MovieClip(FTemplate.getChildByName("bgcolor"));
if (!FXMLDecoder.IsDefExportType()){
this.stage.scaleMode = "noScale";
FMaskMC = new MovieClip();
FFlashWidth = FXMLDecoder.GetExportWidth();
FFlashHeight = FXMLDecoder.GetExportHeight();
FMaskMC.graphics.lineStyle();
FMaskMC.graphics.beginFill(0xFFFF00);
FMaskMC.graphics.drawRect(0, 0, FFlashWidth, FFlashHeight);
FMaskMC.graphics.endFill();
};
ChangeBkImage();
if (("FFunPro" in FTemplate)){
FTemplate.FFunPro = CallBackTemplateCom;
};
if (FTemplate != null){
FTemplateWidht = FTemplate.FTemplateWidth;
FTemplateHeight = FTemplate.FTemplateHeight;
if (((!((FTemplateWidht == 720))) || (!((FTemplateHeight == 540))))){
FTemplate.scaleX = (FTemplate.scaleY = (720 / FTemplateWidht));
};
if (FBegMC != null){
FBegMC.scaleX = (FBegMC.scaleY = (FFlashWidth / FTemplateWidht));
FEndMC.scaleX = (FEndMC.scaleY = (FFlashWidth / FTemplateWidht));
};
if (("FSizeW" in FTemplate)){
FTemplate.FSizeW = FFlashWidth;
FTemplate.FSizeH = FFlashHeight;
};
FTemplate.FImageCount = FXMLDecoder.GetImageCount();
FWindows = FTemplate.FWindows;
FThumb = FTemplate.FThumb;
if (("FTemplateType" in FTemplate)){
FTemplateType = FTemplate.FTemplateType;
};
if (FTemplateType == "advanced"){
FPlayWidows = MovieClip(FTemplate.getChildByName("playwindows"));
FbAutoPlay = FTemplate.FbAutoPlay;
FPlayWidows.visible = false;
FPlayWidows.FExitFun = FWindowExit;
};
FNumThumb = FTemplate.FNumThumb;
FthumbType = FTemplate.FthumbType;
FThumbAry = FTemplate.FThumbAry;
FPlayMC = FTemplate.FMainMC;
FBtnPlay = FTemplate.FBtnPlay;
FBtnMusic = FTemplate.FBtnMusic;
FLoadMC = FTemplate.FLoadMC;
FBtnPior = FTemplate.FBtnPior;
FBtnNext = FTemplate.FBtnNext;
FThumbPior = FTemplate.FThumbPior;
FThumbNext = FTemplate.FThumbNext;
if (FBtnPior != null){
FBtnPior.addEventListener(MouseEvent.CLICK, ProBtnPior);
};
if (FBtnNext != null){
FBtnNext.addEventListener(MouseEvent.CLICK, ProBtnNext);
};
if (FThumbPior != null){
FThumbPior.addEventListener(MouseEvent.CLICK, ProThumbPiorClick);
};
if (FThumbNext != null){
FThumbNext.addEventListener(MouseEvent.CLICK, ProThumbNextClick);
};
if (FBtnPlay != null){
FBtnPlay.addEventListener(MouseEvent.CLICK, ProBtnPlay);
};
if (FBtnMusic != null){
FBtnMusic.addEventListener(MouseEvent.CLICK, ProBtnMusic);
};
FTemplate.FProSetInfo();
if (FThumbAry != null){
FThumbAry.forEach(AddThumbEvent);
};
FLabTotalImg = FTemplate.FLabTotalImg;
FLabTotalPage = FTemplate.FLabTotalPage;
FPlayWidth = FTemplate.FPlayWidth;
FPlayHeight = FTemplate.FPlayHeight;
};
}
private function SetObjLink(_arg1:MovieClip):void{
_arg1.addEventListener(MouseEvent.CLICK, OnLinkClick);
}
private function DateReadComplate():void{
var _local1:Watermark;
if (FXMLDecoder.GetWondershare()){
_local1 = new Watermark();
_local1.ShowWaterMark(this);
};
trace("ReadDate Complated");
if (FLoadMC != null){
FLoadMC.visible = false;
};
InitInfo();
FBKMusic = FResource.GetBkMusic();
if (FBKMusic != null){
PlayMusic(true);
} else {
if (((!((FBtnMusic == null))) && ((FTemplateType == "advanced")))){
FBtnMusic.visible = false;
};
};
if (FBegMC != null){
PlayBegMC();
} else {
PlayTemplateMC();
};
}
private function OnBkComplate(_arg1:Event):void{
FBKPlayed = true;
FBKPos = 0;
FBKPlaying = false;
FBKChannel.removeEventListener(Event.COMPLETE, OnBkComplate);
if (FXMLDecoder.GetBKMusicLoop()){
PlayMusic(true);
};
}
public function ProThumbNextClick(_arg1:MouseEvent):void{
var _local2:MovieClip = MovieClip(_arg1.currentTarget);
if (!_local2.enabled){
return;
};
if (FBShowRePlay){
return;
};
FnPage++;
if (FnPage >= (FnTotalPage - 1)){
FnPage = (FnTotalPage - 1);
FThumbNext.enabled = false;
} else {
FThumbPior.enabled = true;
};
ShowThumb(FnPage);
PlayCustomflash();
if (FThumb != null){
FThumb.play();
};
}
private function AddMask():void{
if (!FXMLDecoder.IsDefExportType()){
if ((FFlashWidth * 540) > (FFlashHeight * 720)){
FRootMC.scaleX = (FRootMC.scaleY = (FFlashWidth / FTemplateWidht));
} else {
FRootMC.scaleX = (FRootMC.scaleY = (FFlashHeight / FTemplateHeight));
};
FRootMC.x = (360 - ((FTemplateWidht * FRootMC.scaleX) / 2));
FRootMC.y = (270 - ((FTemplateHeight * FRootMC.scaleY) / 2));
FRootMC.mask = FMaskMC;
FMaskMC.x = (360 - (FFlashWidth / 2));
FMaskMC.y = (270 - (FFlashHeight / 2));
this.addChild(FMaskMC);
};
}
private function AddMovieClip(_arg1:MovieClip, _arg2:Boolean):void{
if (((!((FMCEffect == null))) && ((FMCEffect.parent == FPlayMC)))){
FPlayMC.removeChild(FMCEffect);
FMCEffect = null;
trace(("RemoveChild" + FMCEffect));
};
FMCEffect = _arg1;
if (_arg2){
if (FMCEffect.totalFrames >= FMCEffect.FTotalFrame){
FMCEffect.GOTO((FMCEffect.FTotalFrame - 1));
} else {
FMCEffect.GOTO(FMCEffect.totalFrames);
};
FMCEffect.stop();
} else {
FMCEffect.GOTO(1);
};
SetCurClips(FMCEffect);
FPlayMC.addChild(FMCEffect);
var _local3:String = FXMLDecoder.GetImgLink(FMCEffect.FnIndex);
if (_local3 != ""){
SetObjLink(FMCEffect);
};
if (FPlayStae == "play"){
FMCEffect.PlayEffect();
} else {
FMCEffect.PauseEffect();
};
FRootMC.setChildIndex(FElement, (FRootMC.numChildren - 1));
FElement.SetPlayIndex(FResource.FMCElement[FMCEffect.FnIndex], FMCEffect.FnIndex);
ShowPageThumb();
PlayCustomflash();
if (FPlayStae == "play"){
FPlayMC.addEventListener(Event.ENTER_FRAME, onEffectEnterFrame);
};
}
private function SetCurClips(_arg1:MovieClip):void{
var _local2 = 720;
var _local3 = 540;
var _local4:Number = 1;
if ((_local3 / _local2) <= (FPlayHeight / FPlayWidth)){
_local4 = (FPlayHeight / _local3);
_arg1.x = ((FPlayWidth - (_local2 * _local4)) / 2);
_arg1.y = 0;
} else {
_local4 = (FPlayWidth / _local2);
_arg1.y = ((FPlayHeight - (_local3 * _local4)) / 2);
_arg1.x = 0;
};
_arg1.scaleX = (_arg1.scaleY = _local4);
}
private function ReplaceImage(_arg1:MovieClip, _arg2:int, _arg3:Array):void{
var _local4:MovieClip;
var _local5:uint;
var _local6:ColorTransform;
var _local7:Bitmap;
var _local8:Bitmap;
var _local9:DisplayObject;
var _local10:Number;
var _local11:TextField;
var _local12:int;
var _local13:int;
if (FthumbType == "image"){
_local4 = MovieClip(_arg1.getChildByName("cankao"));
if (_local4 == null){
_local4 = MovieClip(_arg1);
};
_local5 = FXMLDecoder.GetBKColor();
_local6 = _local4.transform.colorTransform;
_local6.color = _local5;
_local4.transform.colorTransform = _local6;
_local7 = FThumbBmpAry[_arg2];
if (_local7 == null){
_arg1.visible = false;
return;
};
_arg1.visible = true;
_local8 = new Bitmap(_local7.bitmapData);
new Bitmap(_local7.bitmapData).scaleX = (_local8.scaleY = 1);
_local8.smoothing = true;
_local9 = _arg1.getChildAt(1);
if ((_local9 is Bitmap)){
_arg1.removeChild(_local9);
_local9 = null;
};
if ((((_local4.width < _local8.width)) || ((_local4.height < _local8.height)))){
if ((_local8.height / _local8.width) >= (_local4.height / _local4.width)){
_local8.scaleX = (_local8.scaleY = (_local4.height / _local8.height));
} else {
_local8.scaleX = (_local8.scaleY = (_local4.width / _local8.width));
};
} else {
if (FRootMC.scaleX < 1){
_local10 = 1;
_local8.scaleX = (_local8.scaleY = _local10);
if ((((_local4.width < _local8.width)) || ((_local4.height < _local8.height)))){
if ((_local8.height / _local8.width) >= (_local4.height / _local4.width)){
_local8.scaleX = (_local8.scaleY = ((_local10 * _local4.height) / _local8.height));
} else {
_local8.scaleX = (_local8.scaleY = ((_local10 * _local4.width) / _local8.width));
};
};
};
};
_local8.x = (_local4.x + ((_local4.width - _local8.width) / 2));
_local8.y = (_local4.y + ((_local4.height - _local8.height) / 2));
_arg1.addChildAt(_local8, 1);
} else {
_local11 = TextField(_arg1.getChildByName("text"));
_local12 = (((FnPage * FThumbAry.length) + _arg2) + 1);
_local13 = FXMLDecoder.GetSwfCount();
if (_local12 > _local13){
_arg1.parent.visible = false;
} else {
_arg1.parent.visible = true;
};
_local11.text = String(_local12);
};
}
private function AddNumber():void{
}
private function PlayCustomflash():void{
var _local4:MovieClip;
var _local5:MovieClip;
if (FThumbAry.length <= 0){
return;
};
var _local1:int = (fID % FThumbAry.length);
var _local2:int = (fID / FThumbAry.length);
var _local3:int;
while (_local3 < FThumbAry.length) {
_local4 = MovieClip(FThumbAry[_local3].parent);
if (_local4 != null){
_local5 = MovieClip(_local4.getChildByName(sCusflash));
if (_local5 != null){
if ((((_local1 == _local3)) && ((_local2 == FnPage)))){
_local5.gotoAndPlay(2);
} else {
_local5.gotoAndStop(1);
};
};
};
_local3++;
};
}
private function PlayMusic(_arg1:Boolean):void{
if ((((FBKMusic == null)) || (FBKPlaying))){
return;
};
FBKChannel = FBKMusic.play(FBKPos, 0);
FBKPlayed = false;
FBKChannel.addEventListener(Event.SOUND_COMPLETE, OnBkComplate);
if (FBtnMusic != null){
FBtnMusic.gotoAndStop(1);
};
FBKPlaying = true;
}
private function AutoPlayTemplate():void{
var _local2:ReplayBtn;
var _local1:int = FXMLDecoder.GetSwfCount();
fID = (fID + 1);
if (((!((FEndMC == null))) && ((fID >= _local1)))){
PlayEndMC();
fID = 0;
return;
};
if (fID >= _local1){
OpenEndURL();
switch (FXMLDecoder.GetLoopType()){
case LF_AUTO_LOOP:
fID = 0;
break;
case LF_PLAY_ONCE:
fID = (_local1 - 1);
return;
case LF_REPLAY_BUTTON:
if ((((FTemplateType == "advanced")) && (!(FbAutoPlay)))){
return;
};
fID = 0;
FBShowRePlay = true;
SetBtnState(false);
_local2 = new ReplayBtn();
_local2.ShowBtn(this, AutoRePlayOnClick);
return;
};
};
AutoRePlayOnClick();
}
public function PushThumbMC(_arg1:MovieClip):void{
FThumbAry.push(_arg1);
}
private function AutoRePlayOnClick():void{
if (FBShowRePlay){
SetBtnState(true);
FBShowRePlay = false;
if (((FBKPlayed) && (!(FXMLDecoder.GetBKMusicLoop())))){
PlayMusic(true);
};
};
StepPlay(fID);
if (FWindows != null){
FPlayWidows.visible = false;
FWindows.gotoAndPlay(1);
FWindows.addEventListener(Event.ENTER_FRAME, OnFWindowsEnter);
};
}
private function ThumbBtnState():void{
if (((FThumbPior) && ((FnPage == 0)))){
FThumbPior.gotoAndStop(3);
FThumbPior.enabled = false;
};
if (((FThumbNext) && (!((FnPage == (FnTotalPage - 1)))))){
FThumbNext.gotoAndStop(1);
FThumbNext.enabled = true;
};
if (((FThumbNext) && ((FnPage == (FnTotalPage - 1))))){
FThumbNext.gotoAndStop(3);
FThumbNext.enabled = false;
};
if (((FThumbPior) && (!((FnPage == 0))))){
FThumbPior.gotoAndStop(1);
FThumbPior.enabled = true;
};
}
private function LoadSelf():void{
var myUrl:String = FRootMC.loaderInfo.url;
var stream:URLStream = new URLStream();
var request:URLRequest = new URLRequest(myUrl);
stream.addEventListener(ProgressEvent.PROGRESS, progressHandler);
stream.addEventListener(Event.COMPLETE, StreamLoadComplated);
try {
stream.load(request);
} catch(error:Error) {
trace("Unable to load requested URL.");
};
}
private function ReadPreLoader(_arg1:ByteArray):void{
var _local2:uint;
var _local3:ByteArray;
var _local4:String;
var _local5:uint;
var _local6:ByteArray;
var _local7:Loader;
trace(_arg1.length);
while (true) {
if (_arg1.readByte() == 45){
if (_arg1.readByte() == 45){
if (_arg1.readByte() == 45){
if (_arg1.readByte() == 45){
if (_arg1.readByte() == 45){
break;
};
};
};
};
};
};
if (_arg1.bytesAvailable > 0){
_local2 = _arg1.readUnsignedInt();
_local3 = new ByteArray();
_arg1.readBytes(_local3, 0, _local2);
_local4 = _local3.readMultiByte(_local3.length, "utf-8");
trace(_local4);
FPreXML = new PreLoadXML(_local4);
if (_arg1.bytesAvailable > 0){
_local5 = _arg1.readUnsignedInt();
_local6 = new ByteArray();
_arg1.readBytes(_local6, 0, _local5);
_local7 = new Loader();
_local7.contentLoaderInfo.addEventListener(Event.COMPLETE, OnPreLoaderComplate);
_local7.loadBytes(_local6);
};
};
}
private function OnEndMCFrame(_arg1:Event):void{
var _local3:ReplayBtn;
var _local2:int = (FXMLDecoder.GetEndTime() * this.stage.frameRate);
FBECurFrame++;
if (FBECurFrame == _local2){
FEndMC.removeEventListener(Event.ENTER_FRAME, OnEndMCFrame);
OpenEndURL();
switch (FXMLDecoder.GetLoopType()){
case LF_AUTO_LOOP:
PlayBegMC();
break;
case LF_PLAY_ONCE:
fID = 0;
break;
case LF_REPLAY_BUTTON:
if ((((FTemplateType == "advanced")) && (!(FbAutoPlay)))){
return;
};
fID = 0;
FBShowRePlay = true;
SetBtnState(false);
_local3 = new ReplayBtn();
_local3.ShowBtn(this, PlayBegMC);
return;
};
};
}
private function OpenEndURL():void{
var _local1:String = FXMLDecoder.GetEndURL();
OpenURL(_local1);
}
private function OnLoadPress(_arg1:ProgressEvent):void{
}
public function ProThumbClick(_arg1:MouseEvent):void{
if (FBShowRePlay){
return;
};
var _local2:int = (FnPage * FThumbAry.length);
fID = (_arg1.currentTarget.CusnIndex + _local2);
if (FOldEffect != null){
if (FOldEffect.parent == FPlayMC){
FPlayMC.removeChild(FOldEffect);
FOldEffect = null;
};
};
StepPlay(fID);
if (FWindows != null){
FPlayWidows.visible = false;
FWindows.gotoAndPlay(1);
FWindows.addEventListener(Event.ENTER_FRAME, OnFWindowsEnter);
};
}
private function StreamCom(_arg1:ByteArray):void{
FSWFDecord = new SWFDecoder();
Fxmlstr = FSWFDecord.ReadXML(_arg1);
if (Fxmlstr == ""){
if (_BeginPlay != null){
_BeginPlay();
};
return;
};
FXMLDecoder = new XMLDecoder(Fxmlstr);
FSWFDecord.SetXMLValue(FXMLDecoder);
FResource = new ReadAllRES(FSWFDecord, FXMLDecoder);
if (FLoadMC != null){
FResource.SetPreLoader(FLoadMC);
};
FbReadAll = true;
FSBPlay();
}
private function AddThumbEvent(_arg1:MovieClip, _arg2:int, _arg3:Array):void{
var _local4:MovieClip = MovieClip(_arg1.parent);
_local4.CusnIndex = _arg2;
_local4.addEventListener(MouseEvent.CLICK, ProThumbClick);
}
private function OnBegMCFrame(_arg1:Event):void{
FBECurFrame++;
var _local2:int = (FXMLDecoder.GetBegTime() * this.stage.frameRate);
if (FBECurFrame == _local2){
FBegMC.removeEventListener(Event.ENTER_FRAME, OnBegMCFrame);
PlayTemplateMC();
};
}
private function OnFWindowsEnter(_arg1:Event):void{
if (FWindows.currentLabel == FlabShowPalyWindows){
FWindows.removeEventListener(Event.ENTER_FRAME, OnFWindowsEnter);
if (FPlayWidows.enabled){
FPlayWidows.visible = true;
};
FRootMC.setChildIndex(FElement, (FRootMC.numChildren - 1));
FElement.SetPlayIndex(FResource.FMCElement[FPlayWidows.FnIndex], FPlayWidows.FnIndex);
FPlayWidows.playeffect();
};
}
private function ShowLabPage():void{
if (FLabTotalPage != null){
FLabTotalPage.visible = true;
FLabTotalPage.text = ((String((FnPage + 1)) + "/") + String(FnTotalPage));
};
}
public function FSBPlay():void{
fID = 0;
trace("Begin ReadDate");
FResource.InitDate(DateReadComplate);
}
private function ShowPageThumb():void{
var _local1:int = (fID / FThumbAry.length);
if (_local1 != FnPage){
ShowThumb(_local1);
if (FThumb != null){
FThumb.play();
};
};
}
private function onEffectEnterFrame(_arg1:Event):void{
if (FMCEffect.FCurFrame >= FMCEffect.FTotalFrame){
ProBtnNext(null);
};
}
private function PauseMusic():void{
if (FBKChannel != null){
FBKPos = FBKChannel.position;
FBKChannel.stop();
FBKPlaying = false;
};
if (FBtnMusic != null){
FBtnMusic.gotoAndStop(3);
};
}
private function SetBtnState(_arg1:Boolean):void{
if (FBtnNext != null){
FBtnNext.enabled = _arg1;
};
if (FBtnPior != null){
FBtnPior.enabled = _arg1;
};
if (FBtnPlay != null){
FBtnPlay.enabled = _arg1;
};
if (FThumbNext != null){
FThumbNext.enabled = _arg1;
};
if (FThumbPior != null){
FThumbPior.enabled = _arg1;
};
}
private function InitInfo():void{
var _local1:int;
var _local2:int;
TemplateInit();
FElement = new ElementSprite(FXMLDecoder);
FElement.FWidth = FFlashWidth;
FElement.FHeight = FFlashHeight;
FElement.scaleX = FTemplate.scaleX;
FElement.scaleY = FTemplate.scaleY;
FElement.x = FTemplate.x;
FElement.y = FTemplate.y;
FRootMC.addChild(FElement);
AddMask();
if (((!((FThumbAry == null))) && ((FThumbAry.length > 0)))){
_local1 = FXMLDecoder.GetSwfCount();
_local2 = (_local1 % FThumbAry.length);
if (_local2 == 0){
FnTotalPage = (_local1 / FThumbAry.length);
} else {
FnTotalPage = ((_local1 / FThumbAry.length) + 1);
};
ShowThumb(0);
};
if (FBtnPlay != null){
FBtnPlay.gotoAndStop(3);
};
}
}
}//package
Section 13
//HanderInfo (HanderInfo)
package {
import flash.utils.*;
import flash.errors.*;
public class HanderInfo {
protected var _frames:uint;
protected var _height:uint;
protected var _width:uint;
protected var w_h_ruleList:Array;
protected var _version:uint;
protected var _size:uint;
protected var _type:String;
protected var _fps:uint;
public function HanderInfo(_arg1:ByteArray){
setWHruleList();
parseByteArray(_arg1);
}
public function get size():uint{
return (_size);
}
protected function getW_H_RulePosition(_arg1:Array, _arg2:String):Array{
var _local3:*;
for (_local3 in _arg1) {
if (_arg1[_local3].ctrlCode == _arg2){
break;
};
};
return (_arg1[_local3].position);
}
public function get width():uint{
return (_width);
}
public function get version():uint{
return (_version);
}
public function get frames():uint{
return (_frames);
}
public function get height():uint{
return (_height);
}
public function get fps():uint{
return (_fps);
}
public function toString():String{
return ((((((((((((((("[type:" + _type) + ",version:") + _version) + ",size:") + _size) + ",width:") + _width) + ",height:") + _height) + ",fps:") + _fps) + ",frames:") + _frames) + "]"));
}
protected function setWHruleList():void{
w_h_ruleList = [];
w_h_ruleList[0] = {ctrlCode:"50", position:[[0, 10], [5, 10], 5]};
w_h_ruleList[1] = {ctrlCode:"58", position:[[1, 40], [6, 10], 6]};
w_h_ruleList[2] = {ctrlCode:"60", position:[[1, 10], [7, 10], 6]};
w_h_ruleList[3] = {ctrlCode:"68", position:[[2, 40], [8, 10], 7]};
w_h_ruleList[4] = {ctrlCode:"70", position:[[2, 10], [9, 10], 7]};
w_h_ruleList[5] = {ctrlCode:"78", position:[[3, 40], [10, 10], 8]};
w_h_ruleList[6] = {ctrlCode:"80", position:[[3, 10], [11, 10], 8]};
w_h_ruleList[7] = {ctrlCode:"88", position:[[2, 40], [12, 10], 9]};
}
public function get type():String{
return (_type);
}
protected function parseByteArray(_arg1:ByteArray):void{
var _local10:*;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.LITTLE_ENDIAN;
_arg1.endian = Endian.LITTLE_ENDIAN;
_arg1.readBytes(_local2, 0, 8);
_type = _local2.readUTFBytes(3);
_version = _local2[3];
_size = ((((_local2[7] << 24) | (_local2[6] << 16)) | (_local2[5] << 8)) | _local2[4]);
_local2.position = 8;
var _local3:ByteArray = new ByteArray();
_arg1.readBytes(_local3);
if (_type == "CWS"){
_local3.uncompress();
} else {
if (_type != "FWS"){
throw (new IOError("出错:不是swf文件!"));
};
};
_local2.writeBytes(_local3, 0, 13);
var _local4:String = _local2[8].toString(16);
var _local5:Array = getW_H_RulePosition(w_h_ruleList, _local4);
var _local6:* = _local5[2];
var _local7 = "";
var _local8:int;
while (_local8 < _local6) {
_local10 = _local2[(_local8 + 9)].toString(16);
if (_local10.length == 1){
_local10 = ("0" + _local10);
};
_local7 = (_local7 + _local10);
_local8++;
};
_width = (new Number(("0x" + _local7.substr(_local5[0][0], 4))) / _local5[0][1]);
_height = (new Number(("0x" + _local7.substr(_local5[1][0], 4))) / _local5[1][1]);
var _local9:* = (8 + _local6);
_local9 = (_local9 + 2);
_fps = _local2[_local9];
_frames = ((_local2[(_local9 + 2)] << 8) | _local2[(_local9 + 1)]);
}
}
}//package
Section 14
//MontionSprite (MontionSprite)
package {
import flash.events.*;
import flash.display.*;
public class MontionSprite extends MovieClip {
private var FFrameRate:int;// = 24
public var FMontion:MovieClip;
private var nCurFrame:int;// = 0
private var FLenTime:int;// = 3
public function MontionSprite(_arg1:Bitmap, _arg2:int):void{
FLenTime = 5;
FMontion = new MovieClip();
FMontion.name = "MC";
_arg1.smoothing = true;
FMontion.addChild(_arg1);
this.addChild(FMontion);
Play();
}
public function Play():void{
this.addEventListener(Event.ENTER_FRAME, onChange);
}
public function Stop():void{
this.removeEventListener(Event.ENTER_FRAME, onChange);
}
private function onChange(_arg1:Event):void{
nCurFrame = (nCurFrame + 1);
if (nCurFrame == (FLenTime * FFrameRate)){
this.removeEventListener(Event.ENTER_FRAME, onChange);
};
}
}
}//package
Section 15
//MotionManager (MotionManager)
package {
import flash.display.*;
public class MotionManager {
private var FTrans:String;
private var FManager:CusMotion;
private var FFrameCount:int;// = 0
private var FParams:Object;
private var FStartFrame:int;// = 0
private var FTempMC:MovieClip;
private var FCurFrame:int;// = 0
private var FOnFinished:Function;
private var FShapes:DisplayObject;
public function SetFrame(_arg1:Number):void{
var _local2:Number = ((_arg1 - FStartFrame) / FFrameCount);
if (_local2 > 1){
_local2 = 1;
};
var _local3:Number = _local2;
if (FParams.direction == 1){
_local3 = (1 - _local2);
};
if (FManager != null){
FManager._render(_local3);
};
}
public function cleanUp():void{
FManager.cleanUp();
}
public function Start():void{
FFrameCount = 0;
FCurFrame = 0;
FStartFrame = 0;
FManager = null;
switch (FTrans){
case "none":
break;
case "FlyIn":
FManager = new FlyIn(FShapes, FParams);
break;
case "Fade":
FManager = new Fade(FShapes, FParams);
break;
case "Zoom":
FManager = new Zoom(FShapes, FParams);
break;
case "CutIn":
FManager = new CutIn(FShapes, FParams);
break;
case "OtherEffect":
FManager = new OtherEffect(FShapes, FParams);
break;
};
FFrameCount = (FParams.duration * FParams.FPS);
SetFrame(FStartFrame);
}
public function AddTransition(_arg1:String, _arg2:DisplayObject, _arg3:Object):void{
FTrans = _arg1;
FParams = _arg3;
FShapes = _arg2;
}
public function SetOnFinished(_arg1:Function):void{
FOnFinished = _arg1;
}
public function Free():void{
}
}
}//package
Section 16
//MovieClipEx (MovieClipEx)
package {
import flash.display.*;
public class MovieClipEx extends MovieClip {
public var CusAlpha:Number;// = 1
public var CusBeginFrame:int;
public var CusBLoad:Boolean;
public var CusTotalFrame:int;
public var CusName:String;
public var CusCurFrame:int;
public var CusIndex:int;
public var CusType:String;
public var CusURL:String;
}
}//package
Section 17
//OpenLink (OpenLink)
package {
import flash.net.*;
import flash.external.*;
public class OpenLink {
public static function OpenWindow(_arg1:String, _arg2:String="_blank", _arg3:String=""){
var url = _arg1;
var window = _arg2;
var features = _arg3;
var WINDOW_OPEN_FUNCTION = "window.open";
var myURL:URLRequest = new URLRequest(url);
var browserName:String = getBrowserName();
try {
if (browserName == "Firefox"){
ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window, features);
return;
};
if (browserName == "IE"){
ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window, features);
return;
};
if (browserName == "Safari"){
navigateToURL(myURL, window);
return;
};
if (browserName == "Opera"){
navigateToURL(myURL, window);
return;
};
navigateToURL(myURL, window);
} catch(e:Error) {
trace("Error");
};
}
private static function getBrowserName():String{
var browser:String;
var browserAgent:String;
try {
browserAgent = ExternalInterface.call("function getBrowser(){return navigator.userAgent;}");
if (((!((browserAgent == null))) && ((browserAgent.indexOf("Firefox") == 0)))){
browser = "Firefox";
return (browser);
};
if (((!((browserAgent == null))) && ((browserAgent.indexOf("Safari") == 0)))){
browser = "Safari";
return (browser);
};
if (((!((browserAgent == null))) && ((browserAgent.indexOf("MSIE") == 0)))){
browser = "IE";
return (browser);
};
if (((!((browserAgent == null))) && ((browserAgent.indexOf("Opera") == 0)))){
browser = "Opera";
return (browser);
};
browser = "Undefined";
return (browser);
} catch(e:Error) {
browser = "Undefined";
return (browser);
};
browser = "Undefined";
return (browser);
}
}
}//package
Section 18
//OtherEffect (OtherEffect)
package {
import flash.display.*;
import flash.text.*;
public class OtherEffect extends CusMotion {
public var className:String;// = "OtherEffect"
private var FScale:Number;
private var bitmap:Bitmap;
private var FSpeed1:Number;
private var FSpeed3:Number;
private var FNewObj1:TextField;
private var FOldObj:TextField;
private var FBaseRate:Number;
private var FSpeed2:Number;
public var type:Object;
private var FNewObj2:TextField;
private var FNewObj3:TextField;
private var FAlpha:Number;
private var myBitmapData:BitmapData;
private var FPara:Object;
private var FOldSpeed:Number;
private var _alphaFinal:Number;
private var FRotateSprite:Sprite;
private var FOldX:Number;
private var FOldY:Number;
public function OtherEffect(_arg1:DisplayObject, _arg2:Object){
type = Fade;
super(_arg1, _arg2);
FPara = _arg2;
init(_arg1, _arg2);
}
public function RenderCloudStone(_arg1:Number):void{
FOldObj.x = (FOldObj.x + (_arg1 * FOldSpeed));
FNewObj1.x = (FNewObj1.x + (_arg1 * FSpeed1));
FNewObj2.x = (FNewObj2.x + (_arg1 * FSpeed2));
FNewObj3.x = (FNewObj3.x + (_arg1 * FSpeed3));
}
public function ReplaceStrToSpace(_arg1:String, _arg2:Number, _arg3:Number):String{
var _local4:String;
var _local5 = "";
_local4 = _arg1;
var _local6:Number = 0;
while (_local6 < _arg3) {
_local5 = (_local5 + " ");
_local6++;
};
return ((_local5 + _local4.substr((_arg2 + _arg3))));
}
override public function init(_arg1:DisplayObject, _arg2:Object):void{
var _local3:Shape;
super.init(_arg1, _arg2);
FOldObj = TextField(_content);
_alphaFinal = FOldObj.alpha;
switch (FPara.effectname){
case "CloudStone":
FNewObj1 = new TextField();
FNewObj2 = new TextField();
FNewObj3 = new TextField();
this.AssignText(FNewObj1);
this.AssignText(FNewObj2);
this.AssignText(FNewObj3);
FBaseRate = 25;
FOldSpeed = (2 * FBaseRate);
FSpeed1 = (5 * FBaseRate);
FSpeed2 = (7 * FBaseRate);
FSpeed3 = (10 * FBaseRate);
FOldObj.x = (FOldObj.x - 250);
FNewObj1.scaleX = (FNewObj1.scaleY = 0.8);
FNewObj2.scaleX = (FNewObj2.scaleY = 0.7);
FNewObj2.y = (FNewObj2.y - 120);
FNewObj3.y = (FNewObj3.y + 200);
FNewObj1.x = (FNewObj1.x - 150);
FNewObj2.x = (FNewObj2.x - 300);
break;
case "UniteDisuniteH":
FNewObj1 = new TextField();
this.AssignText(FNewObj1);
FBaseRate = 85;
FOldSpeed = (((2 * FBaseRate) * FPara.duration) / 3);
FSpeed1 = (((7 * FBaseRate) * FPara.duration) / 3);
FOldX = FOldObj.x;
break;
case "UniteDisuniteV":
FNewObj1 = new TextField();
this.AssignText(FNewObj1);
FBaseRate = 85;
FOldSpeed = (((2 * FBaseRate) * FPara.duration) / 3);
FSpeed1 = (((7 * FBaseRate) * FPara.duration) / 3);
FOldY = FOldObj.y;
break;
case "Rotate":
FOldObj.visible = false;
myBitmapData = new BitmapData(FOldObj.width, FOldObj.height, true, 0xFFFFFF);
myBitmapData.draw(FOldObj);
bitmap = new Bitmap(myBitmapData);
bitmap.x = (-(FOldObj.width) / 2);
bitmap.y = (-(FOldObj.height) / 2);
bitmap.alpha = FOldObj.alpha;
bitmap.smoothing = true;
FRotateSprite = new Sprite();
FRotateSprite.graphics.drawRect((-(FOldObj.width) / 2), (-(FOldObj.height) / 2), FOldObj.width, FOldObj.height);
FRotateSprite.x = (FOldObj.x + (FOldObj.width / 2));
FRotateSprite.y = (FOldObj.y + (FOldObj.height / 2));
FRotateSprite.addChild(bitmap);
FOldObj.parent.addChild(FRotateSprite);
break;
case "Blinds":
_local3 = new Shape();
_local3.graphics.drawRect(0, 0, (_content.width / 2), (_content.height / 2));
_content.parent.addChild(_local3);
_local3.x = _content.x;
_local3.mask = _content;
break;
case "Box":
break;
case "Fan":
break;
case "Wheel":
break;
case "Tracker":
FOldX = _content.x;
FSpeed1 = ((800 * FPara.duration) / 3);
break;
case "Wipe":
FNewObj1 = new TextField();
this.AssignText(FNewObj1);
FOldObj.visible = false;
break;
case "Wipe_End":
FNewObj1 = new TextField();
this.AssignText(FNewObj1);
FOldObj.visible = false;
break;
case "Typer":
FNewObj1 = new TextField();
this.AssignText(FNewObj1);
FOldObj.visible = false;
break;
};
}
public function RenderUniteDisuniteH(_arg1:Number):void{
if (_arg1 < (1.5 / FPara.duration)){
FOldObj.x = (FOldX - (_arg1 * FOldSpeed));
FNewObj1.x = (FOldX + (_arg1 * FSpeed1));
FOldObj.alpha = (FNewObj1.alpha = ((1 - ((_arg1 * FPara.duration) / 1.5)) * _alphaFinal));
} else {
if (_arg1 <= (3 / FPara.duration)){
FOldObj.x = (FOldX - (((3 / FPara.duration) - _arg1) * FOldSpeed));
FNewObj1.x = (FOldX + (((3 / FPara.duration) - _arg1) * FSpeed1));
FOldObj.alpha = (FNewObj1.alpha = ((((_arg1 * FPara.duration) / 1.5) - 1) * _alphaFinal));
};
};
}
public function RenderBlinds(_arg1:Number):void{
}
public function RenderUniteDisuniteV(_arg1:Number):void{
if (_arg1 < (1.5 / FPara.duration)){
FOldObj.y = (FOldY - (_arg1 * FOldSpeed));
FNewObj1.y = (FOldY + (_arg1 * FSpeed1));
FOldObj.alpha = (FNewObj1.alpha = ((1 - ((_arg1 * FPara.duration) / 1.5)) * _alphaFinal));
} else {
if (_arg1 <= (3 / FPara.duration)){
FOldObj.y = (FOldY - (((3 / FPara.duration) - _arg1) * FOldSpeed));
FNewObj1.y = (FOldY + (((3 / FPara.duration) - _arg1) * FSpeed1));
FOldObj.alpha = (FNewObj1.alpha = ((((_arg1 * FPara.duration) / 1.5) - 1) * _alphaFinal));
};
};
}
public function RenderWipe_End(_arg1:Number):void{
var _local2:Number;
if (_arg1 <= 0.4){
_local2 = int(((FOldObj.length * (0.4 - _arg1)) * 2.5));
FNewObj1.text = ReplaceStrToSpace(FOldObj.text, 0, _local2);
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
if (_arg1 >= 0.6){
FNewObj1.text = FOldObj.text.substr(0, ((FOldObj.length * (1 - _arg1)) * 2.5));
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
}
public function RenderWipe(_arg1:Number):void{
var _local2:Number;
if (_arg1 <= (1.5 / FPara.duration)){
FNewObj1.text = FOldObj.text.substr(0, int((((FOldObj.length * _arg1) * FPara.duration) / 1.5)));
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
if (_arg1 >= (1 - (1.5 / FPara.duration))){
_local2 = int((((FOldObj.length * (_arg1 - (1 - (1.5 / FPara.duration)))) * FPara.duration) / 1.5));
FNewObj1.text = ReplaceStrToSpace(FOldObj.text, 0, _local2);
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
}
public function RenderTracker(_arg1:Number):void{
if (_arg1 < (1 / 6)){
_content.x = (FOldX - (_arg1 * FSpeed1));
} else {
if (_arg1 < (3 / 6)){
_content.x = (FOldX - (((1 / 6) - _arg1) * FSpeed1));
} else {
if (_arg1 < (5 / 6)){
_content.x = (FOldX - (((3 / 6) - _arg1) * FSpeed1));
} else {
_content.x = (FOldX + ((1 - _arg1) * FSpeed1));
};
};
};
}
public function RenderRotate(_arg1:Number):void{
var _local2:Number;
if (_arg1 <= (3 / FPara.duration)){
_local2 = (((360 * _arg1) * FPara.duration) / 3);
FRotateSprite.rotation = _local2;
FRotateSprite.alpha = ((_arg1 * FPara.duration) / 3);
};
}
public function RenderBox(_arg1:Number):void{
}
override public function _render(_arg1:Number):void{
switch (FPara.effectname){
case "CloudStone":
RenderCloudStone(_arg1);
RenderCloudStone(_arg1);
break;
case "UniteDisuniteH":
RenderUniteDisuniteH(_arg1);
break;
case "UniteDisuniteV":
RenderUniteDisuniteV(_arg1);
break;
case "Rotate":
RenderRotate(_arg1);
break;
case "Blinds":
RenderBlinds(_arg1);
break;
case "Box":
RenderBox(_arg1);
break;
case "Fan":
RenderFan(_arg1);
break;
case "Wheel":
RenderWheel(_arg1);
break;
case "Tracker":
RenderTracker(_arg1);
break;
case "Wipe":
RenderWipe(_arg1);
break;
case "Wipe_End":
RenderWipe_End(_arg1);
break;
case "Typer":
RenderTyper(_arg1);
break;
};
}
override public function cleanUp():void{
FOldObj.visible = true;
if (FNewObj1 != null){
FNewObj1.parent.removeChild(FNewObj1);
};
if (FNewObj2 != null){
FNewObj2.parent.removeChild(FNewObj2);
};
if (FNewObj3 != null){
FNewObj3.parent.removeChild(FNewObj3);
};
switch (FPara.effectname){
case "Rotate":
FRotateSprite.removeChild(bitmap);
FRotateSprite.parent.removeChild(FRotateSprite);
break;
};
}
public function RenderWheel(_arg1:Number):void{
}
public function AssignText(_arg1:TextField):void{
_arg1.text = FOldObj.text;
_arg1.x = FOldObj.x;
_arg1.y = FOldObj.y;
_arg1.alpha = FOldObj.alpha;
_arg1.autoSize = FOldObj.autoSize;
_arg1.setTextFormat(FOldObj.getTextFormat());
var _local2:int = FOldObj.parent.getChildIndex(FOldObj);
FOldObj.parent.addChildAt(_arg1, _local2);
}
public function RenderTyper(_arg1:Number):void{
if (_arg1 <= 0.4){
FNewObj1.text = FOldObj.text.substr(0, (int((((FOldObj.length * _arg1) * 5) / 2)) + 1));
FNewObj1.alpha = _alphaFinal;
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
if (_arg1 >= 0.7){
FNewObj1.alpha = ((((1 - _arg1) * 10) / 3) * _alphaFinal);
FNewObj1.setTextFormat(FOldObj.getTextFormat());
};
}
public function RenderFan(_arg1:Number):void{
}
}
}//package
Section 19
//PreLoadXML (PreLoadXML)
package {
public class PreLoadXML {
private var FXML:XML;
public function PreLoadXML(_arg1:String):void{
FXML = new XML(_arg1);
}
public function GetPreLoadUse():Boolean{
if (FXML.PreLoader.UseBKColor == "False"){
return (false);
};
return (true);
}
public function GetPreLoadTextColor():uint{
return (FXML.PreLoader.TextColor);
}
public function GetPreLoadSaveID():int{
return (FXML.PreLoader.SaveInfoID);
}
public function GetPreLoadBGColor():uint{
return (FXML.PreLoader.BKColor);
}
}
}//package
Section 20
//ReadAllRES (ReadAllRES)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
public class ReadAllRES {
public var FMCElement:Array;
private var _ProcInit:Function;
private var FBmpAry:Array;
public var FEndMC:MovieClip;
private var FbInit:Boolean;// = false
private var FElemImg:int;// = 0
private var FXMLDecoder:XMLDecoder;
private var _ProcPreLoad:Function;
private var FLoadText:TextField;
private var FElemCount:int;
private var FSWFDecord:SWFDecoder;
private var FFramerate:int;// = 24
private var FBkMusic:Sound;
public var FIntroAry:Array;
public var FTemplateImg:Bitmap;
private var FDefTranMC:MovieClip;
private var FnIndex:int;// = 0
private var FnImage:int;// = 0
private var FPreLoadMC:MovieClip;
private var FElemIndex:int;// = 0
private var FReadImgNum:int;// = 1
public var FTemplate:MovieClip;
private var FReadNum:int;// = 2
private var FMCAry:Array;
public var FEndAry:Array;
public var FBegMC:MovieClip;
private var FEffect:MovieClip;
public function ReadAllRES(_arg1:SWFDecoder, _arg2:XMLDecoder){
FXMLDecoder = _arg2;
FSWFDecord = _arg1;
FBmpAry = new Array();
FMCAry = new Array();
FIntroAry = new Array();
FEndAry = new Array();
FMCElement = new Array();
FnImage = 0;
}
private function BuildCurImage(_arg1:MovieClip, _arg2:Array):void{
var _local6:BitmapEx;
var _local7:Number;
var _local8:Object;
var _local9:uint;
var _local10:String;
var _local3:Array = new Array();
var _local4:int = _arg1.FnIndex;
var _local5:int;
while (_local5 < _arg2.length) {
_local6 = new BitmapEx(_arg2[_local5]);
_local7 = FXMLDecoder.GetImgShowTime(_local4);
_local6.SetLength(_local7);
if (_local4 == 0){
_local6.SetPriMon("");
} else {
_local8 = FXMLDecoder.GetImgCusMon((_local4 - 1));
if (_local8 == null){
_local10 = FXMLDecoder.GetImgMonID((_local4 - 1));
_local6.SetPriMon(_local10);
} else {
_local6.setCusPriMonPara(_local8);
};
};
_local8 = FXMLDecoder.GetImgCusMon(_local4);
if (_local8 == null){
_local10 = FXMLDecoder.GetImgMonID(_local4);
_local6.SetMonID(_local10);
} else {
_local6.SetCusMonPara(_local8);
};
_local9 = FXMLDecoder.GetBKColor();
_local6.SetBkColor(_local9);
_local6.SetDowned(true);
_local3.push(_local6);
_local5++;
};
if (_arg1.LoadImages){
_arg1.LoadImages(_local3, (_local7 * FFramerate));
};
}
public function SetPreLoader(_arg1:MovieClip):void{
FPreLoadMC = _arg1;
FLoadText = TextField(FPreLoadMC.getChildByName("loadtext"));
FLoadText.text = "0%";
}
public function ReadAllElement(_arg1:int):void{
var _local2:int;
switch (_arg1){
case 65534:
case 0xFFFF:
FElemImg = _arg1;
ReadCliart(FElemImg);
break;
default:
_local2 = FXMLDecoder.GetImageCount();
if (FElemImg == _local2){
ReadAllElement(65534);
} else {
FMCElement[FElemImg] = new Array();
ReadCliart(FElemImg);
};
};
}
public function PopMC():MovieClip{
return (FMCAry.shift());
}
public function ReadCliart(_arg1:int):void{
FElemCount = FXMLDecoder.GetClipartCount(_arg1);
FElemIndex = 0;
if (FElemCount > 0){
ReadCliartElement(FElemImg, FElemIndex);
} else {
ReadScene(FElemImg);
};
}
public function ReadImageComplate(_arg1:Bitmap):void{
ShowLoadText(FnImage, 1);
if (FnImage == 39){
trace("adfad");
};
FBmpAry.push(_arg1);
if (FBmpAry.length == FXMLDecoder.GetSwfCount()){
trace("Image Read Complated");
ReadSWF();
} else {
FnImage++;
ReadImage();
};
}
public function ReadEndMC():void{
var _local1:int = FXMLDecoder.GetTemplateSaveID();
FSWFDecord.ReadFlash(_local1, ReadEndMCComplted, true);
}
private function ReadSWF():void{
var _local1:int;
var _local2:String;
var _local3:int;
var _local4:int;
if (FnIndex == 0){
_local1 = FXMLDecoder.GetDefualtID();
FSWFDecord.ReadFlash(_local1, ReadSwfComplate);
} else {
_local2 = FXMLDecoder.GetEffectName((FnIndex - 1));
if (_local2 != ""){
_local3 = FXMLDecoder.GetEffectSaveID((FnIndex - 1));
FSWFDecord.ReadFlash(_local3, ReadSwfComplate);
} else {
_local4 = FXMLDecoder.GetDefualtID();
FSWFDecord.ReadFlash(_local4, ReadSwfComplate);
};
};
}
public function ReadCliartElement(_arg1:int, _arg2:int):void{
var _local3:int = FXMLDecoder.GetClipartSaveID(_arg1, _arg2);
FSWFDecord.ReadFlash(_local3, ReadCliartComplate);
}
private function LoadSwfComplated(_arg1:Event):void{
var _local2:Loader = (_arg1.target.loader as Loader);
_local2.contentLoaderInfo.removeEventListener(Event.COMPLETE, LoadSwfComplated);
var _local3:MovieClip = MovieClip(_local2.content);
FSWFDecord.FTemplateWidth = 720;
FSWFDecord.FTemplateHeight = 540;
TemplateComplted(_local3);
}
public function ReadBegMC():void{
var _local1:int = FXMLDecoder.GetTemplateSaveID();
FSWFDecord.ReadFlash(_local1, BegMCComplted, true);
}
public function ReadSceneElement(_arg1:int, _arg2:int):void{
var _local3:int = FXMLDecoder.GetSceneSaveID(_arg1, _arg2);
FSWFDecord.ReadFlash(_local3, ReadScenceComplate);
}
private function ReadSwfComplate(_arg1:MovieClip):void{
var _local2:Array;
var _local3:String;
ShowLoadText(FnIndex, 2);
_arg1.FnIndex = FnIndex;
if (FnIndex == 0){
FDefTranMC = _arg1;
_local2 = GetBMP(FnIndex, 1);
} else {
_local3 = FXMLDecoder.GetEffectName((FnIndex - 1));
if ((((_local3 == "")) || ((_local3 == "DefaultTrans")))){
_local2 = GetBMP(FnIndex, 1);
} else {
_local2 = GetBMP((FnIndex - 1), 2);
};
};
BuildCurImage(_arg1, _local2);
FMCAry.push(_arg1);
if (FMCAry.length == FXMLDecoder.GetSwfCount()){
trace("Transeffect Read Complated");
ReadAllElement(FElemIndex);
} else {
FnIndex++;
ReadSWF();
};
}
public function ReadImage():void{
FSWFDecord.ReadImage(FnImage, ReadImageComplate);
}
private function ReadBkMusic():void{
var _local1:int = FXMLDecoder.GetBkMusicSaveID();
FSWFDecord.ReadMusic(_local1, ReadBkMusiced);
}
public function GetMC(_arg1:int):MovieClip{
return (FMCAry[_arg1]);
}
public function GetBkMusic():Sound{
return (FBkMusic);
}
public function ReadTemplate():void{
var _local1:int = FXMLDecoder.GetTemplateSaveID();
FSWFDecord.ReadFlash(_local1, TemplateComplted, true);
}
private function ReadTemplateBkImg():void{
var _local1:int;
if (FXMLDecoder.GetTemplateImg()){
_local1 = FXMLDecoder.GetTemplateImgSaveID();
if (_local1 != -1){
FSWFDecord.ReadImageBySaveId(_local1, TemplateImgCom);
} else {
ReadTemplate();
};
} else {
ReadTemplate();
};
}
public function ReadSoundElement(_arg1:int, _arg2:int):void{
var _local3:int = FXMLDecoder.GetSoundSaveID(_arg1, _arg2);
FSWFDecord.ReadMusic(_local3, ReadSoundComplate);
}
public function ReadScenceComplate(_arg1:MovieClip):void{
var _local2:MovieClipEx = new MovieClipEx();
_local2.addChild(_arg1);
_local2.CusType = "scene";
_local2.CusIndex = FElemIndex;
if (FElemImg == 65534){
FIntroAry.push(_local2);
} else {
if (FElemImg == 0xFFFF){
FEndAry.push(_local2);
} else {
FMCElement[FElemImg].push(_local2);
};
};
FElemIndex++;
if (FElemIndex == FElemCount){
ReadSound(FElemImg);
} else {
ReadSceneElement(FElemImg, FElemIndex);
};
}
private function BegMCComplted(_arg1:MovieClip):void{
FBegMC = _arg1;
var _local2:Scene = FBegMC.scenes[1];
if (_local2 == null){
return;
};
FBegMC.gotoAndStop(1, _local2.name);
ReadEndMC();
}
public function ReadSoundComplate(_arg1:Sound):void{
var _local2:Object = new Object();
_local2.CusType = "sound";
_local2.CusIndex = FElemIndex;
_local2.CusSound = _arg1;
if (FElemImg == 65534){
FIntroAry.push(_local2);
} else {
if (FElemImg == 0xFFFF){
FEndAry.push(_local2);
} else {
FMCElement[FElemImg].push(_local2);
};
};
FElemIndex++;
if (FElemIndex == FElemCount){
if (FElemImg == 65534){
ReadAllElement(0xFFFF);
} else {
if (FElemImg == 0xFFFF){
_ProcInit();
} else {
FElemImg++;
ReadAllElement(FElemImg);
};
};
} else {
ReadSoundElement(FElemImg, FElemIndex);
};
}
private function ReadBkMusiced(_arg1:Sound):void{
FBkMusic = _arg1;
ReadImage();
}
private function ReadEffect(_arg1:String):void{
var _local2:Loader = new Loader();
var _local3:URLRequest = new URLRequest(_arg1);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadSwfComplated);
_local2.load(_local3);
}
public function ReadPreLoadMC(_arg1:Function):void{
_ProcPreLoad = _arg1;
}
private function ReadPreLoadComplate(_arg1:MovieClip):void{
FPreLoadMC = _arg1;
FLoadText = TextField(FPreLoadMC.getChildByName("loadtext"));
FLoadText.text = "0%";
_ProcPreLoad(_arg1);
}
private function TemplateComplted(_arg1:MovieClip):void{
FTemplate = _arg1;
FTemplate.FTemplateWidth = FSWFDecord.FTemplateWidth;
FTemplate.FTemplateHeight = FSWFDecord.FTemplateHeight;
if (FXMLDecoder.GetBegEnd()){
ReadBegMC();
} else {
if (FXMLDecoder.GetBkMusicCount() > 0){
ReadBkMusic();
} else {
ReadImage();
};
};
}
private function ReadEndMCComplted(_arg1:MovieClip):void{
FEndMC = _arg1;
var _local2:Scene = FEndMC.scenes[2];
if (_local2 == null){
return;
};
FEndMC.gotoAndStop(1, _local2.name);
if (FXMLDecoder.GetBkMusicCount() > 0){
ReadBkMusic();
} else {
ReadImage();
};
}
public function ReadCliartComplate(_arg1:MovieClip):void{
var _local2:MovieClipEx = new MovieClipEx();
_local2.addChild(_arg1);
_local2.CusType = "clipart";
_local2.CusIndex = FElemIndex;
if (FElemImg == 65534){
FIntroAry.push(_local2);
} else {
if (FElemImg == 0xFFFF){
FEndAry.push(_local2);
} else {
FMCElement[FElemImg].push(_local2);
};
};
FElemIndex++;
if (FElemIndex == FElemCount){
ReadScene(FElemImg);
} else {
ReadCliartElement(FElemImg, FElemIndex);
};
}
public function GetBMP(_arg1:int, _arg2:int):Array{
var _local5:int;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < FBmpAry.length) {
_local5 = (_arg1 + _arg2);
if ((((_local4 >= _arg1)) && ((_local4 < _local5)))){
_local3.push(FBmpAry[_local4]);
};
_local4++;
};
return (_local3);
}
private function TemplateImgCom(_arg1:Bitmap):void{
FTemplateImg = new Bitmap(_arg1.bitmapData);
ReadTemplate();
}
public function ReadSound(_arg1:int):void{
FElemCount = FXMLDecoder.GetSoundCount(_arg1);
FElemIndex = 0;
if (FElemCount > 0){
ReadSoundElement(FElemImg, FElemIndex);
} else {
if (FElemImg == 65534){
ReadAllElement(0xFFFF);
} else {
if (FElemImg == 0xFFFF){
_ProcInit();
} else {
FElemImg++;
ReadAllElement(FElemImg);
};
};
};
}
public function ReadScene(_arg1:int):void{
FElemCount = FXMLDecoder.GetSceneCount(_arg1);
FElemIndex = 0;
if (FElemCount > 0){
ReadSceneElement(FElemImg, FElemIndex);
} else {
ReadSound(FElemImg);
};
}
public function InitDate(_arg1:Function):void{
FbInit = false;
if (_ProcInit == null){
_ProcInit = _arg1;
};
ReadTemplateBkImg();
}
private function ShowLoadText(_arg1:int, _arg2:int):void{
var _local5:int;
if (FLoadText == null){
return;
};
var _local3:int = FXMLDecoder.GetImageCount();
var _local4:int = FXMLDecoder.GetSwfCount();
switch (_arg2){
case 1:
_local5 = (((_arg1 / _local3) * 10) + 80);
break;
case 2:
_local5 = (90 + ((_arg1 / _local4) * 10));
};
var _local6:TextFormat = FLoadText.getTextFormat();
if (_local5 == 3){
trace("adfads");
};
FLoadText.text = (String(_local5) + "%");
FLoadText.setTextFormat(_local6);
}
}
}//package
Section 21
//ReplayBtn (ReplayBtn)
package {
import flash.events.*;
import flash.display.*;
public class ReplayBtn extends MovieClip {
private var FWidth:int;// = 50
public var FunOnClick:Function;
private var FCrishape:Shape;
private var FRectShape:Shape;
private var FShape:Shape;
private var FHeight:int;// = 50
public function ReplayBtn(){
FCrishape = new Shape();
FCrishape.graphics.beginFill(0xFFFFFF, 1);
FCrishape.graphics.lineStyle(1, 0);
FCrishape.graphics.drawCircle(25, 25, 25);
FCrishape.graphics.endFill();
FCrishape.alpha = 0.3;
this.addChild(FCrishape);
FShape = new Shape();
FShape.graphics.beginFill(0, 1);
FShape.graphics.moveTo(0, 0);
FShape.graphics.lineTo(0, 30);
FShape.graphics.lineTo(20, 15);
FShape.graphics.lineTo(0, 0);
FShape.graphics.endFill();
FShape.x = 20;
FShape.y = 10;
FShape.alpha = 0.6;
this.addChild(FShape);
var _local1:SimpleButton = new SimpleButton();
_local1.hitTestState = FCrishape;
this.addChild(_local1);
_local1.addEventListener(MouseEvent.ROLL_OVER, OnBtnOver);
_local1.addEventListener(MouseEvent.ROLL_OUT, OnBtnOut);
_local1.addEventListener(MouseEvent.CLICK, OnBtnClick);
}
private function OnBtnClick(_arg1:MouseEvent):void{
if (FunOnClick != null){
FunOnClick();
this.parent.removeChild(this);
};
}
private function OnBtnOver(_arg1:MouseEvent):void{
FShape.alpha = 1;
FCrishape.alpha = 1;
}
private function OnBtnOut(_arg1:MouseEvent):void{
FShape.alpha = 0.6;
FCrishape.alpha = 0.3;
}
public function ShowBtn(_arg1:MovieClip, _arg2:Function):void{
FunOnClick = _arg2;
this.x = ((720 - this.width) / 2);
this.y = ((540 - this.height) / 2);
_arg1.addChild(this);
}
}
}//package
Section 22
//SWFDecoder (SWFDecoder)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
public class SWFDecoder {
public var FTemplateWidth:int;
private var FXMLDecoder:XMLDecoder;
private var _ProcReadMusic:Function;
public var FTemplateHeight:int;
private var FMainDate:ByteArray;
private var _ProcReadSWF:Function;
private var _ProcReadIMG:Function;
private var FMontion:MontionSprite;
private static const SWF:Class = SWFDecoder_SWF;
public function ReadSelfSwf(_arg1:String):void{
var name = _arg1;
var targetURL:String = name;
var request:URLRequest = new URLRequest(targetURL);
var variables:URLLoader = new URLLoader();
variables.dataFormat = URLLoaderDataFormat.BINARY;
variables.addEventListener(Event.COMPLETE, completeHandler);
try {
trace("Laoding");
variables.load(request);
} catch(error:Error) {
trace(("Unable to load URL:" + error));
};
}
public function ReadXML(_arg1:ByteArray):String{
var nOffice:uint;
var nSize:uint;
var xmlData:ByteArray;
var data = _arg1;
var xmlStr = "";
FMainDate = data;
FMainDate.position = (FMainDate.length - 9);
try {
if (FMainDate.bytesAvailable > 0){
nOffice = FMainDate.readUnsignedInt();
if (nOffice > FMainDate.length){
return (xmlStr);
};
FMainDate.position = nOffice;
nSize = FMainDate.readUnsignedInt();
if ((FMainDate.position + nSize) > FMainDate.length){
return (xmlStr);
};
xmlData = new ByteArray();
FMainDate.readBytes(xmlData, 0, nSize);
xmlStr = xmlData.readMultiByte(xmlData.length, "utf-8");
};
return (xmlStr);
} catch(e:ArgumentError) {
trace(e.message);
};
return (xmlStr);
}
public function ReadMainSwf(_arg1:int, _arg2:Function):void{
var _local6:ByteArray;
var _local7:Loader;
_ProcReadSWF = _arg2;
var _local3:uint = FXMLDecoder.GetSwfSize(_arg1);
var _local4:uint = FXMLDecoder.GetSwfOff(_arg1);
FMainDate.position = _local4;
var _local5:uint = FMainDate.readUnsignedInt();
if (_local5 == _local3){
_local6 = new ByteArray();
FMainDate.readBytes(_local6, 0, _local3);
_local7 = new Loader();
_local7.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfLoaded);
_local7.loadBytes(_local6);
} else {
trace("文件读取不正确");
};
}
public function ReadImage(_arg1:int, _arg2:Function):void{
var nLen:uint;
var SwfData:ByteArray;
var loader:Loader;
var nID = _arg1;
var ReadIMG = _arg2;
trace(("当前读取的图片ID:" + nID));
_ProcReadIMG = ReadIMG;
var nSize:uint = FXMLDecoder.GetImgSize(nID);
var nOffice:uint = FXMLDecoder.GetImgOffice(nID);
trace(("当前图片的SIZE:" + nSize));
FMainDate.position = nOffice;
try {
nLen = FMainDate.readUnsignedInt();
if (nLen == nSize){
SwfData = new ByteArray();
FMainDate.readBytes(SwfData, 0, nSize);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
loader.loadBytes(SwfData);
} else {
trace("图片文件读取不正确");
};
} catch(e:Error) {
trace((("读取文件索引:" + nID) + "出错"));
};
}
private function onSwfLoaded(_arg1:Event):void{
var _local3:MovieClip;
var _local2:Loader = (_arg1.target.loader as Loader);
_local2.contentLoaderInfo.removeEventListener(Event.COMPLETE, onSwfLoaded);
if (!(_local2.content is MovieClip)){
_local3 = new MovieClip();
_local3.addChild(_local2.content);
_ProcReadSWF(_local3);
} else {
_ProcReadSWF((_local2.content as MovieClip));
};
}
public function ReadMusic(_arg1:int, _arg2:Function):void{
var _local6:ByteArray;
_ProcReadMusic = _arg2;
var _local3:uint = FXMLDecoder.GetFileSize(_arg1);
var _local4:uint = FXMLDecoder.GetFileOff(_arg1);
FMainDate.position = _local4;
var _local5:uint = FMainDate.readUnsignedInt();
if (_local5 == _local3){
_local6 = new ByteArray();
FMainDate.readBytes(_local6, 0, _local3);
fromByteArray(_local6, Audio.STEREO, Audio.BIT16, Audio.RATE44100, onMusicReaded);
} else {
trace("音乐文件读取不正确");
};
}
private function completeHandler(_arg1:Event):void{
var _local2:Loader;
trace("loaded");
_local2 = new Loader();
var _local3:ByteArray = (_arg1.target.data as ByteArray);
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfLoaded);
trace(_local3.length);
_local2.loadBytes(_local3);
}
public function ReadImageBySaveId(_arg1:int, _arg2:Function):void{
var _local6:ByteArray;
var _local7:Loader;
_ProcReadIMG = _arg2;
var _local3:uint = FXMLDecoder.GetFileSize(_arg1);
var _local4:uint = FXMLDecoder.GetFileOff(_arg1);
FMainDate.position = _local4;
var _local5:uint = FMainDate.readUnsignedInt();
if (_local5 == _local3){
_local6 = new ByteArray();
FMainDate.readBytes(_local6, 0, _local3);
_local7 = new Loader();
_local7.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
_local7.loadBytes(_local6);
} else {
trace("图片文件读取不正确");
};
}
private function onMusicReaded(_arg1:Sound):void{
_ProcReadMusic(_arg1);
}
private function ReadXMLDateOff(_arg1:uint, _arg2:uint):void{
FMainDate.position = _arg1;
var _local3:ByteArray = new ByteArray();
FMainDate.readBytes(_local3, 0, _arg2);
var _local4:String = _local3.readMultiByte(_local3.length, "utf-8");
trace(_local4);
}
public function ReadFlash(_arg1:int, _arg2:Function, _arg3:Boolean=false):void{
var _local7:ByteArray;
var _local8:Loader;
var _local9:HanderInfo;
_ProcReadSWF = _arg2;
var _local4:uint = FXMLDecoder.GetFileSize(_arg1);
var _local5:uint = FXMLDecoder.GetFileOff(_arg1);
FMainDate.position = _local5;
var _local6:uint = FMainDate.readUnsignedInt();
if (_local6 == _local4){
_local7 = new ByteArray();
FMainDate.readBytes(_local7, 0, _local4);
if (_arg3){
_local9 = new HanderInfo(_local7);
FTemplateWidth = _local9.width;
FTemplateHeight = _local9.height;
};
_local8 = new Loader();
_local8.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfLoaded);
_local8.loadBytes(_local7);
} else {
trace("Flash文件读取不正确");
};
}
private function onImageLoaded(_arg1:Event):void{
var _local2:Loader = (_arg1.target.loader as Loader);
_local2.contentLoaderInfo.removeEventListener(Event.COMPLETE, onImageLoaded);
_ProcReadIMG((_local2.content as Bitmap));
}
public function fromByteArray(_arg1:ByteArray, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:Function):ByteArray{
var loader:Loader;
var bytes = _arg1;
var channels = _arg2;
var bits = _arg3;
var rate = _arg4;
var onComplete = _arg5;
var swf:ByteArray = ByteArray(new SWF());
swf.endian = Endian.LITTLE_ENDIAN;
swf.position = swf.length;
swf.writeShort(959);
swf.writeUnsignedInt((bytes.length + 7));
var byte2:uint = (2 << 4);
switch (rate){
case 44100:
byte2 = (byte2 | 12);
break;
case 22050:
byte2 = (byte2 | 8);
break;
case 11025:
byte2 = (byte2 | 4);
break;
};
var numSamples:int = bytes.length;
if (channels == 2){
byte2 = (byte2 | 1);
numSamples = (numSamples << 1);
};
if (bits == 16){
byte2 = (byte2 | 2);
numSamples = (numSamples << 1);
};
swf.writeShort(1);
swf.writeByte(byte2);
swf.writeUnsignedInt(numSamples);
swf.writeBytes(bytes);
swf.writeShort((1 << 6));
swf.position = 4;
swf.writeUnsignedInt(swf.length);
swf.position = 0;
var onSWFLoaded:Function = function (_arg1:Event):void{
onComplete(Sound(new ((loader.contentLoaderInfo.applicationDomain.getDefinition("SoundItem") as Class))));
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
loader.loadBytes(swf);
return (swf);
}
public function SetXMLValue(_arg1:XMLDecoder):void{
FXMLDecoder = _arg1;
}
}
}//package
Section 23
//SWFDecoder_SWF (SWFDecoder_SWF)
package {
import mx.core.*;
public class SWFDecoder_SWF extends ByteArrayAsset {
}
}//package
Section 24
//TextItem (TextItem)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class TextItem {
public var FCusCurFrame:int;
private var FTransM:MotionManager;
public var FCusBLoad:Boolean;
private var FOldInfo:Object;
private var FPlayEffect:Boolean;// = false
public var FText:TextField;
private var FrameRate:int;// = 24
public var FCusTotalFrame:int;
public var FParent:MovieClip;
public var FEffectName:String;// = "FlyIn"
private var FPubType:String;// = "Preview"
public var FCusIndex:int;
public var FCusBeginFrame:int;
public function TextItem(_arg1:TextField){
FOldInfo = {_x:null, _y:null, _xscale:null, _yscale:null, _alpha:null, _rotation:null, _text:null};
super();
FText = _arg1;
FTransM = new MotionManager();
}
public function PlayEffect(_arg1:String):void{
FCusCurFrame = 0;
FPubType = _arg1;
var _local2:int = (FCusTotalFrame / 24);
var _local3 = 6;
switch (FEffectName){
case "Fade":
FTransM.AddTransition("Fade", FText, {dimension:_local3, direction:0, duration:_local2, width:720, height:540, FPS:FrameRate});
break;
case "ScrollLeft":
case "ScrollRight":
case "ScrollTop":
case "ScrollBottom":
case "ScrollRightTop":
case "ScrollLeftTop":
case "ScrollLeftBottom":
case "ScrollRightBottom":
if (FEffectName == "ScrollLeft"){
_local3 = 6;
};
if (FEffectName == "ScrollRight"){
_local3 = 4;
};
if (FEffectName == "ScrollTop"){
_local3 = 8;
};
if (FEffectName == "ScrollBottom"){
_local3 = 2;
};
if (FEffectName == "ScrollRightTop"){
_local3 = 7;
};
if (FEffectName == "ScrollLeftTop"){
_local3 = 9;
};
if (FEffectName == "ScrollLeftBottom"){
_local3 = 3;
};
if (FEffectName == "ScrollRightBottom"){
_local3 = 1;
};
FTransM.AddTransition("FlyIn", FText, {dimension:_local3, direction:0, duration:_local2, width:720, height:540, ParentMC:FParent, FPS:FrameRate});
break;
case "ZoomIn":
case "ZoomOut":
case "ZoomIn_Quick":
case "ZoomOut_Quick":
case "DoubleZoom":
FTransM.AddTransition("Zoom", FText, {effectname:FEffectName, direction:0, duration:_local2, width:720, height:540, FPS:FrameRate});
break;
case "CloudStone":
case "UniteDisuniteH":
case "UniteDisuniteV":
case "Rotate":
case "Blinds":
case "Box":
case "Fan":
case "Wheel":
case "Tracker":
case "Wipe":
case "Wipe_End":
case "Typer":
FTransM.AddTransition("OtherEffect", FText, {effectname:FEffectName, direction:0, duration:_local2, width:720, height:540, FPS:FrameRate});
break;
case "CutIn_Right":
case "CutIn_Left":
case "CutIn_Top":
case "CutIn_Bottom":
FTransM.AddTransition("CutIn", FText, {effectname:FEffectName, direction:0, duration:_local2, width:720, height:540, FPS:FrameRate});
break;
default:
FTransM.AddTransition("none", FText, {dimension:_local3, direction:0, duration:_local2, width:720, height:540, FPS:FrameRate});
break;
};
FTransM.SetOnFinished(OnEffectComplate);
FTransM.Start();
FPlayEffect = true;
FText.addEventListener(Event.ENTER_FRAME, OnEnterFrame);
}
public function OnEffectComplate():void{
if (FPubType == "Preview"){
FText.parent.parent.removeChild(FText.parent);
} else {
ResetText();
FTransM.cleanUp();
};
}
private function OnEnterFrame(_arg1:Event):void{
FCusCurFrame++;
FTransM.SetFrame(FCusCurFrame);
if (FCusCurFrame == FCusTotalFrame){
FPlayEffect = false;
FText.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
OnEffectComplate();
};
}
public function StopEffect():void{
if (!FPlayEffect){
return;
};
FCusCurFrame = FCusTotalFrame;
FPlayEffect = false;
FText.removeEventListener(Event.ENTER_FRAME, OnEnterFrame);
OnEffectComplate();
}
public function Init():void{
if (FPlayEffect){
return;
};
if (FOldInfo == null){
FOldInfo = new Object();
};
FOldInfo._x = FText.x;
FOldInfo._y = FText.y;
FOldInfo._xscale = FText.scaleX;
FOldInfo._yscale = FText.scaleY;
FOldInfo._alpha = FText.alpha;
FOldInfo._rotation = FText.rotation;
FOldInfo._text = FText.text;
}
public function GetPlayEff():Boolean{
return (FPlayEffect);
}
public function ResetText():void{
FText.x = FOldInfo._x;
FText.y = FOldInfo._y;
FText.scaleX = (FText.scaleY = 1);
FText.alpha = FOldInfo._alpha;
}
}
}//package
Section 25
//Watermark (Watermark)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class Watermark extends MovieClip {
private var FWidth:int;// = 250
private var FURL:String;// = "http://www.flash-slide-show.com"
private var FHeight:int;// = 50
private var FUrlTxt:TextField;
private var FUrlFormat:TextFormat;
public function Watermark(){
var _local1:Shape = new Shape();
_local1.graphics.beginFill(0, 0.5);
_local1.graphics.drawRoundRect(0, 0, FWidth, FHeight, 12, 12);
_local1.graphics.endFill();
this.addChild(_local1);
this.blendMode = BlendMode.LAYER;
var _local2:TextField = new TextField();
_local2.text = "Evaluation Copy";
var _local3:TextFormat = new TextFormat();
_local3.size = 26;
_local3.bold = true;
_local3.color = 0xFFFFFF;
_local2.width = FWidth;
_local2.autoSize = TextFieldAutoSize.CENTER;
_local2.setTextFormat(_local3);
_local2.alpha = 0.6;
this.addChild(_local2);
FUrlTxt = new TextField();
FUrlTxt.text = FURL;
FUrlFormat = new TextFormat();
FUrlFormat.size = 12;
FUrlFormat.underline = true;
FUrlFormat.color = 0xFFFFFF;
FUrlTxt.width = FWidth;
FUrlTxt.alpha = 0.6;
FUrlTxt.autoSize = TextFieldAutoSize.CENTER;
FUrlTxt.setTextFormat(FUrlFormat);
FUrlTxt.y = 28;
this.addChild(FUrlTxt);
var _local4:SimpleButton = new SimpleButton();
_local4.hitTestState = _local1;
this.addChild(_local4);
_local4.addEventListener(MouseEvent.ROLL_OVER, OnBtnOver);
_local4.addEventListener(MouseEvent.ROLL_OUT, OnBtnOut);
_local4.addEventListener(MouseEvent.CLICK, OnBtnClick);
}
private function OnBtnClick(_arg1:MouseEvent):void{
OpenLink.OpenWindow(FURL);
}
private function OnBtnOver(_arg1:MouseEvent):void{
FUrlFormat.color = 0xFF;
FUrlTxt.setTextFormat(FUrlFormat);
}
public function ShowWaterMark(_arg1:MovieClip):void{
this.x = ((720 - this.width) / 2);
this.y = ((540 - this.height) / 2);
_arg1.addChild(this);
}
private function OnBtnOut(_arg1:MouseEvent):void{
FUrlFormat.color = 0xFFFFFF;
FUrlTxt.setTextFormat(FUrlFormat);
}
}
}//package
Section 26
//XMLDecoder (XMLDecoder)
package {
public class XMLDecoder {
private var FXML:XML;
public function XMLDecoder(_arg1:String):void{
FXML = new XML(_arg1);
}
public function GetImgMonID(_arg1:int):String{
var _local2:XML = GetImgObj(_arg1);
return (_local2.Motion);
}
public function GetTemplateName():String{
return (FXML.Template.TemplatePath);
}
public function GetSwfCount():int{
return (GetImageCount());
}
public function GetImgObj(_arg1:int):XML{
var _local2:XMLList = FXML.Images.TImageObj;
return (_local2[_arg1]);
}
public function GetTemplateImgSaveID():int{
return (FXML.Template.BKImageSaveID);
}
public function GetSwfSize(_arg1:int):uint{
var _local2:int = GetEffectSaveID(_arg1);
return (GetFileSize(_local2));
}
public function GetEffectName(_arg1:int):String{
var _local2:XML = GetImgObj(_arg1);
if (_local2 != null){
return (_local2.Trans_effect);
};
return ("");
}
public function GetBegEnd():Boolean{
var _local1:String = FXML.Template.InCludeOpenEnd;
if (_local1 == "False"){
return (false);
};
return (true);
}
public function GetSoundCount(_arg1:int):int{
var _local2:XMLList = GetSoundList(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.length());
}
public function GetSceneSize(_arg1:int, _arg2:int):uint{
var _local3:XML = GetSceneObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileSize(_local4));
}
public function GetImgCusMon(_arg1:int):Object{
var _local3:Object;
var _local2:XML = GetImgObj(_arg1);
if (_local2.CMotion.Enabled == "False"){
return (null);
};
_local3 = new Object();
_local3._StartPosX = _local2.CMotion.StartPos.Left;
_local3._StartPosY = _local2.CMotion.StartPos.Top;
_local3._StartPosW = _local2.CMotion.StartPos.Width;
_local3._StartPosH = _local2.CMotion.StartPos.Height;
_local3._EndPosX = _local2.CMotion.EndPos.Left;
_local3._EndPosY = _local2.CMotion.EndPos.Top;
_local3._EndPosW = _local2.CMotion.EndPos.Width;
_local3._EndPosH = _local2.CMotion.EndPos.Height;
return (_local3);
}
public function GetSceneOff(_arg1:int, _arg2:int):uint{
var _local3:XML = GetSceneObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileOff(_local4));
}
public function GetSoundSize(_arg1:int, _arg2:int):uint{
var _local3:XML = GetSoundObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileSize(_local4));
}
public function GetClipArtList(_arg1:int):XMLList{
var xmllist:XMLList;
var nIndex = _arg1;
xmllist = FXML.Elements.ClipArts.TClipArt.(PosInfo.ImageIndex == nIndex);
return (xmllist);
}
public function GetTextLink(_arg1:int, _arg2:int):String{
var _local3:XML = GetTextObj(_arg1, _arg2);
return (_local3.Hyperlink);
}
public function GetClipartSize(_arg1:int, _arg2:int):uint{
var _local3:XML = GetClipartObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileSize(_local4));
}
public function GetEffectSaveID(_arg1:int):int{
var _local2:XML = GetImgObj(_arg1);
return (_local2.EffectSaveID);
}
public function GetSceneObj(_arg1:int, _arg2:int):XML{
var _local3:XMLList = GetSceneList(_arg1);
trace(("xmllist:" + _local3));
return (_local3[_arg2]);
}
public function GetBKColor():uint{
return (FXML.ExportSetting.BackgndColor);
}
public function GetBKMusicLoop():Boolean{
if (FXML.LoopMusic == "True"){
return (true);
};
return (false);
}
public function GetSwfPath(_arg1:int):String{
var _local2:int = GetEffectSaveID(_arg1);
var _local3:XML = GetFileObj(_local2);
return (_local3.Path);
}
public function GetEndTime():int{
return (FXML.Template.EndTime);
}
public function GetSceneList(_arg1:int):XMLList{
var xmllist:XMLList;
var nIndex = _arg1;
xmllist = FXML.Elements.Scenes.TScene.(PosInfo.ImageIndex == nIndex);
return (xmllist);
}
public function GetClipartSaveID(_arg1:int, _arg2:int):int{
var _local3:XML = GetClipartObj(_arg1, _arg2);
trace(_local3);
return (_local3.SaveInfoID);
}
public function GetSoundOff(_arg1:int, _arg2:int):uint{
var _local3:XML = GetSoundObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileOff(_local4));
}
public function GetSoundList(_arg1:int):XMLList{
var xmllist:XMLList;
var nIndex = _arg1;
xmllist = FXML.Elements.FunnySounds.TAudio.(PosInfo.ImageIndex == nIndex);
return (xmllist);
}
public function GetSoundSaveID(_arg1:int, _arg2:int):int{
var _local3:XML = GetSoundObj(_arg1, _arg2);
return (_local3.SaveInfoID);
}
public function GetSceneCount(_arg1:int):int{
var _local2:XMLList = GetSceneList(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.length());
}
public function GetClipartObj(_arg1:int, _arg2:int):XML{
var _local3:XMLList = GetClipArtList(_arg1);
trace(_local3);
return (_local3[_arg2]);
}
public function GetFileOff(_arg1:int):uint{
var _local2:XML = GetFileObj(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.OffSet);
}
public function GetSoundObj(_arg1:int, _arg2:int):XML{
var _local3:XMLList = GetSoundList(_arg1);
return (_local3[_arg2]);
}
public function GetClipartCount(_arg1:int):int{
var _local2:XMLList = GetClipArtList(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.length());
}
public function GetSoundFileName(_arg1:int, _arg2:int):String{
var _local3:XML = GetSoundObj(_arg1, _arg2);
return (_local3.FileName);
}
public function GetTextList(_arg1:int):XMLList{
var xmllist:XMLList;
var nIndex = _arg1;
xmllist = FXML.Elements.FunnyTexts.TFunnyText.(PosInfo.ImageIndex == nIndex);
return (xmllist);
}
public function GetSceneFileName(_arg1:int, _arg2:int):String{
var _local3:XML = GetSceneObj(_arg1, _arg2);
return (_local3.ResFileName);
}
public function GetFileObj(_arg1:int):XML{
var xmllist:XMLList;
var nSaveID = _arg1;
xmllist = FXML.SaveInfos.TSaveInfo.(ID == nSaveID);
if (xmllist.length() > 1){
trace("有重复SAVEID");
};
return (xmllist[0]);
}
public function GetImgShowTime(_arg1:int):Number{
var _local2:XML = GetImgObj(_arg1);
return (_local2.ImageLen);
}
public function GetImgLink(_arg1:int):String{
var _local2:XML = GetImgObj(_arg1);
return (_local2.Hyperlink);
}
public function GetTemplateSaveID():int{
return (FXML.Template.SaveInfoID);
}
public function IsDefExportType():Boolean{
if (FXML.ExportSetting.SlideSizeType == "ssDefault"){
return (true);
};
return (false);
}
public function GetImageCount():int{
var _local1:XMLList = FXML.Images.TImageObj;
return (_local1.length());
}
public function GetClipartFileName(_arg1:int, _arg2:int):String{
var _local3:XML = GetClipartObj(_arg1, _arg2);
return (_local3.ResFileName);
}
public function GetTextCount(_arg1:int):int{
var _local2:XMLList = GetTextList(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.length());
}
public function GetBkMusicSaveID():int{
var _local1:XMLList = FXML.BKMusics.TAudio;
if (_local1.length() > 0){
return (_local1[0].SaveInfoID);
};
return (0);
}
public function GetImgSize(_arg1:int):uint{
var _local2:int = GetImgSaveID(_arg1);
return (GetFileSize(_local2));
}
public function GetImgOffice(_arg1:int):uint{
var _local2:int = GetImgSaveID(_arg1);
return (GetFileOff(_local2));
}
public function GetExportHeight():int{
return (FXML.ExportSetting.SlideHeight);
}
public function GetTemplateImg():Boolean{
var _local1:String = FXML.Template.UserBKImage;
if (_local1 == "False"){
return (false);
};
return (true);
}
public function GetLoopType():String{
return (FXML.ExportSetting.LoopFlag);
}
public function GetDeaTranSize():uint{
var _local1:int = GetDefualtID();
return (GetFileSize(_local1));
}
public function GetPublishType():String{
return (FXML.ExportSetting.PublishType);
}
public function GetBegTime():int{
return (FXML.Template.OpenTime);
}
public function GetExportWidth():int{
return (FXML.ExportSetting.SlideWidth);
}
public function GetDefualtID():int{
return (FXML.GlobalSetting.SaveInfoID);
}
public function GetClipartOff(_arg1:int, _arg2:int):uint{
var _local3:XML = GetClipartObj(_arg1, _arg2);
var _local4:int = _local3.SaveInfoID;
return (GetFileOff(_local4));
}
public function GetSwfOff(_arg1:int):uint{
var _local2:int = GetEffectSaveID(_arg1);
return (GetFileOff(_local2));
}
public function GetImgSaveID(_arg1:int):int{
var _local2:XML = GetImgObj(_arg1);
return (_local2.ImgSaveID);
}
public function GetBkMusicCount():int{
var _local1:XMLList = FXML.BKMusics.TAudio;
return (_local1.length());
}
public function GetEndURL():String{
return (FXML.ExportSetting.MovieEndURL);
}
public function GetWondershare():Boolean{
if (FXML.ExportSetting.Wondershare == "True"){
return (true);
};
return (false);
}
public function GetTemplateImgFile():String{
return (FXML.Template.BKImageExportFile);
}
public function GetFileSize(_arg1:int):uint{
var _local2:XML = GetFileObj(_arg1);
if (_local2 == null){
return (0);
};
return (_local2.Size);
}
public function GetTextObj(_arg1:int, _arg2:int):XML{
var _local3:XMLList = GetTextList(_arg1);
return (_local3[_arg2]);
}
public function GetSceneSaveID(_arg1:int, _arg2:int):int{
var _local3:XML = GetSceneObj(_arg1, _arg2);
return (_local3.SaveInfoID);
}
public function GetClipArtLink(_arg1:int, _arg2:int):String{
var _local3:XML = GetClipartObj(_arg1, _arg2);
return (_local3.Hyperlink);
}
public function GetDeaTranOff():uint{
var _local1:int = GetDefualtID();
return (GetFileOff(_local1));
}
public function GetImgFileName(_arg1:int):String{
var _local2:XML = GetImgObj(_arg1);
if (_local2 == null){
return ("");
};
var _local3:String = _local2.ExportFile;
if (_local3 == ""){
return (_local2.OutFile);
};
return (_local2.ExportFile);
}
}
}//package
Section 27
//Zoom (Zoom)
package {
import flash.display.*;
import flash.text.*;
public class Zoom extends CusMotion {
public var type:Object;
private var FOldWidth:Number;
private var FPara:Object;
private var FOldHeight:Number;
private var FFlag:Number;
private var FChangeRate:Number;
private var _alphaFinal:Number;
private var FNewObj:TextField;
private var FSpeed:Number;
public var className:String;// = "Zoom"
private var InCreate:Number;
private var FScale:Number;
private var FOldObj:TextField;
private var FOldX:Number;
private var FAlpha:Number;
private var FOldY:Number;
public function Zoom(_arg1:DisplayObject, _arg2:Object){
type = Fade;
super(_arg1, _arg2);
FPara = _arg2;
init(_arg1, _arg2);
}
override public function cleanUp():void{
if (FPara.effectname == "DoubleZoom"){
FNewObj.parent.removeChild(FNewObj);
};
}
public function RenderDoubleZoom(_arg1:Number):void{
var _local2:Number = (FSpeed * _arg1);
if (_local2 > 1){
_local2 = 1;
};
FOldObj.scaleX = (FOldObj.scaleY = _local2);
FNewObj.scaleX = (FNewObj.scaleY = (2 - _local2));
FOldObj.alpha = (FNewObj.alpha = (_local2 * _alphaFinal));
FOldObj.x = (FOldX - ((FOldObj.width - FOldWidth) / 2));
FNewObj.x = (FOldX - ((FNewObj.width - FOldWidth) / 2));
}
override public function init(_arg1:DisplayObject, _arg2:Object):void{
super.init(_arg1, _arg2);
FOldObj = TextField(_content);
FOldX = FOldObj.x;
FOldWidth = FOldObj.width;
FOldY = FOldObj.y;
FOldHeight = FOldObj.height;
_alphaFinal = FOldObj.alpha;
switch (FPara.effectname){
case "ZoomIn":
FScale = 0;
FAlpha = 0;
FFlag = 1;
FSpeed = ((1 * FPara.duration) / 4);
break;
case "ZoomOut":
FScale = 1;
FAlpha = 1;
FFlag = -1;
FSpeed = ((1 * FPara.duration) / 4);
break;
case "ZoomIn_Quick":
FScale = 0;
FAlpha = 0;
FFlag = 1;
FSpeed = ((2 * FPara.duration) / 4);
break;
case "ZoomOut_Quick":
FScale = 1;
FAlpha = 1;
FFlag = -1;
FSpeed = ((2 * FPara.duration) / 4);
break;
case "DoubleZoom":
FNewObj = new TextField();
FNewObj.text = FOldObj.text;
FNewObj.x = FOldObj.x;
FNewObj.y = FOldObj.y;
FNewObj.autoSize = FOldObj.autoSize;
FNewObj.setTextFormat(FOldObj.getTextFormat());
FOldObj.parent.addChild(FNewObj);
FSpeed = ((1 * FPara.duration) / 3);
break;
};
FChangeRate = (FFlag * FSpeed);
}
override public function _render(_arg1:Number):void{
if (FPara.effectname != "DoubleZoom"){
InCreate = (FAlpha + (FChangeRate * _arg1));
if (InCreate < 0){
InCreate = 0;
};
if (InCreate > 1){
InCreate = 1;
};
FOldObj.scaleX = (FOldObj.scaleY = InCreate);
FOldObj.alpha = (InCreate * _alphaFinal);
FOldObj.x = (FOldX - ((FOldObj.width - FOldWidth) / 2));
FOldObj.y = (FOldY - ((FOldObj.height - FOldHeight) / 2));
} else {
RenderDoubleZoom(_arg1);
};
}
}
}//package