Section 1
//gameOver_92 (_fla.gameOver_92)
package _fla {
import flash.display.*;
public dynamic class gameOver_92 extends MovieClip {
public var replayBtn:SimpleButton;
public var totalScore:totalScoremc;
}
}//package _fla
Section 2
//goodjob_93 (_fla.goodjob_93)
package _fla {
import flash.display.*;
public dynamic class goodjob_93 extends MovieClip {
public var score_mc:totalScoremc;
public var total_mc:totalScoremc;
public var continue_btn:SimpleButton;
}
}//package _fla
Section 3
//hintBar_66 (_fla.hintBar_66)
package _fla {
import flash.display.*;
public dynamic class hintBar_66 extends MovieClip {
public function hintBar_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package _fla
Section 4
//hotgamesforgirls_1 (_fla.hotgamesforgirls_1)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public dynamic class hotgamesforgirls_1 extends MovieClip {
public var loading:MovieClip;
public var percent_txt:TextField;
public var logo_btn:SimpleButton;
public var play_btn:SimpleButton;
public function hotgamesforgirls_1(){
addFrameScript(0, frame1, 1, frame2);
}
public function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
_local2 = int(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 100));
if (loading.currentFrame < _local2){
loading.play();
} else {
loading.stop();
};
if (loading.currentFrame == loading.totalFrames){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
goNext();
};
percent_txt.text = (loading.currentFrame.toString() + "%");
}
function frame1(){
stop();
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
function frame2(){
stop();
play_btn.addEventListener(MouseEvent.CLICK, playHandler);
}
public function goNext():void{
this.play();
}
public function playHandler(_arg1:MouseEvent):void{
play_btn.removeEventListener(MouseEvent.CLICK, playHandler);
MovieClip(root).play();
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.hotgamesforgirls.com"), "_blank");
}
}
}//package _fla
Section 5
//hotgamesforgirls_4 (_fla.hotgamesforgirls_4)
package _fla {
import flash.display.*;
public dynamic class hotgamesforgirls_4 extends MovieClip {
public function hotgamesforgirls_4(){
addFrameScript(105, frame106);
}
function frame106(){
stop();
}
}
}//package _fla
Section 6
//hotgamesforgirls_5 (_fla.hotgamesforgirls_5)
package _fla {
import flash.display.*;
public dynamic class hotgamesforgirls_5 extends MovieClip {
public function hotgamesforgirls_5(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package _fla
Section 7
//hotgamesforgirls_mc_40 (_fla.hotgamesforgirls_mc_40)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class hotgamesforgirls_mc_40 extends MovieClip {
public var logo_btn:SimpleButton;
public function hotgamesforgirls_mc_40(){
addFrameScript(0, frame1);
}
function frame1(){
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.hotgamesforgirls.com"), "_blank");
}
}
}//package _fla
Section 8
//level_61 (_fla.level_61)
package _fla {
import flash.display.*;
public dynamic class level_61 extends MovieClip {
public var levelM:level_mc;
}
}//package _fla
Section 9
//levelSelect_95 (_fla.levelSelect_95)
package _fla {
import flash.display.*;
public dynamic class levelSelect_95 extends MovieClip {
public var b10:SimpleButton;
public var b14:SimpleButton;
public var b13:SimpleButton;
public var b15:SimpleButton;
public var b2:SimpleButton;
public var b4:SimpleButton;
public var b9:SimpleButton;
public var b5:SimpleButton;
public var b6:SimpleButton;
public var b7:SimpleButton;
public var b1:SimpleButton;
public var b3:SimpleButton;
public var b8:SimpleButton;
public var b12:SimpleButton;
public var b11:SimpleButton;
}
}//package _fla
Section 10
//pointBar_56 (_fla.pointBar_56)
package _fla {
import flash.display.*;
public dynamic class pointBar_56 extends MovieClip {
public var pointMask:MovieClip;
}
}//package _fla
Section 11
//ready_46 (_fla.ready_46)
package _fla {
import flash.display.*;
public dynamic class ready_46 extends MovieClip {
public var level_mc:levelnum1;
}
}//package _fla
Section 12
//score_59 (_fla.score_59)
package _fla {
import flash.display.*;
public dynamic class score_59 extends MovieClip {
public var score_mc:totalScoremc;
}
}//package _fla
Section 13
//Timeline_27 (_fla.Timeline_27)
package _fla {
import flash.display.*;
public dynamic class Timeline_27 extends MovieClip {
public function Timeline_27(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package _fla
Section 14
//Timeline_37 (_fla.Timeline_37)
package _fla {
import flash.display.*;
public dynamic class Timeline_37 extends MovieClip {
public function Timeline_37(){
addFrameScript(95, frame96, 96, frame97);
}
function frame97(){
stop();
}
function frame96(){
stop();
}
}
}//package _fla
Section 15
//Timeline_52 (_fla.Timeline_52)
package _fla {
import flash.display.*;
public dynamic class Timeline_52 extends MovieClip {
public function Timeline_52(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package _fla
Section 16
//Timeline_88 (_fla.Timeline_88)
package _fla {
import flash.display.*;
public dynamic class Timeline_88 extends MovieClip {
public var goodjob_mc:MovieClip;
public var pause_mc:MovieClip;
public var gameOver_mc:MovieClip;
public var win_mc:MovieClip;
}
}//package _fla
Section 17
//winmc_90 (_fla.winmc_90)
package _fla {
import flash.display.*;
public dynamic class winmc_90 extends MovieClip {
public var replayBtn:SimpleButton;
public var totalScore:totalScoremc;
}
}//package _fla
Section 18
//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 19
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 20
//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 21
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 22
//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 23
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 24
//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 25
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 26
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
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 27
//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 28
//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 29
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
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 30
//BaseDigitalMC (mainGame.components.BaseDigitalMC)
package mainGame.components {
import flash.display.*;
public class BaseDigitalMC extends MovieClip {
protected var bits:int;// = 1
protected var num:int;// = 0
public var bit2:MovieClip;
public var bit3:MovieClip;
public var bit4:MovieClip;
public var bit5:MovieClip;
public var bit1:MovieClip;
public function BaseDigitalMC(){
var _local1:int;
num = 0;
bits = 1;
super();
_local1 = 1;
while (this[("bit" + _local1.toString())]) {
this[("bit" + _local1.toString())].gotoAndStop(1);
_local1++;
};
bits = (_local1 - 1);
this.setValue(0);
}
public function setValue(_arg1:uint):void{
var _local2:String;
var _local3:uint;
var _local4:uint;
_local2 = _arg1.toString();
if (_local2.length > bits){
throw (new Error("too big number set to ", this.name));
};
_local3 = (bits - _local2.length);
_local4 = 1;
while (_local4 <= _local3) {
this[("bit" + _local4.toString())].visible = false;
_local4++;
};
_local3++;
while (_local4 <= bits) {
this[("bit" + _local4.toString())].gotoAndStop((uint(_local2.charAt((_local4 - _local3))) + 1));
this[("bit" + _local4.toString())].visible = true;
_local4++;
};
this[("bit" + bits.toString())].visible = true;
}
}
}//package mainGame.components
Section 31
//BGMusic (mainGame.components.BGMusic)
package mainGame.components {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class BGMusic extends MovieClip {
public var musicOn:SimpleButton;
private var channel:SoundChannel;
public var musicOff:SimpleButton;
private var off:SimpleButton;
private var on:SimpleButton;
public static var bMusic:Boolean = true;
public static var position:Number = 0;
public static var sound:Sound;
public function BGMusic(){
on = this["musicOn"];
off = this["musicOff"];
off.visible = false;
on.visible = false;
this.addEventListener(MouseEvent.CLICK, clickHandler);
this.addEventListener(Event.ADDED_TO_STAGE, init);
this.addEventListener(Event.REMOVED_FROM_STAGE, removeHandler);
sound = new bgsound();
}
private function init(_arg1:Event):void{
if (bMusic){
on.visible = true;
channel = sound.play(position);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
} else {
off.visible = true;
};
}
public function restart():void{
if (bMusic){
setSound();
};
}
private function removeHandler(_arg1:Event):void{
if (channel){
position = channel.position;
channel.stop();
};
}
private function clickHandler(_arg1:MouseEvent=null):void{
bMusic = !(bMusic);
setSound();
}
private function soundCompleteHandler(_arg1:Event):void{
position = 0;
channel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
channel = sound.play(0);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
private function setSound():void{
if (bMusic){
on.visible = true;
off.visible = false;
if (channel){
channel.stop();
};
channel = sound.play(position);
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
} else {
on.visible = false;
off.visible = true;
position = channel.position;
channel.stop();
channel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
}
public function close():void{
if (bMusic){
bMusic = false;
setSound();
bMusic = true;
};
}
}
}//package mainGame.components
Section 32
//Clock (mainGame.components.Clock)
package mainGame.components {
import flash.display.*;
import mainGame.*;
public class Clock extends MovieClip {
public var s1:MovieClip;
public var s2:MovieClip;
public var totalTime:uint;// = 0
private var timer:TimerUtil;
private var sec:uint;// = 0
public var m1:MovieClip;
public var levelTime:uint;// = 0
public var m2:MovieClip;
public function Clock(){
sec = 0;
levelTime = 0;
totalTime = 0;
super();
sec = 0;
update();
}
public function destroy():void{
if (timer){
timer.destroy();
timer = null;
};
}
public function setTime(_arg1:uint):void{
sec = _arg1;
update();
}
private function onTimer():void{
levelTime++;
update();
}
public function start():void{
if (timer){
timer.pause(false);
} else {
timer = new TimerUtil(onTimer, null, this, 1000);
};
}
public function update():void{
var _local1:uint;
var _local2:uint;
var _local3:Array;
sec = (levelTime + totalTime);
_local1 = (sec / 60);
_local2 = (sec % 60);
_local3 = [Math.min(9, uint((_local1 / 10))), (_local1 % 10), uint((_local2 / 10)), (_local2 % 10)];
m1.gotoAndStop((_local3[0] + 1));
m2.gotoAndStop((_local3[1] + 1));
s1.gotoAndStop((_local3[2] + 1));
s2.gotoAndStop((_local3[3] + 1));
}
public function pause(_arg1:Boolean):void{
if (timer){
timer.pause(_arg1);
};
}
}
}//package mainGame.components
Section 33
//HelpPanel (mainGame.components.HelpPanel)
package mainGame.components {
import flash.display.*;
import flash.events.*;
public class HelpPanel extends MovieClip {
public var closeBtn:SimpleButton;
public var nextBtn:SimpleButton;
public function HelpPanel(){
stop();
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickHandler);
}
public function destory():void{
this.removeEventListener(MouseEvent.CLICK, clickHandler);
this.parent.removeChild(this);
}
private function clickHandler(_arg1:MouseEvent):void{
if ((_arg1.target is SimpleButton)){
if (_arg1.target.name == "nextBtn"){
this.nextFrame();
} else {
this.visible = false;
};
};
}
}
}//package mainGame.components
Section 34
//Warning (mainGame.components.Warning)
package mainGame.components {
import flash.display.*;
import mainGame.events.*;
public class Warning extends MovieClip {
public function Warning(){
stop();
addFrameScript((this.totalFrames - 1), endFrame);
}
private function endFrame():void{
stop();
dispatchEvent(new GameEvent(GameEvent.WARNINGOVER));
}
}
}//package mainGame.components
Section 35
//GameEvent (mainGame.events.GameEvent)
package mainGame.events {
import flash.events.*;
public class GameEvent extends Event {
public var body;
public static const UPDATEPOINT:String = "updatePoint";
public static const WARNINGOVER:String = "warningOver";
public static const RESERVECREATECOMPLETE:String = "reserveCreateComplete";
public static const CREATEFOODCOMPLETE:String = "createFoodComplete";
public static const SHOWSCORE:String = "showScore";
public static const SHOWWARNING:String = "showWarning";
public static const PLAYSOUND:String = "playSound";
public static const BEFORDROP:String = "beforDrop";
public static const LEVELUP:String = "levelup";
public function GameEvent(_arg1:String, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.body = _arg2;
}
override public function toString():String{
return (formatToString("GameEvent", "type", "bubbles", "cancelable", "eventPhase"));
}
public function getBody(){
return (body);
}
override public function clone():Event{
return (new GameEvent(type, body, bubbles, cancelable));
}
}
}//package mainGame.events
Section 36
//GameController (mainGame.GameController)
package mainGame {
import flash.display.*;
import flash.events.*;
import mainGame.events.*;
import flash.utils.*;
public class GameController extends EventDispatcher {
private var itemDropDelay:Number;
private var warningIsShow:Boolean;
private var isOver:Boolean;// = false
private var reserveItemIndex:uint;
private var cellH:Number;// = 44
private var dropList:Array;
private var spawnGoal:uint;// = 0
private var gameStarted:Boolean;// = false
private var spawnRatios:Array;
private var cellW:Number;// = 70
private var dropData:Array;
private var baseScore:int;// = 50
private var multi:uint;
private var isWin:Boolean;// = false
private var spawnCount:uint;// = 0
private var itemData:Array;
private var colData:Array;
public var levelScore:int;// = 0
private var lastTime:Number;
private var level:int;// = 1
private var container:MovieClip;
private var score:int;// = 0
private var reserveItemTotal:uint;
private var dropTimer:TimerUtil;
private var effectHolder:Sprite;
private var itemHolder:Sprite;
private var isPausing:Boolean;
public var totalScore:int;// = 0
public var gameData:Object;
private var gameReady:Boolean;// = false
private var overTimer:TimerUtil;
private var rows:int;// = 9
private var maxInitHeight:uint;// = 4
private var columns:int;// = 6
private var itemTimer:TimerUtil;
private var dragList:Array;
private var reservedTimer:TimerUtil;
public function GameController(_arg1:MovieClip){
rows = 9;
columns = 6;
cellW = 70;
cellH = (55 * 0.8);
maxInitHeight = 4;
baseScore = 50;
level = 1;
gameStarted = false;
gameReady = false;
score = 0;
spawnCount = 0;
spawnGoal = 0;
levelScore = 0;
totalScore = 0;
isWin = false;
isOver = false;
super();
container = _arg1;
itemHolder = new Sprite();
effectHolder = new Sprite();
container.addChild(itemHolder);
container.addChild(effectHolder);
initColumn();
}
private function mouseUpHandler(_arg1:MouseEvent):void{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Number;
var _local6:Number;
var _local7:int;
container.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveItems);
container.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
_local2 = getRC();
_local3 = colData[_local2.c].length;
_local4 = dragList.length;
_local5 = ((_local2.c * cellW) + (cellW / 2));
_local6 = -(((_local3 * cellH) + (cellH / 2)));
_local7 = 0;
while (_local7 < _local4) {
dragList[_local7].item.x = _local5;
dragList[_local7].item.y = _local6;
dragList[_local7].column = _local2.c;
_local6 = (_local6 - cellH);
_local7++;
};
colData[_local2.c] = colData[_local2.c].concat(dragList);
dragList = [];
checkColumn(_local2.c, _local3);
}
private function getRC():Object{
var _local1:int;
var _local2:int;
_local1 = (-(container.mouseY) / cellH);
_local2 = (container.mouseX / cellW);
_local1 = Math.min(Math.max(0, _local1), (rows - 1));
_local2 = Math.min(Math.max(0, _local2), (columns - 1));
return ({r:_local1, c:_local2});
}
private function removeColumn(_arg1:uint):void{
var _local2:uint;
var _local3:MovieClip;
var _local4:int;
_local2 = colData[_arg1].length;
levelScore = (levelScore + (baseScore * (_local2 + 1)));
spawnCount = (spawnCount + _local2);
_local4 = 0;
while (_local4 < _local2) {
removeItem(colData[_arg1][_local4].item);
_local4++;
};
colData[_arg1] = [];
}
private function removeTimer():void{
if (reservedTimer){
reservedTimer.destroy();
reservedTimer = null;
};
if (itemTimer){
itemTimer.destroy();
itemTimer = null;
};
if (dropTimer){
dropTimer.destroy();
dropTimer = null;
};
if (overTimer){
overTimer.destroy();
overTimer = null;
};
}
private function createItem():void{
var _local1:uint;
var _local2:int;
var _local3:uint;
var _local4:MovieClip;
var _local5:uint;
var _local6:Object;
_local1 = ((Math.random() > 0.5)) ? 1 : 2;
_local2 = -1;
_local2 = Math.floor((Math.random() * columns));
_local3 = 0;
while (!(_local3)) {
_local3 = getType();
_local5 = (itemData[(_local3 - 1)][0] + itemData[(_local3 - 1)][1]);
if (_local5){
if ((itemData[(_local3 - 1)][(_local1 - 1)] / _local5) > 0.5){
_local1 = (3 - _local1);
};
};
if (colData[_local2].length == 0){
break;
};
_local6 = colData[_local2][(colData[_local2].length - 1)];
if ((((_local6.id == _local3)) && ((_local6.piece == (_local1 - 1))))){
_local3 = 0;
continue;
};
};
dispatchEvent(new GameEvent(GameEvent.BEFORDROP, ((_local2 * cellW) + (cellW / 2))));
_local4 = addItem(_local1, _local3, _local2, rows);
}
private function startAction():void{
var _local1:Object;
for each (_local1 in dropList) {
_local1.item.enabled = true;
_local1.item.mouseEnabled = true;
};
}
private function itemDownHandler(_arg1:MouseEvent):void{
var _local2:Object;
var _local3:uint;
if (isOver){
return;
};
_local2 = getRC();
_local3 = colData[_local2.c].length;
dragList = colData[_local2.c].splice(_local2.r, (_local3 - _local2.r));
container.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveItems);
container.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
}
private function addItem(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):MovieClip{
var _local5:MovieClip;
var _local6:int;
if (_arg1 == 1){
_local5 = new turkey1();
} else {
_local6 = ((Math.random() > 0.5)) ? 1 : 2;
if (_local6 == 1){
_local5 = new turkey21();
} else {
_local5 = new turkey22();
};
};
_local5.gotoAndStop(_arg2);
_local5.addEventListener(MouseEvent.MOUSE_DOWN, itemDownHandler);
_local5.mouseChildren = false;
_local5.mouseEnabled = false;
_local5.buttonMode = true;
_local5.enabled = false;
_local5.scaleX = 0.8;
_local5.scaleY = 0.8;
_local5.x = ((_arg3 * cellW) + (cellW / 2));
_local5.y = ((-((_arg4 + 4)) * cellH) - (cellH / 2));
itemHolder.addChild(_local5);
dropList.push({item:_local5, falling:true, column:_arg3, piece:_arg1, id:_arg2});
var _local7 = itemData[(_arg2 - 1)];
var _local8 = (_arg1 - 1);
var _local9 = (_local7[_local8] + 1);
_local7[_local8] = _local9;
return (_local5);
}
public function start():void{
var _local1:int;
initColumn();
container.visible = true;
initColumn();
warningIsShow = false;
gameStarted = false;
gameReady = false;
isOver = false;
isWin = false;
levelScore = 0;
maxInitHeight = gameData.maxInitHeight;
itemDropDelay = gameData.delay;
reserveItemIndex = 0;
reserveItemTotal = gameData.initItems;
spawnCount = 0;
spawnGoal = gameData.goal;
spawnRatios = gameData.spawnRatios.split(",");
spawnRatios[0] = int(spawnRatios[0]);
_local1 = 1;
while (_local1 < 7) {
spawnRatios[_local1] = (spawnRatios[(_local1 - 1)] + int(spawnRatios[_local1]));
_local1++;
};
multi = 1;
isPausing = false;
dropList = new Array();
reservedTimer = new TimerUtil(addPrevItem, null, this, 500, reserveItemTotal, true);
dropTimer = new TimerUtil(dropItem, null, this, 50);
lastTime = getTimer();
isPausing = false;
}
private function moveItems(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:int;
_local2 = container.mouseX;
_local3 = container.mouseY;
_local4 = dragList.length;
_local5 = 0;
while (_local5 < _local4) {
dragList[_local5].item.x = _local2;
dragList[_local5].item.y = _local3;
_local3 = (_local3 - cellH);
_local5++;
};
}
private function removeEvent():void{
container.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
container.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveItems);
}
private function createFood():void{
var _local1:MovieClip;
var _local2:MovieClip;
if (itemHolder.numChildren){
_local1 = (itemHolder.getChildAt(0) as MovieClip);
_local2 = new food();
_local2.x = _local1.x;
_local2.y = _local1.y;
effectHolder.addChild(_local2);
if (_local1.hasEventListener(MouseEvent.CLICK)){
_local1.removeEventListener(MouseEvent.CLICK, itemDownHandler);
};
itemHolder.removeChild(_local1);
} else {
overTimer.destroy();
createFoodComplete();
};
}
private function checkColumn(_arg1:uint, _arg2:uint):void{
var _local3:Object;
var _local4:Object;
var _local5:uint;
var _local6:Number;
var _local7:MovieClip;
if (isOver){
return;
};
if (((isWin) && ((dropList.length <= 1)))){
dispatchEvent(new GameEvent(GameEvent.LEVELUP));
return;
};
if (((!(gameReady)) || ((_arg2 == 0)))){
return;
};
if (getMaxHeight() >= (rows + 1)){
if (!warningIsShow){
warningIsShow = true;
dispatchEvent(new GameEvent(GameEvent.SHOWWARNING, true));
};
} else {
if (warningIsShow){
warningIsShow = false;
dispatchEvent(new GameEvent(GameEvent.SHOWWARNING, false));
};
};
_local5 = 0;
_local3 = colData[_arg1][_arg2];
_local4 = colData[_arg1][(_arg2 - 1)];
if ((((_local3.id == _local4.id)) && ((_local3.piece == (_local4.piece + 1))))){
if (((!((_local3.id == 6))) && (!((_local3.id == 7))))){
_local5++;
colData[_arg1].splice((_arg2 - 1), 2);
var _local8 = itemData[(_local3.id - 1)];
var _local9:int;
var _local10 = (_local8[_local9] - 1);
_local8[_local9] = _local10;
_local8 = itemData[(_local3.id - 1)];
_local9 = 1;
_local10 = (_local8[_local9] - 1);
_local8[_local9] = _local10;
_local6 = getTimer();
if ((_local6 - lastTime) < 500){
multi++;
} else {
multi = 1;
};
lastTime = _local6;
levelScore = (levelScore + ((baseScore * 2) * multi));
_local7 = new turkey3();
_local7.gotoAndStop(_local3.id);
_local7.x = _local4.item.x;
_local7.y = _local4.item.y;
effectHolder.addChild(_local7);
_local7.addEventListener(Event.ENTER_FRAME, motion);
removeItem(_local3.item, _local4.item);
if (colData[_arg1].length > (_arg2 - 1)){
dropList = dropList.concat(colData[_arg1].splice((_arg2 - 1), colData[_arg1].length));
};
spawnCount = (spawnCount + 2);
} else {
if (_local3.id == 6){
removeRow(_arg2, _arg1);
} else {
removeColumn(_arg1);
};
};
dispatchEvent(new GameEvent(GameEvent.PLAYSOUND, "xiaochu"));
dispatchEvent(new GameEvent(GameEvent.SHOWSCORE, (totalScore + levelScore)));
if ((((spawnCount >= spawnGoal)) && ((dropList.length <= 1)))){
dispatchEvent(new GameEvent(GameEvent.LEVELUP));
isWin = true;
};
dispatchEvent(new GameEvent(GameEvent.UPDATEPOINT, (spawnCount / spawnGoal)));
} else {
return;
};
}
private function setEnabled(_arg1:MovieClip, _arg2:Boolean):void{
_arg1.mouseEnabled = _arg2;
_arg1.enabled = _arg2;
}
private function initColumn():void{
var _local1:int;
colData = new Array();
dropData = new Array();
itemData = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
_local1 = 0;
while (_local1 < columns) {
colData[_local1] = [];
dropData[_local1] = [];
_local1++;
};
}
private function addPrevItem():void{
var _local1:uint;
var _local2:int;
var _local3:uint;
var _local4:MovieClip;
var _local5:uint;
var _local6:Object;
_local1 = ((Math.random() > 0.5)) ? 1 : 2;
_local2 = -1;
while (_local2 == -1) {
_local2 = Math.floor((Math.random() * columns));
if (dropData[_local2].length == maxInitHeight){
_local2 = -1;
continue;
};
};
_local3 = 0;
while (!(_local3)) {
_local3 = getType();
_local5 = (itemData[(_local3 - 1)][0] + itemData[(_local3 - 1)][1]);
if (_local5){
if ((itemData[(_local3 - 1)][(_local1 - 1)] / _local5) > 0.5){
_local1 = (3 - _local1);
};
};
if (dropData[_local2].length == 0){
break;
};
_local6 = dropData[_local2][(dropData[_local2].length - 1)];
if ((((_local6.id == _local3)) && (((_local6.piece + 1) == _local1)))){
_local3 = 0;
continue;
};
};
_local4 = addItem(_local1, _local3, _local2, rows);
dropData[_local2].push({id:_local3, piece:_local1});
}
private function getType():uint{
var _local1:uint;
var _local2:int;
_local1 = (Math.floor((Math.random() * spawnRatios[6])) + 1);
_local2 = 0;
while (_local2 < 7) {
if (spawnRatios[_local2] >= _local1){
return ((_local2 + 1));
};
_local2++;
};
return (1);
}
private function removeItem(... _args):void{
var _local2:MovieClip;
for each (_local2 in _args) {
if (_local2.hasEventListener(MouseEvent.CLICK)){
_local2.removeEventListener(MouseEvent.CLICK, itemDownHandler);
};
itemHolder.removeChild(_local2);
};
}
private function drawBlock():void{
var _local1:Graphics;
var _local2:int;
_local1 = container.graphics;
_local1.lineStyle(1);
_local2 = 0;
while (_local2 < rows) {
_local1.moveTo(0, (-(_local2) * cellH));
_local1.lineTo((cellW * columns), (-(_local2) * cellH));
_local2++;
};
_local2 = 0;
while (_local2 < columns) {
_local1.moveTo((_local2 * cellW), 0);
_local1.lineTo((_local2 * cellW), (-(rows) * cellH));
_local2++;
};
}
private function removeRow(_arg1:uint, _arg2:uint):void{
var _local3:int;
var _local4:MovieClip;
var _local5:int;
_local3 = 0;
_arg1--;
_local5 = 0;
while (_local5 < columns) {
if (_local5 != _arg2){
if (colData[_local5].length > _arg1){
_local3++;
removeItem(colData[_local5][_arg1].item);
colData[_local5].splice(_arg1, 1);
if (colData[_local5].length > _arg1){
dropList = dropList.concat(colData[_local5].splice(_arg1, colData[_local5].length));
};
};
} else {
_local3 = (_local3 + 2);
removeItem(colData[_arg2][(_arg1 + 1)].item, colData[_arg2][_arg1].item);
colData[_arg2].splice(_arg1, 2);
if (colData[_arg2].length > _arg1){
dropList = dropList.concat(colData[_arg2].splice(_arg1, colData[_arg2].length));
};
};
_local5++;
};
levelScore = (levelScore + (_local3 * baseScore));
spawnCount = (spawnCount + _local3);
}
private function dropItem():void{
var _local1:uint;
var _local2:Boolean;
var _local3:uint;
var _local4:Object;
var _local5:uint;
var _local6:Number;
_local1 = dropList.length;
if (_local1 == 0){
return;
};
_local2 = false;
_local3 = 0;
while (_local3 < _local1) {
_local4 = dropList[_local3];
if (((_local4.hasOwnProperty("falling")) && (!(_local4.falling)))){
} else {
_local4.item.y = (_local4.item.y + 18);
_local5 = colData[_local4.column].length;
_local6 = ((_local5 * cellH) + (cellH / 2));
_local6 = -(_local6);
if (_local4.item.y >= _local6){
_local4.item.y = _local6;
_local4.falling = false;
colData[_local4.column].push({piece:_local4.piece, item:_local4.item, id:_local4.id, column:_local4.column});
_local4.falling = false;
if (gameReady){
dropList.splice(_local3, 1);
_local3--;
_local1--;
setEnabled(_local4.item, true);
};
checkColumn(_local4.column, _local5);
} else {
_local2 = true;
};
};
_local3++;
};
if (!_local2){
if (!gameReady){
reservedTimer.destroy();
reservedTimer = null;
gameReady = true;
startAction();
dropList = [];
itemTimer = new TimerUtil(createItem, null, this, itemDropDelay);
dispatchEvent(new GameEvent(GameEvent.RESERVECREATECOMPLETE));
};
};
}
private function motion(_arg1:Event):void{
_arg1.target.alpha = (_arg1.target.alpha - 0.1);
if (_arg1.target.alpha <= 0){
_arg1.target.removeEventListener(Event.ENTER_FRAME, motion);
effectHolder.removeChild((_arg1.target as MovieClip));
};
}
private function createFoodComplete():void{
dispatchEvent(new GameEvent(GameEvent.CREATEFOODCOMPLETE));
}
public function gameOver():void{
isOver = true;
removeEvent();
removeTimer();
overTimer = new TimerUtil(createFood, null, this, 50);
}
private function getMaxHeight():int{
var _local1:uint;
var _local2:int;
_local1 = 0;
if (colData.length){
_local2 = 0;
while (_local2 < columns) {
_local1 = Math.max(_local1, colData[_local2].length);
_local2++;
};
};
return (_local1);
}
public function pause():Boolean{
isPausing = !(isPausing);
if (isPausing){
container.visible = false;
} else {
container.visible = true;
};
if (reservedTimer){
reservedTimer.pause(isPausing);
};
if (itemTimer){
itemTimer.pause(isPausing);
};
if (dropTimer){
dropTimer.pause(isPausing);
};
return (isPausing);
}
private function removeChild():void{
var _local1:MovieClip;
while (itemHolder.numChildren) {
_local1 = (itemHolder.getChildAt(0) as MovieClip);
if (_local1){
if (_local1.hasEventListener(MouseEvent.CLICK)){
_local1.removeEventListener(MouseEvent.CLICK, itemDownHandler);
};
};
itemHolder.removeChildAt(0);
};
while (effectHolder.numChildren) {
_local1 = (effectHolder.getChildAt(0) as MovieClip);
if (_local1){
if (_local1.hasEventListener(Event.ENTER_FRAME)){
_local1.removeEventListener(Event.ENTER_FRAME, motion);
};
};
effectHolder.removeChildAt(0);
};
}
public function destroy():void{
removeEvent();
removeTimer();
removeChild();
}
}
}//package mainGame
Section 37
//GameSetting (mainGame.GameSetting)
package mainGame {
public class GameSetting {
public static const LOGOURI:String = "http://www.hotgamesforgirls.com";
public static const MOREGAMEURI:String = "http://www.hotgamesforgirls.com";
public static const FALLSPEED:Number = 18;
public static const LEVELDATA:Array = [{title:"1", initItems:17, maxInitHeight:3, levelTime:120, goal:20, delay:2000, spawnRatios:"10,10,00,00,00,00,00"}, {title:"2", initItems:18, maxInitHeight:4, levelTime:120, goal:22, delay:2000, spawnRatios:"10,10,10,00,00,00,00"}, {title:"3", initItems:19, maxInitHeight:4, levelTime:120, goal:24, delay:2000, spawnRatios:"10,10,10,20,00,00,00"}, {title:"4", initItems:20, maxInitHeight:4, levelTime:105, goal:26, delay:1900, spawnRatios:"10,10,10,20,00,02,00"}, {title:"5", initItems:21, maxInitHeight:4, levelTime:100, goal:28, delay:1800, spawnRatios:"10,10,10,10,20,00,00"}, {title:"6", initItems:22, maxInitHeight:4, levelTime:120, goal:30, delay:1700, spawnRatios:"10,10,10,10,20,02,00"}, {title:"7", initItems:23, maxInitHeight:4, levelTime:120, goal:32, delay:1600, spawnRatios:"10,10,10,10,20,02,02"}, {title:"8", initItems:24, maxInitHeight:4, levelTime:120, goal:34, delay:1500, spawnRatios:"10,10,10,20,10,02,00"}, {title:"9", initItems:24, maxInitHeight:5, levelTime:120, goal:36, delay:1400, spawnRatios:"10,10,10,20,10,00,02"}, {title:"10", initItems:24, maxInitHeight:5, levelTime:120, goal:38, delay:1300, spawnRatios:"10,10,10,20,20,00,02"}, {title:"11", initItems:24, maxInitHeight:5, levelTime:120, goal:40, delay:1200, spawnRatios:"10,10,10,20,20,02,02"}, {title:"12", initItems:24, maxInitHeight:5, levelTime:120, goal:42, delay:1100, spawnRatios:"10,10,10,20,20,02,02"}, {title:"13", initItems:24, maxInitHeight:5, levelTime:120, goal:44, delay:1000, spawnRatios:"10,10,10,20,20,02,02"}, {title:"14", initItems:24, maxInitHeight:6, levelTime:120, goal:44, delay:900, spawnRatios:"10,10,10,20,20,02,02"}, {title:"15", initItems:24, maxInitHeight:6, levelTime:120, goal:44, delay:700, spawnRatios:"10,10,10,20,20,02,02"}];
}
}//package mainGame
Section 38
//GameToolBarController (mainGame.GameToolBarController)
package mainGame {
import flash.display.*;
import flash.events.*;
import gs.*;
import mainGame.events.*;
import mainGame.components.*;
import gs.easing.*;
import flash.media.*;
import flash.net.*;
import flash.system.*;
public class GameToolBarController extends EventDispatcher {
private var level:uint;// = 1
private var selectLevelShow:Boolean;// = false
private var container:MovieClip;
private var sound:Sound;
private var moreGameBt:SimpleButton;
private var hintBar:MovieClip;
private var warning:Warning;
private var levelSelctMc:MovieClip;
private var pauseBtn:SimpleButton;
private var readyMc:MovieClip;
private var levelSum:uint;// = 15
private var gameContainer:MovieClip;
private var levelMc:BaseDigitalMC;
private var timeMc:Clock;
private var pointMc:MovieClip;
private var scoreMc:MovieClip;
private var isWin:Boolean;// = false
private var gameReady:Boolean;// = false
private var restartBtn:SimpleButton;
private var bgMusic:BGMusic;
private var popupMc:MovieClip;
private var game:GameController;
private var backBtn:SimpleButton;
private var moreGameBtn:SimpleButton;
public function GameToolBarController(_arg1:MovieClip){
var _local2:int;
var _local3:SimpleButton;
level = 1;
gameReady = false;
levelSum = 15;
selectLevelShow = false;
isWin = false;
super();
container = _arg1;
levelMc = _arg1["levelMc"]["levelM"];
timeMc = _arg1["timeMc"];
scoreMc = _arg1["scoreMc"];
pointMc = _arg1["pointMc"];
pauseBtn = _arg1["pauseBtn"];
backBtn = _arg1["backBtn"];
restartBtn = _arg1["restartBtn"];
readyMc = _arg1["ready_mc"];
popupMc = _arg1["popup_mc"];
warning = _arg1["warning_mc"];
moreGameBt = _arg1["moreGameBtn"];
hintBar = _arg1["hintBar_mc"];
gameContainer = _arg1["gameContainer"];
levelSelctMc = _arg1["levelSelect"];
bgMusic = _arg1["bgMusic"];
game = new GameController(gameContainer);
game.addEventListener(GameEvent.SHOWSCORE, setScore);
game.addEventListener(GameEvent.LEVELUP, levelUpHandler);
game.addEventListener(GameEvent.RESERVECREATECOMPLETE, createCompleteHandler);
game.addEventListener(GameEvent.UPDATEPOINT, updatePoint);
game.addEventListener(GameEvent.CREATEFOODCOMPLETE, showGameOverPanel);
game.addEventListener(GameEvent.SHOWWARNING, warningShowHandler);
game.addEventListener(GameEvent.BEFORDROP, showDropHint);
game.addEventListener(GameEvent.PLAYSOUND, showEffectSound);
warning.addEventListener(GameEvent.WARNINGOVER, warningHandler);
container.stage.focus = container.stage;
_local2 = 1;
while (_local2 <= 15) {
_local3 = levelSelctMc[("b" + _local2.toString())];
_local3.addEventListener(MouseEvent.CLICK, levelSelectHandler);
_local2++;
};
initPopup();
initToolBar();
}
private function levelUpHandler(_arg1:GameEvent):void{
isWin = true;
hintBar.gotoAndStop(1);
game.destroy();
timeMc.pause(true);
UtilMethod.setEnabled(pauseBtn, false);
(popupMc.goodjob_mc.score_mc as BaseDigitalMC).setValue(game.levelScore);
(popupMc.goodjob_mc.total_mc as BaseDigitalMC).setValue((game.totalScore + game.levelScore));
popupMc.goodjob_mc.y = -272;
if (level == levelSum){
playSound("tongguan");
(popupMc.win_mc.totalScore as BaseDigitalMC).setValue((game.levelScore + game.totalScore));
TweenLite.to(popupMc.win_mc, 1, {y:49.3, ease:Back.easeOut});
} else {
playSound("guoguan");
TweenLite.to(popupMc.goodjob_mc, 1, {y:55.8, ease:Back.easeOut});
if (!popupMc.goodjob_mc.continue_btn.hasEventListener(MouseEvent.CLICK)){
popupMc.goodjob_mc.continue_btn.addEventListener(MouseEvent.CLICK, continueHandler);
};
};
}
private function warningHandler(_arg1:GameEvent):void{
if (isWin){
return;
};
gameOver();
}
private function levelSelectHandler(_arg1:MouseEvent):void{
var _local2:int;
_local2 = int(_arg1.target.name.substr(1));
selectLevelShow = false;
TweenLite.to(levelSelctMc, 1, {y:-121});
level = _local2;
game.totalScore = 0;
timeMc.totalTime = 0;
restartHandler();
}
private function initPopup():void{
hintBar.visible = false;
popupMc["pause_mc"].visible = false;
popupMc.gameOver_mc.y = -276;
popupMc.goodjob_mc.y = -272;
popupMc.win_mc.y = -276;
pointMc.pointMask.scaleY = 0;
(scoreMc.score_mc as BaseDigitalMC).setValue(game.totalScore);
showWelcome();
}
private function pauseHandler(_arg1:MouseEvent=null):void{
var _local2:Boolean;
_local2 = game.pause();
popupMc.pause_mc.visible = _local2;
if (gameReady){
timeMc.pause(_local2);
};
}
private function continueHandler(_arg1:MouseEvent):void{
level++;
game.totalScore = (game.totalScore + game.levelScore);
timeMc.totalTime = (timeMc.totalTime + timeMc.levelTime);
timeMc.levelTime = 0;
levelMc.setValue(level);
pointMc.pointMask.scaleY = 0;
hintBar.visible = false;
TweenLite.to(popupMc.goodjob_mc, 1, {y:-272, onComplete:showWelcome});
}
private function backHandler(_arg1:MouseEvent):void{
removeEvent();
game.destroy();
timeMc.destroy();
container.prevFrame();
}
private function initToolBar():void{
UtilMethod.setEnabled(pauseBtn, false);
UtilMethod.setEnabled(restartBtn, false);
pauseBtn.addEventListener(MouseEvent.CLICK, pauseHandler);
restartBtn.addEventListener(MouseEvent.CLICK, restartHandler);
popupMc.gameOver_mc.replayBtn.addEventListener(MouseEvent.CLICK, restartHandler);
popupMc.win_mc.replayBtn.addEventListener(MouseEvent.CLICK, winRestartHandler);
backBtn.addEventListener(MouseEvent.CLICK, backHandler);
levelMc.setValue(level);
moreGameBt.addEventListener(MouseEvent.CLICK, moreGameHandler);
}
private function showWelcome():void{
readyMc.y = -250;
levelMc.setValue(level);
(readyMc.level_mc as BaseDigitalMC).setValue(level);
TweenLite.to(readyMc, 1, {y:-11.5, ease:Back.easeOut, onComplete:startGameHandler});
}
private function startGame():void{
bgMusic.restart();
isWin = false;
UtilMethod.setEnabled(pauseBtn, true);
UtilMethod.setEnabled(restartBtn, true);
game.gameData = GameSetting.LEVELDATA[(level - 1)];
game.start();
}
private function createCompleteHandler(_arg1:GameEvent):void{
gameReady = true;
timeMc.start();
hintBar.visible = true;
}
private function startGameHandler(_arg1:MouseEvent=null):void{
TweenLite.to(readyMc, 1, {y:-250, onComplete:startGame, delay:1});
}
private function winRestartHandler(_arg1:MouseEvent):void{
level = 1;
game.totalScore = 0;
timeMc.totalTime = 0;
restartHandler();
}
private function playSound(_arg1:String):void{
var _local2:Class;
if ((((((_arg1 == "tongguan")) || ((_arg1 == "guoguan")))) || ((_arg1 == "shibai")))){
bgMusic.close();
};
_local2 = (ApplicationDomain.currentDomain.getDefinition(_arg1) as Class);
if (_local2){
sound = (new (_local2) as Sound);
sound.play();
};
}
private function showDropHint(_arg1:GameEvent):void{
var p:Number;
var e = _arg1;
p = Number(e.getBody());
hintBar.visible = true;
TweenLite.to(hintBar, 0.5, {x:(p + gameContainer.x), ease:Back.easeOut, onComplete:function (){
hintBar.gotoAndPlay(2);
}});
}
private function showEffectSound(_arg1:GameEvent):void{
playSound(String(_arg1.getBody()));
}
private function restartHandler(_arg1:MouseEvent=null):void{
game.destroy();
timeMc.pause(true);
timeMc.levelTime = 0;
timeMc.update();
initPopup();
}
private function updatePoint(_arg1:GameEvent):void{
pointMc.pointMask.scaleY = Number(_arg1.getBody());
}
private function setScore(_arg1:GameEvent):void{
(scoreMc.score_mc as BaseDigitalMC).setValue(int(_arg1.getBody()));
}
private function showGameOverPanel(_arg1:GameEvent):void{
playSound("shibai");
(popupMc.gameOver_mc.totalScore as BaseDigitalMC).setValue((game.totalScore + game.levelScore));
TweenLite.to(popupMc.gameOver_mc, 1, {y:49.3, ease:Back.easeOut});
}
private function moreGameHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(GameSetting.MOREGAMEURI), "_blank");
}
private function gameOver():void{
UtilMethod.setEnabled(pauseBtn, false);
game.gameOver();
timeMc.pause(true);
}
private function keyDownHandler(_arg1:KeyboardEvent=null):void{
if (((_arg1.ctrlKey) && ((_arg1.keyCode == 76)))){
if (!selectLevelShow){
TweenLite.to(levelSelctMc, 1, {y:200, ease:Back.easeOut});
} else {
TweenLite.to(levelSelctMc, 1, {y:-121});
};
selectLevelShow = !(selectLevelShow);
};
if (!popupMc.pause_mc.visible){
pauseHandler();
};
}
private function warningShowHandler(_arg1:GameEvent):void{
var _local2:Boolean;
_local2 = Boolean(_arg1.getBody());
if (_local2){
warning.gotoAndPlay(1);
} else {
warning.gotoAndStop(1);
};
}
private function removeEvent():void{
var _local1:int;
var _local2:SimpleButton;
pauseBtn.removeEventListener(MouseEvent.CLICK, pauseHandler);
restartBtn.removeEventListener(MouseEvent.CLICK, restartHandler);
popupMc.gameOver_mc.replayBtn.removeEventListener(MouseEvent.CLICK, restartHandler);
popupMc.win_mc.replayBtn.removeEventListener(MouseEvent.CLICK, winRestartHandler);
popupMc.goodjob_mc.continue_btn.removeEventListener(MouseEvent.CLICK, continueHandler);
backBtn.removeEventListener(MouseEvent.CLICK, backHandler);
game.removeEventListener(GameEvent.SHOWSCORE, setScore);
game.removeEventListener(GameEvent.LEVELUP, levelUpHandler);
game.removeEventListener(GameEvent.RESERVECREATECOMPLETE, createCompleteHandler);
game.removeEventListener(GameEvent.UPDATEPOINT, updatePoint);
game.removeEventListener(GameEvent.CREATEFOODCOMPLETE, showGameOverPanel);
game.removeEventListener(GameEvent.SHOWWARNING, warningShowHandler);
game.removeEventListener(GameEvent.PLAYSOUND, showEffectSound);
game.removeEventListener(GameEvent.BEFORDROP, showDropHint);
warning.removeEventListener(GameEvent.WARNINGOVER, warningHandler);
moreGameBt.removeEventListener(MouseEvent.CLICK, moreGameHandler);
_local1 = 1;
while (_local1 <= 15) {
_local2 = levelSelctMc[("b" + _local1.toString())];
_local2.removeEventListener(MouseEvent.CLICK, levelSelectHandler);
_local1++;
};
container.stage.removeEventListener(KeyboardEvent.KEY_UP, keyDownHandler);
}
}
}//package mainGame
Section 39
//MainController (mainGame.MainController)
package mainGame {
import flash.display.*;
public class MainController {
private var container:MovieClip;
public function MainController(_arg1:MovieClip){
container = _arg1;
new GameToolBarController(_arg1);
}
}
}//package mainGame
Section 40
//StartPageController (mainGame.StartPageController)
package mainGame {
import flash.display.*;
import flash.events.*;
import mainGame.components.*;
import flash.net.*;
public class StartPageController {
private var playBtn:SimpleButton;
private var container:MovieClip;
private var moreGameBtn:SimpleButton;
private var helpMc:HelpPanel;
private var helpBtn:SimpleButton;
public function StartPageController(_arg1:MovieClip){
container = _arg1;
helpMc = _arg1["help_mc"];
playBtn = _arg1["playBtn"];
helpBtn = _arg1["helpBtn"];
moreGameBtn = _arg1["moreGameBtn"];
playBtn.addEventListener(MouseEvent.CLICK, playBtnHandler);
helpBtn.addEventListener(MouseEvent.CLICK, helpBtnHandler);
moreGameBtn.addEventListener(MouseEvent.CLICK, moreGameHandler);
}
private function moreGameHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(GameSetting.MOREGAMEURI), "_blank");
}
private function playBtnHandler(_arg1:MouseEvent):void{
removeEvent();
container.removeChild(playBtn);
container.removeChild(helpBtn);
container.removeChild(moreGameBtn);
helpMc.destory();
container.nextFrame();
}
private function removeEvent():void{
playBtn.removeEventListener(MouseEvent.CLICK, playBtnHandler);
helpBtn.removeEventListener(MouseEvent.CLICK, helpBtnHandler);
moreGameBtn.removeEventListener(MouseEvent.CLICK, moreGameHandler);
container["kiss_mc"].nextFrame();
}
private function helpBtnHandler(_arg1:MouseEvent):void{
helpMc.gotoAndStop(1);
helpMc.visible = true;
}
}
}//package mainGame
Section 41
//TimerUtil (mainGame.TimerUtil)
package mainGame {
import flash.events.*;
import flash.utils.*;
public class TimerUtil {
private var timer:Timer;
private var onTimer:Function;// = null
private var targetObj;
private var onComplete:Function;// = null
public function TimerUtil(_arg1:Function, _arg2:Function=null, _arg3=null, _arg4:Number=1000, _arg5:int=0, _arg6:Boolean=false){
onTimer = null;
onComplete = null;
super();
this.onTimer = _arg1;
this.onComplete = _arg2;
this.targetObj = _arg3;
if (_arg6){
_arg5--;
};
_arg5 = Math.max(0, _arg5);
timer = new Timer(_arg4, _arg5);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler);
timer.start();
if (_arg6){
timerHandler();
};
}
private function timerCompleteHandler(_arg1:TimerEvent):void{
if (onComplete != null){
onComplete.apply(targetObj);
};
}
private function timerHandler(_arg1:TimerEvent=null):void{
if (onTimer != null){
onTimer.apply(targetObj);
};
}
public function pause(_arg1:Boolean):void{
if (_arg1){
timer.stop();
} else {
timer.start();
};
}
public function destroy():void{
if (timer){
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.removeEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandler);
timer = null;
};
}
}
}//package mainGame
Section 42
//UtilMethod (mainGame.UtilMethod)
package mainGame {
import flash.display.*;
import flash.geom.*;
public class UtilMethod {
public static var grayDegree:Number = -40;
public static function setEnabled(_arg1:InteractiveObject, _arg2:Boolean):void{
var _local3:ColorTransform;
_local3 = new ColorTransform();
if (!_arg2){
_local3.redOffset = (_local3.greenOffset = (_local3.blueOffset = ((grayDegree / 100) * 0xFF)));
};
_arg1.transform.colorTransform = _local3;
_arg1.mouseEnabled = _arg2;
if ((_arg1 is SimpleButton)){
(_arg1 as SimpleButton).enabled = _arg2;
};
if ((_arg1 is DisplayObjectContainer)){
(_arg1 as DisplayObjectContainer).mouseChildren = _arg2;
};
}
}
}//package mainGame
Section 43
//bgsound (bgsound)
package {
import flash.media.*;
public dynamic class bgsound extends Sound {
}
}//package
Section 44
//food (food)
package {
import flash.display.*;
public dynamic class food extends MovieClip {
}
}//package
Section 45
//guoguan (guoguan)
package {
import flash.media.*;
public dynamic class guoguan extends Sound {
}
}//package
Section 46
//level_mc (level_mc)
package {
import mainGame.components.*;
public dynamic class level_mc extends BaseDigitalMC {
}
}//package
Section 47
//levelnum1 (levelnum1)
package {
import mainGame.components.*;
public dynamic class levelnum1 extends BaseDigitalMC {
}
}//package
Section 48
//shibai (shibai)
package {
import flash.media.*;
public dynamic class shibai extends Sound {
}
}//package
Section 49
//tongguan (tongguan)
package {
import flash.media.*;
public dynamic class tongguan extends Sound {
}
}//package
Section 50
//totalScoremc (totalScoremc)
package {
import mainGame.components.*;
public dynamic class totalScoremc extends BaseDigitalMC {
}
}//package
Section 51
//turkey1 (turkey1)
package {
import flash.display.*;
public dynamic class turkey1 extends MovieClip {
}
}//package
Section 52
//turkey21 (turkey21)
package {
import flash.display.*;
public dynamic class turkey21 extends MovieClip {
}
}//package
Section 53
//turkey22 (turkey22)
package {
import flash.display.*;
public dynamic class turkey22 extends MovieClip {
}
}//package
Section 54
//turkey3 (turkey3)
package {
import flash.display.*;
public dynamic class turkey3 extends MovieClip {
}
}//package
Section 55
//TurkeyMixupGame (TurkeyMixupGame)
package {
import flash.display.*;
import mainGame.*;
import mainGame.components.*;
public class TurkeyMixupGame extends MovieClip {
public var moreGameBtn:SimpleButton;
public var popup_mc:MovieClip;
public var backBtn:SimpleButton;
private var startPageCtrl:StartPageController;
public var warning_mc:Warning;
public var kiss_mc:MovieClip;
public var timeMc:Clock;
public var help_mc:HelpPanel;
public var helpBtn:SimpleButton;
public var pointMc:MovieClip;
public var playBtn:SimpleButton;
public var levelMc:MovieClip;
public var levelSelect:MovieClip;
public var hintBar_mc:MovieClip;
public var gameContainer:MovieClip;
public var ready_mc:MovieClip;
public var pauseBtn:SimpleButton;
public var restartBtn:SimpleButton;
public var scoreMc:MovieClip;
private var mainCtrl:MainController;
public var bgMusic:BGMusic;
public function TurkeyMixupGame(){
addFrameScript(0, frame1);
super();
stop();
addFrameScript(1, initStartPage);
addFrameScript(2, initGamePage);
}
function frame1(){
stop();
}
private function initGamePage():void{
stop();
mainCtrl = new MainController(this);
}
private function initStartPage():void{
stop();
startPageCtrl = new StartPageController(this);
}
}
}//package
Section 56
//xiaochu (xiaochu)
package {
import flash.media.*;
public dynamic class xiaochu extends Sound {
}
}//package