Section 1
//Back (gs.easing.Back)
package gs.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package gs.easing
Section 2
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
}
}//package gs.plugins
Section 3
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _info:Array;
protected var _a:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function init(_arg1:Array, _arg2:Array):void{
var _local3:int;
_a = _arg1;
_local3 = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
}
}//package gs.plugins
Section 4
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
}
}//package gs.plugins
Section 5
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 6
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
protected var _target:DisplayObject;
public static const VERSION:Number = 1.1;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:ColorTransform;
if (!(_arg1 is DisplayObject)){
return (false);
};
_local4 = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package gs.plugins
Section 7
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var round:Boolean;
public var onComplete:Function;
public var propName:String;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
_changeFactor = 0;
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 8
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
public class VisiblePlugin extends TweenPlugin {
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
}
}//package gs.plugins
Section 9
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import gs.*;
import flash.display.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _st:SoundTransform;
protected var _target:Object;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
}
}//package gs.plugins
Section 10
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var index:uint;
public var start:Number;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 11
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 12
//TweenLite (gs.TweenLite)
package gs {
import flash.events.*;
import flash.display.*;
import gs.utils.tween.*;
import gs.plugins.*;
import flash.utils.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var started:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var vars:Object;
public var ease:Function;
public var tweens:Array;
public var exposedVars:Object;
public var combinedTimeScale:Number;
public var initTime:Number;
public static const version:Number = 10.092;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
super();
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
_local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
_local2 = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
_local2 = (currentTime = getTimer());
_local3 = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 13
//GazoIntro_1 (HeroesvsDragons_fla.GazoIntro_1)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class GazoIntro_1 extends MovieClip {
public var aa_mc:MovieClip;
public var _self:MovieClip;
public var gazoPlayButton:SimpleButton;
public var preloaderBar:MovieClip;
public var fullScreenButton:SimpleButton;
public function GazoIntro_1(){
addFrameScript(0, frame1, 1, frame2, 24, frame25, 40, frame41);
}
public function onFullScreenButtonClick(_arg1:MouseEvent):void{
var e = _arg1;
try {
navigateToURL(new URLRequest("http://www.gazo.com/?refb=intro"), "_blank");
} catch(e:Error) {
};
}
function frame1(){
stop();
fullScreenButton.addEventListener(MouseEvent.CLICK, onFullScreenButtonClick, false, 0, true);
}
function frame25(){
stop();
_self = MovieClip(this);
gazoPlayButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
_self.play();
}, false, 0, true);
}
function frame2(){
stop();
preloaderBar.startLoading();
}
function frame41(){
stop();
(parent as MovieClip).gotoAndStop(3);
}
}
}//package HeroesvsDragons_fla
Section 14
//GazoIntroAnimation_2 (HeroesvsDragons_fla.GazoIntroAnimation_2)
package HeroesvsDragons_fla {
import flash.display.*;
import flash.media.*;
public dynamic class GazoIntroAnimation_2 extends MovieClip {
public var _myChannel:SoundChannel;
public var volumeSize:uint;
public var _bgMusic:BgMusic2;
public var musicSet:SoundTransform;
public function GazoIntroAnimation_2(){
addFrameScript(5, frame6, 94, frame95);
}
function frame95(){
stop();
MovieClip(parent).play();
}
function frame6(){
volumeSize = 1;
_bgMusic = new BgMusic2();
musicSet = new SoundTransform(1, 0);
_myChannel = _bgMusic.play(0, 1);
_myChannel.soundTransform = musicSet;
}
}
}//package HeroesvsDragons_fla
Section 15
//gazoPreloader_9 (HeroesvsDragons_fla.gazoPreloader_9)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gazoPreloader_9 extends MovieClip {
public var _parentMC:MovieClip;
public var _orgPreloaderBarWidth:Number;
public var preloaderBar:MovieClip;
public function gazoPreloader_9(){
addFrameScript(0, frame1);
}
public function setLoaded(_arg1:Number):void{
var _local2:Number;
_local2 = (_orgPreloaderBarWidth * _arg1);
preloaderBar.width = (_orgPreloaderBarWidth * _arg1);
}
public function init():void{
if (_parentMC.loaderInfo.bytesLoaded >= _parentMC.loaderInfo.bytesTotal){
this.visible = false;
end();
} else {
initBarWidth();
_parentMC.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
_parentMC.loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
};
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
setLoaded(_local4);
}
function frame1(){
}
public function startLoading():void{
var a:Number;
_parentMC = MovieClip(parent);
try {
a = _parentMC.loaderInfo.width;
init();
} catch(e:Error) {
_parentMC.addEventListener(Event.ENTER_FRAME, function (_arg1:Event):void{
_arg1.currentTarget.removeEventListener(_arg1.type, arguments.callee);
init();
});
};
}
public function initBarWidth():void{
_orgPreloaderBarWidth = preloaderBar.width;
preloaderBar.width = 0;
}
public function onLoadComplete(_arg1:Event):void{
end();
}
public function end():void{
try {
_parentMC.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
_parentMC.loaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
} catch(e:Error) {
};
_parentMC.play();
}
}
}//package HeroesvsDragons_fla
Section 16
//HerosvsDragons102_284 (HeroesvsDragons_fla.HerosvsDragons102_284)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons102_284 extends MovieClip {
public function HerosvsDragons102_284(){
addFrameScript(29, frame30, 59, frame60);
}
function frame30(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame60(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 17
//HerosvsDragons103_299 (HeroesvsDragons_fla.HerosvsDragons103_299)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons103_299 extends MovieClip {
public function HerosvsDragons103_299(){
addFrameScript(27, frame28, 55, frame56);
}
function frame28(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame56(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 18
//HerosvsDragons104_222 (HeroesvsDragons_fla.HerosvsDragons104_222)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons104_222 extends MovieClip {
public function HerosvsDragons104_222(){
addFrameScript(31, frame32, 63, frame64);
}
function frame64(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame32(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 19
//HerosvsDragons105_270 (HeroesvsDragons_fla.HerosvsDragons105_270)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons105_270 extends MovieClip {
public function HerosvsDragons105_270(){
addFrameScript(34, frame35, 69, frame70);
}
function frame70(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame35(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 20
//HerosvsDragons106_244 (HeroesvsDragons_fla.HerosvsDragons106_244)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons106_244 extends MovieClip {
public function HerosvsDragons106_244(){
addFrameScript(32, frame33, 64, frame65);
}
function frame65(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame33(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 21
//HerosvsDragons107_202 (HeroesvsDragons_fla.HerosvsDragons107_202)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons107_202 extends MovieClip {
public var fire_mc:MovieClip;
public function HerosvsDragons107_202(){
addFrameScript(36, frame37, 72, frame73);
}
function frame73(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
function frame37(){
if (root){
MovieClip(root).hp = (MovieClip(root).hp - 1);
MovieClip(root).refurbishUI();
};
}
}
}//package HeroesvsDragons_fla
Section 22
//HerosvsDragons108_285 (HeroesvsDragons_fla.HerosvsDragons108_285)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons108_285 extends MovieClip {
public function HerosvsDragons108_285(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 23
//HerosvsDragons110_300 (HeroesvsDragons_fla.HerosvsDragons110_300)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons110_300 extends MovieClip {
public function HerosvsDragons110_300(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 24
//HerosvsDragons112_226 (HeroesvsDragons_fla.HerosvsDragons112_226)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons112_226 extends MovieClip {
public function HerosvsDragons112_226(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 25
//HerosvsDragons125_271 (HeroesvsDragons_fla.HerosvsDragons125_271)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons125_271 extends MovieClip {
public function HerosvsDragons125_271(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 26
//HerosvsDragons130_256 (HeroesvsDragons_fla.HerosvsDragons130_256)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons130_256 extends MovieClip {
public function HerosvsDragons130_256(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 27
//HerosvsDragons14_114 (HeroesvsDragons_fla.HerosvsDragons14_114)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons14_114 extends MovieClip {
public var occurrence_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 28
//HerosvsDragons156_212 (HeroesvsDragons_fla.HerosvsDragons156_212)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons156_212 extends MovieClip {
public function HerosvsDragons156_212(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 29
//HerosvsDragons194_116 (HeroesvsDragons_fla.HerosvsDragons194_116)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons194_116 extends MovieClip {
public var _p:MovieClip;
public function HerosvsDragons194_116(){
addFrameScript(5, frame6, 77, frame78);
}
function frame78(){
stop();
MovieClip(parent).prevFrame();
}
function frame6(){
MovieClip(parent).fire(this.localToGlobal(new Point(_p.x, _p.y)));
}
}
}//package HeroesvsDragons_fla
Section 30
//HerosvsDragons202_106 (HeroesvsDragons_fla.HerosvsDragons202_106)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons202_106 extends MovieClip {
public var _p:MovieClip;
public function HerosvsDragons202_106(){
addFrameScript(4, frame5, 11, frame12);
}
function frame12(){
stop();
MovieClip(parent).prevFrame();
}
function frame5(){
MovieClip(parent).fire(this.localToGlobal(new Point(_p.x, _p.y)));
}
}
}//package HeroesvsDragons_fla
Section 31
//HerosvsDragons212_95 (HeroesvsDragons_fla.HerosvsDragons212_95)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons212_95 extends MovieClip {
public var _p:MovieClip;
public function HerosvsDragons212_95(){
addFrameScript(4, frame5, 59, frame60);
}
function frame5(){
MovieClip(parent).fire(this.localToGlobal(new Point(_p.x, _p.y)));
}
function frame60(){
stop();
MovieClip(parent).prevFrame();
}
}
}//package HeroesvsDragons_fla
Section 32
//HerosvsDragons22_165 (HeroesvsDragons_fla.HerosvsDragons22_165)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class HerosvsDragons22_165 extends MovieClip {
public var fButton:SimpleButton;
public function HerosvsDragons22_165(){
addFrameScript(0, frame1);
}
function frame1(){
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.gazo.com/?refb=intro");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package HeroesvsDragons_fla
Section 33
//HerosvsDragons232_85 (HeroesvsDragons_fla.HerosvsDragons232_85)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons232_85 extends MovieClip {
public var _p:MovieClip;
public function HerosvsDragons232_85(){
addFrameScript(4, frame5, 26, frame27);
}
function frame5(){
MovieClip(parent).fire(this.localToGlobal(new Point(_p.x, _p.y)));
}
function frame27(){
stop();
MovieClip(parent).prevFrame();
}
}
}//package HeroesvsDragons_fla
Section 34
//HerosvsDragons241_72 (HeroesvsDragons_fla.HerosvsDragons241_72)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons241_72 extends MovieClip {
public var mask_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 35
//HerosvsDragons247_121 (HeroesvsDragons_fla.HerosvsDragons247_121)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons247_121 extends MovieClip {
public var lens_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 36
//HerosvsDragons248_75 (HeroesvsDragons_fla.HerosvsDragons248_75)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons248_75 extends MovieClip {
public var main_mc:MovieClip;
public var main2_mc:Hero;
public var main3_mc:Hero;
public var main1_mc:Hero;
public var arrow_mc:MovieClip;
public var foe_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 37
//HerosvsDragons255_159 (HeroesvsDragons_fla.HerosvsDragons255_159)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
public dynamic class HerosvsDragons255_159 extends MovieClip {
public var playAgain_btn:SimpleButton;
public function HerosvsDragons255_159(){
addFrameScript(2, frame3);
}
public function nextDown(_arg1:MouseEvent):void{
MovieClip(root).gotoAndStop(3);
}
function frame3(){
playAgain_btn.addEventListener(MouseEvent.MOUSE_DOWN, nextDown);
}
}
}//package HeroesvsDragons_fla
Section 38
//HerosvsDragons258_146 (HeroesvsDragons_fla.HerosvsDragons258_146)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons258_146 extends MovieClip {
public var wing_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 39
//HerosvsDragons261_22 (HeroesvsDragons_fla.HerosvsDragons261_22)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class HerosvsDragons261_22 extends MovieClip {
public var fButton:SimpleButton;
public function HerosvsDragons261_22(){
addFrameScript(0, frame1);
}
function frame1(){
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.gazo.com/?refb=intro");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package HeroesvsDragons_fla
Section 40
//HerosvsDragons267_107 (HeroesvsDragons_fla.HerosvsDragons267_107)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons267_107 extends MovieClip {
public var cannon_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 41
//HerosvsDragons315_179 (HeroesvsDragons_fla.HerosvsDragons315_179)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons315_179 extends MovieClip {
public var _mc:MovieClip;
public var i:uint;
public function HerosvsDragons315_179(){
addFrameScript(9, frame10, 29, frame30, 49, frame50, 69, frame70, 89, frame90, 109, frame110, 129, frame130, 141, frame142);
}
function frame70(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame90(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame10(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame110(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame30(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame130(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame50(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 180)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
function frame142(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
}
}//package HeroesvsDragons_fla
Section 42
//HerosvsDragons316_185 (HeroesvsDragons_fla.HerosvsDragons316_185)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons316_185 extends MovieClip {
public var _mc:MovieClip;
public var i:uint;
public function HerosvsDragons316_185(){
addFrameScript(7, frame8, 13, frame14);
}
function frame14(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
function frame8(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 120)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
_mc.speed = 1;
};
i++;
};
};
}
}
}//package HeroesvsDragons_fla
Section 43
//HerosvsDragons318_177 (HeroesvsDragons_fla.HerosvsDragons318_177)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons318_177 extends MovieClip {
public var _mc:MovieClip;
public var i:uint;
public function HerosvsDragons318_177(){
addFrameScript(6, frame7, 11, frame12);
}
function frame12(){
stop();
MovieClip(parent.parent).removeChild(MovieClip(parent));
}
function frame7(){
if (MovieClip(root).bg_mc.foe_mc.numChildren){
i = 0;
while (i < MovieClip(root).bg_mc.foe_mc.numChildren) {
_mc = (MovieClip(root).bg_mc.foe_mc.getChildAt(i) as MovieClip);
if ((((Math.abs((_mc.x - MovieClip(parent).x)) < 120)) && (!((Math.ceil((_mc.currentFrame / 3)) == 2))))){
MovieClip(root).harm(_mc, MovieClip(parent).ap);
};
i++;
};
};
}
}
}//package HeroesvsDragons_fla
Section 44
//HerosvsDragons32_173 (HeroesvsDragons_fla.HerosvsDragons32_173)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons32_173 extends MovieClip {
public function HerosvsDragons32_173(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 45
//HerosvsDragons321_211 (HeroesvsDragons_fla.HerosvsDragons321_211)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons321_211 extends MovieClip {
public function HerosvsDragons321_211(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 46
//HerosvsDragons333_117 (HeroesvsDragons_fla.HerosvsDragons333_117)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons333_117 extends MovieClip {
public var mask_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 47
//HerosvsDragons334_142 (HeroesvsDragons_fla.HerosvsDragons334_142)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons334_142 extends MovieClip {
public function HerosvsDragons334_142(){
addFrameScript(0, frame1, 45, frame46);
}
function frame1(){
MovieClip(parent).cd_mc = this;
}
function frame46(){
stop();
MovieClip(parent).cd = false;
}
}
}//package HeroesvsDragons_fla
Section 48
//HerosvsDragons335_143 (HeroesvsDragons_fla.HerosvsDragons335_143)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons335_143 extends MovieClip {
public function HerosvsDragons335_143(){
addFrameScript(0, frame1, 90, frame91);
}
function frame91(){
stop();
MovieClip(parent).cd = false;
}
function frame1(){
MovieClip(parent).cd_mc = this;
}
}
}//package HeroesvsDragons_fla
Section 49
//HerosvsDragons336_144 (HeroesvsDragons_fla.HerosvsDragons336_144)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HerosvsDragons336_144 extends MovieClip {
public function HerosvsDragons336_144(){
addFrameScript(0, frame1, 150, frame151);
}
function frame151(){
stop();
MovieClip(parent).cd = false;
}
function frame1(){
MovieClip(parent).cd_mc = this;
}
}
}//package HeroesvsDragons_fla
Section 50
//HerosvsDragons36_169 (HeroesvsDragons_fla.HerosvsDragons36_169)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
public dynamic class HerosvsDragons36_169 extends MovieClip {
public var replay_btn:SimpleButton;
public function HerosvsDragons36_169(){
addFrameScript(8, frame9);
}
public function nextDown(_arg1:MouseEvent):void{
MovieClip(root).gotoAndStop(6);
}
function frame9(){
stop();
replay_btn.addEventListener(MouseEvent.MOUSE_DOWN, nextDown);
}
}
}//package HeroesvsDragons_fla
Section 51
//HerosvsDragons38_167 (HeroesvsDragons_fla.HerosvsDragons38_167)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons38_167 extends MovieClip {
public function HerosvsDragons38_167(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 52
//HerosvsDragons40_163 (HeroesvsDragons_fla.HerosvsDragons40_163)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons40_163 extends MovieClip {
public function HerosvsDragons40_163(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 53
//HerosvsDragons42_160 (HeroesvsDragons_fla.HerosvsDragons42_160)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
public dynamic class HerosvsDragons42_160 extends MovieClip {
public var next_btn:SimpleButton;
public function HerosvsDragons42_160(){
addFrameScript(11, frame12);
}
public function nextDown(_arg1:MouseEvent):void{
MovieClip(root).gotoAndStop(6);
}
function frame12(){
stop();
next_btn.addEventListener(MouseEvent.MOUSE_DOWN, nextDown);
}
}
}//package HeroesvsDragons_fla
Section 54
//HerosvsDragons55_150 (HeroesvsDragons_fla.HerosvsDragons55_150)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons55_150 extends MovieClip {
public function HerosvsDragons55_150(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 55
//HerosvsDragons59_59 (HeroesvsDragons_fla.HerosvsDragons59_59)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons59_59 extends MovieClip {
public function HerosvsDragons59_59(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 56
//HerosvsDragons61_24 (HeroesvsDragons_fla.HerosvsDragons61_24)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons61_24 extends MovieClip {
public function HerosvsDragons61_24(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 57
//HerosvsDragons64_29 (HeroesvsDragons_fla.HerosvsDragons64_29)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons64_29 extends MovieClip {
public function HerosvsDragons64_29(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 58
//HerosvsDragons67_32 (HeroesvsDragons_fla.HerosvsDragons67_32)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons67_32 extends MovieClip {
public function HerosvsDragons67_32(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 59
//HerosvsDragons8_147 (HeroesvsDragons_fla.HerosvsDragons8_147)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons8_147 extends MovieClip {
public var wing_mc:MovieClip;
}
}//package HeroesvsDragons_fla
Section 60
//HerosvsDragons90_20 (HeroesvsDragons_fla.HerosvsDragons90_20)
package HeroesvsDragons_fla {
import flash.display.*;
public dynamic class HerosvsDragons90_20 extends MovieClip {
public var help_btn:SimpleButton;
public var play_btn:SimpleButton;
public function HerosvsDragons90_20(){
addFrameScript(84, frame85);
}
function frame85(){
stop();
}
}
}//package HeroesvsDragons_fla
Section 61
//Timeline_55 (HeroesvsDragons_fla.Timeline_55)
package HeroesvsDragons_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Timeline_55 extends MovieClip {
public var fButton:SimpleButton;
public function Timeline_55(){
addFrameScript(0, frame1);
}
function frame1(){
fButton.addEventListener(MouseEvent.CLICK, fButtonClicked);
}
public function fButtonClicked(_arg1:MouseEvent){
var urlRequest:URLRequest;
var e = _arg1;
try {
urlRequest = new URLRequest("http://www.gazo.com/?refb=intro");
navigateToURL(urlRequest, "_blank");
} catch(e:Error) {
};
}
}
}//package HeroesvsDragons_fla
Section 62
//Arm (Arm)
package {
import flash.events.*;
import flash.display.*;
public dynamic class Arm extends MovieClip {
public var ap:uint;// = 0
public var goal_mc:MovieClip;
public function Arm(){
ap = 0;
super();
addFrameScript(0, arm1);
addFrameScript(1, arm1);
addFrameScript(2, arm1);
}
private function arm1():void{
addEventListener(Event.ENTER_FRAME, arm1Move);
}
public function remove():void{
removeEventListener(Event.ENTER_FRAME, arm1Move);
}
private function arm1Move(_arg1:Event):void{
var _local2:uint;
var _local3:Arm2;
_local2 = 20;
x = (x + ((Math.cos(((rotation * Math.PI) / 180)) * _local2) * MovieClip(root).gameSpeed));
y = (y + ((Math.sin(((rotation * Math.PI) / 180)) * _local2) * MovieClip(root).gameSpeed));
if (x > (goal_mc.x - 20)){
removeEventListener(Event.ENTER_FRAME, arm1Move);
if ((((currentFrame < 4)) || ((currentFrame == 6)))){
MovieClip(root).harm(goal_mc, ap);
};
if (currentFrame > 3){
_local3 = new Arm2();
_local3.x = this.x;
_local3.y = this.y;
_local3.ap = ap;
_local3.gotoAndStop((currentFrame - 3));
MovieClip(root).bg_mc.addChild(_local3);
};
MovieClip(parent).removeChild(this);
};
}
}
}//package
Section 63
//Arm2 (Arm2)
package {
import flash.display.*;
public dynamic class Arm2 extends MovieClip {
public var fire_mc:MovieClip;
}
}//package
Section 64
//Armn2 (Armn2)
package {
import flash.display.*;
public dynamic class Armn2 extends MovieClip {
}
}//package
Section 65
//BgMusic (BgMusic)
package {
import flash.media.*;
public dynamic class BgMusic extends Sound {
}
}//package
Section 66
//BgMusic2 (BgMusic2)
package {
import flash.media.*;
public dynamic class BgMusic2 extends Sound {
}
}//package
Section 67
//Foe (Foe)
package {
import flash.display.*;
public dynamic class Foe extends MovieClip {
public var dh_mc:MovieClip;
public function Foe(){
var _local1:uint;
super();
_local1 = 0;
while (_local1 < 6) {
addFrameScript((_local1 * 3), refurbish);
addFrameScript(((_local1 * 3) + 1), refurbish);
addFrameScript(((_local1 * 3) + 2), refurbish2);
_local1++;
};
}
public function refurbish():void{
var _local1:uint;
var _local2:MovieClip;
dh_mc = null;
_local1 = 0;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) is MovieClip)){
_local2 = (getChildAt(_local1) as MovieClip);
if (_local2.totalFrames > 10){
dh_mc = _local2;
};
};
_local1++;
};
}
public function refurbish2():void{
dh_mc = null;
}
}
}//package
Section 68
//Hero (Hero)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public dynamic class Hero extends MovieClip {
public var goal_mc:MovieClip;
public function Hero(){
var _local1:uint;
super();
_local1 = 1;
while (_local1 <= 3) {
addFrameScript(((_local1 * 2) - 2), detect1);
addFrameScript(((_local1 * 2) - 1), detect2);
_local1++;
};
}
private function enter(_arg1:Event):void{
if (((MovieClip(root).foe_arr.length) && (MovieClip(root).gameSpeed))){
goal_mc = MovieClip(root).foe_arr[0];
this.removeEventListener(Event.ENTER_FRAME, enter);
nextFrame();
};
}
public function fire(_arg1:Point):void{
MovieClip(root).fire(goal_mc, uint(name.substr(4, 1)), _arg1);
}
private function detect1():void{
this.addEventListener(Event.ENTER_FRAME, enter);
}
public function detect2():void{
this.removeEventListener(Event.ENTER_FRAME, enter);
}
}
}//package
Section 69
//HeroMenu (HeroMenu)
package {
import flash.events.*;
import flash.display.*;
public dynamic class HeroMenu extends MovieClip {
public var cost1:MovieClip;
public var cost2:MovieClip;
public var ap2p1:MovieClip;
public var j3:MovieClip;
public var cost3:MovieClip;
public var j2:MovieClip;
public var ap1p1:MovieClip;
public var ap1p3:MovieClip;
public var j1:MovieClip;
public var ap1p2:MovieClip;
public var sp2p2:MovieClip;
public var sp1p1:MovieClip;
public var sp1p2:MovieClip;
public var close_btn:SimpleButton;
public var _btn:MovieClip;
public var lv2p1:MovieClip;
public var lv2p2:MovieClip;
public var h1:MovieClip;
public var h2:MovieClip;
private var now:MovieClip;
public var h3:MovieClip;
public var ap2p2:MovieClip;
public var ap2p3:MovieClip;
public var lv1p1:MovieClip;
public var lv1p2:MovieClip;
public var sp2p1:MovieClip;
public function HeroMenu(){
now = j1;
pitchOn();
_btn.addEventListener(MouseEvent.MOUSE_DOWN, Up);
close_btn.addEventListener(MouseEvent.MOUSE_DOWN, MovieClip(root).closeHreo);
}
private function nowChange(_arg1:MouseEvent):void{
now = (_arg1.currentTarget as MovieClip);
pitchOn();
}
private function pitchOn():void{
var _local1:uint;
_local1 = 1;
while (_local1 <= 3) {
this[("h" + _local1)].gotoAndStop(_local1);
this[("h" + _local1)].buttonMode = true;
this[("h" + _local1)].wing_mc.visible = false;
this[("h" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, nowChange);
this[("j" + _local1)].gotoAndStop(_local1);
this[("j" + _local1)].buttonMode = true;
this[("j" + _local1)].wing_mc.visible = false;
this[("j" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, nowChange);
_local1++;
};
now.wing_mc.visible = true;
att();
}
private function refurbish(_arg1:Array):void{
var _local2:uint;
var _local3:uint;
_local2 = 1;
while (_local2 <= 2) {
_local3 = 1;
while (_local3 <= 2) {
if ((((_arg1[1][0] == 9)) && ((_local2 == 2)))){
this[((("lv" + _local2) + "p") + _local3)].gotoAndStop(11);
this[((("ap" + _local2) + "p") + _local3)].gotoAndStop(11);
this[((("sp" + _local2) + "p") + _local3)].gotoAndStop(11);
} else {
this[((("lv" + _local2) + "p") + _local3)].gotoAndStop((Math.floor(((_arg1[_local2][0] % Math.pow(10, (3 - _local3))) / Math.pow(10, (2 - _local3)))) + 1));
this[((("ap" + _local2) + "p") + _local3)].gotoAndStop((Math.floor(((_arg1[_local2][1] % Math.pow(10, (4 - _local3))) / Math.pow(10, (3 - _local3)))) + 1));
this[((("sp" + _local2) + "p") + _local3)].gotoAndStop((Math.floor(((_arg1[_local2][2] % Math.pow(10, (3 - _local3))) / Math.pow(10, (2 - _local3)))) + 1));
};
if ((((_arg1[1][0] == 9)) && ((_local2 == 2)))){
this[(("ap" + _local2) + "p3")].gotoAndStop(11);
} else {
this[(("ap" + _local2) + "p3")].gotoAndStop(Math.floor(((_arg1[_local2][1] % 10) + 1)));
};
_local3++;
};
_local2++;
};
_local2 = 1;
while (_local2 <= 3) {
if (_arg1[1][0] < 9){
_btn.lv = _arg1[1][0];
_btn.cost = MovieClip(root).cost_arr[(_arg1[1][0] + 1)];
this[("cost" + _local2)].gotoAndStop((Math.floor(((MovieClip(root).cost_arr[(_arg1[1][0] + 1)] % Math.pow(10, _local2)) / Math.pow(10, (_local2 - 1)))) + 1));
} else {
_btn.cost = 0;
this[("cost" + _local2)].gotoAndStop(11);
};
_local2++;
};
if (_arg1[1][0] >= 9){
_btn.visible = false;
} else {
_btn.visible = true;
};
}
private function att():void{
var _local1:String;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:Array;
_local1 = now.name.substr(0, 1);
_local2 = uint(now.name.substr(1, 1));
_local3 = 1;
_local4 = 1;
_local5 = 1;
_local6 = 1;
_local7 = 1;
_local8 = 1;
if (_local1 == "h"){
_local3 = MovieClip(root).heroMain_arr[_local2];
_local4 = MovieClip(root).heroAp_arr[_local2][_local3];
_local5 = (MovieClip(root).heroSp_arr[_local2] * 10);
_local6 = (MovieClip(root).heroMain_arr[_local2] + 1);
_local7 = MovieClip(root).heroAp_arr[_local2][_local6];
_local8 = (MovieClip(root).heroSp_arr[_local2] * 10);
} else {
_local3 = MovieClip(root).main_arr[_local2];
_local4 = MovieClip(root).ap_arr[_local2][_local3];
_local5 = (MovieClip(root).sp_arr[_local2] * 10);
_local6 = (MovieClip(root).main_arr[_local2] + 1);
_local7 = MovieClip(root).ap_arr[_local2][_local6];
_local8 = (MovieClip(root).sp_arr[_local2] * 10);
};
_local9 = [[], [_local3, _local4, _local5], [_local6, _local7, _local8]];
refurbish(_local9);
}
private function Up(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:String;
var _local4:uint;
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = now.name.substr(0, 1);
_local4 = uint(now.name.substr(1, 1));
if (MovieClip(root).money >= _local2.cost){
MovieClip(root).money = (MovieClip(root).money - _local2.cost);
if (_local3 == "h"){
var _local5 = MovieClip(root).heroMain_arr;
var _local6 = _local4;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
} else {
_local5 = MovieClip(root).main_arr;
_local6 = _local4;
_local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
MovieClip(root).refurbishUI();
};
pitchOn();
}
}
}//package
Section 70
//jiaMoney (jiaMoney)
package {
import flash.display.*;
import flash.text.*;
public dynamic class jiaMoney extends Sprite {
public var hp_txt:TextField;
}
}//package
Section 71
//jianHP (jianHP)
package {
import flash.display.*;
import flash.text.*;
public dynamic class jianHP extends Sprite {
public var hp_txt:TextField;
}
}//package
Section 72
//Main (Main)
package {
import gs.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import gs.easing.*;
import flash.media.*;
public dynamic class Main extends MovieClip {
private const wave_arr:Array;
public const heroSp_arr:Array;
public const ap_arr:Array;
public const hp_arr:Array;
public const heroAp_arr:Array;
public const cost_arr:Array;
public const sp_arr:Array;
public var helpOk_btn:SimpleButton;
public var hp_mc:MovieClip;
public var level_mc:MovieClip;
public var volumeSize:uint;// = 1
public var _myChannel:SoundChannel;
public var wing_mc:MovieClip;
public var m1_mc:MovieClip;
public var foe_arr:Array;
private var nowLevel:uint;// = 1
public var hpBar_mc:MovieClip;
private var money_arr:Array;
public var money_2:MovieClip;
public var money_3:MovieClip;
public var money_4:MovieClip;
public var money_5:MovieClip;
private var maxLevel:uint;// = 10
public var money_1:MovieClip;
public var hero_btn:SimpleButton;
private var save_arr:Object;
public var m2_mc:MovieClip;
private var first:Boolean;// = true
public var money:uint;// = 0
private var time:uint;// = 0
public var d1_mc:Skill;
public var main_arr:Array;
public var stop_mc:MovieClip;
public var heroMain_arr:Array;
public var hp:int;// = 100
private var stageMC:MovieClip;
public var heroMenu_mc:HeroMenu;
public var d2_mc:Skill;
public var dh_mc:MovieClip;
private var foeNum:uint;// = 0
public var map_mc:MovieClip;
public var gameSpeed:uint;// = 1
private var current:uint;// = 0
public var menu_btn:SimpleButton;
public var d3_mc:Skill;
public var post_mc:MovieClip;
public var _bgMusic:BgMusic;
public var bg_mc:MovieClip;
public var foe_mc:Array;
public var musicSet:SoundTransform;
public function Main(){
nowLevel = 1;
maxLevel = 10;
gameSpeed = 1;
hp = 100;
money = 0;
foe_mc = [];
time = 0;
foeNum = 0;
foe_arr = [];
main_arr = [3, 1, 1, 1];
heroMain_arr = [3, 1, 1, 1];
ap_arr = [[], [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50], [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300]];
heroAp_arr = [[], [0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160], [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300], [0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70]];
sp_arr = [0, 2, 3, 5];
heroSp_arr = [0, 0.9, 2, 0.4];
cost_arr = [0, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900];
money_arr = [0, 12, 18, 24, 30, 35, 40, 45, 50, 55, 60];
wave_arr = [0, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14];
hp_arr = [0, 80, 110, 150, 200, 320, 450, 590, 740, 900, 1070];
volumeSize = 1;
_bgMusic = new BgMusic();
musicSet = new SoundTransform((volumeSize * 0.5), 0);
first = true;
current = 0;
save_arr = {};
super();
stage.showDefaultContextMenu = false;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
addFrameScript(0, stop);
addFrameScript(2, beginGame);
addFrameScript(3, helpGame);
addFrameScript(4, mainGame);
addFrameScript(5, jumpGame);
}
private function shellChange(_arg1:MouseEvent):void{
var _local2:uint;
if (!_arg1.currentTarget.cd){
_local2 = uint(_arg1.currentTarget.name.substr(1, 1));
current = _local2;
shellShow();
};
}
private function mainStart(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:uint;
var _local6:MovieClip;
var _local7:Array;
if (gameSpeed){
if ((((bg_mc.mouseX > -490)) && (current))){
_local3 = ((Math.atan2((bg_mc.mouseY - bg_mc.arrow_mc.y), (bg_mc.mouseX - bg_mc.arrow_mc.x)) * 180) / Math.PI);
if (_local3 < -60){
_local3 = -60;
} else {
if (_local3 > -10){
_local3 = -10;
};
};
bg_mc.arrow_mc.rotation = _local3;
bg_mc.main_mc.cannon_mc.rotation = bg_mc.arrow_mc.rotation;
};
_local2 = Math.sqrt((((bg_mc.mouseY - bg_mc.arrow_mc.y) * (bg_mc.mouseY - bg_mc.arrow_mc.y)) + ((bg_mc.mouseX - bg_mc.arrow_mc.x) * (bg_mc.mouseX - bg_mc.arrow_mc.x))));
if (bg_mc.mouseX <= -500){
_local2 = 0;
};
bg_mc.arrow_mc.mask_mc.scaleX = (_local2 / 400);
};
if (gameSpeed){
foe_arr = [];
_local4 = 150;
time = (time + gameSpeed);
_local5 = 0;
while (_local5 < bg_mc.foe_mc.numChildren) {
_local6 = (bg_mc.foe_mc.getChildAt(_local5) as MovieClip);
if ((((_local6.x <= 450)) && (!(((_local6.currentFrame % 3) === 0))))){
foe_arr.push(_local6);
};
_local5++;
};
if (time < (120 * wave_arr[nowLevel])){
_local7 = [0, 1, 1];
_local7[1] = Math.ceil((nowLevel / 2));
_local7[2] = (Math.ceil((nowLevel / 2)) + 1);
if ((time % _local4) == 1){
newFoe(_local7[1]);
} else {
if ((time % _local4) == 21){
newFoe(_local7[1]);
} else {
if ((time % _local4) == 41){
newFoe(2);
} else {
if ((time % _local4) == 61){
newFoe(_local7[2]);
};
};
};
};
} else {
if (bg_mc.foe_mc.numChildren <= 0){
win();
};
};
};
}
private function musicChange(_arg1:MouseEvent):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
volumeSize = (1 - volumeSize);
_local2.gotoAndStop((3 - _local2.currentFrame));
musicSet = new SoundTransform((volumeSize * 0.5), 0);
_myChannel.soundTransform = musicSet;
}
public function fire(_arg1:MovieClip, _arg2:uint, _arg3:Point):void{
var _local4:Arm;
_local4 = new Arm();
_local4.x = bg_mc.globalToLocal(_arg3).x;
_local4.y = bg_mc.globalToLocal(_arg3).y;
_local4.goal_mc = _arg1;
_local4.ap = heroAp_arr[_arg2][heroMain_arr[_arg2]];
_local4.gotoAndStop(_arg2);
_local4.rotation = ((Math.atan2(((_arg1.y + _arg1._p.y) - _local4.y), ((_arg1.x + _arg1._p.x) - _local4.x)) * 180) / Math.PI);
_local4.scaleX = (_local4.scaleY = 0.3);
bg_mc.addChild(_local4);
}
private function mainFrie(_arg1:MouseEvent):void{
var _local2:Armn2;
var _local3:Point;
var _local4:Number;
if (((gameSpeed) && ((current > 0)))){
_local2 = new Armn2();
_local3 = bg_mc.main_mc.cannon_mc.occurrence_mc.localToGlobal(new Point(0, 0));
_local3 = bg_mc.globalToLocal(_local3);
_local2.x = _local3.x;
_local2.y = _local3.y;
stageMC = _local2;
_local2.ap = ap_arr[current][main_arr[current]];
_local2.rotation = bg_mc.arrow_mc.rotation;
_local4 = bg_mc.arrow_mc.mask_mc.scaleX;
(((_local4 > 1)) && (1));
_local2.speed = (_local4 * 30);
_local2.vigorX = (_local2.speed * Math.cos(((_local2.rotation * Math.PI) / 180)));
_local2.vigorY = (_local2.speed * Math.sin(((_local2.rotation * Math.PI) / 180)));
_local2.gotoAndStop(current);
_local2.addEventListener(Event.ENTER_FRAME, aMove);
bg_mc.addChild(_local2);
this[(("d" + current) + "_mc")].cd = true;
this[(("d" + current) + "_mc")].cd_mc.gotoAndPlay(1);
current = 0;
shellShow();
};
}
public function stopOrPlay(_arg1:MovieClip):void{
if (gameSpeed){
_arg1.play();
} else {
_arg1.stop();
};
}
private function beginGame():void{
stop();
first = true;
if (_myChannel){
} else {
_myChannel = _bgMusic.play(0, 9999);
_myChannel.soundTransform = musicSet;
};
m1_mc.gotoAndStop((2 - volumeSize));
m1_mc.addEventListener(MouseEvent.MOUSE_DOWN, musicChange);
dh_mc.play_btn.addEventListener(MouseEvent.MOUSE_DOWN, jumpTo(5));
dh_mc.help_btn.addEventListener(MouseEvent.MOUSE_DOWN, jumpTo(4));
}
private function removeAll():void{
var _local1:MovieClip;
var _local2:uint;
_local2 = 0;
while (_local2 < bg_mc.numChildren) {
if ((bg_mc.getChildAt(_local2) is Arm)){
_local1 = (bg_mc.getChildAt(_local2) as MovieClip);
_local1.remove();
} else {
if ((bg_mc.getChildAt(_local2) is Armn2)){
_local1 = (bg_mc.getChildAt(_local2) as MovieClip);
_local1.removeEventListener(Event.ENTER_FRAME, aMove);
} else {
if ((bg_mc.getChildAt(_local2) is Arm2)){
_local1 = (bg_mc.getChildAt(_local2) as MovieClip);
_local1.gotoAndStop(4);
} else {
if ((bg_mc.getChildAt(_local2) is Hero)){
_local1 = (bg_mc.getChildAt(_local2) as MovieClip);
_local1.detect2();
_local1.gotoAndStop(7);
};
};
};
};
_local2++;
};
if (bg_mc.foe_mc.numChildren){
_local2 = 0;
while (_local2 < bg_mc.foe_mc.numChildren) {
_local1 = (bg_mc.foe_mc.getChildAt(_local2) as MovieClip);
_local1.gotoAndStop(19);
_local2++;
};
};
while (bg_mc.numChildren) {
bg_mc.removeChildAt(0);
};
}
private function heroMenu(_arg1:MouseEvent):void{
if (heroMenu_mc.y < -120){
TweenLite.to(heroMenu_mc, 0.5, {y:270, ease:Back.easeOut});
if (gameSpeed){
gameStop();
};
} else {
TweenLite.to(heroMenu_mc, 0.5, {y:-150, ease:Back.easeOut});
if (gameSpeed == 0){
gameStop();
};
};
}
private function menuDown(_arg1:MouseEvent):void{
removeEventListener(Event.ENTER_FRAME, mainStart);
gameStop();
removeAll();
gotoAndStop(3);
}
private function foeMove(_arg1:Event):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
_local2.x = (_local2.x - (_local2.speed * gameSpeed));
if (_local2.x <= -440){
_local2.removeEventListener(Event.ENTER_FRAME, foeMove);
_local2.x = -440;
_local2.nextFrame();
};
}
private function mapMoves(_arg1:Event):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
bg_mc.x = (702.5 - (((_local2.x + 112) * 795) / 224));
}
private function helpGame():void{
helpOk_btn.addEventListener(MouseEvent.MOUSE_DOWN, jumpTo(5));
}
public function refurbishUI():void{
var _local1:uint;
var _local2:uint;
var _local3:uint;
hp_mc.gotoAndStop((hp + 1));
hpBar_mc.mask_mc.scaleX = (hp / 100);
_local1 = 1;
while (_local1 <= 5) {
_local2 = Math.pow(10, (6 - _local1));
_local3 = Math.pow(10, (5 - _local1));
this[("money_" + _local1)].gotoAndStop((Math.floor(((money % _local2) / _local3)) + 1));
if (money > (Math.pow(10, (5 - _local1)) - 1)){
this[("money_" + _local1)].visible = true;
} else {
this[("money_" + _local1)].visible = false;
};
_local1++;
};
money_5.visible = true;
if (hp <= 0){
lose();
};
}
private function lose():void{
gameStop();
removeAll();
money = save_arr.money;
main_arr = save_arr.main_arr.concat();
heroMain_arr = save_arr.heroMain_arr.concat();
post_mc.gotoAndStop(2);
post_mc.visible = true;
hp_mc.gotoAndStop(1);
}
private function gameStop(_arg1:MouseEvent=null):void{
var _local2:uint;
var _local3:MovieClip;
gameSpeed = (1 - gameSpeed);
stop_mc.gotoAndStop((gameSpeed + 1));
if (bg_mc.foe_mc.numChildren){
_local2 = 0;
while (_local2 < bg_mc.foe_mc.numChildren) {
_local3 = (MovieClip(bg_mc.foe_mc.getChildAt(_local2)) as MovieClip);
if ((_local3.currentFrame % 3)){
_local3.refurbish();
stopOrPlay(_local3.dh_mc);
};
_local2++;
};
};
_local2 = 0;
while (_local2 < bg_mc.numChildren) {
if ((bg_mc.getChildAt(_local2) is MovieClip)){
_local3 = (bg_mc.getChildAt(_local2) as MovieClip);
if (((!((_local3.name == "foe_mc"))) && (_local3.numChildren))){
if (((_local3.numChildren) && ((_local3.getChildAt(0) is MovieClip)))){
_local3 = (_local3.getChildAt(0) as MovieClip);
stopOrPlay(_local3);
};
};
};
_local2++;
};
}
private function newFoe(_arg1:uint):void{
var _local2:Foe;
var _local3:Point;
foeNum++;
_local2 = new Foe();
_local2.x = 800;
_local2.y = 180;
_local2.num = foeNum;
_local2.speed = 2;
_local2.hp = hp_arr[nowLevel];
_local3 = new Point(-20, -20);
_local2._p = _local3;
_local2.cacheAsBitmap = true;
if (_arg1 == 2){
_local2.y = -90;
};
_local2.gotoAndStop(((_arg1 * 3) - 2));
_local2.scaleX = (_local2.scaleY = 0.5);
bg_mc.foe_mc.addChild(_local2);
_local2.addEventListener(Event.ENTER_FRAME, foeMove);
}
public function harm(_arg1:MovieClip, _arg2:uint):void{
var _local3:jianHP;
var _local4:jiaMoney;
if (_arg1.hp > 0){
_arg1.hp = (_arg1.hp - _arg2);
_local3 = new jianHP();
_local3.hp_txt.text = String(_arg2);
TweenLite.to(_local3, 1, {y:-100, alpha:0});
_arg1.addChild(_local3);
};
if ((((((((_arg1.hp <= 0)) && (_arg1.parent))) && (_arg1))) && (!(((_arg1.currentFrame % 3) == 0))))){
_arg1.removeEventListener(Event.ENTER_FRAME, foeMove);
_arg1.gotoAndStop((Math.ceil((_arg1.currentFrame / 3)) * 3));
money = (money + money_arr[nowLevel]);
_local4 = new jiaMoney();
_local4.y = 10;
_local4.hp_txt.text = String(money_arr[nowLevel]);
TweenLite.to(_local4, 2, {y:-100, alpha:0.7});
_arg1.addChild(_local4);
refurbishUI();
};
}
private function jumpGame():void{
gotoAndStop(5);
}
private function jumpTo(_arg1:uint):Function{
var gotoStop:Function;
var _n = _arg1;
gotoStop = function (_arg1:MouseEvent):void{
gotoAndStop(_n);
};
return (gotoStop);
}
public function closeHreo(_arg1:MouseEvent):void{
TweenLite.to(heroMenu_mc, 0.5, {y:-150, ease:Back.easeOut});
if (gameSpeed == 0){
gameStop();
};
}
private function shellShow():void{
var _local1:uint;
_local1 = 1;
while (_local1 <= 3) {
this[(("d" + _local1) + "_mc")].gotoAndStop(_local1);
if (_local1 == current){
this[(("d" + _local1) + "_mc")].di_mc.gotoAndStop(2);
} else {
this[(("d" + _local1) + "_mc")].di_mc.gotoAndStop(1);
};
_local1++;
};
if (current == 0){
bg_mc.arrow_mc.visible = false;
} else {
stageMC = null;
bg_mc.x = 702.5;
map_mc.lens_mc.x = -112;
bg_mc.arrow_mc.visible = true;
};
}
private function mainGame():void{
var _local1:uint;
m2_mc.gotoAndStop((2 - volumeSize));
m2_mc.addEventListener(MouseEvent.MOUSE_DOWN, musicChange);
foeNum = 0;
hp = 100;
foe_mc = [];
time = 0;
gameSpeed = 1;
if (first){
nowLevel = 1;
first = false;
main_arr = [3, 1, 1, 1];
heroMain_arr = [3, 1, 1, 1];
money = 0;
};
save_arr = {};
save_arr.money = money;
save_arr.main_arr = main_arr.concat();
save_arr.heroMain_arr = heroMain_arr.concat();
level_mc.gotoAndStop((nowLevel + 1));
level_mc.mouseEnabled = false;
bg_mc.main_mc.gotoAndStop(1);
stop_mc.gotoAndStop(2);
post_mc.visible = false;
_local1 = 1;
while (_local1 <= 3) {
bg_mc[(("main" + _local1) + "_mc")].gotoAndStop(((_local1 * 2) - 1));
this[(("d" + _local1) + "_mc")].gotoAndStop(_local1);
this[(("d" + _local1) + "_mc")].di_mc.gotoAndStop(1);
this[(("d" + _local1) + "_mc")].buttonMode = true;
this[(("d" + _local1) + "_mc")].addEventListener(MouseEvent.MOUSE_DOWN, shellChange);
_local1++;
};
bg_mc.mouseChildren = false;
bg_mc.buttonMode = true;
bg_mc.addEventListener(MouseEvent.MOUSE_DOWN, mainFrie);
menu_btn.addEventListener(MouseEvent.MOUSE_DOWN, menuDown);
stop_mc.addEventListener(MouseEvent.MOUSE_DOWN, gameStop);
hero_btn.addEventListener(MouseEvent.MOUSE_DOWN, heroMenu);
addEventListener(Event.ENTER_FRAME, mainStart);
addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
map_mc.lens_mc.addEventListener(MouseEvent.MOUSE_DOWN, mapMove);
hero_btn.addEventListener(MouseEvent.MOUSE_DOWN, heroMenu);
refurbishUI();
shellShow();
}
private function mapMove(_arg1:MouseEvent):void{
var _local2:MovieClip;
stageMC = null;
_local2 = (_arg1.currentTarget as MovieClip);
_local2.startDrag(true, new Rectangle(-112, 0, 224, 0));
_local2.addEventListener(Event.ENTER_FRAME, mapMoves);
stage.addEventListener(MouseEvent.MOUSE_UP, mapStop);
}
private function mapStop(_arg1:MouseEvent):void{
var _local2:MovieClip;
_local2 = map_mc.lens_mc;
_local2.stopDrag();
_local2.removeEventListener(Event.ENTER_FRAME, mapMoves);
stage.removeEventListener(MouseEvent.MOUSE_UP, mapStop);
}
private function keyDown(_arg1:KeyboardEvent):void{
var _local2:uint;
_local2 = 0;
if (_arg1.keyCode == 81){
_local2 = 1;
} else {
if (_arg1.keyCode == 87){
_local2 = 2;
} else {
if (_arg1.keyCode == 69){
_local2 = 3;
};
};
};
if ((((_local2 > 0)) && ((gameSpeed > 0)))){
if (!this[(("d" + _local2) + "_mc")].cd){
current = _local2;
shellShow();
};
};
}
private function aMove(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Arm2;
if (!gameSpeed){
return;
};
if (stageMC == MovieClip(_arg1.currentTarget)){
bg_mc.x = (300 - stageMC.x);
if (bg_mc.x > 702.5){
bg_mc.x = 702.5;
} else {
if (bg_mc.x < -87.5){
bg_mc.x = -87.5;
};
};
map_mc.lens_mc.x = ((((702.5 - bg_mc.x) * 224) / 795) - 112);
};
_local2 = (_arg1.currentTarget as MovieClip);
_local2.x = (_local2.x + _local2.vigorX);
_local2.y = (_local2.y + _local2.vigorY);
_local2.vigorY = (_local2.vigorY + 1);
_local2.rotation = ((Math.atan2(_local2.vigorY, _local2.vigorX) * 180) / Math.PI);
if (_local2.y >= 180){
if (stageMC == MovieClip(_arg1.currentTarget)){
stageMC = null;
};
_local2.y = 180;
_local2.removeEventListener(Event.ENTER_FRAME, aMove);
_local3 = new Arm2();
_local3.gotoAndStop(_local2.currentFrame);
_local3.x = _local2.x;
_local3.y = _local2.y;
_local3.ap = _local2.ap;
bg_mc.addChild(_local3);
bg_mc.removeChild(_local2);
};
}
private function win():void{
gameStop();
removeAll();
if (nowLevel < 10){
nowLevel++;
post_mc.gotoAndStop(1);
} else {
post_mc.gotoAndStop(3);
};
post_mc.visible = true;
hp_mc.gotoAndStop(1);
}
}
}//package
Section 73
//Skill (Skill)
package {
import flash.events.*;
import flash.display.*;
public dynamic class Skill extends MovieClip {
public var cd_mc:MovieClip;
public var cd:Boolean;// = true
public var di_mc:MovieClip;
public function Skill(){
cd = true;
super();
this.addEventListener(Event.ENTER_FRAME, enter);
}
private function enter(_arg1:Event):void{
if (cd_mc){
if (cd_mc.currentFrame < cd_mc.totalFrames){
if (MovieClip(root).gameSpeed){
cd_mc.nextFrame();
} else {
cd_mc.stop();
};
};
};
}
}
}//package