Section 1
//character (classes.character)
package classes {
import flash.events.*;
import flash.utils.*;
public class character extends characterMC {
var xSpd:Number;// = 0
var jumping:Boolean;// = false
var moving:Boolean;// = false
var ySpd:Number;// = 0
var tickd:Number;// = 0
var tick:Number;
var Parent:container;
var Base:ground2;
public function character(_arg1:container, _arg2:ground2):void{
xSpd = 0;
ySpd = 0;
tick = getTimer();
tickd = 0;
jumping = false;
moving = false;
super();
x = 225;
y = 400;
Parent = _arg1;
Parent.x = 0;
Base = _arg2;
gotoAndStop("RUN");
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, rem, false, 0, true);
addEventListener("Jump", jump);
}
private function jump(_arg1:Event){
if (!jumping){
jumping = true;
ySpd = -20;
Parent.ComboOn = false;
gotoAndStop("JUMP");
};
}
private function rem(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED_FROM_STAGE, rem);
removeEventListener("Jump", jump);
}
private function ef(_arg1:Event){
tickd = (getTimer() - tick);
tick = getTimer();
if (((!((currentFrame == 1))) && (!(jumping)))){
gotoAndStop("RUN");
};
y = (y + ((ySpd * tickd) / 33));
if (y < 250){
Parent.y = (Parent.y + 1);
if (ySpd < 0){
Parent.y = (Parent.y - (((ySpd / 3) * tickd) / 33));
};
};
if (y > 520){
parent.dispatchEvent(new Event("GameOver"));
};
if (ySpd < 20){
ySpd = (ySpd + ((1.5 * tickd) / 33));
};
if (y > ((Base.y + Parent.y) - 20)){
y = ((Base.y + Parent.y) - 20);
jumping = false;
ySpd = 0;
};
if (ySpd > 2){
jumping = true;
gotoAndStop("JUMP");
};
if (Math.abs((stage.mouseX - x)) > 15){
xSpd = ((stage.mouseX - x) / 6);
x = (x + ((xSpd * tickd) / 33));
Parent.x = (Parent.x - (((xSpd / 5) * tickd) / 33));
if (xSpd < 0){
scaleX = -1;
} else {
scaleX = 1;
};
} else {
if (!jumping){
gotoAndStop("REST");
};
};
}
}
}//package classes
Section 2
//cloud (classes.cloud)
package classes {
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class cloud extends cloudMC {
var yPos:Number;// = 0
var pt:Point;
var xSpd:Number;// = 0
var OffsetX:Number;// = 0
var OffsetY:Number;// = 0
var range:Number;// = 40
var ySpd:Number;// = 0
var tickd:Number;// = 0
var tick:Number;
var spd:Number;// = 2
var pt2:Point;
var newY:Number;// = 0
var xPos:Number;// = 0
var Parent:character;
var newX:Number;// = 0
var _Parent:container;
public function cloud(_arg1:character, _arg2, _arg3):void{
xPos = 0;
yPos = 0;
xSpd = 0;
ySpd = 0;
tickd = 0;
tick = getTimer();
OffsetX = 0;
OffsetY = 0;
newX = 0;
newY = 0;
spd = 2;
range = 40;
pt = new Point();
pt2 = new Point();
super();
x = (Math.random() * 500);
_Parent = _arg2;
spd = _arg3;
y = (-75 - _Parent.y);
Parent = _arg1;
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
CloudBall1.xPos = CloudBall1.x;
CloudBall1.yPos = CloudBall1.y;
CloudBall2.xPos = CloudBall2.x;
CloudBall2.yPos = CloudBall2.y;
CloudBall3.xPos = CloudBall3.x;
CloudBall3.yPos = CloudBall3.y;
CloudBall4.xPos = CloudBall4.x;
CloudBall4.yPos = CloudBall4.y;
CloudBall5.xPos = CloudBall5.x;
CloudBall5.yPos = CloudBall5.y;
CloudBall6.xPos = CloudBall6.x;
CloudBall6.yPos = CloudBall6.y;
CloudBall7.xPos = CloudBall7.x;
CloudBall7.yPos = CloudBall7.y;
CloudBall1.xSpd = 0;
CloudBall1.ySpd = 0;
CloudBall2.xSpd = 0;
CloudBall2.ySpd = 0;
CloudBall3.xSpd = 0;
CloudBall3.ySpd = 0;
CloudBall4.xSpd = 0;
CloudBall4.ySpd = 0;
CloudBall5.xSpd = 0;
CloudBall5.ySpd = 0;
CloudBall6.xSpd = 0;
CloudBall6.ySpd = 0;
CloudBall7.xSpd = 0;
CloudBall7.ySpd = 0;
}
private function ef(_arg1:Event):void{
tickd = (getTimer() - tick);
tick = getTimer();
OffsetX = -(parent.x);
OffsetY = -(parent.y);
newX = (x - OffsetX);
newY = (y - OffsetY);
if ((((((((Math.abs((newX - Parent.x)) < range)) && (((newY - Parent.y) < 18)))) && (((newY - Parent.y) > -2)))) && ((Parent.ySpd >= 0)))){
if (!_Parent.ComboOn){
_Parent.Combo = 0;
};
Parent.ySpd = 0;
Parent.y = newY;
Parent.jumping = false;
};
y = (y + ((spd * tickd) / 33));
if (newY > 500){
parent.dispatchEvent(new Event("NewCloud"));
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
pt.x = CloudBall1.x;
pt.y = CloudBall1.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall1.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall1.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall1.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall1.ySpd++;
};
};
CloudBall1.x = (CloudBall1.x + CloudBall1.xSpd);
CloudBall1.y = (CloudBall1.y + CloudBall1.ySpd);
CloudBall1.xSpd = (CloudBall1.xSpd + ((CloudBall1.xPos - CloudBall1.x) / 5));
CloudBall1.ySpd = (CloudBall1.ySpd + ((CloudBall1.yPos - CloudBall1.y) / 5));
CloudBall1.xSpd = (CloudBall1.xSpd / 1.2);
CloudBall1.ySpd = (CloudBall1.ySpd / 1.2);
pt.x = CloudBall2.x;
pt.y = CloudBall2.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall2.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall2.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall2.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall2.ySpd++;
};
};
CloudBall2.x = (CloudBall2.x + CloudBall2.xSpd);
CloudBall2.y = (CloudBall2.y + CloudBall2.ySpd);
CloudBall2.xSpd = (CloudBall2.xSpd + ((CloudBall2.xPos - CloudBall2.x) / 5));
CloudBall2.ySpd = (CloudBall2.ySpd + ((CloudBall2.yPos - CloudBall2.y) / 5));
CloudBall2.xSpd = (CloudBall2.xSpd / 1.2);
CloudBall2.ySpd = (CloudBall2.ySpd / 1.2);
pt.x = CloudBall3.x;
pt.y = CloudBall3.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall3.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall3.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall3.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall3.ySpd++;
};
};
CloudBall3.x = (CloudBall3.x + CloudBall3.xSpd);
CloudBall3.y = (CloudBall3.y + CloudBall3.ySpd);
CloudBall3.xSpd = (CloudBall3.xSpd + ((CloudBall3.xPos - CloudBall3.x) / 5));
CloudBall3.ySpd = (CloudBall3.ySpd + ((CloudBall3.yPos - CloudBall3.y) / 5));
CloudBall3.xSpd = (CloudBall3.xSpd / 1.2);
CloudBall3.ySpd = (CloudBall3.ySpd / 1.2);
pt.x = CloudBall4.x;
pt.y = CloudBall4.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall4.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall4.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall4.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall4.ySpd++;
};
};
CloudBall4.x = (CloudBall4.x + CloudBall4.xSpd);
CloudBall4.y = (CloudBall4.y + CloudBall4.ySpd);
CloudBall4.xSpd = (CloudBall4.xSpd + ((CloudBall4.xPos - CloudBall4.x) / 5));
CloudBall4.ySpd = (CloudBall4.ySpd + ((CloudBall4.yPos - CloudBall4.y) / 5));
CloudBall4.xSpd = (CloudBall4.xSpd / 1.2);
CloudBall4.ySpd = (CloudBall4.ySpd / 1.2);
pt.x = CloudBall5.x;
pt.y = CloudBall5.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall5.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall5.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall5.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall5.ySpd++;
};
};
CloudBall5.x = (CloudBall5.x + CloudBall5.xSpd);
CloudBall5.y = (CloudBall5.y + CloudBall5.ySpd);
CloudBall5.xSpd = (CloudBall5.xSpd + ((CloudBall5.xPos - CloudBall5.x) / 5));
CloudBall5.ySpd = (CloudBall5.ySpd + ((CloudBall5.yPos - CloudBall5.y) / 5));
CloudBall5.xSpd = (CloudBall5.xSpd / 1.2);
CloudBall5.ySpd = (CloudBall5.ySpd / 1.2);
pt.x = CloudBall6.x;
pt.y = CloudBall6.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall6.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall6.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall6.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall6.ySpd++;
};
};
CloudBall6.x = (CloudBall6.x + CloudBall6.xSpd);
CloudBall6.y = (CloudBall6.y + CloudBall6.ySpd);
CloudBall6.xSpd = (CloudBall6.xSpd + ((CloudBall6.xPos - CloudBall6.x) / 5));
CloudBall6.ySpd = (CloudBall6.ySpd + ((CloudBall6.yPos - CloudBall6.y) / 5));
CloudBall6.xSpd = (CloudBall6.xSpd / 1.2);
CloudBall6.ySpd = (CloudBall6.ySpd / 1.2);
pt.x = CloudBall7.x;
pt.y = CloudBall7.y;
pt2 = localToGlobal(pt);
if ((((Math.abs((pt2.x - Parent.x)) < 40)) && ((Math.abs((pt2.y - Parent.y)) < 40)))){
if (pt2.x < Parent.x){
CloudBall7.xSpd--;
};
if (pt2.x > Parent.x){
CloudBall7.xSpd++;
};
if (pt2.y < Parent.y){
CloudBall7.ySpd--;
};
if (pt2.y > Parent.y){
CloudBall7.ySpd++;
};
};
CloudBall7.x = (CloudBall7.x + CloudBall7.xSpd);
CloudBall7.y = (CloudBall7.y + CloudBall7.ySpd);
CloudBall7.xSpd = (CloudBall7.xSpd + ((CloudBall7.xPos - CloudBall7.x) / 5));
CloudBall7.ySpd = (CloudBall7.ySpd + ((CloudBall7.yPos - CloudBall7.y) / 5));
CloudBall7.xSpd = (CloudBall7.xSpd / 1.2);
CloudBall7.ySpd = (CloudBall7.ySpd / 1.2);
}
}
}//package classes
Section 3
//coin (classes.coin)
package classes {
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class coin extends coinMC {
var OffsetX:Number;// = 0
var OffsetY:Number;// = 0
var Beep:Sound;
var tickd:Number;// = 0
var tick:Number;
var spd:Number;// = 2
var newY:Number;// = 0
var Parent:character;
var newX:Number;// = 0
public function coin(_arg1:character, _arg2){
OffsetX = 0;
OffsetY = 0;
newX = 0;
newY = 0;
Beep = new beep();
tickd = 0;
tick = getTimer();
spd = 2;
super();
x = (Math.random() * 500);
y = (-15 - _arg2.y);
Parent = _arg1;
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, rem, false, 0, true);
}
private function rem(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, rem);
}
private function ef(_arg1:Event):void{
var _local2:*;
var _local3:combo;
var _local4:particle;
tickd = (getTimer() - tick);
tick = getTimer();
OffsetX = -(parent.x);
OffsetY = -(parent.y);
newX = (x - OffsetX);
newY = (y - OffsetY);
y = (y + ((spd * tickd) / 33));
if (newY > 500){
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
if ((((Math.abs((newX - Parent.x)) < 30)) && ((Math.abs((newY - (Parent.y - 40))) < 35)))){
Beep.play();
_local2 = 0;
while (_local2 < 10) {
_local4 = new particle(newX, newY);
parent.parent.addChild(_local4);
_local2++;
};
_local3 = new combo(newX, newY, parent);
parent.parent.addChild(_local3);
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes
Section 4
//combo (classes.combo)
package classes {
import flash.events.*;
public class combo extends comboMC {
var ySpd:Number;// = -0.8
var _combo:Number;// = 0
var Parent;
public function combo(_arg1, _arg2, _arg3):void{
ySpd = -0.8;
_combo = 0;
super();
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
x = _arg1;
y = _arg2;
Parent = _arg3;
Parent.Combo++;
_combo = Parent.Combo;
width = (width + _combo);
height = (height + _combo);
if (Parent.ComboOn){
Parent.Combo++;
_combo = Parent.Combo;
};
Parent.ComboOn = true;
if (_combo > 1){
txtbox.text = ("x " + String(_combo));
} else {
txtbox.text = "";
};
if (_combo > Parent.MaxCombo){
Parent.MaxCombo = _combo;
};
Parent.Score = (Parent.Score + (_combo * 10));
}
private function ef(_arg1:Event):void{
y = (y + ySpd);
alpha = (alpha - 0.02);
if (alpha <= 0){
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes
Section 5
//cursor (classes.cursor)
package classes {
import flash.events.*;
public class cursor extends cursorMC {
const PI = 3.1415926;
var Rad:Number;// = 0
var Parent:character;
var Deg:Number;// = 0
public function cursor(_arg1:character):void{
Rad = 0;
Deg = 0;
super();
Parent = _arg1;
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
this.addEventListener(Event.REMOVED, rem, false, 0, true);
}
private function rem(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, ef);
removeEventListener(Event.REMOVED, rem);
}
private function ef(_arg1:Event):void{
x = stage.mouseX;
y = stage.mouseY;
Rad = Math.atan2(((Parent.y - 25) - y), (Parent.x - x));
Deg = (((Rad * 180) / PI) + 90);
rotation = Deg;
}
}
}//package classes
Section 6
//particle (classes.particle)
package classes {
import flash.events.*;
public class particle extends particleMC {
var xSpd:Number;// = 0
var ySpd:Number;// = 0
public function particle(_arg1, _arg2):void{
xSpd = 0;
ySpd = 0;
super();
addEventListener(Event.ENTER_FRAME, ef, false, 0, true);
x = _arg1;
y = _arg2;
rotation = (Math.random() * 360);
xSpd = ((Math.random() * 10) - 5);
ySpd = ((Math.random() * 10) - 5);
}
private function ef(_arg1:Event):void{
y = (y + ySpd);
x = (x + xSpd);
alpha = (alpha - 0.03);
if (alpha <= 0){
removeEventListener(Event.ENTER_FRAME, ef);
parent.removeChild(this);
};
}
}
}//package classes
Section 7
//snow (classes.snow)
package classes {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class snow extends Sprite {
var timer:Timer;
var tickd:Number;// = 0
var o:Number;// = 0
var tick:Number;
var Parent:container;
public function snow(_arg1:container){
o = 0;
timer = new Timer(45, 0);
tickd = 0;
tick = getTimer();
super();
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
Parent = _arg1;
timer.start();
}
private function tim(_arg1:TimerEvent){
var _local2:MovieClip;
_local2 = new MovieClip();
_local2.graphics.lineStyle(3, 0xFFFFFF);
_local2.graphics.lineTo(0, 1);
_local2.x = ((Math.random() * 600) - 50);
_local2.y = (-(parent.y) - (Math.random() * 15));
_local2.o = (Math.random() * 300);
_local2.addEventListener(Event.ENTER_FRAME, ef2);
addChild(_local2);
}
private function ef2(_arg1:Event){
var _local2:MovieClip;
tickd = (getTimer() - tick);
tick = getTimer();
_local2 = (_arg1.target as MovieClip);
_local2.y++;
_local2.x = (_local2.x + (2 * Math.sin(((_local2.y + _local2.o) / 25))));
if (_local2.y > (450 - Parent.y)){
_local2.removeEventListener(Event.ENTER_FRAME, ef2);
_local2.parent.removeChild(_local2);
};
}
}
}//package classes
Section 8
//arcadetown_splash_16 (CloudClimber_fla.arcadetown_splash_16)
package CloudClimber_fla {
import flash.display.*;
public dynamic class arcadetown_splash_16 extends MovieClip {
public function arcadetown_splash_16(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package CloudClimber_fla
Section 9
//MainTimeline (CloudClimber_fla.MainTimeline)
package CloudClimber_fla {
import flash.events.*;
import classes.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.geom.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var btn_highscores:SimpleButton;
public var Crosshair:cursor;
public var Cloud:cloud;
public var CloudDown:Boolean;
public var Seconds:String;
public var btn_moregames:SimpleButton;
public var Score:Number;
public var btn_addthisgametoyourwebsite:SimpleButton;
public var btn_instructions:SimpleButton;
public var MaxCombo:Number;
public var Cloud3:cloud;
public var Cloud4:cloud;
public var Cloud6:cloud;
public var Altitude:Number;
public var Cloud2:cloud;
public var progressbar:MovieClip;
public var Cloud5:cloud;
public var Cloud7:cloud;
public var Minutes:String;
public var txt_TimeAlive:TextField;
public var btn_back:SimpleButton;
public var name_input:TextField;
public var LastCloud:cloud;
public var btn_replay:SimpleButton;
public var Song:Sound;
public var btn_play:SimpleButton;
public var timer:Timer;
public var Cont:container;
public var btn_submit:SimpleButton;
public var btn_arcadetown:SimpleButton;
public var Ground2:ground2;
public var Combo:Number;
public var Char:character;
public var timeStart:Number;
public var txt_MaxCombo:TextField;
public var level:Number;
public var arcadetown_splash:MovieClip;
public var Snow:snow;
public var txt_Altitude:TextField;
public var btn_credits:SimpleButton;
public var TimeAlive:Number;
public var txt_Score:TextField;
public var ComboOn:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3, 105, frame106, 106, frame107, 107, frame108, 108, frame109, 109, frame110, 110, frame111);
}
public function BitmapTransition():void{
var bitmapdata:BitmapData;
var bitmap:*;
var bitmapMC:*;
var ef:Function;
ef = function (_arg1:Event):void{
bitmapMC.alpha = (bitmapMC.alpha - 0.02);
if (bitmapMC.alpha <= 0){
stage.removeChild(bitmapMC);
bitmapMC.removeEventListener(Event.ENTER_FRAME, ef);
};
};
bitmapdata = new BitmapData(500, 450, false);
bitmapdata.draw(stage, new Matrix());
bitmap = new Bitmap(bitmapdata);
bitmapMC = new MovieClip();
bitmapMC.addChild(bitmap);
stage.addChild(bitmapMC);
bitmapMC.addEventListener(Event.ENTER_FRAME, ef);
}
public function btn_highscores_click(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(generateHighscoreURL("CloudClimber"));
navigateToURL(_local2);
}
public function btn_moregames_click(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadetown.com/index.asp?gameid=cloudclimber");
navigateToURL(_local2);
}
public function btn_replay_click(_arg1:MouseEvent):void{
BitmapTransition();
gotoAndStop("GAME");
}
function frame3(){
stage.frameRate = 30;
arcadetown_splash.buttonMode = true;
arcadetown_splash.useHandCursor = true;
arcadetown_splash.addEventListener(MouseEvent.CLICK, btn_moregames_click, false, 0, true);
}
function frame1(){
stop();
stage.quality = StageQuality.HIGH;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.frameRate = 100;
this.addEventListener(Event.ENTER_FRAME, preloading, false, 0, true);
}
public function cl(_arg1:MouseEvent):void{
Char.dispatchEvent(new Event("Jump"));
}
public function btn_play_click(_arg1:MouseEvent):void{
BitmapTransition();
gotoAndStop("GAME");
}
public function g_o(_arg1:Event):void{
TimeAlive = Math.round(((getTimer() - timeStart) / 1000));
Altitude = Math.round((Cont.y / 5));
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, tim);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, cl);
stage.removeEventListener("GameOver", g_o);
Cont.removeEventListener("NewCloud", cast);
BitmapTransition();
gotoAndStop("GAMEOVER");
}
public function tim(_arg1:Event):void{
var _local2:coin;
var _local3:cloud;
if (CloudDown){
CloudDown = false;
_local2 = new coin(Char, Cont);
Cont.addChild(_local2);
_local3 = new cloud(Char, Cont, 2);
Cont.addChild(_local3);
};
}
public function GetBaseUrl(_arg1){
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:String;
_local2 = _arg1.toLowerCase();
_local3 = _local2.length;
_local4 = _local2.indexOf("?", 0);
if (_local4 > 0){
_local3 = _local4;
};
_local5 = "download";
if (_local2.substr(0, 4) == "http"){
_local5 = _arg1.substr(7, (_local3 - 7));
};
return (_local5);
}
public function btn_credits_click(_arg1:MouseEvent):void{
BitmapTransition();
gotoAndStop("CREDITS");
}
public function btn_instructions_click(_arg1:MouseEvent):void{
BitmapTransition();
gotoAndStop("INSTRUCTIONS");
}
public function preloading(_arg1:Event):void{
progressbar.scaleX = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndPlay(3);
this.removeEventListener(Event.ENTER_FRAME, preloading);
};
}
public function generateHighscoreURL(_arg1:String){
var _local2:String;
_local2 = (("http://www.arcadetown.com/" + _arg1) + "/view_high_scores.asp");
return (_local2);
}
public function cast(_arg1:Event):void{
CloudDown = true;
}
function frame106(){
BitmapTransition();
gotoAndStop("MENU");
}
function frame109(){
stage.quality = StageQuality.HIGH;
btn_back.addEventListener(MouseEvent.CLICK, btn_back_click, false, 0, true);
}
function frame107(){
stop();
stage.quality = StageQuality.HIGH;
stage.frameRate = 100;
btn_play.addEventListener(MouseEvent.CLICK, btn_play_click, false, 0, true);
btn_instructions.addEventListener(MouseEvent.CLICK, btn_instructions_click, false, 0, true);
btn_credits.addEventListener(MouseEvent.CLICK, btn_credits_click, false, 0, true);
btn_moregames.addEventListener(MouseEvent.CLICK, btn_moregames_click, false, 0, true);
btn_highscores.addEventListener(MouseEvent.CLICK, btn_highscores_click, false, 0, true);
btn_arcadetown.addEventListener(MouseEvent.CLICK, btn_moregames_click, false, 0, true);
btn_addthisgametoyourwebsite.addEventListener(MouseEvent.CLICK, btn_addthisgametoyourwebsite_click, false, 0, true);
}
function frame108(){
stop();
Ground2 = new ground2();
Cont = new container();
Char = new character(Cont, Ground2);
Crosshair = new cursor(Char);
Snow = new snow(Cont);
Song = new winter();
level = 1;
Score = 0;
Combo = 0;
ComboOn = true;
MaxCombo = 0;
Altitude = 0;
TimeAlive = 0;
timeStart = getTimer();
CloudDown = false;
timer = new Timer(200, 0);
SoundMixer.stopAll();
stage.quality = StageQuality.MEDIUM;
Mouse.hide();
Song.play();
Cont.Combo = 0;
Cont.Score = 0;
Cont.MaxCombo = 0;
stage.addChild(Char);
stage.addChild(Cont);
Cont.addChild(Snow);
Cont.addChild(Ground2);
Ground2.y = 450;
stage.addChild(Crosshair);
stage.addEventListener(MouseEvent.MOUSE_DOWN, cl, false, 0, true);
stage.addEventListener("GameOver", g_o);
Cont.addEventListener("NewCloud", cast);
timer.addEventListener(TimerEvent.TIMER, tim, false, 0, true);
timer.start();
Cloud = new cloud(Char, Cont, 0);
Cont.addChild(Cloud);
Cloud.y = -300;
Cloud2 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud2);
Cloud2.y = -200;
Cloud3 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud3);
Cloud3.y = -100;
Cloud4 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud4);
Cloud4.y = 0;
Cloud5 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud5);
Cloud5.y = 100;
Cloud6 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud6);
Cloud6.y = 200;
Cloud7 = new cloud(Char, Cont, 0);
Cont.addChild(Cloud7);
Cloud7.y = 300;
}
function frame110(){
stage.quality = StageQuality.HIGH;
btn_back.addEventListener(MouseEvent.CLICK, btn_back_click, false, 0, true);
}
public function EncrpytString(_arg1:String){
var _local2:String;
var _local3:int;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
_local2 = "aHfEjcDebChGiAfIjDbEjacD";
_local3 = _local2.length;
_local4 = "0";
_local5 = _arg1.length;
_local6 = 0;
_local7 = "";
_local11 = 0;
_local12 = 0;
while (_local12 < _local5) {
_local8 = _arg1.charCodeAt(_local12);
if (_local8 >= 128){
_local8 = 88;
};
_local9 = _local2.charCodeAt(_local6);
_local6 = (_local6 + 1);
if (_local6 >= _local3){
_local6 = 0;
};
_local10 = ((_local8 % 16) + _local9);
_local7 = (_local7 + String.fromCharCode(_local10));
_local11 = (_local11 + _local10);
_local9 = _local2.charCodeAt(_local6);
_local6 = (_local6 + 1);
if (_local6 >= _local3){
_local6 = 0;
};
_local10 = (Math.floor((_local8 / 16)) + _local9);
_local7 = (_local7 + String.fromCharCode(_local10));
_local11 = (_local11 + _local10);
_local12++;
};
_local11 = (_local11 % 0x0100);
_local9 = _local2.charCodeAt(_local6);
_local6 = (_local6 + 1);
if (_local6 >= _local3){
_local6 = 0;
};
_local10 = ((_local11 % 16) + _local9);
_local7 = (_local7 + String.fromCharCode(_local10));
_local9 = _local2.charCodeAt(_local6);
_local6 = (_local6 + 1);
if (_local6 >= _local3){
_local6 = 0;
};
_local10 = (Math.floor((_local11 / 16)) + _local9);
_local7 = (_local7 + String.fromCharCode(_local10));
return (_local7);
}
public function btn_submit_click(_arg1:MouseEvent):void{
var _local2:URLRequest;
if (name_input.text != "Your name"){
_local2 = new URLRequest(generateHighscoreSubmission("CloudClimber", name_input.text, Cont.Score));
navigateToURL(_local2);
BitmapTransition();
gotoAndStop("MENU");
};
}
public function GetUrlParam(_arg1:String, _arg2:String){
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local3 = _arg1.toLowerCase();
_local4 = _local3.indexOf(_arg2);
_local5 = _arg2.length;
if (_local4 > 0){
_local7 = _local3.indexOf("&", (_local4 + _local5));
if (_local7 > 0){
_local6 = (_local7 - _local4);
} else {
_local6 = (_arg1.length - _local4);
};
return (_arg1.substr((_local4 + _local5), _local6));
};
return ("");
}
function frame111(){
stop();
stage.removeChild(Cont);
stage.removeChild(Crosshair);
stage.removeChild(Char);
Mouse.show();
SoundMixer.stopAll();
stage.quality = StageQuality.HIGH;
Minutes = "";
Seconds = "";
Cont.Score = (((Cont.Score + Altitude) + (TimeAlive * 2)) * Cont.MaxCombo);
txt_Altitude.text = (String(Altitude) + " feet");
txt_MaxCombo.text = String(Cont.MaxCombo);
Minutes = String(Math.floor((TimeAlive / 60)));
Seconds = String((TimeAlive % 60));
if (Number(Seconds) < 10){
Seconds = ("0" + Seconds);
};
txt_TimeAlive.text = ((Minutes + " : ") + Seconds);
txt_Score.text = String(Cont.Score);
btn_replay.addEventListener(MouseEvent.CLICK, btn_replay_click, false, 0, true);
btn_moregames.addEventListener(MouseEvent.CLICK, btn_moregames_click, false, 0, true);
btn_submit.addEventListener(MouseEvent.CLICK, btn_submit_click, false, 0, true);
}
public function generateHighscoreSubmission(_arg1:String, _arg2:String, _arg3:int){
var _local4:String;
var _local5:String;
var _local6:String;
_local4 = ((_arg2 + "|") + _arg3);
_local5 = EncrpytString(_local4);
_local6 = ((("http://www.arcadetown.com/" + _arg1) + "/hs.asp?") + _local5);
return (_local6);
}
public function btn_addthisgametoyourwebsite_click(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadetown.com/free_content/index.asp");
navigateToURL(_local2);
}
public function btn_back_click(_arg1:MouseEvent):void{
BitmapTransition();
gotoAndStop("MENU");
}
}
}//package CloudClimber_fla
Section 10
//beep (beep)
package {
import flash.media.*;
public dynamic class beep extends Sound {
}
}//package
Section 11
//characterMC (characterMC)
package {
import flash.display.*;
public dynamic class characterMC extends MovieClip {
}
}//package
Section 12
//cloudMC (cloudMC)
package {
import flash.display.*;
public dynamic class cloudMC extends MovieClip {
public var CloudBall4:MovieClip;
public var CloudBall2:MovieClip;
public var CloudBall5:MovieClip;
public var CloudBall6:MovieClip;
public var CloudBall7:MovieClip;
public var CloudBall1:MovieClip;
public var CloudBall3:MovieClip;
}
}//package
Section 13
//coinMC (coinMC)
package {
import flash.display.*;
public dynamic class coinMC extends MovieClip {
}
}//package
Section 14
//comboMC (comboMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class comboMC extends MovieClip {
public var txtbox:TextField;
}
}//package
Section 15
//container (container)
package {
import flash.display.*;
public dynamic class container extends MovieClip {
}
}//package
Section 16
//cursorMC (cursorMC)
package {
import flash.display.*;
public dynamic class cursorMC extends MovieClip {
}
}//package
Section 17
//ground2 (ground2)
package {
import flash.display.*;
public dynamic class ground2 extends MovieClip {
}
}//package
Section 18
//particleMC (particleMC)
package {
import flash.display.*;
public dynamic class particleMC extends MovieClip {
}
}//package
Section 19
//winter (winter)
package {
import flash.media.*;
public dynamic class winter extends Sound {
}
}//package