Section 1
//runrun_loading_2 (_fla.runrun_loading_2)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class runrun_loading_2 extends MovieClip {
public var rp:runrun_pao;
public var a;
public var scale;
public function runrun_loading_2(){
addFrameScript(0, frame1);
}
public function rps(_arg1):void{
_arg1.target.x = (_arg1.target.x + Math.cos(_arg1.target.dir));
_arg1.target.y = (_arg1.target.y - _arg1.target.v);
_arg1.target.width = ((_arg1.target.sc * (900 - _arg1.target.y)) / 450);
_arg1.target.height = ((_arg1.target.sc * (900 - _arg1.target.y)) / 450);
if (_arg1.target.x > 700){
_arg1.target.x = -50;
};
if (_arg1.target.x < -50){
_arg1.target.x = 700;
};
if (_arg1.target.y < -50){
_arg1.target.y = 500;
};
}
function frame1(){
a = 1;
while (a <= 40) {
rp = new runrun_pao();
scale = Math.floor(((Math.random() * 24) + 16));
rp.width = scale;
rp.height = scale;
rp.sc = scale;
rp.gotoAndStop(Math.floor(((Math.random() * 2) + 1)));
rp.x = Math.floor((Math.random() * 700));
rp.y = (Math.floor((Math.random() * 500)) + 450);
rp.rotation = Math.floor((Math.random() * 360));
rp.dir = -(Math.floor((Math.random() * 180)));
rp.v = (Math.floor((Math.random() * 3)) + 3);
rp.addEventListener(Event.ENTER_FRAME, rps);
this.addChild(rp);
a++;
};
}
}
}//package _fla
Section 2
//runrun_loading_33 (_fla.runrun_loading_33)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_33 extends MovieClip {
public function runrun_loading_33(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package _fla
Section 3
//runrun_loading_34 (_fla.runrun_loading_34)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_34 extends MovieClip {
public function runrun_loading_34(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package _fla
Section 4
//runrun_loading_35 (_fla.runrun_loading_35)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_35 extends MovieClip {
public function runrun_loading_35(){
addFrameScript(40, frame41);
}
function frame41(){
gotoAndPlay(6);
}
}
}//package _fla
Section 5
//runrun_loading_37 (_fla.runrun_loading_37)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class runrun_loading_37 extends MovieClip {
public var percent_txt:TextField;
public function runrun_loading_37(){
addFrameScript(0, frame1, 239, frame240);
}
function frame1(){
this.nowk = (this.totalFrames / 48);
this.addEventListener(Event.ENTER_FRAME, nowks);
}
function frame240(){
stop();
this.removeEventListener(Event.ENTER_FRAME, nowks);
}
public function nowks(_arg1):void{
percent_txt.text = (int(((this.currentFrame / this.totalFrames) * 100)).toString() + "%");
}
}
}//package _fla
Section 6
//runrun_loading_4 (_fla.runrun_loading_4)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_4 extends MovieClip {
public function runrun_loading_4(){
addFrameScript(0, frame1, 1, frame2, 144, frame145);
}
function frame1(){
this.visible = false;
}
function frame2(){
this.visible = true;
}
function frame145(){
stop();
}
}
}//package _fla
Section 7
//runrun_loading_40 (_fla.runrun_loading_40)
package _fla {
import flash.display.*;
import flash.events.*;
public dynamic class runrun_loading_40 extends MovieClip {
public var play_btn:SimpleButton;
public function runrun_loading_40(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, plays);
}
public function plays(_arg1):void{
MovieClip(root).nextFrame();
}
}
}//package _fla
Section 8
//runrun_loading_44 (_fla.runrun_loading_44)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_44 extends MovieClip {
public function runrun_loading_44(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package _fla
Section 9
//runrun_loading_45 (_fla.runrun_loading_45)
package _fla {
import flash.display.*;
public dynamic class runrun_loading_45 extends MovieClip {
public function runrun_loading_45(){
addFrameScript(9, frame10);
}
function frame10(){
MovieClip(root).play();
}
}
}//package _fla
Section 10
//runrun_logo_132 (_fla.runrun_logo_132)
package _fla {
import flash.display.*;
public dynamic class runrun_logo_132 extends MovieClip {
public function runrun_logo_132(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package _fla
Section 11
//runrun_logo_mc_115 (_fla.runrun_logo_mc_115)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class runrun_logo_mc_115 extends MovieClip {
public var logo_btn:SimpleButton;
public function runrun_logo_mc_115(){
addFrameScript(0, frame1);
}
function frame1(){
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.runrungames.com/games151/bookcase-battle.html"), "_blank");
}
}
}//package _fla
Section 12
//runrungames_loading_1 (_fla.runrungames_loading_1)
package _fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class runrungames_loading_1 extends MovieClip {
public var loading:MovieClip;
public var logo_btn:SimpleButton;
public function runrungames_loading_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 < int(((_local2 / 100) * 240))){
loading.play();
} else {
loading.stop();
};
if (loading.currentFrame == loading.totalFrames){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
goNext();
};
loading.percent_txt.text = (int(((loading.currentFrame / 240) * 100)).toString() + "%");
}
function frame1(){
stop();
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
logo_btn.addEventListener(MouseEvent.CLICK, linkHandler);
}
function frame2(){
stop();
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function goNext():void{
this.play();
}
public function linkHandler(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.runrungames.com"), "_blank");
}
}
}//package _fla
Section 13
//Timeline_148 (_fla.Timeline_148)
package _fla {
import flash.display.*;
public dynamic class Timeline_148 extends MovieClip {
public function Timeline_148(){
addFrameScript(8, frame9);
}
function frame9(){
MovieClip(parent).gotoAndStop(1);
}
}
}//package _fla
Section 14
//Timeline_165 (_fla.Timeline_165)
package _fla {
import flash.display.*;
public dynamic class Timeline_165 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 15
//Timeline_167 (_fla.Timeline_167)
package _fla {
import flash.display.*;
public dynamic class Timeline_167 extends MovieClip {
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p4:MovieClip;
}
}//package _fla
Section 16
//Timeline_168 (_fla.Timeline_168)
package _fla {
import flash.display.*;
public dynamic class Timeline_168 extends MovieClip {
public var banana_mc:MovieClip;
public var mask_mc:MovieClip;
}
}//package _fla
Section 17
//bad (bad)
package {
import flash.media.*;
public dynamic class bad extends Sound {
}
}//package
Section 18
//bg1 (bg1)
package {
import flash.media.*;
public dynamic class bg1 extends Sound {
}
}//package
Section 19
//bg2 (bg2)
package {
import flash.media.*;
public dynamic class bg2 extends Sound {
}
}//package
Section 20
//bg3 (bg3)
package {
import flash.media.*;
public dynamic class bg3 extends Sound {
}
}//package
Section 21
//bg4 (bg4)
package {
import flash.media.*;
public dynamic class bg4 extends Sound {
}
}//package
Section 22
//Big (Big)
package {
import flash.display.*;
public class Big extends MovieClip {
public function Big(){
addFrameScript(12, bigs);
addFrameScript((this.totalFrames - 1), jixu);
}
private function jixu():void{
MovieClip(parent).gotoAndStop(1);
MovieClip(root).jixu();
}
private function bigs():void{
MovieClip(parent).scaleX = (MovieClip(parent).scaleY = (MovieClip(parent).scaleY * 1.05));
}
}
}//package
Section 23
//Fruit (Fruit)
package {
import flash.display.*;
public dynamic class Fruit extends MovieClip {
}
}//package
Section 24
//FruitScore (FruitScore)
package {
import flash.display.*;
public dynamic class FruitScore extends MovieClip {
}
}//package
Section 25
//good (good)
package {
import flash.media.*;
public dynamic class good extends Sound {
}
}//package
Section 26
//Help (Help)
package {
import flash.display.*;
import flash.events.*;
public class Help extends MovieClip {
public var close_btn:SimpleButton;
public function Help(){
addFrameScript(0, refurbish);
addFrameScript(1, refurbish);
}
private function refurbish():void{
close_btn.addEventListener(MouseEvent.MOUSE_DOWN, closeHelp);
}
private function closeHelp(_arg1:MouseEvent):void{
this.visible = false;
}
}
}//package
Section 27
//Language (Language)
package {
import flash.display.*;
public class Language {
public static function languageChange(_arg1:String, _arg2:MovieClip):void{
var _local3:uint;
_local3 = 1;
while (_local3 <= (_arg2.numChildren - 1)) {
if ((_arg2.getChildAt(_local3) is MovieClip)){
if (MovieClip(_arg2.getChildAt(_local3)).name.substr(0, 3) == "lan"){
if (_arg1 == "en"){
MovieClip(_arg2.getChildAt(_local3)).gotoAndStop(1);
} else {
MovieClip(_arg2.getChildAt(_local3)).gotoAndStop(2);
};
};
};
_local3++;
};
}
}
}//package
Section 28
//Lose (Lose)
package {
import flash.display.*;
public class Lose extends MovieClip {
public function Lose(){
addFrameScript((this.totalFrames - 1), lose);
}
private function lose():void{
stop();
if (MovieClip(root).HP_num > 0){
MovieClip(parent).gotoAndStop(1);
MovieClip(root).jixu();
};
}
}
}//package
Section 29
//LoseUI (LoseUI)
package {
import flash.display.*;
import flash.events.*;
public class LoseUI extends MovieClip {
public var tryCN_btn:SimpleButton;
public var tryEN_btn:SimpleButton;
public var score_mc:MovieClip;
public var height_mc:MovieClip;
public function LoseUI(){
addFrameScript(0, frameEN);
addFrameScript(1, frameCN);
}
public function refurbish():void{
refurbishNumber(height_mc, 4, MovieClip(root).height_num);
refurbishNumber(score_mc, 5, MovieClip(root).score_num);
}
private function frameCN():void{
tryCN_btn.addEventListener(MouseEvent.MOUSE_DOWN, replayGame);
}
private function replayGame(_arg1:MouseEvent):void{
MovieClip(root).replayGame();
}
private function frameEN():void{
tryEN_btn.addEventListener(MouseEvent.MOUSE_DOWN, replayGame);
}
private function refurbishNumber(_arg1:MovieClip, _arg2:uint, _arg3:uint){
var _local4:uint;
_local4 = 1;
while (_local4 <= _arg2) {
_arg1[("p" + _local4)].gotoAndStop((Math.floor(((_arg3 % Math.pow(10, _local4)) / Math.pow(10, (_local4 - 1)))) + 1));
_local4++;
};
}
}
}//package
Section 30
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.system.*;
public class Main extends MovieClip {
private const adMode:String = "load";
private const language:String = "en";
public var foreground_mc:MovieClip;
public var bgShow_mc:MovieClip;
public var lanHeight_mc:MovieClip;
private var volumeSize:uint;// = 1
public var lanMore2_mc:MoreGames;
public var score_num:uint;// = 0
public var lanHelps_mc:MovieClip;
public var background_mc:MovieClip;
private var sf:Boolean;// = true
public var score_mc:MovieClip;
private var speed:uint;// = 2
public var height_num:uint;// = 0
public var fruitScore_mc:MovieClip;
public var lanPlay_mc:MovieClip;
private var fruitNum:uint;// = 0
public var mushroom_mc:MovieClip;
public var lanGmeName_mc:MovieClip;
public var lanScore_mc:MovieClip;
public var MGShow_mc:MovieClip;
public var foregroundBegin:MovieClip;
public var lanLose_mc:LoseUI;
public var lanReplay_mc:MovieClip;
public var lanHelp_mc:Help;
public var monkey_mc:MovieClip;
private var speedMax:uint;// = 2
private var asdasdasd:uint;// = 0
public var mainground_mc:MovieClip;
private var myChannel:SoundChannel;
public var life_mc:MovieClip;
public var height_mc:MovieClip;
public var progressBar_mc:MovieClip;
public var lanWin_mc:MovieClip;
private var mymp3:Sound;
public var HP_num:uint;// = 5
public var lanLife_mc:MovieClip;
public var music_mc:MovieClip;
public var lanMore1_mc:MoreGames;
public function Main(){
speed = 2;
speedMax = 2;
height_num = 0;
score_num = 0;
HP_num = 5;
fruitNum = 0;
asdasdasd = 0;
mymp3 = new bg1();
sf = true;
volumeSize = 1;
super();
addFrameScript(0, frame1);
addFrameScript(0, adFrame);
addFrameScript(1, beginFrame);
addFrameScript(2, playFrame);
addFrameScript(3, winFrame);
}
private function fruitMove(_arg1:Event):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
if (_local2.y >= ((20 * speed) + 40)){
if (_local2.scaleX < 1){
_local2.scaleX = (_local2.scaleY = (_local2.scaleX + (0.05 * speed)));
} else {
_local2.scaleX = (_local2.scaleY = 1);
};
};
_local2.y = (_local2.y + (speed * 2));
if (_local2.y > 650){
_local2.removeEventListener(Event.ENTER_FRAME, fruitMove);
mushroom_mc.removeChild(_local2);
} else {
if ((((_local2.y > 230)) && ((_local2.y < 380)))){
if ((((((_local2.x < 280)) && ((monkey_mc.x < 280)))) || ((((_local2.x > 410)) && ((monkey_mc.x > 410)))))){
hitFruit(_local2.currentFrame);
MovieClip(_local2).removeEventListener(Event.ENTER_FRAME, fruitMove);
mushroom_mc.removeChild((_local2 as MovieClip));
};
};
};
}
private function mouseClick(_arg1:MouseEvent):void{
var _local2:SoundTransform;
if (sf){
volumeSize = 0;
sf = false;
} else {
volumeSize = 1;
sf = true;
};
_local2 = new SoundTransform(volumeSize, 0);
myChannel.soundTransform = _local2;
music_mc.gotoAndStop((2 - volumeSize));
}
private function setBGMusic(_arg1:String):void{
var _local2:Class;
if (myChannel){
myChannel.stop();
myChannel = null;
};
_local2 = (ApplicationDomain.currentDomain.getDefinition(_arg1) as Class);
mymp3 = (new (_local2) as Sound);
myChannel = mymp3.play(0, 9999, new SoundTransform(volumeSize));
}
private function beginFrame():void{
stop();
lanHelp_mc.visible = false;
Language.languageChange(language, this);
lanPlay_mc.addEventListener(MouseEvent.MOUSE_DOWN, playGame);
lanHelps_mc.addEventListener(MouseEvent.MOUSE_DOWN, helpGame);
}
private function hitFruit(_arg1:uint):void{
var _local2:FruitScore;
trace("hit", _arg1);
if (_arg1 == 1){
stage.removeEventListener(Event.ENTER_FRAME, upclimb);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
monkey_mc.gotoAndStop(4);
speed = 0;
HP_num = (HP_num - 1);
if (HP_num <= 0){
lose();
};
SoundEffectFactory.showEffect("bad");
} else {
if (_arg1 == 2){
HP_num = (HP_num + 1);
SoundEffectFactory.showEffect("good");
if (HP_num >= 5){
HP_num = 5;
};
} else {
if (_arg1 == 3){
SoundEffectFactory.showEffect("good");
score_num = (score_num + 100);
} else {
if (_arg1 == 4){
SoundEffectFactory.showEffect("good");
score_num = (score_num + 50);
};
};
};
};
_local2 = new FruitScore();
_local2.gotoAndStop(_arg1);
monkey_mc.addChild(_local2);
_local2.addEventListener(Event.ENTER_FRAME, fruitScoreMove);
refurbishUI();
}
function frame1(){
stop();
}
private function removes():void{
speed = 0;
stage.removeEventListener(Event.ENTER_FRAME, upclimb);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
monkey_mc.gotoAndStop(5);
}
public function jixu():void{
stage.addEventListener(Event.ENTER_FRAME, upclimb);
stage.addEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
}
public function replayGame():void{
while (mushroom_mc.numChildren) {
MovieClip(mushroom_mc.getChildAt(0)).removeEventListener(Event.ENTER_FRAME, fruitMove);
mushroom_mc.removeChildAt(0);
};
monkey_mc.removeEventListener(Event.ENTER_FRAME, monkeyOver);
speed = 2;
speedMax = 2;
height_num = 0;
score_num = 0;
HP_num = 5;
fruitNum = 0;
lanLose_mc.visible = false;
refurbish();
refurbishProgressBar();
stage.addEventListener(Event.ENTER_FRAME, upclimb);
stage.addEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
}
private function playFrame():void{
stop();
if (asdasdasd){
} else {
myChannel = mymp3.play(0, 9999);
asdasdasd = 1;
};
music_mc.gotoAndStop((2 - volumeSize));
music_mc.buttonMode = true;
music_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseClick);
speed = 2;
speedMax = 2;
height_num = 0;
score_num = 0;
HP_num = 5;
fruitNum = 0;
lanLose_mc.visible = false;
refurbish();
refurbishProgressBar();
Language.languageChange(language, this);
stage.addEventListener(Event.ENTER_FRAME, upclimb);
stage.addEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
}
private function monkeyJump(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 37){
if (uint(monkey_mc.x) == 412){
monkey_mc.gotoAndStop(1);
monkey_mc.gotoAndStop(2);
monkey_mc.addEventListener(Event.ENTER_FRAME, monkeyLeftMove);
};
} else {
if (_arg1.keyCode == 39){
if (uint(monkey_mc.x) == 274){
monkey_mc.gotoAndStop(1);
monkey_mc.gotoAndStop(3);
monkey_mc.addEventListener(Event.ENTER_FRAME, monkeyRightMove);
};
};
};
}
private function fruitX(_arg1:Fruit):void{
if (Math.random() < 0.9){
if ((fruitNum % 2)){
_arg1.x = 412;
} else {
_arg1.x = 274;
};
} else {
if ((fruitNum % 2)){
_arg1.x = 274;
} else {
_arg1.x = 412;
};
};
}
public function helpGame(_arg1:MouseEvent):void{
lanHelp_mc.visible = true;
}
private function refurbishUI():void{
life_mc.gotoAndStop((HP_num + 1));
refurbishNumber(height_mc, 4, height_num);
refurbishNumber(score_mc, 5, score_num);
}
private function winFrame():void{
stop();
SoundEffectFactory.showEffect("win");
lanReplay_mc.addEventListener(MouseEvent.MOUSE_DOWN, replayGames);
Language.languageChange(language, this);
}
private function fruitNew():void{
var _local1:Fruit;
fruitNum++;
_local1 = new Fruit();
fruitFrame(_local1);
fruitX(_local1);
mushroom_mc.addChild(_local1);
_local1.y = -100;
_local1.scaleX = (_local1.scaleY = 0);
_local1.addEventListener(Event.ENTER_FRAME, fruitMove);
}
private function upclimb(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if ((((((height_num > 2000)) && ((height_num < 2100)))) && ((speedMax < 3)))){
speedMax = 3;
setBGMusic("bg2");
} else {
if ((((((height_num > 4000)) && ((height_num < 4100)))) && ((speedMax < 4)))){
speedMax = 4;
setBGMusic("bg3");
} else {
if ((((((height_num > 6000)) && ((height_num < 6100)))) && ((speedMax < 5)))){
speedMax = 5;
setBGMusic("bg4");
};
};
};
speed = speedMax;
score_num = (score_num + (speed * 4));
_local2 = (((foreground_mc.y + 1000) * 3) / 1400);
_local3 = (((foreground_mc.y + 1000) * 1) / 1400);
height_num = (height_num + speed);
background_mc.y = (background_mc.y + (speed / _local2));
foreground_mc.y = (foreground_mc.y + (speed / _local3));
mainground_mc.y = (mainground_mc.y + (speed * 2));
if ((((mainground_mc.y >= 1000)) && ((height_num <= 7700)))){
mainground_mc.y = (mainground_mc.y - 406);
};
if (height_num >= 8000){
height_num = 8000;
stage.removeEventListener(Event.ENTER_FRAME, upclimb);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, monkeyJump);
if (monkey_mc.x < 280){
monkey_mc.gotoAndStop(1);
monkey_mc.gotoAndStop(3);
} else {
monkey_mc.gotoAndStop(1);
monkey_mc.gotoAndStop(2);
};
monkey_mc.num = 12;
monkey_mc.addEventListener(Event.ENTER_FRAME, monkeyOver);
};
if (((((height_num / 80) > (fruitNum + 1))) && ((height_num <= 7700)))){
fruitNew();
};
refurbishProgressBar();
refurbishNumber(height_mc, 4, height_num);
refurbishNumber(score_mc, 5, score_num);
}
private function lose():void{
setBGMusic("bg1");
lanLose_mc.visible = true;
lanLose_mc.refurbish();
}
private function adFrame():void{
if (adMode == "load"){
stop();
} else {
if (adMode == "add"){
};
};
}
public function replayGames(_arg1:MouseEvent):void{
setBGMusic("bg1");
gotoAndStop("begin_Frame");
}
private function monkeyOver(_arg1:Event):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
_local2.x = (_local2.x + ((343 - _local2.x) / _local2.num));
_local2.y = (_local2.y + ((70 - _local2.y) / _local2.num));
_local2.num--;
if (_local2.num <= 0){
win();
};
}
public function refurbish():void{
monkey_mc.gotoAndStop(1);
monkey_mc.x = 274.2;
monkey_mc.x = 412.2;
height_num = 0;
score_num = 0;
HP_num = 5;
background_mc.y = -825.8;
foreground_mc.y = -230.4;
mainground_mc.y = 190.3;
refurbishUI();
}
private function playGame(_arg1:MouseEvent):void{
gotoAndStop("play_Frame");
}
private function monkeyLeftMove(_arg1:Event):void{
_arg1.currentTarget.x = (_arg1.currentTarget.x - 17.5);
if (_arg1.currentTarget.x <= 274.2){
_arg1.currentTarget.x = 274.2;
monkey_mc.removeEventListener(Event.ENTER_FRAME, monkeyLeftMove);
};
}
private function monkeyRightMove(_arg1:Event):void{
_arg1.currentTarget.x = (_arg1.currentTarget.x + 17.5);
if (_arg1.currentTarget.x >= 412.2){
_arg1.currentTarget.x = 412.2;
monkey_mc.removeEventListener(Event.ENTER_FRAME, monkeyRightMove);
};
}
private function refurbishNumber(_arg1:MovieClip, _arg2:uint, _arg3:uint){
var _local4:uint;
_local4 = 1;
while (_local4 <= _arg2) {
_arg1[("p" + _local4)].gotoAndStop((Math.floor(((_arg3 % Math.pow(10, _local4)) / Math.pow(10, (_local4 - 1)))) + 1));
_local4++;
};
}
public function refurbishProgressBar():void{
progressBar_mc.mask_mc.height = (((height_num + 1) * 260) / 8000);
progressBar_mc.banana_mc.y = ((-((height_num + 1)) * 260) / 8000);
}
private function fruitFrame(_arg1:Fruit):void{
if (Math.random() < 0.8){
_arg1.gotoAndStop(1);
} else {
if ((((height_num < 4000)) || ((Math.random() < 0.8)))){
_arg1.gotoAndStop((Math.floor((Math.random() * 2)) + 3));
} else {
_arg1.gotoAndStop(4);
};
};
}
private function fruitScoreMove(_arg1:Event):void{
var _local2:MovieClip;
_local2 = (_arg1.currentTarget as MovieClip);
_local2.y = (_local2.y - 4);
if (_local2.y <= -100){
_local2.removeEventListener(Event.ENTER_FRAME, fruitScoreMove);
monkey_mc.removeChild(_local2);
};
}
private function win():void{
while (mushroom_mc.numChildren) {
MovieClip(mushroom_mc.getChildAt(0)).removeEventListener(Event.ENTER_FRAME, fruitMove);
mushroom_mc.removeChildAt(0);
};
monkey_mc.removeEventListener(Event.ENTER_FRAME, monkeyOver);
gotoAndStop("win_Frame");
}
}
}//package
Section 31
//MoreGames (MoreGames)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class MoreGames extends MovieClip {
private const url:URLRequest;
public function MoreGames(){
url = new URLRequest("http://www.runrungames.com/games149/bricks-puzzle.html");
super();
this.addEventListener(MouseEvent.MOUSE_DOWN, urlClick);
}
private function urlClick(_arg1:MouseEvent):void{
navigateToURL(url, "_blank");
}
}
}//package
Section 32
//MusicBG (MusicBG)
package {
import flash.media.*;
public dynamic class MusicBG extends Sound {
}
}//package
Section 33
//runrun_pao (runrun_pao)
package {
import flash.display.*;
public dynamic class runrun_pao extends MovieClip {
}
}//package
Section 34
//SoundEffectFactory (SoundEffectFactory)
package {
import flash.media.*;
import flash.system.*;
public class SoundEffectFactory {
private static var _sound:Sound;
private static var _channel:SoundChannel;
public static function showEffect(_arg1:String):void{
var _local2:Class;
_local2 = (ApplicationDomain.currentDomain.getDefinition(_arg1) as Class);
if (_local2){
_sound = (new (_local2) as Sound);
_channel = _sound.play();
};
}
}
}//package
Section 35
//win (win)
package {
import flash.media.*;
public dynamic class win extends Sound {
}
}//package