[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Section 1 (230 B)
//Bomb_13 (Chainsplode_fla.Bomb_13)
package Chainsplode_fla {
import flash.display.*;
public dynamic class Bomb_13 extends MovieClip {
public var Spikes:MovieClip;
public var Core:MovieClip;
}
}//package Chainsplode_fla
Section 2 (324 B)
//Bomb_14 (Chainsplode_fla.Bomb_14)
package Chainsplode_fla {
import flash.display.*;
public dynamic class Bomb_14 extends MovieClip {
public function Bomb_14(){
addFrameScript(0, frame1, 6, frame7);
}
function frame7(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package Chainsplode_fla
Section 3 (261 B)
//ChainLengthText_2 (Chainsplode_fla.ChainLengthText_2)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ChainLengthText_2 extends MovieClip {
public var TXTChainLength:TextField;
}
}//package Chainsplode_fla
Section 4 (551 B)
//PanelCongrats_8 (Chainsplode_fla.PanelCongrats_8)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PanelCongrats_8 extends MovieClip {
public var TXTAllLevels:TextField;
public var FinalScore:MovieClip;
public var NextPageBG:MovieClip;
public var TXTCurrentRequirements:TextField;
public var TXTNextPage:TextField;
public var TXTDetonated:TextField;
public function PanelCongrats_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Chainsplode_fla
Section 5 (294 B)
//PanelCongrats_9 (Chainsplode_fla.PanelCongrats_9)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PanelCongrats_9 extends MovieClip {
public var TXTCalculateScore:TextField;
public var TXTNewScore:TextField;
}
}//package Chainsplode_fla
Section 6 (381 B)
//PanelTryAgain_7 (Chainsplode_fla.PanelTryAgain_7)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PanelTryAgain_7 extends MovieClip {
public var RetryLevelBG:MovieClip;
public var TXTCurrentRequirements:TextField;
public var TXTRetryLevelButton:TextField;
public var TXTDetonated:TextField;
}
}//package Chainsplode_fla
Section 7 (281 B)
//PanelWelcome_10 (Chainsplode_fla.PanelWelcome_10)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PanelWelcome_10 extends MovieClip {
public var StartBG:MovieClip;
public var TXTStart:TextField;
}
}//package Chainsplode_fla
Section 8 (536 B)
//PanelWellDone_4 (Chainsplode_fla.PanelWellDone_4)
package Chainsplode_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PanelWellDone_4 extends MovieClip {
public var NextLevelBG:MovieClip;
public var TXTCalculateScore:TextField;
public var TXTCurrentRequirements:TextField;
public var TXTNextLevelButton:TextField;
public var TXTPrepare:TextField;
public var TXTNextRequirements:TextField;
public var TXTNewScore:TextField;
public var TXTDetonated:TextField;
}
}//package Chainsplode_fla
Section 9 (281 B)
//Speaker_11 (Chainsplode_fla.Speaker_11)
package Chainsplode_fla {
import flash.display.*;
public dynamic class Speaker_11 extends MovieClip {
public function Speaker_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Chainsplode_fla
Section 10 (1.15 KiB) ●
//Back (fl.transitions.easing.Back)
package fl.transitions.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 11 (927 B)
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 12 (5.96 KiB) ● ●
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 13 (966 B)
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 14 (6.31 KiB) ● ●
//Bomb (Bomb)
package {
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.media.*;
public class Bomb extends Sprite {
const STABLE_SPEED:Number = 1;
const UNSTABLE_SPEED:Number = 3;
const EXPLODING_ROTATION_SPEED:Number = 10;
const STABLE_ROTATION_SPEED:Number = 2;
const UNSTABLE_ROTATION_SPEED:Number = 2;
var ymov:Number;
var ExplosionSound:Grenade3Sound;
var XS2Tween:Tween;
var mass:Number;// = 20
var XSTween:Tween;
var HasExploded:Boolean;
var Direction:int;
var State:String;
var radius:Number;// = 20
var YSTween:Tween;
var ATween:Tween;
public var Img:MovieClip;
var CountdownTimer:Timer;
var xmov:Number;
var YS2Tween:Tween;
public function Bomb(_arg1:uint, _arg2:uint, _arg3:uint){
mass = 20;
radius = 20;
super();
this.HasExploded = false;
this.buttonMode = true;
this.x = _arg1;
this.y = _arg2;
this.Direction = _arg3;
this.State = "Stable";
this.Img.Core.gotoAndStop(1);
this.addEventListener(Event.ADDED_TO_STAGE, elInit);
this.addEventListener(MouseEvent.MOUSE_DOWN, Explode);
}
public function elRemove(_arg1:TweenEvent=null){
this.HasExploded = true;
Chainsplode(parent.parent).Bombs.splice(Chainsplode(parent.parent).Bombs.indexOf(this), 1);
this.State = "Exploded";
this.dispatchEvent(new Event("Exploded"));
FinishRemoval();
}
public function elExplode(_arg1:Event=null){
var _local2:*;
var _local3:*;
var _local4:Bomb;
var _local5:*;
var _local6:Number;
var _local7:Number;
_local2 = MovieClip(parent.parent).Bombs;
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (((!((_local4 == this))) && ((_local4.State == "Stable")))){
_local5 = Math.sqrt((((this.x - _local4.x) * (this.x - _local4.x)) + ((this.y - _local4.y) * (this.y - _local4.y))));
if (_local5 < (((this.Img.Core.width - 2) * 4) * this.scaleX)){
_local6 = (_local4.x - this.x);
_local7 = (_local4.y - this.y);
_local4.Direction = ((Math.atan2(_local7, _local6) * 180) / Math.PI);
_local4.Destabilize();
};
};
_local3++;
};
if (((!((this.State == "Exploding"))) && (!((this.State == "Exploded"))))){
this.State = "Exploding";
XS2Tween = new Tween(this.Img, "scaleX", Back.easeIn, 1, 4, 0.2, true);
YS2Tween = new Tween(this.Img, "scaleY", Back.easeIn, 1, 4, 0.2, true);
YS2Tween.addEventListener(TweenEvent.MOTION_FINISH, elInitRemoval);
if (MovieClip(parent.parent).SoundIsEnabled == true){
ExplosionSound = new Grenade3Sound();
ExplosionSound.play();
};
this.dispatchEvent(new Event("Exploding"));
};
}
public function elInit(_arg1:Event){
this.addEventListener(Event.ENTER_FRAME, elEnterFrame);
}
private function elEnterFrame(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:Bomb;
var _local5:Number;
var _local6:Number;
var _local7:*;
this.xmov = (Math.cos(((Math.PI / 180) * this.Direction)) * STABLE_SPEED);
this.ymov = (Math.sin(((Math.PI / 180) * this.Direction)) * STABLE_SPEED);
if (this.State == "Stable"){
this.Img.Spikes.rotation = (this.Img.Spikes.rotation + STABLE_ROTATION_SPEED);
} else {
if (this.State == "Unstable"){
this.Img.Spikes.rotation = (this.Img.Spikes.rotation + UNSTABLE_ROTATION_SPEED);
} else {
if (this.State == "Exploding"){
this.Img.Spikes.rotation = (this.Img.Spikes.rotation + EXPLODING_ROTATION_SPEED);
};
};
};
if (this.x <= 0){
this.x = 1;
this.Direction = (180 - this.Direction);
} else {
if (this.x >= stage.stageWidth){
this.x = (stage.stageWidth - 1);
this.Direction = (180 - this.Direction);
};
};
if (this.y <= 0){
this.y = 1;
this.Direction = (360 - this.Direction);
} else {
if (this.y >= stage.stageHeight){
this.y = (stage.stageHeight - 1);
this.Direction = (360 - this.Direction);
};
};
if (this.State == "Stable"){
this.x = (this.x + (Math.cos(((Math.PI / 180) * this.Direction)) * STABLE_SPEED));
this.y = (this.y + (Math.sin(((Math.PI / 180) * this.Direction)) * STABLE_SPEED));
} else {
if (this.State == "Unstable"){
this.x = (this.x + (Math.cos(((Math.PI / 180) * this.Direction)) * UNSTABLE_SPEED));
this.y = (this.y + (Math.sin(((Math.PI / 180) * this.Direction)) * UNSTABLE_SPEED));
};
};
_local2 = MovieClip(parent.parent).Bombs;
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_local4 != this){
_local5 = (_local4.x - this.x);
_local6 = (_local4.y - this.y);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
if ((((((_local7 < 20)) && ((this.State == "Unstable")))) && ((_local4.HasExploded == false)))){
this.elExplode();
};
};
_local3++;
};
}
public function elInitRemoval(_arg1:TweenEvent){
this.ATween = new Tween(this, "alpha", Strong.easeOut, 1, 0, 0.3, true);
this.ATween.addEventListener(TweenEvent.MOTION_FINISH, elRemove);
}
public function Explode(_arg1:MouseEvent){
this.addEventListener(MouseEvent.MOUSE_DOWN, Explode);
this.dispatchEvent(new Event("ChainStarted"));
Destabilize(1);
}
public function FinishRemoval(){
if (this.YS2Tween){
this.YS2Tween.removeEventListener(TweenEvent.MOTION_FINISH, elInitRemoval);
};
if (this.ATween){
this.ATween.removeEventListener(TweenEvent.MOTION_FINISH, elRemove);
};
if (this.CountdownTimer){
this.CountdownTimer.removeEventListener(TimerEvent.TIMER, elExplode);
};
this.removeEventListener(Event.ADDED_TO_STAGE, elInit);
this.removeEventListener(MouseEvent.MOUSE_DOWN, Explode);
this.removeEventListener(Event.ENTER_FRAME, elEnterFrame);
parent.removeChild(this);
}
public function Destabilize(_arg1:uint=3000){
this.Img.Core.gotoAndPlay(2);
this.XSTween = new Tween(this.Img, "scaleX", Back.easeOut, 1, 1.3, 0.2, true);
this.YSTween = new Tween(this.Img, "scaleY", Back.easeOut, 1, 1.3, 0.5, true);
this.YSTween.looping = true;
this.XSTween.looping = true;
this.State = "Unstable";
this.CountdownTimer = new Timer(_arg1, 1);
this.CountdownTimer.addEventListener(TimerEvent.TIMER, elExplode);
this.CountdownTimer.start();
}
}
}//package
Section 15 (8.08 KiB) ● ●
//Chainsplode (Chainsplode)
package {
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public dynamic class Chainsplode extends MovieClip {
var CLTYSTween:Tween;
var Stars:Sprite;
var BombsMC:Sprite;
public var Welcome:MovieClip;
public var WellDone:MovieClip;
var SoundIsEnabled:Boolean;
public var TryAgain:MovieClip;
var Score:uint;
var Chain:Array;
var Levels:Array;
public var Congrats:MovieClip;
public var ChainLengthText:MovieClip;
var CLTXSTween:Tween;
public var Flash:MovieClip;
var LevelIndex:uint;
public var Speaker:MovieClip;
public var ChainLength:uint;
public var Bombs:Array;
public function Chainsplode(){
BombsMC = new Sprite();
super();
addFrameScript(0, frame1, 1, frame2);
}
private function LoadLevel(_arg1:uint){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Bomb;
LevelIndex = _arg1;
if (((Bombs) && ((Bombs.length > 0)))){
_local4 = 0;
while (_local4 < Bombs.length) {
Bombs[_local4].FinishRemoval();
_local4++;
};
};
Bombs = new Array();
Chain = new Array();
_local2 = Levels[_arg1];
_local3 = 0;
while (_local3 < _local2.Bombs) {
_local5 = AddBomb(int(((Math.random() * (stage.stageWidth - 20)) + 10)), int(((Math.random() * (stage.stageHeight - 20)) + 10)), int((Math.random() * 360)));
if (((_local2.BombScale) && ((_local2.BombScale > 0)))){
_local5.scaleX = _local2.BombScale;
_local5.scaleY = _local2.BombScale;
};
_local3++;
};
Welcome.y = (stage.stageHeight + 20);
WellDone.y = (stage.stageHeight + 20);
TryAgain.y = (stage.stageHeight + 20);
Congrats.y = (stage.stageHeight + 20);
ChainLengthText.TXTChainLength.text = "";
ChainLengthText.scaleX = 1;
ChainLengthText.scaleY = 1;
}
private function EnableSound(){
SoundIsEnabled = true;
Speaker.gotoAndStop(1);
}
private function elToggleSound(_arg1:MouseEvent=null){
if (SoundIsEnabled == true){
DisableSound();
} else {
EnableSound();
};
}
private function DisableSound(){
SoundIsEnabled = false;
Speaker.gotoAndStop(2);
}
private function Init(){
SoundIsEnabled = true;
Flash.alpha = 0;
Flash.mouseEnabled = false;
Levels = new Array();
Levels.push({Bombs:0, ToWin:0});
Levels.push({Bombs:15, ToWin:2});
Levels.push({Bombs:15, ToWin:3});
Levels.push({Bombs:15, ToWin:6});
Levels.push({Bombs:20, ToWin:12, BombScale:0.9});
Levels.push({Bombs:25, ToWin:14});
Levels.push({Bombs:30, ToWin:18});
Levels.push({Bombs:25, ToWin:14, BombScale:0.8});
Levels.push({Bombs:30, ToWin:21});
Levels.push({Bombs:35, ToWin:23, BombScale:0.8});
Levels.push({Bombs:45, ToWin:30, BombScale:0.8});
Levels.push({Bombs:45, ToWin:33, BombScale:0.8});
Levels.push({Bombs:50, ToWin:34, BombScale:0.6});
Levels.push({Bombs:40, ToWin:31, BombScale:0.8});
Levels.push({Bombs:40, ToWin:30, BombScale:0.5});
Levels.push({Bombs:30, ToWin:21, BombScale:0.6});
Levels.push({Bombs:35, ToWin:25, BombScale:0.6});
Levels.push({Bombs:20, ToWin:15, BombScale:0.7});
Levels.push({Bombs:30, ToWin:26, BombScale:0.7});
Levels.push({Bombs:40, ToWin:35, BombScale:0.8});
Levels.push({Bombs:50, ToWin:48, BombScale:0.8});
addChildAt(BombsMC, 0);
addChildAt(ChainLengthText, 0);
WellDone.TXTNextLevelButton.mouseEnabled = false;
WellDone.NextLevelBG.buttonMode = true;
WellDone.NextLevelBG.addEventListener(MouseEvent.CLICK, elLoadNextLevel);
TryAgain.TXTRetryLevelButton.mouseEnabled = false;
TryAgain.RetryLevelBG.buttonMode = true;
TryAgain.RetryLevelBG.addEventListener(MouseEvent.CLICK, elReloadLevel);
Congrats.TXTNextPage.mouseEnabled = false;
Congrats.NextPageBG.buttonMode = true;
Congrats.NextPageBG.addEventListener(MouseEvent.CLICK, elShowNextCongratsPage);
Congrats.FinalScore.alpha = 0;
Welcome.TXTStart.mouseEnabled = false;
Welcome.StartBG.buttonMode = true;
Welcome.StartBG.addEventListener(MouseEvent.CLICK, elStartGame);
Speaker.buttonMode = true;
Speaker.addEventListener(MouseEvent.CLICK, elToggleSound);
}
private function elAddToChain(_arg1:Event){
if (Chain.indexOf((_arg1.currentTarget == -1))){
Chain.push(_arg1.currentTarget);
ChainLength++;
ChainLengthText.TXTChainLength.text = ChainLength;
if (CLTXSTween){
CLTXSTween.stop();
};
if (CLTYSTween){
CLTYSTween.stop();
};
CLTXSTween = new Tween(ChainLengthText, "scaleX", Back.easeOut, ChainLengthText.scaleX, (1 + (ChainLength / 10)), 0.3, true);
CLTYSTween = new Tween(ChainLengthText, "scaleY", Back.easeOut, ChainLengthText.scaleY, (1 + (ChainLength / 10)), 0.3, true);
};
}
private function elCheckIfFinished(_arg1:Event){
var _local2:uint;
var _local3:Boolean;
var _local4:*;
var _local5:*;
_local2 = 0;
_local3 = false;
while ((((_local2 < Bombs.length)) && ((_local3 == false)))) {
if (Bombs[_local2].State != "Stable"){
_local3 = true;
};
_local2++;
};
if (_local3 == false){
_local4 = Levels[LevelIndex];
_local5 = Levels[(LevelIndex + 1)];
if (ChainLength >= _local4.ToWin){
if (LevelIndex < (Levels.length - 1)){
WellDone.TXTCurrentRequirements.text = (((("You needed to detonate\n" + _local4.ToWin) + " of ") + _local4.Bombs) + " mines,\nand you detonated");
WellDone.TXTDetonated.text = ChainLength.toString();
WellDone.TXTPrepare.text = ("Prepare for level " + (LevelIndex + 1));
WellDone.TXTNextRequirements.text = (((("in which you must detonate " + _local5.ToWin) + " of ") + _local5.Bombs) + " mines.");
WellDone.TXTNextLevelButton.text = ("Play level " + (LevelIndex + 1));
if (Score > 0){
WellDone.TXTCalculateScore.text = ((Score + "\n+") + (ChainLength * 100));
} else {
WellDone.TXTCalculateScore.text = "";
};
Score = (Score + (ChainLength * 100));
WellDone.TXTNewScore.text = Score;
WellDone.y = ((stage.stageHeight / 2) - (WellDone.height / 2));
} else {
Congrats.y = ((stage.stageHeight / 2) - (Congrats.height / 2));
Congrats.TXTCurrentRequirements.text = (((("You needed to detonate\n" + _local4.ToWin) + " of ") + _local4.Bombs) + " mines,\nand you detonated");
Congrats.TXTDetonated.text = ChainLength.toString();
};
} else {
TryAgain.TXTCurrentRequirements.text = (((("You needed to detonate\n" + _local4.ToWin) + " of ") + _local4.Bombs) + " mines,\nbut you only detonated");
TryAgain.TXTDetonated.text = ChainLength.toString();
TryAgain.TXTRetryLevelButton.text = (("Play level " + LevelIndex) + " again");
TryAgain.y = ((stage.stageHeight / 2) - (TryAgain.height / 2));
};
};
}
public function elReloadLevel(_arg1:MouseEvent){
LoadLevel(LevelIndex);
}
function frame1(){
MochiBot.track(this, "26863cd1");
MochiAd.showPreGameAd({clip:root, id:"b91d6caeca353725", res:"770x450"});
}
function frame2(){
Init();
stop();
}
private function elStartGame(_arg1:MouseEvent){
LoadLevel(1);
}
private function elShowNextCongratsPage(_arg1:MouseEvent){
Congrats.gotoAndStop(2);
Congrats.FinalScore.TXTCalculateScore.text = ((Score + "\n+") + (ChainLength * 100));
Score = (Score + (ChainLength * 100));
Congrats.FinalScore.TXTNewScore.text = Score;
Congrats.FinalScore.alpha = 1;
}
private function AddBomb(_arg1:uint, _arg2:uint, _arg3:uint):Bomb{
var _local4:Bomb;
_local4 = new Bomb(_arg1, _arg2, _arg3);
_local4.addEventListener("ChainStarted", elChainStarted);
_local4.addEventListener("Exploding", elAddToChain);
_local4.addEventListener("Exploded", elCheckIfFinished);
Bombs.push(_local4);
BombsMC.addChild(_local4);
return (_local4);
}
public function elLoadNextLevel(_arg1:MouseEvent){
LoadLevel((LevelIndex + 1));
}
private function elChainStarted(_arg1:Event){
var _local2:*;
ChainLength = 0;
_local2 = 0;
while (_local2 < Bombs.length) {
Bombs[_local2].removeEventListener(MouseEvent.MOUSE_DOWN, Bombs[_local2].Explode);
Bombs[_local2].buttonMode = false;
_local2++;
};
}
}
}//package
Section 16 (133 B)
//Grenade1Sound (Grenade1Sound)
package {
import flash.media.*;
public dynamic class Grenade1Sound extends Sound {
}
}//package
Section 17 (133 B)
//Grenade3Sound (Grenade3Sound)
package {
import flash.media.*;
public dynamic class Grenade3Sound extends Sound {
}
}//package
Section 18 (17.71 KiB) ● ● ●
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class MochiAd {
public static function getVersion():String{
return ("2.1");
}
public static function showTimedAd(_arg1:Object):void{
MochiAd.showInterLevelAd(_arg1);
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var f:Function;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
f = function (_arg1:Object):void{
mc._mochiad_ctr_failed = true;
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
g = function (_arg1:Object):void{
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["sendHighScore", _arg1], _arg2, _arg3);
return (true);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
return (_local3);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
_arg1.removeChild(_arg1._mochiad);
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = _local1.loaderInfo.bytesTotal;
if ((((_local4 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
_local3 = true;
};
};
};
if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _loadCommunicator(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var clipname:String;
var server:String;
var depth:Number;
var mc:MovieClip;
var lv:URLVariables;
var k:String;
var lc:LocalConnection;
var name:String;
var req:URLRequest;
var loader:Loader;
var options = _arg1;
DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip[clipname]){
return (clip[clipname]);
};
server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, clipname, depth);
lv = new URLVariables();
for (k in options) {
lv[k] = options[k];
};
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.name = name;
mc.lc = lc;
lv.lc = name;
mc._id = 0;
mc._queue = [];
mc.rpcResult = function (_arg1:Object):void{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:Object;
var _local7:Object;
_arg1 = parseInt(_arg1.toString());
_local3 = mc._callbacks[_arg1];
if (typeof(_local3) == "undefined"){
return;
};
delete mc._callbacks[_arg1];
_local4 = [];
_local5 = 2;
while (_local5 < _local3.length) {
_local4.push(_local3[_local5]);
_local5++;
};
_local5 = 1;
while (_local5 < arguments.length) {
_local4.push(arguments[_local5]);
_local5++;
};
_local6 = _local3[1];
_local7 = _local3[0];
if (((_local7) && ((typeof(_local6) == "string")))){
_local6 = _local7[_local6];
};
if (typeof(_local6) == "function"){
_local6.apply(_local7, _local4);
};
};
mc._didConnect = function (_arg1:String):void{
var _local2:Array;
var _local3:Function;
var _local4:Number;
var _local5:Array;
mc._endpoint = _arg1;
_local2 = mc._queue;
delete mc._queue;
_local3 = mc.doSend;
_local4 = 0;
while (_local4 < _local2.length) {
_local5 = _local2[_local4];
_local3.apply(this, _local5);
_local4++;
};
};
mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{
var _local5:Number;
var _local6:LocalConnection;
var _local7:Array;
var _local8:Number;
if (mc._endpoint == null){
_local7 = [];
_local8 = 0;
while (_local8 < arguments.length) {
_local7.push(arguments[_local8]);
_local8++;
};
mc._queue.push(_local7);
return;
};
mc._id = (mc._id + 1);
_local5 = mc._id;
mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))];
_local6 = new LocalConnection();
_local6.send(mc._endpoint, "rpc", _local5, _arg1);
};
mc._callbacks = {};
mc._callbacks[0] = [mc, "_didConnect"];
lv.st = getTimer();
req = new URLRequest((server + ".swf"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
loader.load(req);
mc.addChild(loader);
mc._mochiad_com = loader;
return (mc);
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, ad_started:function ():void{
this.clip.stop();
}, ad_finished:function ():void{
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
bar.x = 10;
bar.y = (h - 20);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (!this.parent.parent){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
if (!chk.showing){
_local11 = _local2.loaderInfo.bytesTotal;
if ((((_local11 > 0)) || (("number" == "undefined")))){
chk.showing = true;
chk.started = getTimer();
} else {
if (_local3 > chk.ad_timeout){
_local4 = true;
};
};
};
if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
MochiAd.showPreGameAd(_arg1);
}
public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{
var _local4:MovieClip;
_local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id});
if (!_local4){
return (false);
};
_local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3);
return (true);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
mc.removeEventListener(Event.ENTER_FRAME, f);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 19 (1.24 KiB) ●
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.system.*;
import flash.net.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package