STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
218850
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2393 · P4785

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/45575591?noj=FRM45575591-19DC" width="1" height="1"></div>

StickMan Jumper 3 - beautiful graphics, addictive gameplay and an absurd world.swf

This is the info page for
Flash #91127

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS3]
Section 1
//Board (game.Board) package game { import graphics.*; public class Board extends GraphicObject implements GameObject { private var maxSpeed:Number;// = 0.3 private var minW:int;// = 15 private var rotatespeed:Number;// = 0 private var stopped:Boolean;// = false private var moving:int; private var raisespeed:Number;// = 2.5E-5 private var old_w:int; private var balancing:Number;// = 0.002 private var baseY:Number; private var speedX:Number; private var speedY:Number;// = 0 private static var myGraph:GameGraph = new GameGraph(new imageClass(), 1, 0); private static var imageClass:Class = Board_imageClass; public function Board(x:int, y:int, w:int=60, h:int=10, moving:int=0, speedX:Number=0.07){ baseY = y; if (moving == 0){ if (Math.random() < 0.5){ this.moving = 1; } else { this.moving = -1; }; } else { this.moving = moving; }; this.speedX = speedX; super(myGraph, x, y, w, h); } public function enlarge():void{ old_w = w; w = (w + 20); informScaling(); } public function stop():void{ stopped = true; } public function shrink():void{ w = old_w; informScaling(); } private function move(elapsed:int):void{ var rotbefore:Number; if (stopped){ return; }; if (x <= 1){ moving = -(moving); x = 1; } else { if ((x + w) > Game.w){ moving = -(moving); x = (Game.w - w); }; }; x = (x + ((speedX * moving) * elapsed)); if (((!((y == baseY))) || (!((speedY == 0))))){ y = (y + (speedY * elapsed)); speedY = (speedY - (raisespeed * elapsed)); if (y <= baseY){ y = baseY; speedY = 0; }; }; informMovement(); if (((!((rotatespeed == 0))) || (!((rot == 0))))){ rotbefore = rot; rot = (rot + (rotatespeed * elapsed)); if (rot > 0){ rotatespeed = (rotatespeed - (balancing * elapsed)); } else { rotatespeed = (rotatespeed + (balancing * elapsed)); }; if ((((((rotbefore < 0)) && ((rot >= 0)))) || ((((rotbefore > 0)) && ((rot <= 0)))))){ rotatespeed = 0; rot = 0; }; informRotation(); }; } public function hitDude(dude:Dude):void{ var dist:Number = ((dude.getX() + (dude.getW() / 2)) - (this.x + (this.w / 2))); if (dist < 0){ rotatespeed = -(rotatespeed); }; speedY = (Math.atan2((w / 2), Math.abs(dist)) / 50); if (dist < 0){ moving = -1; } else { moving = 1; }; if (this.w > minW){ w = (w - 1.8); }; if (this.speedX < maxSpeed){ this.speedX = (this.speedX + 0.009); }; informScaling(); } public function act(elapsed:int):void{ move(elapsed); } public function clone():Board{ return (new Board(x, y, w, h, (moving * -1), speedX)); } public function start():void{ stopped = false; } } }//package game
Section 2
//Board_imageClass (game.Board_imageClass) package game { import mx.core.*; public class Board_imageClass extends BitmapAsset { } }//package game
Section 3
//Bonus (game.Bonus) package game { import graphics.*; public class Bonus extends GraphicObject implements GameObject { private var speed_x:Number; private var speed_y:Number; private var moving:int;// = 1 private static var myGraph:GameGraph = new GameGraph(new imageClass(), 1, 0); private static var imageClass:Class = Bonus_imageClass; public function Bonus(x:int, y:int, speed_x:Number){ super(myGraph, x, y); this.speed_x = speed_x; } public function act(elapsed:int):void{ x = (x + ((speed_x * moving) * elapsed)); if (x > 640){ destroy(); } else { informMovement(); }; } } }//package game
Section 4
//Bonus_imageClass (game.Bonus_imageClass) package game { import mx.core.*; public class Bonus_imageClass extends BitmapAsset { } }//package game
Section 5
//Dude (game.Dude) package game { import graphics.*; public class Dude extends GraphicObject implements GameObject { private var overSunStatus:int;// = -1 private var moving:int;// = 0 private var speedX:Number;// = 0.15 private var speedY:Number;// = 0 private static var jumpRightGraph:GameGraph = new GameGraph(new jumpRightClass(), 28, 50); private static var jumpLeftClass:Class = Dude_jumpLeftClass; private static var idleClass:Class = Dude_idleClass; private static var jumpUp2Graph:GameGraph = new GameGraph(new jumpUp2Class(), 26, 50); private static var jumpRightClass:Class = Dude_jumpRightClass; private static var jumpLeftRollClass:Class = Dude_jumpLeftRollClass; private static var jumpUp2Class:Class = Dude_jumpUp2Class; private static var jumpRightRollGraph:GameGraph = new GameGraph(new jumpRightRollClass(), 26, 50); private static var jumpRightRollClass:Class = Dude_jumpRightRollClass; private static var jumpLeftGraph:GameGraph = new GameGraph(new jumpLeftClass(), 28, 50); private static var idleGraph:GameGraph = new GameGraph(new idleClass(), 12, 50); private static var jumpLeftRollGraph:GameGraph = new GameGraph(new jumpLeftRollClass(), 26, 50); public function Dude(x:int, y:int){ super(idleGraph, x, y); } public function act(elapsed:int):void{ move(elapsed); } public function slowDown():void{ this.speedX = (this.speedX - 0.05); } public function speedUp():void{ this.speedX = (this.speedX + 0.05); } public function startMovingRight():void{ moving = 1; } private function move(elapsed:int):void{ speedY = (speedY + (Game.gravity * elapsed)); y = (y + (speedY * elapsed)); if (moving){ if (((((this.x + ((moving * speedX) * elapsed)) > -6)) && (((this.x + ((moving * speedX) * elapsed)) < ((640 - this.w) + 6))))){ this.x = (this.x + ((moving * speedX) * elapsed)); }; }; informMovement(); } public function startMovingLeft():void{ moving = -1; } public function hitBoard(board:Board):void{ var dist:Number = ((x + (w / 2)) - (board.getX() + (board.getW() / 2))); this.y = (360 - h); speedY = -0.21; if (moving == 0){ playEffect(jumpUp2Graph); } else { if (Math.abs(dist) > 13){ if (moving == -1){ playEffect(jumpLeftGraph); } else { playEffect(jumpRightGraph); }; } else { if (moving == -1){ playEffect(jumpLeftRollGraph); } else { playEffect(jumpRightRollGraph); }; }; }; overSunStatus = 0; } public function stopMovingRight():void{ if (moving == 1){ moving = 0; }; } public function stopMovingLeft():void{ if (moving == -1){ moving = 0; }; } public function overSun(sun:Sun):int{ if (overSunStatus != -2){ if (hitCheck(sun, true, 1)){ overSunStatus = -2; return (-1); }; }; if (overSunStatus < 0){ return (0); }; if ((((overSunStatus == 0)) && (((this.y + (this.h / 2)) < (sun.getY() + (sun.getH() / 2)))))){ if ((this.x + (this.w / 2)) < (sun.getX() + (sun.getW() / 2))){ overSunStatus = 1; } else { overSunStatus = 2; }; } else { if (((((getY() + (getH() / 2)) > (sun.getY() + (sun.getH() / 2)))) && ((overSunStatus > 0)))){ if ((((((overSunStatus == 1)) && (((this.x + (this.w / 2)) > (sun.getX() + (sun.getW() / 2)))))) || ((((overSunStatus == 2)) && (((this.x + (this.w / 2)) < (sun.getX() + (sun.getW() / 2)))))))){ overSunStatus = -2; return (1); }; overSunStatus = -1; return (0); }; }; return (0); } } }//package game
Section 6
//Dude_idleClass (game.Dude_idleClass) package game { import mx.core.*; public class Dude_idleClass extends BitmapAsset { } }//package game
Section 7
//Dude_jumpLeftClass (game.Dude_jumpLeftClass) package game { import mx.core.*; public class Dude_jumpLeftClass extends BitmapAsset { } }//package game
Section 8
//Dude_jumpLeftRollClass (game.Dude_jumpLeftRollClass) package game { import mx.core.*; public class Dude_jumpLeftRollClass extends BitmapAsset { } }//package game
Section 9
//Dude_jumpRightClass (game.Dude_jumpRightClass) package game { import mx.core.*; public class Dude_jumpRightClass extends BitmapAsset { } }//package game
Section 10
//Dude_jumpRightRollClass (game.Dude_jumpRightRollClass) package game { import mx.core.*; public class Dude_jumpRightRollClass extends BitmapAsset { } }//package game
Section 11
//Dude_jumpUp2Class (game.Dude_jumpUp2Class) package game { import mx.core.*; public class Dude_jumpUp2Class extends BitmapAsset { } }//package game
Section 12
//Game (game.Game) package game { import flash.events.*; import graphics.*; import flash.utils.*; public class Game extends EventDispatcher { private var started:Boolean;// = false private var bonusInterval:int; private var scoresPerJump:int; private var negatype:int;// = -1 private var bonus:Bonus; private var lastBonus:int; private var negaInterval:int; private var negaMaxInterval:int;// = 30000 private var slowMode:Number;// = 1 private var bonusLeft:int; private var sun:Sun; private var boards:Array; private var dude:Dude; private var bonustype:int;// = -1 private var negabonus:NegaBonus; private var _gui:Object; private var negaLeft:int; public static var scores:int; public static var w:int = 640; public static var h:int = 480; public static var last_scores:int; public static var gravity:Number = 0.00015; public function Game(_gui:Object){ boards = new Array(); lastBonus = getTimer(); super(); this._gui = _gui; init(); } public function moveLeft():void{ dude.startMovingLeft(); } public function init():void{ scores = 0; scoresPerJump = 10; bonusLeft = 0; bonusInterval = 20000; negaInterval = negaMaxInterval; addDude(300, 100); addBoard(93, 360); addBoard(306, 365); addBoard(520, 370); addSun(297, 230); } public function act(dtime:Number):void{ var board:Board; var board2:Board; var over:int; dtime = (dtime / slowMode); dtime = (dtime * 1.25); dude.act(dtime); if ((dude.getY() + dude.getH()) > h){ gameOver(); return; }; for each (board in boards) { board.act(dtime); }; if (negabonus != null){ negabonus.act(dtime); if (negabonus.getX() > 640){ negabonus = null; }; }; if (bonus != null){ bonus.act(dtime); if (bonus.getX() > 640){ bonus = null; }; }; for each (board2 in boards) { if (dude.hitCheck(board2, false, 1, 20)){ dude.hitBoard(board2); board2.hitDude(dude); addScores(); if (bonusLeft > 0){ bonusLeft--; dispatchEvent(new Event("BonusChanged")); if (bonusLeft == 0){ removeBonusEffect(); }; }; if (negaLeft > 0){ negaLeft--; dispatchEvent(new Event("BonusChanged")); if (negaLeft == 0){ removeNegaEffect(); }; }; dispatchEvent(new Event("ScoresChanged")); break; }; }; over = dude.overSun(sun); if (over == -1){ hitSun(); } else { if (over == 1){ scoresPerJump = (scoresPerJump + 10); dispatchEvent(new Event("WentOver")); }; }; if (((!((negabonus == null))) && (dude.hitCheck(negabonus, true)))){ negabonus.destroy(); negabonus = null; removeNegaEffect(); addNegaEffect(); }; if (((!((bonus == null))) && (dude.hitCheck(bonus, true)))){ bonus.destroy(); bonus = null; removeBonusEffect(); addBonusEffect(); }; bonusInterval = (bonusInterval - dtime); if (bonusInterval <= 0){ bonusInterval = 40000; bonus = new Bonus(-50, 170, 0.1); }; negaInterval = (negaInterval - dtime); if (negaInterval <= 0){ negaInterval = negaMaxInterval; negabonus = new NegaBonus(-50, 170, 0.1); }; } private function addDude(x:int, y:int):void{ dude = new Dude(x, y); } public function getScores():int{ return (scores); } public function stopMovingRight():void{ dude.stopMovingRight(); } public function getSun():GraphicObject{ return (sun); } public function stopMovingLeft():void{ dude.stopMovingLeft(); } private function addScores():void{ scores = (scores + scoresPerJump); } public function getJumperX():int{ return (dude.getX()); } public function getJumperY():int{ return (dude.getY()); } public function getPowerUpType():int{ return (bonustype); } public function resume():void{ } private function addBonusEffect():void{ var board:Board; bonustype = Math.floor((Math.random() * 6)); switch (bonustype){ case 0: slowMode = 1.5; break; case 1: for each (board in boards.slice(0, 3)) { boards.push(board.clone()); }; break; case 2: for each (board in boards) { board.stop(); }; break; case 3: for each (board in boards) { board.enlarge(); }; break; case 4: gravity = (gravity * 0.7); break; case 5: sun.lower(); break; }; bonusLeft = 4; dispatchEvent(new Event("Powerup")); } private function hitSun():void{ if (scoresPerJump > 10){ scoresPerJump = (scoresPerJump - 10); dispatchEvent(new Event("ObstacleTouched")); }; } public function getPowerDownLeft():int{ return (negaLeft); } private function addNegaEffect():void{ negatype = Math.floor((Math.random() * 3)); switch (negatype){ case 0: _gui.flip(); break; case 1: dude.slowDown(); break; case 2: sun.rise(); break; default: trace("Unpossible!"); }; negaLeft = 4; dispatchEvent(new Event("Powerdown")); } private function addBoard(x:int, y:int):void{ boards.push(new Board(x, y)); } public function moveRight():void{ dude.startMovingRight(); } public function getScoresPerJump():int{ return (scoresPerJump); } public function getLastScores():int{ return (last_scores); } public function gameOver():void{ var board:Board; last_scores = scores; removeBonusEffect(); removeNegaEffect(); for each (board in boards) { board.destroy(); }; boards = new Array(); dude.destroy(); sun.destroy(); if (negabonus != null){ negabonus.destroy(); }; if (bonus != null){ bonus.destroy(); }; negabonus = null; bonus = null; init(); dispatchEvent(new Event("GameOver")); } private function addSun(x:int, y:int):void{ sun = new Sun(x, y); } private function removeNegaEffect():void{ switch (negatype){ case 0: _gui.flip(); break; case 1: dude.speedUp(); break; case 2: sun.lower(); }; negatype = -1; negaLeft = 0; } public function getPowerUpLeft():int{ return (bonusLeft); } public function getPowerDownType():int{ return (negatype); } private function removeBonusEffect():void{ var board:Board; switch (bonustype){ case 0: slowMode = 1; break; case 1: for each (board in boards.slice(3, 6)) { board.destroy(); }; boards.pop(); boards.pop(); boards.pop(); break; case 2: for each (board in boards) { board.start(); }; break; case 3: for each (board in boards) { board.shrink(); }; break; case 4: gravity = 0.00015; break; case 5: sun.rise(); break; }; bonusLeft = 0; bonustype = -1; } } }//package game
Section 13
//GameObject (game.GameObject) package game { public interface GameObject { function act(:int):void; } }//package game
Section 14
//NegaBonus (game.NegaBonus) package game { import graphics.*; public class NegaBonus extends GraphicObject implements GameObject { private var speed_x:Number; private var speed_y:Number; private var angle:Number;// = 0 private var moving:int;// = 1 private static var myGraph:GameGraph = new GameGraph(new imageClass(), 1, 0); private static var imageClass:Class = NegaBonus_imageClass; public function NegaBonus(x:int, y:int, speed_x:Number){ super(myGraph, x, y); this.speed_x = speed_x; this.speed_y = 1; } public function act(elapsed:int):void{ angle = (angle + (0.003 * elapsed)); angle = (angle % (2 * Math.PI)); y = (y + (((Math.sin(angle) * speed_y) * elapsed) / 10)); x = (x + ((speed_x * moving) * elapsed)); if (x > 640){ destroy(); } else { informMovement(); }; } } }//package game
Section 15
//NegaBonus_imageClass (game.NegaBonus_imageClass) package game { import mx.core.*; public class NegaBonus_imageClass extends BitmapAsset { } }//package game
Section 16
//Sun (game.Sun) package game { import graphics.*; public class Sun extends GraphicObject implements GameObject { private static var img:GameGraph = new GameGraph(new imageClass()); private static var imageClass:Class = Sun_imageClass; public function Sun(x:int, y:int){ super(img, x, y); } public function lower():void{ y = (y + 60); informMovement(); } public function act(elapsed:int):void{ } public function rise():void{ y = (y - 60); informMovement(); } } }//package game
Section 17
//Sun_imageClass (game.Sun_imageClass) package game { import mx.core.*; public class Sun_imageClass extends BitmapAsset { } }//package game
Section 18
//Engine (graphics.Engine) package graphics { import flash.display.*; import game.*; import flash.geom.*; public class Engine extends Bitmap { private var bg:Bitmap; private var bgChanged:Boolean;// = false private var dt:int; private var children:Array; public static var _this:Engine; public function Engine(w:int, h:int){ children = new Array(0); super(); _this = this; bitmapData = new BitmapData(w, h, true, 0); bg = new Bitmap(new BitmapData(w, h, false)); } public function listenTo(gameInstance:Game):void{ gameInstance.addEventListener("objectCreated", objectCreated); } private function clearChild(item:Image, index:int, array:Array):void{ var source:Rectangle = new Rectangle(item.x, item.y, item.width, item.height); var dest:Point = new Point(item.x, item.y); bitmapData.copyPixels(bg.bitmapData, source, dest); } public function objectCreated(event:GraphicEvent):void{ var image:Image = new Image(event.obj); children.push(image); } public function clear():void{ children.forEach(clearChild); } private function drawChild(item:Image, index:int, array:Array):Boolean{ var result:Boolean = item.draw(this.bitmapData, dt); return (result); } public function addObject(obj:GraphicObject, back:Boolean=false):Image{ var image:Image = new Image(obj); if (!back){ children.push(image); } else { children.unshift(image); }; return (image); } public function nextFrame(dt:int):void{ this.dt = dt; if (bgChanged){ bitmapData.copyPixels(bg.bitmapData, new Rectangle(0, 0, width, height), new Point()); }; children = children.filter(drawChild); } public function getBG():Bitmap{ bgChanged = true; return (bg); } public static function getInstance():Engine{ if (_this == null){ _this = new Engine(640, 480); }; return (_this); } } }//package graphics
Section 19
//GameGraph (graphics.GameGraph) package graphics { import flash.display.*; public class GameGraph { private var directions:int; private var loop:Boolean; private var frames:int; private var h:int; private var w:int; private var frameSpeed:int; private var image:Bitmap; public function GameGraph(image:Bitmap, frames:int=1, frameSpeed:int=0, width:int=0, height:int=0, directions:int=1, loop:Boolean=true){ super(); this.image = image; if (frames == 1){ w = image.width; h = image.height; } else { if (height == 0){ w = (image.width / frames); h = w; } else { w = width; h = height; }; }; this.frames = frames; this.frameSpeed = frameSpeed; this.loop = loop; this.directions = directions; } public function getW():int{ return (w); } public function getImage():Bitmap{ return (image); } public function getDirections():int{ return (directions); } public function getH():int{ return (h); } public function getFrames():int{ return (frames); } public function loops():Boolean{ return (loop); } public function getFrameSpeed():int{ return (frameSpeed); } } }//package graphics
Section 20
//GraphicEvent (graphics.GraphicEvent) package graphics { import flash.events.*; public class GraphicEvent extends Event { public var obj:GraphicObject; public function GraphicEvent(type:String, obj:GraphicObject, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); this.obj = obj; } } }//package graphics
Section 21
//GraphicObject (graphics.GraphicObject) package graphics { import flash.events.*; import flash.geom.*; public class GraphicObject extends EventDispatcher { protected var y:Number; public var graph:GameGraph; protected var rot:Number;// = 0 private var image:Image; protected var h:Number; protected var w:Number; protected var x:Number; protected var _exists:Boolean;// = true public function GraphicObject(graph:GameGraph, x:Number=0, y:Number=0, w:Number=0, h:Number=0, back:Boolean=false){ super(); this.graph = graph; this.x = x; this.y = y; if (w == 0){ this.w = graph.getW(); } else { this.w = w; }; if (h == 0){ this.h = graph.getH(); } else { this.h = h; }; image = Engine.getInstance().addObject(this, back); } public function getW():int{ return (w); } public function getX():int{ return (x); } public function getY():int{ return (y); } protected function informRotation():void{ dispatchEvent(new Event("objectRotated")); } protected function playEffect(graph:GameGraph):void{ image.playEffect(graph); } public function getGraph():GameGraph{ return (graph); } public function getPos():Point{ return (new Point(x, y)); } public function exists():Boolean{ return (_exists); } protected function informScaling():void{ dispatchEvent(new Event("objectScaled")); } public function getImage():Image{ return (image); } public function getH():int{ return (h); } public function getRotation():int{ return (rot); } public function destroy():void{ dispatchEvent(new Event("objectDestroyed")); _exists = false; } public function hitCheck(obj:GraphicObject, pp:Boolean, tolerance:int=1, clip_w:int=0, clip_h:int=0):Boolean{ if (image.colorHitTestObject(obj.getImage(), pp, tolerance, clip_w, clip_h)){ return (true); }; return (false); } protected function informMovement():void{ dispatchEvent(new Event("objectMoved")); } } }//package graphics
Section 22
//Image (graphics.Image) package graphics { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; public class Image extends Bitmap { private var matrix:Matrix; private var flipped:Boolean;// = false private var unit:GraphicObject; private var fadeamt:int;// = 0 private var alive:Boolean;// = true private var graph:GameGraph; private var dir:int; private var rotating:Number;// = 0 private var playingEffect:Boolean;// = false private var frameSpeed:int; private var frame:int;// = 0 private var lastFrame:int; private var changed:Boolean;// = false public function Image(unit:GraphicObject){ lastFrame = getTimer(); super(); this.unit = unit; graph = unit.getGraph(); x = unit.getX(); y = unit.getY(); unit.addEventListener("objectMoved", move); unit.addEventListener("objectScaled", scale); unit.addEventListener("objectDestroyed", destroy); unit.addEventListener("objectPlaysEffect", playEffect); frameSpeed = unit.graph.getFrameSpeed(); bitmapData = new BitmapData(graph.getW(), graph.getH(), true, 0); matrix = this.graph.getImage().transform.matrix; this.width = unit.getW(); this.height = unit.getH(); render(); } private function destroy(event:Event):void{ unit.removeEventListener("objectMoved", move); unit.removeEventListener("objectScaled", scale); unit.removeEventListener("objectDestroyed", destroy); unit.removeEventListener("objectPlaysEffect", playEffect); dispatchEvent(new Event("destroyed")); changed = true; alive = false; } public function startFade(amt:int):void{ fadeamt = amt; } private function scale(event:Event):void{ width = unit.getW(); height = unit.getH(); } public function colorHitTestObject(object2:Bitmap, pixelPerfect:Boolean=true, tolerance:int=0xFF, clip_w:int=0, clip_h:int=0):Boolean{ var bounds1:Rectangle = new Rectangle((x + (clip_w / 2)), y, (width - clip_w), height); var bounds2:Rectangle = new Rectangle(object2.x, object2.y, object2.width, object2.height); var bounds:Rectangle = bounds1.intersection(bounds2); bounds.x = Math.floor(bounds.x); bounds.y = Math.floor(bounds.y); bounds.width = Math.ceil(bounds.width); bounds.height = Math.ceil(bounds.height); if ((((bounds.width < 1)) || ((bounds.height < 1)))){ return (false); }; if (!pixelPerfect){ return (true); }; return (bitmapData.hitTest(new Point(x, y), 0xFF, object2, new Point(object2.x, object2.y), 0xFF)); } private function move(event:Event):void{ x = unit.getX(); y = unit.getY(); if (flipped){ this.x = (this.x + width); }; changed = true; } private function transformed():Boolean{ if ((((fadeamt == 0)) && ((width == graph.getW())))){ return (false); }; return (true); } public function draw(bd:BitmapData, dt:int):Boolean{ var source:Rectangle; var dest:Point; if (alive){ if (fadeamt > 0){ fade(dt); }; nextFrame(); if (!transformed()){ source = new Rectangle(0, 0, graph.getW(), graph.getH()); dest = new Point(x, y); bd.copyPixels(bitmapData, source, dest, null, null, true); } else { source = new Rectangle((x + (frame * this.graph.getW())), (y + (dir * graph.getH())), this.graph.getW(), this.graph.getH()); bd.draw(this, this.transform.matrix, this.transform.colorTransform); }; }; changed = false; return (alive); } private function stopEffect():void{ playingEffect = false; frame = 0; this.graph = unit.getGraph(); bitmapData = new BitmapData(unit.getW(), unit.getH(), true, 0); render(); } private function render():void{ var source:Rectangle = new Rectangle((frame * this.graph.getW()), (dir * this.graph.getH()), this.graph.getW(), this.graph.getH()); var dest:Point = new Point(0, 0); bitmapData.copyPixels(graph.getImage().bitmapData, source, dest); changed = false; } public function playEffect(graph:GameGraph):void{ frame = 0; this.graph = graph; bitmapData = new BitmapData(unit.getW(), unit.getH(), true, 0); playingEffect = true; changed = true; render(); } public function nextFrame():void{ if (frameSpeed == 0){ return; }; var sinceLastFrame:int = (getTimer() - lastFrame); if (sinceLastFrame >= this.graph.getFrameSpeed()){ frame++; if (frame >= this.graph.getFrames()){ frame = 0; if (playingEffect){ stopEffect(); }; if (!unit.graph.loops()){ destroy(null); removeEventListener("enterFrame", nextFrame); return; }; }; render(); lastFrame = getTimer(); }; } private function fade(dt:int):void{ var newOffset:int = (transform.colorTransform.alphaOffset - fadeamt); if (newOffset <= -255){ destroy(null); } else { transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, (transform.colorTransform.alphaOffset - fadeamt)); }; } } }//package graphics
Section 23
//Banner (gui.Banner) package gui { import flash.display.*; import graphics.*; import flash.geom.*; public class Banner extends Bitmap { private var graph:GameGraph; private var speed:Number;// = 0.13 private var nextFrame:int; private var frame:int;// = 0 private static var banner1:GameGraph = new GameGraph(new banner1Class(), 11, 50, 288, 50); private static var banner3:GameGraph = new GameGraph(new banner3Class(), 11, 50, 288, 50); private static var banner2:GameGraph = new GameGraph(new banner2Class(), 11, 50, 288, 50); private static var banner3Class:Class = Banner_banner3Class; private static var banner2Class:Class = Banner_banner2Class; private static var banner1Class:Class = Banner_banner1Class; private static var type:int = 0; public function Banner(){ super(); type++; if (type > 3){ type = 1; }; switch (type){ case 1: graph = banner1; break; case 2: graph = banner2; break; case 3: graph = banner3; break; default: graph = banner1; }; bitmapData = new BitmapData(graph.getW(), graph.getH(), true, 0xFFFFFF); this.x = (0 - width); this.y = 100; nextFrame = graph.getFrameSpeed(); bitmapData.copyPixels(graph.getImage().bitmapData, new Rectangle(0, 0, width, height), new Point()); update(); } public function update(dt:int=1):Banner{ x = (x + (speed * dt)); if (x > 640){ parent.removeChild(this); return (null); }; nextFrame = (nextFrame - dt); if (nextFrame <= 0){ if (++frame >= graph.getFrames()){ frame = 0; }; nextFrame = graph.getFrameSpeed(); bitmapData.copyPixels(graph.getImage().bitmapData, new Rectangle((frame * graph.getW()), 0, width, height), new Point()); }; return (this); } } }//package gui
Section 24
//Banner_banner1Class (gui.Banner_banner1Class) package gui { import mx.core.*; public class Banner_banner1Class extends BitmapAsset { } }//package gui
Section 25
//Banner_banner2Class (gui.Banner_banner2Class) package gui { import mx.core.*; public class Banner_banner2Class extends BitmapAsset { } }//package gui
Section 26
//Banner_banner3Class (gui.Banner_banner3Class) package gui { import mx.core.*; public class Banner_banner3Class extends BitmapAsset { } }//package gui
Section 27
//GraphicNumber (gui.GraphicNumber) package gui { import flash.events.*; import flash.display.*; import graphics.*; import flash.geom.*; import flash.utils.*; public class GraphicNumber extends Bitmap { private var objToMerge:GraphicNumber; public var number:int; private var empty:int; private var graph:GameGraph; private var mark:Boolean; private var rice:Number;// = 0 private var objToHit:DisplayObject; private var lastFrame:int; private var fade:Number;// = 0 private static var colorfulClass:Class = GraphicNumber_colorfulClass; private static var redClass:Class = GraphicNumber_redClass; private static var darkClass:Class = GraphicNumber_darkClass; public static var greenGraph:GameGraph = new GameGraph(new greenClass(), 12, 0); public static var blueGraph:GameGraph = new GameGraph(new blueClass(), 12, 0); private static var greenClass:Class = GraphicNumber_greenClass; public static var darkGraph:GameGraph = new GameGraph(new darkClass(), 12, 0); public static var colorfulGraph:GameGraph = new GameGraph(new colorfulClass(), 12, 0); public static var redGraph:GameGraph = new GameGraph(new redClass(), 12, 0); private static var blueClass:Class = GraphicNumber_blueClass; public function GraphicNumber(x:int, y:int, w:Number, h:Number, number:int, graph:GameGraph, mark:Boolean=false, empty:int=14){ var index:int; var pow:int; var current:int; var dest_x:int; var source:Rectangle; var dest:Point; lastFrame = getTimer(); super(); this.x = x; this.y = y; this.graph = graph; this.mark = mark; this.empty = empty; this.number = number; var length = 1; var temp_num:int = number; while (Math.abs(temp_num) >= 10) { length++; temp_num = (temp_num / 10); }; var n = 2; if (mark){ length++; bitmapData = new BitmapData((length * 40), 40, true, 0xFFFFFF); if (number >= 0){ index = 10; } else { index = 11; }; bitmapData.copyPixels(graph.getImage().bitmapData, new Rectangle((index * graph.getW()), 0, graph.getW(), graph.getH()), new Point()); } else { bitmapData = new BitmapData((length * 40), 40, true, 0xFFFFFF); n--; }; temp_num = Math.abs(number); while (n <= length) { pow = Math.pow(10, (length - n)); current = (temp_num / pow); temp_num = (temp_num - (current * pow)); dest_x = ((current - 1) * redGraph.getW()); if (current == 0){ dest_x = (9 * redGraph.getW()); }; source = new Rectangle(dest_x, 0, greenGraph.getW(), greenGraph.getH()); dest = new Point((((n * graph.getW()) - (empty * n)) - 30), 0); bitmapData.copyPixels(graph.getImage().bitmapData, source, dest, null, null, true); n++; }; this.width = (w * length); this.height = h; addEventListener(Event.ENTER_FRAME, enterFrame); } public function setNumber(number:int):void{ var index:int; var pow:int; var current:int; var dest_x:int; var source:Rectangle; var dest:Point; this.number = number; var length = 1; var temp_num:int = number; while (Math.abs(temp_num) >= 10) { length++; temp_num = (temp_num / 10); }; var n = 2; if (mark){ length++; bitmapData = new BitmapData((length * 40), 40, true, 0xFFFFFF); if (number >= 0){ index = 10; } else { index = 11; }; bitmapData.copyPixels(graph.getImage().bitmapData, new Rectangle((index * graph.getW()), 0, graph.getW(), graph.getH()), new Point()); } else { bitmapData = new BitmapData((length * 40), 40, true, 0xFFFFFF); n--; }; temp_num = Math.abs(number); while (n <= length) { pow = Math.pow(10, (length - n)); current = (temp_num / pow); temp_num = (temp_num - (current * pow)); dest_x = ((current - 1) * redGraph.getW()); if (current == 0){ dest_x = (9 * redGraph.getW()); }; source = new Rectangle(dest_x, 0, greenGraph.getW(), greenGraph.getH()); dest = new Point((((n * graph.getW()) - (empty * n)) - 30), 0); bitmapData.copyPixels(graph.getImage().bitmapData, source, dest, null, null, true); n++; }; } public function getNumber():int{ return (number); } public function startRice(val:Number):void{ rice = val; } private function enterFrame(e:Event):void{ var dt:int = (getTimer() - lastFrame); lastFrame = getTimer(); y = (y - ((rice * dt) / 10)); var newOffset:int = (transform.colorTransform.alphaOffset - fade); if (((!((objToHit == null))) && (this.hitTestObject(objToHit)))){ destroy(); } else { if (((!((objToMerge == null))) && (this.hitTestObject(objToMerge)))){ objToMerge.setNumber((objToMerge.getNumber() + number)); destroy(); } else { if (newOffset <= -255){ destroy(); } else { transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, (transform.colorTransform.alphaOffset - fade)); }; }; }; } public function merge(obj:GraphicNumber):void{ this.objToMerge = obj; } public function hitObject(obj:DisplayObject):void{ this.objToHit = obj; } public function destroy():void{ removeEventListener(Event.ENTER_FRAME, enterFrame); parent.removeChild(this); } public function startFade(val:Number):void{ fade = val; } } }//package gui
Section 28
//GraphicNumber_blueClass (gui.GraphicNumber_blueClass) package gui { import mx.core.*; public class GraphicNumber_blueClass extends BitmapAsset { } }//package gui
Section 29
//GraphicNumber_colorfulClass (gui.GraphicNumber_colorfulClass) package gui { import mx.core.*; public class GraphicNumber_colorfulClass extends BitmapAsset { } }//package gui
Section 30
//GraphicNumber_darkClass (gui.GraphicNumber_darkClass) package gui { import mx.core.*; public class GraphicNumber_darkClass extends BitmapAsset { } }//package gui
Section 31
//GraphicNumber_greenClass (gui.GraphicNumber_greenClass) package gui { import mx.core.*; public class GraphicNumber_greenClass extends BitmapAsset { } }//package gui
Section 32
//GraphicNumber_redClass (gui.GraphicNumber_redClass) package gui { import mx.core.*; public class GraphicNumber_redClass extends BitmapAsset { } }//package gui
Section 33
//Main (gui.Main) package gui { import flash.events.*; import flash.display.*; import graphics.*; import library.*; import Mochi.*; public dynamic class Main extends MovieClip { public var _mochiads_game_id:String;// = "e28df173b5974189" public static var WORLD_W:int; public static var WORLD_H:int; public function Main():void{ super(); if (stage){ init(); } else { addEventListener(Event.ENTER_FRAME, init); }; } private function init(e:Event=null):void{ MochiServices.connect("e28df173b5974189", this); removeEventListener(Event.ENTER_FRAME, init); WORLD_W = 640; WORLD_H = 480; new Engine(WORLD_W, WORLD_H); var lib:Library = new Library(); lib.addEventListener(Event.COMPLETE, libloaded); lib.load(); } private function libloaded(e:Event=null):void{ var element:Element; for each (element in Library.getElements()) { addChild(element); }; } } }//package gui
Section 34
//Preloader (gui.Preloader) package gui { import flash.events.*; import flash.display.*; import flash.utils.*; public class Preloader extends MovieClip { private var bg:Bitmap; private var BG:Class; public function Preloader(){ BG = Preloader_BG; bg = new BG(); super(); addEventListener(Event.ENTER_FRAME, checkFrame); this.graphics.beginBitmapFill(bg.bitmapData); this.graphics.drawRect(0, 0, 640, 480); this.graphics.endFill(); } private function checkFrame(e:Event):void{ if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, checkFrame); startup(); }; } private function startup():void{ stop(); var mainClass:Class = (getDefinitionByName("gui.Main") as Class); addChild((new (mainClass) as DisplayObject)); } } }//package gui
Section 35
//Preloader_BG (gui.Preloader_BG) package gui { import mx.core.*; public class Preloader_BG extends BitmapAsset { } }//package gui
Section 36
//Button (library.Button) package library { import flash.events.*; import flash.display.*; import flash.utils.*; public class Button extends Element { private var downState:DisplayObject; private var button:SimpleButton; private var upState:DisplayObject; private var overState:DisplayObject; public function Button(data:XML){ super(data); upState = getUpState(); overState = getOverState(); downState = getDownState(); button = new SimpleButton(upState, overState, downState, upState); if (data.hasOwnProperty("width")){ button.width = data.width; }; if (data.hasOwnProperty("height")){ button.height = data.height; }; if (data.selected == true){ select(); }; addEventListener(MouseEvent.CLICK, eventListener); addChild(button); } private function getUpState():DisplayObject{ return ((Library.getFile(data.upstate) as DisplayObject)); } private function getOverState():DisplayObject{ return ((Library.getFile(data.overstate) as DisplayObject)); } public function unselect(params:XMLList=null):void{ button.upState = upState; } private function getDownState():DisplayObject{ return ((Library.getFile(data.downstate) as DisplayObject)); } public function select(params:XMLList=null):void{ button.upState = downState; } public function clone(source:Object){ var copier:ByteArray = new ByteArray(); copier.writeObject(source); copier.position = 0; return (copier.readObject()); } } }//package library
Section 37
//Element (library.Element) package library { import flash.events.*; import flash.display.*; import flash.media.*; import flash.net.*; public class Element extends Sprite { private var music:Sound; protected var data:XML; private var musicChannel:SoundChannel; private static var idCounter:int = 0; public function Element(data:XML){ super(); this.data = data; this.x = data.x; this.y = data.y; this.name = data.attribute("id"); if (data.visible == true){ visible = true; } else { visible = false; }; draw(); addEventListeners(); } public function play_music(params:XMLList=null):void{ trace("play"); if ((((params == null)) || ((params[0] == null)))){ return; }; music = (Library.getFile(params[0]) as Sound); if (music == null){ return; }; musicChannel = music.play(0, int.MAX_VALUE); } private function addedToStage(e:Event):void{ if (visible){ stage.addEventListener(KeyboardEvent.KEY_DOWN, keyListener); }; setLayout(); } private function draw():void{ var image:Bitmap = Library.getImage(data.image); if (image == null){ trace((("Image " + data.image) + " not found")); return; }; var bmd:BitmapData = image.bitmapData; this.graphics.beginBitmapFill(bmd); this.graphics.drawRect(0, 0, data.width, data.height); this.graphics.endFill(); } protected function addEventListeners():void{ var event:XML; var trigger:XML; addEventListener(Event.ADDED_TO_STAGE, addedToStage); for each (event in data.event) { for each (trigger in event.trigger) { if (trigger.attribute("type") == "event"){ addEventListener(trigger, eventListener); }; }; }; } public function stop_music(params:XMLList=null):void{ musicChannel.stop(); } private function open_page(params:XMLList=null):void{ var params = params; var url:String = params[0]; var request:URLRequest = new URLRequest(url); navigateToURL(request, "_blank"); //unresolved jump var _slot1 = e; trace("Error occurred!"); } private function setLayout():void{ var layout:String; if (data.layout.length() < 1){ return; }; for each (layout in data.layout) { var _local4 = this; _local4[layout](); }; } public function bring_to_top(params:XMLList=null):void{ this.parent.setChildIndex(this, (this.parent.numChildren - 1)); } public function eventListener(e:Event):void{ var event:XML; var target:String; var obj:Element; var action:String; if (!visible){ return; }; for each (event in data.event) { if ((((event.trigger.attribute("type") == "event")) && ((event.trigger == e.type)))){ for each (target in event.target) { obj = Library.getElement(target); if (obj == null){ trace("Non existing target:", target); return; }; for each (action in event.action) { var _local12 = obj; _local12[action](event.action.attributes()); }; }; }; }; } public function keyListener(e:KeyboardEvent):void{ var event:XML; var target:String; var obj:DisplayObject; var action:String; if (!visible){ return; }; for each (event in data.event) { if ((((event.trigger.attribute("type") == "key")) && ((event.trigger == e.keyCode)))){ for each (target in event.target) { obj = Library.getElement(target); for each (action in event.action) { var _local12 = obj; _local12[action](event.action.attributes()); }; }; }; }; } public function center(params:XMLList=null):void{ if (stage == null){ trace("Gump must have a parent before centering"); return; }; this.x = ((stage.width / 2) - (this.width / 2)); this.y = ((stage.height / 2) - (this.height / 2)); } public function close(params:XMLList=null):void{ if (parent != null){ stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyListener); }; visible = false; if (musicChannel != null){ musicChannel.stop(); }; dispatchEvent(new Event("close")); } public function open(params:XMLList=null):void{ if (parent != null){ stage.addEventListener(KeyboardEvent.KEY_DOWN, keyListener); }; visible = true; dispatchEvent(new Event("open")); } public function play_sound(params:XMLList=null):void{ if ((((params == null)) || ((params[0] == null)))){ return; }; var sound:Sound = (Library.getFile(params[0]) as Sound); if (sound == null){ return; }; var soundChannel:SoundChannel = sound.play(0, 1); } public function getElement(id:String):Element{ if (this.name == id){ return (this); }; return ((this.getChildByName(id) as Element)); } public static function loadElements(data:XML):Array{ var element:XML; var type:String; var id:String; var elements:Array = new Array(); for each (element in data.children()) { type = element.name().localName; id = element.attribute("id"); if (id == ""){ id = String(idCounter++); }; if (type == "gump"){ elements[id] = new Gump(element); } else { if (type == "movie"){ elements[id] = new Movie(element); } else { if (type == "button"){ elements[id] = new Button(element); } else { if (type == "hs_button"){ elements[id] = new HSButton(element); } else { if (type == "game"){ elements[id] = new GameScreen(element); }; }; }; }; }; }; return (elements); } } }//package library
Section 38
//Files (library.Files) package library { import flash.events.*; import flash.display.*; public class Files extends EventDispatcher { private const subdir:String = "meta/"; public var movies:Array; private var files:int; public var images:Array; public var xmls:Array; private static var START:Class = Files_START; private static var PLAYMORE:Class = Files_PLAYMORE; private static var PLAYMORE3:Class = Files_PLAYMORE3; private static var INTRO:Class = Files_INTRO; private static var PLAYMORE2:Class = Files_PLAYMORE2; private static var LBMO:Class = Files_LBMO; private static var ENDMENU:Class = Files_ENDMENU; private static var MENU:Class = Files_MENU; private static var PLAYMOREMO2:Class = Files_PLAYMOREMO2; private static var PLAYMOREMO3:Class = Files_PLAYMOREMO3; private static var PLAYMOREMO:Class = Files_PLAYMOREMO; private static var LB:Class = Files_LB; private static var ELEMENTS:Class = Files_ELEMENTS; private static var STICKPAGE:Class = Files_STICKPAGE; public function Files(){ super(); images = new Array(); xmls = new Array(); movies = new Array(); } public function getImage(name:String):BitmapData{ return (images[name]); } public function getFile(name:String):Object{ var file:Object = images[name]; if (file == null){ file = xmls[name]; }; if (file == null){ file = movies[name]; }; return (file); } public function load():void{ images["Alkuruutu08.jpg"] = new START(); images["Alkulaatikko08.png"] = new MENU(); images["Loppulaatikko01.png"] = new ENDMENU(); images["LeaderBoards_MO_01.png"] = new LBMO(); images["LeaderBoards01.png"] = new LB(); images["Play_More_Mo.png"] = new PLAYMOREMO(); images["Play_More01.png"] = new PLAYMORE(); images["Play_More_Mo2.png"] = new PLAYMOREMO2(); images["Play_More01_2.png"] = new PLAYMORE2(); images["Play_More_Mo3.png"] = new PLAYMOREMO3(); images["Play_More01_3.png"] = new PLAYMORE3(); images["stickpage.png"] = new STICKPAGE(); xmls["elements.xml"] = new XML(new ELEMENTS()); movies["Intro.swf"] = new INTRO(); dispatchEvent(new Event(Event.COMPLETE)); } } }//package library
Section 39
//Files_ELEMENTS (library.Files_ELEMENTS) package library { import mx.core.*; public class Files_ELEMENTS extends ByteArrayAsset { } }//package library
Section 40
//Files_ENDMENU (library.Files_ENDMENU) package library { import mx.core.*; public class Files_ENDMENU extends BitmapAsset { } }//package library
Section 41
//Files_INTRO (library.Files_INTRO) package library { import mx.core.*; import flash.utils.*; public class Files_INTRO extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Files_INTRO(){ dataClass = Files_INTRO_dataClass; super(); initialWidth = (0x3200 / 20); initialHeight = (9600 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package library
Section 42
//Files_INTRO_dataClass (library.Files_INTRO_dataClass) package library { import mx.core.*; public class Files_INTRO_dataClass extends ByteArrayAsset { } }//package library
Section 43
//Files_LB (library.Files_LB) package library { import mx.core.*; public class Files_LB extends BitmapAsset { } }//package library
Section 44
//Files_LBMO (library.Files_LBMO) package library { import mx.core.*; public class Files_LBMO extends BitmapAsset { } }//package library
Section 45
//Files_MENU (library.Files_MENU) package library { import mx.core.*; public class Files_MENU extends BitmapAsset { } }//package library
Section 46
//Files_PLAYMORE (library.Files_PLAYMORE) package library { import mx.core.*; public class Files_PLAYMORE extends BitmapAsset { } }//package library
Section 47
//Files_PLAYMORE2 (library.Files_PLAYMORE2) package library { import mx.core.*; public class Files_PLAYMORE2 extends BitmapAsset { } }//package library
Section 48
//Files_PLAYMORE3 (library.Files_PLAYMORE3) package library { import mx.core.*; public class Files_PLAYMORE3 extends BitmapAsset { } }//package library
Section 49
//Files_PLAYMOREMO (library.Files_PLAYMOREMO) package library { import mx.core.*; public class Files_PLAYMOREMO extends BitmapAsset { } }//package library
Section 50
//Files_PLAYMOREMO2 (library.Files_PLAYMOREMO2) package library { import mx.core.*; public class Files_PLAYMOREMO2 extends BitmapAsset { } }//package library
Section 51
//Files_PLAYMOREMO3 (library.Files_PLAYMOREMO3) package library { import mx.core.*; public class Files_PLAYMOREMO3 extends BitmapAsset { } }//package library
Section 52
//Files_START (library.Files_START) package library { import mx.core.*; public class Files_START extends BitmapAsset { } }//package library
Section 53
//Files_STICKPAGE (library.Files_STICKPAGE) package library { import mx.core.*; public class Files_STICKPAGE extends BitmapAsset { } }//package library
Section 54
//GameScreen (library.GameScreen) package library { import flash.events.*; import flash.display.*; import graphics.*; import game.*; import flash.geom.*; import gui.*; import flash.utils.*; import flash.media.*; import flash.text.*; public class GameScreen extends Element { private var scoreClass:Class; private var pdleft:GraphicNumber; private var bgGraph:GameGraph; private var pu1graph:GameGraph; private var pdleftGraph:Bitmap; private var inverseworldGraph:GameGraph; private var pu6graph:GameGraph; private var pu4class:Class; private var music:Sound; private var puleftGraph:Bitmap; private var banner:Banner; private var paused:Boolean;// = true private var effectChannel:SoundChannel; private var bgClass:Class; private var soundON:Class; private var inverseworldClass:Class; private var pu1class:Class; private var pdleftClass:Class; private var pu3graph:GameGraph; private var pu6class:Class; private var puleftClass:Class; private var swampGraph:GameGraph; private var musicClass:Class; private var lastBanner:int;// = 10 private var rotated:Number;// = -1.3 private var pu3class:Class; private var muted:Boolean; private var rotMatrix:Matrix; private var slowmovementGraph:GameGraph; private var started:Boolean;// = false private var pu5graph:GameGraph; private var jumpSound:Sound; private var puleft:GraphicNumber; private var lastRotate:int;// = 0 private var lastRound:int; private var scoresPerJumpNum:GraphicNumber; private var spjGraph:Bitmap; private var scoresNum:GraphicNumber; private var slowmovementClass:Class; private var muteButton:SimpleButton; private var pu5class:Class; private var pu2graph:GameGraph; private var highercenterGraph:GameGraph; private var spjClass:Class; private var _game:Game; private var pu2class:Class; private var scoreGraph:Bitmap; private var swampImageClass:Class; private var pu4graph:GameGraph; private var soundOFF:Class; private var parameters:Array; private var rotatePerRound:Number;// = -0.001 private var jumpClass:Class; private var highercenterClass:Class; private var soundChannel:SoundChannel; public static var textForm:TextFormat; public static var w:int = 640; public static var h:int = 480; public function GameScreen(data:XML){ parameters = new Array(); rotMatrix = new Matrix(); bgClass = GameScreen_bgClass; bgGraph = new GameGraph(new bgClass(), 1, 40); musicClass = GameScreen_musicClass; jumpClass = GameScreen_jumpClass; swampImageClass = GameScreen_swampImageClass; swampGraph = new GameGraph(new swampImageClass(), 1, 0); soundON = GameScreen_soundON; soundOFF = GameScreen_soundOFF; spjClass = GameScreen_spjClass; spjGraph = new spjClass(); scoreClass = GameScreen_scoreClass; scoreGraph = new scoreClass(); puleftClass = GameScreen_puleftClass; puleftGraph = new puleftClass(); pdleftClass = GameScreen_pdleftClass; pdleftGraph = new pdleftClass(); slowmovementClass = GameScreen_slowmovementClass; slowmovementGraph = new GameGraph(new slowmovementClass()); highercenterClass = GameScreen_highercenterClass; highercenterGraph = new GameGraph(new highercenterClass()); inverseworldClass = GameScreen_inverseworldClass; inverseworldGraph = new GameGraph(new inverseworldClass()); pu1class = GameScreen_pu1class; pu1graph = new GameGraph(new pu1class()); pu2class = GameScreen_pu2class; pu2graph = new GameGraph(new pu2class()); pu3class = GameScreen_pu3class; pu3graph = new GameGraph(new pu3class()); pu4class = GameScreen_pu4class; pu4graph = new GameGraph(new pu4class()); pu5class = GameScreen_pu5class; pu5graph = new GameGraph(new pu5class()); pu6class = GameScreen_pu6class; pu6graph = new GameGraph(new pu6class()); initGame(); initText(); initSound(); super(data); addChild(Engine.getInstance()); drawBG(1); var swamps:GraphicObject = new GraphicObject(swampGraph, 0, 367); Engine.getInstance().nextFrame(1); setBorders(); } private function setBorders():void{ scoreGraph.x = 180; scoreGraph.y = 17; addChild(scoreGraph); scoresNum = new GraphicNumber(305, 17, 20, 20, 0, GraphicNumber.greenGraph, false, 14); addChild(scoresNum); spjGraph.x = 146; spjGraph.y = 47; addChild(spjGraph); scoresPerJumpNum = new GraphicNumber(305, 47, 20, 20, 10, GraphicNumber.blueGraph, false, 14); addChild(scoresPerJumpNum); puleftGraph.x = 446; puleftGraph.y = 47; puleftGraph.visible = false; addChild(puleftGraph); puleft = new GraphicNumber(((puleftGraph.x + puleftGraph.width) + 12), puleftGraph.y, 20, 20, 0, GraphicNumber.colorfulGraph, false, 14); puleft.visible = false; addChild(puleft); pdleftGraph.x = 413; pdleftGraph.y = 77; pdleftGraph.visible = false; addChild(pdleftGraph); pdleft = new GraphicNumber(((pdleftGraph.x + pdleftGraph.width) + 12), pdleftGraph.y, 20, 20, 0, GraphicNumber.darkGraph, false, 14); pdleft.visible = false; addChild(pdleft); var muteImage:Bitmap = new soundOFF(); var muteImage2:Bitmap = new soundON(); muteButton = new SimpleButton(muteImage, muteImage, muteImage, muteImage2); muteButton.addEventListener("click", mute); muteButton.x = 50; muteButton.y = 10; addChild(muteButton); var bg:Bitmap = new bgClass(); } public function restart(data:XMLList=null):void{ scoresNum.setNumber(0); scoresPerJumpNum.setNumber(10); puleft.visible = false; puleftGraph.visible = false; pdleft.visible = false; pdleftGraph.visible = false; resume(); } private function mute(event:Event):void{ var muteImage:Bitmap = new soundOFF(); var muteImage2:Bitmap = new soundON(); if (muted == false){ muted = true; muteButton.upState = muteImage2; muteButton.overState = muteImage2; muteButton.downState = muteImage2; soundChannel.stop(); } else { muted = false; muteButton.upState = muteImage; muteButton.overState = muteImage; muteButton.downState = muteImage; soundChannel = music.play(0, 999); }; } public function set_parameter(params:XMLList=null):void{ parameters[params[0]] = params[1]; } private function powerdown(event:Event):void{ var graph:GameGraph; pdleftGraph.visible = true; pdleft.visible = true; switch (_game.getPowerDownType()){ case 0: graph = inverseworldGraph; break; case 1: graph = slowmovementGraph; break; case 2: graph = highercenterGraph; break; default: graph = inverseworldGraph; }; var obj:GraphicObject = new GraphicObject(graph, ((w / 2) - (graph.getW() / 2)), 100, 0, 0, true); obj.getImage().startFade(3); pdleft.setNumber(_game.getPowerDownLeft()); } public function resume(params:XMLList=null):void{ paused = false; } private function initGame():void{ _game = new Game(this); _game.addEventListener("ScoresChanged", showScores); _game.addEventListener("ObstacleTouched", hitObstacle); _game.addEventListener("WentOver", overObstacle); _game.addEventListener("Powerup", powerup); _game.addEventListener("Powerdown", powerdown); _game.addEventListener("Flip", flip); } override public function open(params:XMLList=null):void{ super.open(); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); if (!started){ start(); }; paused = false; } private function hitObstacle(event:Event):void{ var num:GraphicNumber = new GraphicNumber(295, 210, 20, 20, -10, GraphicNumber.redGraph, true, 14); num.startRice(2.6); num.merge(scoresPerJumpNum); addChild(num); } private function initText():void{ textForm = new TextFormat(); textForm.size = 14; textForm.bold = true; textForm.font = "comic sans ms"; } private function powerup(event:Event):void{ var graph:GameGraph; puleftGraph.visible = true; puleft.visible = true; switch (_game.getPowerUpType()){ case 0: graph = pu1graph; break; case 1: graph = pu2graph; break; case 2: graph = pu3graph; break; case 3: graph = pu4graph; break; case 4: graph = pu5graph; break; case 5: graph = pu6graph; break; default: graph = pu1graph; }; var obj:GraphicObject = new GraphicObject(graph, ((w / 2) - (graph.getW() / 2)), 100, 0, 0, true); obj.getImage().startFade(3); puleft.setNumber(_game.getPowerUpLeft()); } public function flip(e:Event=null):void{ var temp_matrix:Matrix = this.transform.matrix.clone(); temp_matrix.translate((-640 / 2), (-480 / 2)); temp_matrix.rotate(Math.PI); temp_matrix.translate((640 / 2), (480 / 2)); this.transform.matrix = temp_matrix; } public function start(params:XMLList=null):void{ addEventListener(Event.ENTER_FRAME, onFrame); started = true; } private function overObstacle(event:Event):void{ var num:GraphicNumber = new GraphicNumber(295, 210, 20, 20, 10, GraphicNumber.blueGraph, true, 14); num.startRice(3.3); num.merge(scoresPerJumpNum); addChild(num); if (--lastBanner == 0){ lastBanner = 10; banner = new Banner(); addChild(banner); }; } private function drawBG(dt:int):void{ rotated = (rotated + (rotatePerRound * dt)); rotated = (rotated % (2 * Math.PI)); rotMatrix.translate((-(bgGraph.getImage().width) / 2), (-(bgGraph.getImage().height) / 2)); rotMatrix.rotate(rotatePerRound); rotMatrix.translate((bgGraph.getImage().width / 2), (bgGraph.getImage().height / 2)); rotMatrix.translate(-455, -120); Engine.getInstance().getBG().bitmapData.draw(bgGraph.getImage().bitmapData, rotMatrix, null, null, new Rectangle(0, 0, 640, 480)); rotMatrix.translate(455, 120); } private function showScores(event:Event):void{ var num:GraphicNumber = new GraphicNumber((_game.getJumperX() - 20), (_game.getJumperY() - 50), 20, 20, _game.getScoresPerJump(), GraphicNumber.greenGraph, true, 14); num.startRice(0.5); num.startFade(5); effectChannel = jumpSound.play(0, 1); addChild(num); scoresNum.setNumber(_game.getScores()); puleft.setNumber(_game.getPowerUpLeft()); if (puleft.getNumber() == 0){ puleft.visible = false; puleftGraph.visible = false; }; pdleft.setNumber(_game.getPowerDownLeft()); if (pdleft.getNumber() == 0){ pdleft.visible = false; pdleftGraph.visible = false; }; } private function onKeyUp(event:KeyboardEvent):void{ if (event.keyCode == 39){ _game.stopMovingRight(); }; if (event.keyCode == 37){ _game.stopMovingLeft(); }; } private function onKeyDown(event:KeyboardEvent):void{ if (!paused){ if (event.keyCode == 39){ _game.moveRight(); }; if (event.keyCode == 37){ _game.moveLeft(); }; }; } override protected function addEventListeners():void{ var event:XML; var trigger:XML; super.addEventListeners(); for each (event in data.event) { for each (trigger in event.trigger) { if (trigger.attribute("type") == "event"){ _game.addEventListener(trigger, eventListener); }; }; }; } private function onFrame(e:Event=null):void{ var dtime:int = (getTimer() - lastRound); lastRound = getTimer(); if (dtime > 100){ return; }; if (((!(paused)) && (started))){ Engine.getInstance().bitmapData.lock(); lastRotate++; if (lastRotate == 1){ drawBG(dtime); lastRotate = 0; } else { Engine.getInstance().clear(); }; _game.act(dtime); Engine.getInstance().nextFrame(dtime); Engine.getInstance().bitmapData.unlock(); }; } private function initSound():void{ music = new musicClass(); jumpSound = new jumpClass(); soundChannel = music.play(0, 999); } override public function close(params:XMLList=null):void{ super.close(); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); paused = true; } public function pause(params:XMLList=null):void{ paused = true; } } }//package library
Section 55
//GameScreen_bgClass (library.GameScreen_bgClass) package library { import mx.core.*; public class GameScreen_bgClass extends BitmapAsset { } }//package library
Section 56
//GameScreen_highercenterClass (library.GameScreen_highercenterClass) package library { import mx.core.*; public class GameScreen_highercenterClass extends BitmapAsset { } }//package library
Section 57
//GameScreen_inverseworldClass (library.GameScreen_inverseworldClass) package library { import mx.core.*; public class GameScreen_inverseworldClass extends BitmapAsset { } }//package library
Section 58
//GameScreen_jumpClass (library.GameScreen_jumpClass) package library { import mx.core.*; public class GameScreen_jumpClass extends SoundAsset { } }//package library
Section 59
//GameScreen_musicClass (library.GameScreen_musicClass) package library { import mx.core.*; public class GameScreen_musicClass extends SoundAsset { } }//package library
Section 60
//GameScreen_pdleftClass (library.GameScreen_pdleftClass) package library { import mx.core.*; public class GameScreen_pdleftClass extends BitmapAsset { } }//package library
Section 61
//GameScreen_pu1class (library.GameScreen_pu1class) package library { import mx.core.*; public class GameScreen_pu1class extends BitmapAsset { } }//package library
Section 62
//GameScreen_pu2class (library.GameScreen_pu2class) package library { import mx.core.*; public class GameScreen_pu2class extends BitmapAsset { } }//package library
Section 63
//GameScreen_pu3class (library.GameScreen_pu3class) package library { import mx.core.*; public class GameScreen_pu3class extends BitmapAsset { } }//package library
Section 64
//GameScreen_pu4class (library.GameScreen_pu4class) package library { import mx.core.*; public class GameScreen_pu4class extends BitmapAsset { } }//package library
Section 65
//GameScreen_pu5class (library.GameScreen_pu5class) package library { import mx.core.*; public class GameScreen_pu5class extends BitmapAsset { } }//package library
Section 66
//GameScreen_pu6class (library.GameScreen_pu6class) package library { import mx.core.*; public class GameScreen_pu6class extends BitmapAsset { } }//package library
Section 67
//GameScreen_puleftClass (library.GameScreen_puleftClass) package library { import mx.core.*; public class GameScreen_puleftClass extends BitmapAsset { } }//package library
Section 68
//GameScreen_scoreClass (library.GameScreen_scoreClass) package library { import mx.core.*; public class GameScreen_scoreClass extends BitmapAsset { } }//package library
Section 69
//GameScreen_slowmovementClass (library.GameScreen_slowmovementClass) package library { import mx.core.*; public class GameScreen_slowmovementClass extends BitmapAsset { } }//package library
Section 70
//GameScreen_soundOFF (library.GameScreen_soundOFF) package library { import mx.core.*; public class GameScreen_soundOFF extends BitmapAsset { } }//package library
Section 71
//GameScreen_soundON (library.GameScreen_soundON) package library { import mx.core.*; public class GameScreen_soundON extends BitmapAsset { } }//package library
Section 72
//GameScreen_spjClass (library.GameScreen_spjClass) package library { import mx.core.*; public class GameScreen_spjClass extends BitmapAsset { } }//package library
Section 73
//GameScreen_swampImageClass (library.GameScreen_swampImageClass) package library { import mx.core.*; public class GameScreen_swampImageClass extends BitmapAsset { } }//package library
Section 74
//Gump (library.Gump) package library { public class Gump extends Element { private var events:Array; private var children:Array; public function Gump(data:XML){ events = new Array(); children = new Array(); super(data); addChildren(); } private function addChildren():void{ var element:Element; children = Element.loadElements(data); for each (element in children) { addChild(element); }; } override public function getElement(id:String):Element{ var elem:Element; var child:Element; if (this.name == id){ return (this); }; for each (child in children) { elem = child.getElement(id); if (elem != null){ return (elem); }; }; return (null); } public function getGump(id:String):Gump{ if (this.name == id){ return (this); }; return ((this.getChildByName(id) as Gump)); } public static function loadGumps(data:XML):Array{ var gump:XML; var gumps:Array = new Array(); for each (gump in data.gump) { gumps[gump.id] = new Gump(gump); }; return (gumps); } } }//package library
Section 75
//HSButton (library.HSButton) package library { import flash.events.*; import game.*; import Mochi.*; public class HSButton extends Button { public function HSButton(data:XML){ super(data); addEventListener("click", openLeaderBoards); } private function openLeaderBoards(e:Event=null):void{ MochiScores.showLeaderboard({boardID:"e88060368ff4a87d", score:Game.last_scores, onClose:removeLeaderBoards, res:"640x480"}); this.visible = false; } private function removeLeaderBoards(e:Event=null):void{ } } }//package library
Section 76
//Library (library.Library) package library { import flash.events.*; import flash.display.*; public class Library extends EventDispatcher { private static var entities:Array; private static var elements:Array; private static var files:Files; public function Library(){ super(); entities = new Array(); elements = new Array(); } private function ready(e:Event):void{ var data:XML; var element:Element; for each (data in getXMLs()) { for each (element in Element.loadElements(data)) { elements.push(element); }; }; dispatchEvent(new Event(Event.COMPLETE)); } public function load(e:Event=null):void{ files = new Files(); files.addEventListener(Event.COMPLETE, ready); files.load(); } public static function getImage(name:String):Bitmap{ if (files.images[name] == null){ return (null); }; return (files.images[name]); } public static function getElement(id:String):Element{ var element:Element; var result:Element; for each (element in elements) { result = element.getElement(id); if (result != null){ return (result); }; }; return (null); } public static function getXML(name:String):XML{ return (new XML(files.xmls[name].data)); } public static function getElements():Array{ return (elements); } public static function getFile(name:String):Object{ return (files.getFile(name)); } public static function getXMLs():Array{ var xml:XML; var xmls:Array = new Array(); for each (xml in files.xmls) { xmls.push(xml); }; return (xmls); } public static function getMovie(name:String):DisplayObject{ var movie:MovieClip = files.movies[name]; if (movie == null){ return (null); }; return (movie); } } }//package library
Section 77
//Movie (library.Movie) package library { import flash.events.*; import flash.display.*; public class Movie extends Element { private var movie:MovieClip; private var frameCounter:int;// = 0 public function Movie(data:XML){ super(data); movie = (Library.getMovie(data.file) as MovieClip); movie.addEventListener(Event.ENTER_FRAME, enterFrame); addChild(Library.getMovie(data.file)); } private function enterFrame(e:Event):void{ frameCounter++; if (frameCounter == 120){ dispatchEvent(new Event(Event.COMPLETE)); }; } override public function close(params:XMLList=null):void{ super.close(); movie.stop(); movie.removeEventListener(Event.ENTER_FRAME, enterFrame); } override public function open(params:XMLList=null):void{ super.open(); movie.play(); movie.addEventListener(Event.ENTER_FRAME, enterFrame); } } }//package library
Section 78
//MochiDigits (Mochi.MochiDigits) package Mochi { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(digit:Number=0, index:uint=0):void{ super(); Encoder = 0; setValue(digit, index); } public function reencode():void{ var newEncode:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (newEncode ^ Encoder)); Encoder = newEncode; } public function set value(v:Number):void{ setValue(v); } public function toString():String{ var s:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ s = (s + Sibling.toString()); }; return (s); } public function setValue(digit:Number=0, index:uint=0):void{ var s:String = digit.toString(); var _temp1 = index; index = (index + 1); Fragment = (s.charCodeAt(_temp1) ^ Encoder); if (index < s.length){ Sibling = new MochiDigits(digit, index); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(inc:Number):void{ value = (value + inc); } } }//package Mochi
Section 79
//MochiScores (Mochi.MochiScores) package Mochi { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public function MochiScores(){ super(); } public static function showLeaderboard(options:Object=null):void{ var n:Number; var options = options; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(callbackObj:Object, callbackMethod:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod); } public static function requestList(callbackObj:Object, callbackMethod:Object=null):void{ MochiServices.send("scores_requestList", null, callbackObj, callbackMethod); } public static function scoresArrayToObjects(scores:Object):Object{ var i:Number; var j:Number; var o:Object; var row_obj:Object; var item:String; var param:String; var so:Object = {}; for (item in scores) { if (typeof(scores[item]) == "object"){ if (((!((scores[item].cols == null))) && (!((scores[item].rows == null))))){ so[item] = []; o = scores[item]; j = 0; while (j < o.rows.length) { row_obj = {}; i = 0; while (i < o.cols.length) { row_obj[o.cols[i]] = o.rows[j][i]; i++; }; so[item].push(row_obj); j++; }; } else { so[item] = {}; for (param in scores[item]) { so[item][param] = scores[item][param]; }; }; } else { so[item] = scores[item]; }; }; return (so); } public static function submit(score:Number, name:String, callbackObj:Object=null, callbackMethod:Object=null):void{ score = Number(score); if (isNaN(score)){ trace((("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((score == Number.NEGATIVE_INFINITY)) || ((score == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(score) != score){ trace((("WARNING: Submitted score '" + String(score)) + "' will be truncated")); }; score = Number(score); }; }; MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod); } public static function onClose(args:Object=null):void{ if (args != null){ if (args.error != null){ if (args.error == true){ if (onErrorHandler != null){ if (args.errorCode == null){ args.errorCode = "IOError"; }; onErrorHandler(args.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(boardID:String):void{ MochiScores.boardID = boardID; MochiServices.send("scores_setBoardID", {boardID:boardID}); } } }//package Mochi
Section 80
//MochiServices (Mochi.MochiServices) package Mochi { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public function MochiServices(){ super(); } public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(methodName:String, args:Object=null, callbackObject:Object=null, callbackMethod:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(args, callbackObject, callbackMethod); flush(true); return; }; _clip._queue.push({methodName:methodName, args:args, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(error:Boolean):void{ var request:Object; var callback:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { request = _clip._queue.shift(); callback = null; if (request != null){ if (request.callbackID != null){ callback = _clip._callbacks[request.callbackID]; }; delete _clip._callbacks[request.callbackID]; if (((error) && (!((callback == null))))){ handleError(request.args, callback.callbackObject, callback.callbackMethod); }; }; }; }; }; } private static function clickMovie(url:String, cb:Function):MovieClip{ var b:int; var loader:Loader; var avm1_bytecode:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var header:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var footer:Array = [0, 64, 0, 0, 0]; var mc:MovieClip = new MovieClip(); var lc:LocalConnection = new LocalConnection(); var lc_name:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); lc = new LocalConnection(); mc.lc = lc; mc.click = cb; lc.client = mc; lc.connect(lc_name); var ba:ByteArray = new ByteArray(); var cpool:ByteArray = new ByteArray(); cpool.endian = Endian.LITTLE_ENDIAN; cpool.writeShort(1); cpool.writeUTFBytes(((url + " ") + lc_name)); cpool.writeByte(0); var actionLength:uint = ((avm1_bytecode.length + cpool.length) + 4); var fileLength:uint = (actionLength + 35); ba.endian = Endian.LITTLE_ENDIAN; ba.writeUTFBytes("FWS"); ba.writeByte(8); ba.writeUnsignedInt(fileLength); for each (b in header) { ba.writeByte(b); }; ba.writeUnsignedInt(actionLength); ba.writeByte(136); ba.writeShort(cpool.length); ba.writeBytes(cpool); for each (b in avm1_bytecode) { ba.writeByte(b); }; for each (b in footer) { ba.writeByte(b); }; loader = new Loader(); loader.loadBytes(ba); mc.addChild(loader); return (mc); } private static function init(id:String, clip:Object):void{ _id = id; if (clip != null){ _container = clip; loadCommunicator(id, _container); }; } public static function get childClip():Object{ return (_clip); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = url; var burl = burl; var btn = btn; var onClick = onClick; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (url:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(url, onClick); var rect:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = rect.x; avm1Click.y = rect.y; avm1Click.scaleX = (0.01 * rect.width); avm1Click.scaleY = (0.01 * rect.height); }; err = function (ev:Object):void{ netup = false; ev.target.removeEventListener(ev.type, arguments.callee); setURL(burl); }; complete = function (ev:Object):void{ ev.target.removeEventListener(ev.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); _listenChannel.close(); //unresolved jump var _slot1 = error; }; if (_timer != null){ _timer.stop(); //unresolved jump var _slot1 = error; }; } public static function allowDomains(server:String):String{ var hostname:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (server.indexOf("http://") != -1){ hostname = server.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; }; return (hostname); } public static function getVersion():String{ return ("1.43"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(event:StatusEvent):void{ switch (event.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(clip:Object):Object{ var pairs:Array; var i:Number; var kv:Array; var opts:Object = {}; var options:String = clip.loaderInfo.parameters.mochiad_options; if (options){ pairs = options.split("&"); i = 0; while (i < pairs.length) { kv = pairs[i].split("="); opts[unescape(kv[0])] = unescape(kv[1]); i++; }; }; return (opts); } public static function setContainer(container:Object=null, doAdd:Boolean=true):void{ if (container != null){ if ((container is Sprite)){ _container = container; }; }; if (doAdd){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(args:Object, callbackObject:Object, callbackMethod:Object):void{ var args = args; var callbackObject = callbackObject; var callbackMethod = callbackMethod; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ var _local5 = callbackObject; _local5[callbackMethod](args); //unresolved jump var _slot1 = error; } else { if (callbackMethod != null){ callbackMethod.apply(args); //unresolved jump var _slot1 = error; }; }; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (pkg:Object):void{ var methodName:String; var pkg = pkg; var cb:String = pkg.callbackID; var cblst:Object = this.client._callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ method.apply(obj, pkg.args); //unresolved jump var _slot1 = error; trace(((("Error invoking callback method '" + methodName) + "': ") + pkg.toString())); } else { if (obj != null){ obj(pkg.args); //unresolved jump var _slot1 = error; trace(("Error invoking method on object: " + pkg.toString())); }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; trace("connected!"); _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (args:Object):void{ MochiServices.comChannelName = args.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } public static function set comChannelName(val:String):void{ if (val != null){ if (val.length > 3){ _sendChannelName = (val + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(id:String, clip:Object):MovieClip{ var id = id; var clip = clip; var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); var f:Function = function (ev:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var req:URLRequest = new URLRequest(_servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; req.data = vars; _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function get clip():Object{ return (_container); } public static function bringToTop(e:Event):void{ var e = e; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; //unresolved jump var _slot1 = errorObject; trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connect(id:String, clip:Object, onError:Object=null):void{ var id = id; var clip = clip; var onError = onError; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (errorCode:String):void{ trace(errorCode); }; }; }; } public static function createEmptyMovieClip(parent:Object, name:String, depth:Number, doAdd:Boolean=true):MovieClip{ var parent = parent; var name = name; var depth = depth; var doAdd = doAdd; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; parent[name] = mc; //unresolved jump var _slot1 = e; throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); mc["_name"] = name; return (mc); } public static function connectWait(e:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _timer.stop(); }; } } }//package Mochi
Section 81
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.2.0.3958"; public function BitmapAsset(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ super(bitmapData, pixelSnapping, smoothing); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } } }//package mx.core
Section 82
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; public function ByteArrayAsset(){ super(); } } }//package mx.core
Section 83
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){ super(); this.left = left; this.top = top; this.right = right; this.bottom = bottom; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 84
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexBitmap(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ var bitmapData = bitmapData; var pixelSnapping = pixelSnapping; var smoothing = smoothing; super(bitmapData, pixelSnapping, smoothing); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 85
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexMovieClip(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 86
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 87
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 88
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(void:Point):Point; function get name():String; function set width(flash.display:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(flash.display:String):void; function set scaleX(flash.display:Number):void; function set scaleY(flash.display:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(flash.display:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(void:Point):Point; function get height():Number; function set blendMode(flash.display:String):void; function get parent():DisplayObjectContainer; function getBounds(String:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(flash.display:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(flash.display:Number):void; function set accessibilityProperties(flash.display:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(flash.display:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(flash.display:Number):void; function set mask(flash.display:DisplayObject):void; function getRect(String:DisplayObject):Rectangle; function get alpha():Number; function set transform(flash.display:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean; function set opaqueBackground(flash.display:Object):void; function set visible(flash.display:Boolean):void; function get mask():DisplayObject; function set x(flash.display:Number):void; function set y(flash.display:Number):void; function get transform():Transform; function set filters(flash.display:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(flash.display:Number):void; function get stage():Stage; } }//package mx.core
Section 89
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get isDocument():Boolean; function set repeaters(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function initializeRepeaterArrays(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 90
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public function MovieClipAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 91
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public function MovieClipLoaderAsset(){ super(); var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in loaderContext)){ loaderContext["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, loaderContext); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(value:Number):void{ if (!initialized){ requestedWidth = value; } else { loader.width = value; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(event:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(event); } override public function set height(value:Number):void{ if (!initialized){ requestedHeight = value; } else { loader.height = value; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 92
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 93
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; public function SoundAsset(){ super(); } } }//package mx.core
Section 94
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.2.0.3958"; private static var counter:int = 0; public function NameUtil(){ super(); } public static function displayObjectToString(displayObject:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = displayObject; o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; //unresolved jump var _slot1 = e; return (result); } public static function createUniqueName(object:Object):String{ if (!object){ return (null); }; var name:String = getQualifiedClassName(object); var index:int = name.indexOf("::"); if (index != -1){ name = name.substr((index + 2)); }; var charCode:int = name.charCodeAt((name.length - 1)); if ((((charCode >= 48)) && ((charCode <= 57)))){ name = (name + "_"); }; return ((name + counter++)); } } }//package mx.utils

Library Items

Symbol 1 Bitmap {gui.Preloader_BG}
Symbol 2 Sound {library.GameScreen_jumpClass} [library.GameScreen_jumpClass]
Symbol 3 Sound {library.GameScreen_musicClass} [library.GameScreen_musicClass]
Symbol 4 Bitmap {game.NegaBonus_imageClass}
Symbol 5 Bitmap {game.Dude_jumpLeftClass}
Symbol 6 Bitmap {library.GameScreen_swampImageClass}
Symbol 7 Bitmap {gui.GraphicNumber_redClass}
Symbol 8 Bitmap {gui.Banner_banner1Class}
Symbol 9 Bitmap {library.GameScreen_soundOFF}
Symbol 10 Bitmap {library.GameScreen_pu2class}
Symbol 11 Bitmap {library.Files_LBMO}
Symbol 12 Bitmap {library.GameScreen_slowmovementClass}
Symbol 13 Bitmap {library.GameScreen_scoreClass}
Symbol 14 Bitmap {library.Files_PLAYMORE}
Symbol 15 Bitmap {game.Dude_idleClass}
Symbol 16 Bitmap {gui.GraphicNumber_greenClass}
Symbol 17 Bitmap {library.Files_START}
Symbol 18 Bitmap {library.GameScreen_soundON}
Symbol 19 Bitmap {library.GameScreen_highercenterClass}
Symbol 20 Bitmap {game.Dude_jumpUp2Class}
Symbol 21 Bitmap {game.Board_imageClass}
Symbol 22 Bitmap {library.Files_STICKPAGE}
Symbol 23 Bitmap {library.GameScreen_pu6class}
Symbol 24 Bitmap {library.GameScreen_bgClass}
Symbol 25 Bitmap {library.Files_MENU}
Symbol 26 Bitmap {library.Files_ENDMENU}
Symbol 27 Bitmap {gui.GraphicNumber_colorfulClass}
Symbol 28 BinaryData {library.Files_ELEMENTS}
Symbol 29 Bitmap {library.Files_PLAYMOREMO2}
Symbol 30 Bitmap {library.GameScreen_puleftClass}
Symbol 31 Bitmap {library.GameScreen_pu5class}
Symbol 32 Bitmap {gui.Banner_banner2Class}
Symbol 33 Bitmap {gui.Banner_banner3Class}
Symbol 34 Bitmap {gui.GraphicNumber_blueClass}
Symbol 35 Bitmap {library.GameScreen_pu4class}
Symbol 36 MovieClip {library.Files_INTRO}
Symbol 37 Bitmap {game.Bonus_imageClass}
Symbol 38 Bitmap {gui.GraphicNumber_darkClass}
Symbol 39 Bitmap {game.Dude_jumpLeftRollClass}
Symbol 40 Bitmap {library.GameScreen_pu1class}
Symbol 41 BinaryData {library.Files_INTRO_dataClass}
Symbol 42 Bitmap {library.GameScreen_inverseworldClass}
Symbol 43 Bitmap {library.Files_LB}
Symbol 44 Bitmap {game.Dude_jumpRightRollClass}
Symbol 45 Bitmap {game.Sun_imageClass}
Symbol 46 Bitmap {library.GameScreen_spjClass}
Symbol 47 Bitmap {library.GameScreen_pdleftClass}
Symbol 48 Bitmap {library.GameScreen_pu3class}
Symbol 49 Bitmap {game.Dude_jumpRightClass}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 2 as "library.GameScreen_jumpClass"
ExportAssets (56)Timeline Frame 2Symbol 3 as "library.GameScreen_musicClass"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$fw$e.AvuqxZo7ASllkfHnoWI0."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"gui_Preloader"Frame 1
"start"Frame 2




http://swfchan.com/19/91127/info.shtml
Created: 28/3 -2019 02:27:28 Last modified: 28/3 -2019 02:27:28 Server time: 19/01 -2021 00:16:15