Section 1
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _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) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
public class Tween extends EventDispatcher {
public var isPlaying:Boolean;// = false
public var obj:Object;// = null
public var prop:String;// = ""
public var func:Function;
public var begin:Number;// = NAN
public var change:Number;// = NAN
public var useSeconds:Boolean;// = false
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var looping:Boolean;// = false
private var _duration:Number;// = NAN
private var _time:Number;// = NAN
private var _fps:Number;// = NAN
private var _position:Number;// = NAN
private var _startTime:Number;// = NAN
private var _intervalID:uint;// = 0
private var _finish:Number;// = NAN
private var _timer:Timer;// = null
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){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
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 get time():Number{
return (this._time);
}
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();
};
};
}
public function get duration():Number{
return (this._duration);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function get FPS():Number{
return (this._fps);
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
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 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 get finish():Number{
return ((this.begin + this.change));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
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 yoyo():void{
this.continueTo(this.begin, this.time);
}
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;
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, 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 rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
}
}//package fl.transitions
Section 4
//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_FINISH:String = "motionFinish";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_RESUME:String = "motionResume";
public static const MOTION_LOOP:String = "motionLoop";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
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 5
//block_50w_6 (SimpsonThreat_fla.block_50w_6)
package SimpsonThreat_fla {
import flash.display.*;
public dynamic class block_50w_6 extends MovieClip {
public function block_50w_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SimpsonThreat_fla
Section 6
//circle_8 (SimpsonThreat_fla.circle_8)
package SimpsonThreat_fla {
import flash.display.*;
public dynamic class circle_8 extends MovieClip {
public function circle_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SimpsonThreat_fla
Section 7
//Lisa_23 (SimpsonThreat_fla.Lisa_23)
package SimpsonThreat_fla {
import flash.display.*;
public dynamic class Lisa_23 extends MovieClip {
public function Lisa_23(){
addFrameScript(0, frame1, 4, frame5, 8, frame9, 12, frame13);
}
function frame1(){
stop();
}
function frame5(){
}
function frame9(){
}
function frame13(){
}
}
}//package SimpsonThreat_fla
Section 8
//MainTimeline (SimpsonThreat_fla.MainTimeline)
package SimpsonThreat_fla {
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var k10:emptyblock;
public var l9:emptyblock;
public var m8:emptyblock;
public var n7:emptyblock;
public var o6:emptyblock;
public var h5:emptyblock;
public var i4:emptyblock;
public var j3:emptyblock;
public var k2:emptyblock;
public var d1:emptyblock;
public var townNameText:TextField;
public var floor3:MovieClip;
public var j10:emptyblock;
public var m9:emptyblock;
public var n8:emptyblock;
public var o7:emptyblock;
public var h6:emptyblock;
public var i5:emptyblock;
public var j4:emptyblock;
public var k3:emptyblock;
public var e1:emptyblock;
public var d2:emptyblock;
public var floor10:MovieClip;
public var floor4:MovieClip;
public var i10:emptyblock;
public var n9:emptyblock;
public var o8:emptyblock;
public var h7:emptyblock;
public var i6:emptyblock;
public var j5:emptyblock;
public var k4:emptyblock;
public var e2:emptyblock;
public var f1:emptyblock;
public var d3:emptyblock;
public var query:MovieClip;
public var floor11:MovieClip;
public var floor5:MovieClip;
public var introLogoSprite:introLogo;
public var restartbutton:MovieClip;
public var h10:emptyblock;
public var o9:emptyblock;
public var h8:emptyblock;
public var i7:emptyblock;
public var j6:emptyblock;
public var k5:emptyblock;
public var e3:emptyblock;
public var f2:emptyblock;
public var g1:emptyblock;
public var d4:emptyblock;
public var floor12:MovieClip;
public var floor6:MovieClip;
public var townname:MovieClip;
public var populationTopText:TextField;
public var o10:emptyblock;
public var h9:emptyblock;
public var i8:emptyblock;
public var j7:emptyblock;
public var k6:emptyblock;
public var d5:emptyblock;
public var e4:emptyblock;
public var f3:emptyblock;
public var g2:emptyblock;
public var floor13:MovieClip;
public var floor7:MovieClip;
public var btnIntroStart:introStartButton;
public var LisaSprite:MovieClip;
public var n10:emptyblock;
public var i9:emptyblock;
public var j8:emptyblock;
public var k7:emptyblock;
public var d6:emptyblock;
public var e5:emptyblock;
public var f4:emptyblock;
public var g3:emptyblock;
public var p1:emptyblock;
public var a1:emptyblock;
public var floor14:MovieClip;
public var floor8:MovieClip;
public var m10:emptyblock;
public var j9:emptyblock;
public var k8:emptyblock;
public var d7:emptyblock;
public var e6:emptyblock;
public var f5:emptyblock;
public var g4:emptyblock;
public var p2:emptyblock;
public var b1:emptyblock;
public var a2:emptyblock;
public var floor15:MovieClip;
public var floor9:MovieClip;
public var gameOverSign:MovieClip;
public var l10:emptyblock;
public var k9:emptyblock;
public var d8:emptyblock;
public var e7:emptyblock;
public var f6:emptyblock;
public var g5:emptyblock;
public var p3:emptyblock;
public var c1:emptyblock;
public var b2:emptyblock;
public var a3:emptyblock;
public var floor16:MovieClip;
public var loader_mc:movie_mc;
public var loaded_txt:TextField;
public var d9:emptyblock;
public var e8:emptyblock;
public var f7:emptyblock;
public var g6:emptyblock;
public var p4:emptyblock;
public var c2:emptyblock;
public var b3:emptyblock;
public var a4:emptyblock;
public var c10:emptyblock;
public var e9:emptyblock;
public var f8:emptyblock;
public var g7:emptyblock;
public var p5:emptyblock;
public var a5:emptyblock;
public var l1:emptyblock;
public var c3:emptyblock;
public var b4:emptyblock;
public var b10:emptyblock;
public var f9:emptyblock;
public var g8:emptyblock;
public var p6:emptyblock;
public var a6:emptyblock;
public var b5:emptyblock;
public var l2:emptyblock;
public var m1:emptyblock;
public var c4:emptyblock;
public var p10:emptyblock;
public var a10:emptyblock;
public var g9:emptyblock;
public var p7:emptyblock;
public var a7:emptyblock;
public var b6:emptyblock;
public var c5:emptyblock;
public var l3:emptyblock;
public var m2:emptyblock;
public var n1:emptyblock;
public var p8:emptyblock;
public var a8:emptyblock;
public var b7:emptyblock;
public var c6:emptyblock;
public var l4:emptyblock;
public var m3:emptyblock;
public var n2:emptyblock;
public var o1:emptyblock;
public var smokeSprite:MovieClip;
public var g10:emptyblock;
public var p9:emptyblock;
public var a9:emptyblock;
public var b8:emptyblock;
public var c7:emptyblock;
public var l5:emptyblock;
public var m4:emptyblock;
public var n3:emptyblock;
public var o2:emptyblock;
public var h1:emptyblock;
public var f10:emptyblock;
public var b9:emptyblock;
public var c8:emptyblock;
public var l6:emptyblock;
public var m5:emptyblock;
public var n4:emptyblock;
public var o3:emptyblock;
public var h2:emptyblock;
public var i1:emptyblock;
public var populationText:TextField;
public var e10:emptyblock;
public var c9:emptyblock;
public var l7:emptyblock;
public var m6:emptyblock;
public var n5:emptyblock;
public var o4:emptyblock;
public var h3:emptyblock;
public var i2:emptyblock;
public var j1:emptyblock;
public var floor1:MovieClip;
public var d10:emptyblock;
public var l8:emptyblock;
public var m7:emptyblock;
public var n6:emptyblock;
public var o5:emptyblock;
public var h4:emptyblock;
public var i3:emptyblock;
public var j2:emptyblock;
public var k1:emptyblock;
public var floor2:MovieClip;
public var theTownName;
public var phase;
public var houseTypeSelected;
public var footDown:uint;
public var LisaTween:Tween;
public var LisaXTween:Tween;
public var LandingZone;
public var roofY;
public var roofYnew;
public var jumpY;
public var gameOver;
public var myModel;
public var totModels;
public var nrHouse;
public var nrFood;
public var nrGov;
public var nrBase;
public var nrFlat;
public var popValue;
public var highScore;
public var popMaxValue;
public var buildTurnsLeft;
public var stompTurnsLeft;
public var cityArray:Array;
public var blockArray:Array;
public var myTimer:uint;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number = _arg1.target.bytesLoaded;
var _local3:Number = _arg1.target.bytesTotal;
var _local4:Number = (_local2 / _local3);
loader_mc.scaleX = _local4;
loaded_txt.text = (("Loading... " + Math.round((_local4 * 100))) + "%");
}
public function onComplete(_arg1:Event):void{
loaded_txt.text = "Finished loading.";
btnIntroStart.alpha = 1;
btnIntroStart.addEventListener(MouseEvent.CLICK, startGame);
townname.alpha = 1;
}
public function startGame(_arg1:MouseEvent):void{
theTownName = townname.townNameField.text;
theTownName = theTownName.replace(/^\s+|\s+$/g, "");
if (theTownName == ""){
theTownName = "Springfield";
};
gotoAndStop(2);
}
public function setPhase(_arg1):void{
if (popValue < 1){
stompTurnsLeft = 10;
smokeSprite.x = -100;
LandingZone = -2;
gameOver = true;
gameOverSign.alpha = 0.75;
phase = 1;
query.alpha = 0;
showBlocks(false);
LisaTween = new Tween(LisaSprite, "y", Regular.easeOut, roofY, jumpY, 0.5, true);
LisaTween.FPS = 40;
LisaTween.addEventListener(TweenEvent.MOTION_FINISH, LisaIsUp);
} else {
if (_arg1 == 0){
phase = 0;
showQuery();
showBlocks(true);
} else {
phase = 1;
query.alpha = 0;
showBlocks(false);
myModel = Math.floor((Math.random() * totModels));
LisaTween = new Tween(LisaSprite, "y", Regular.easeOut, roofY, jumpY, 0.5, true);
LisaTween.FPS = 40;
LisaTween.addEventListener(TweenEvent.MOTION_FINISH, LisaIsUp);
};
};
}
public function updateQuery():void{
if ((((nrHouse > 4)) && (((popValue - 51) < (nrFood * 500))))){
query.option1.alpha = 1;
} else {
query.option1.alpha = 0.2;
};
if ((popValue - 6) < (nrFood * 500)){
query.option2.alpha = 1;
} else {
query.option2.alpha = 0.2;
};
if ((((query.option1.alpha > 0.9)) && ((nrGov < nrFood)))){
query.option4.alpha = 1;
} else {
query.option4.alpha = 0.2;
};
if (nrGov > nrBase){
query.option5.alpha = 1;
} else {
query.option5.alpha = 0.2;
};
if (nrGov > 0){
query.option6.alpha = 1;
} else {
query.option6.alpha = 0.2;
};
}
public function showQuery():void{
query.alpha = 0.8;
query.option0.alpha = 1;
query.option2.alpha = 1;
query.option3.alpha = 1;
query.option4.alpha = 0.2;
query.option5.alpha = 0.2;
query.option6.alpha = 0.2;
updateQuery();
houseTypeSelected = 0;
query.circle0.gotoAndStop(1);
query.circle1.gotoAndStop(2);
query.circle2.gotoAndStop(2);
query.circle3.gotoAndStop(2);
query.circle4.gotoAndStop(2);
query.circle5.gotoAndStop(2);
query.circle6.gotoAndStop(2);
}
public function mouseClicked(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (phase == 0){
_local2 = 0;
_local3 = -1;
_local4 = 0;
if (floor1.hitTestPoint(mouseX, mouseY, true)){
_local2 = 1;
};
if (floor2.hitTestPoint(mouseX, mouseY, true)){
_local2 = 2;
};
if (floor3.hitTestPoint(mouseX, mouseY, true)){
_local2 = 3;
};
if (floor4.hitTestPoint(mouseX, mouseY, true)){
_local2 = 4;
};
if (floor5.hitTestPoint(mouseX, mouseY, true)){
_local2 = 5;
};
if (floor6.hitTestPoint(mouseX, mouseY, true)){
_local2 = 6;
};
if (floor7.hitTestPoint(mouseX, mouseY, true)){
_local2 = 7;
};
if (floor8.hitTestPoint(mouseX, mouseY, true)){
_local2 = 8;
};
if (floor9.hitTestPoint(mouseX, mouseY, true)){
_local2 = 9;
};
if (floor10.hitTestPoint(mouseX, mouseY, true)){
_local2 = 10;
};
if (floor11.hitTestPoint(mouseX, mouseY, true)){
_local2 = 11;
};
if (floor12.hitTestPoint(mouseX, mouseY, true)){
_local2 = 12;
};
if (floor13.hitTestPoint(mouseX, mouseY, true)){
_local2 = 13;
};
if (floor14.hitTestPoint(mouseX, mouseY, true)){
_local2 = 14;
};
if (floor15.hitTestPoint(mouseX, mouseY, true)){
_local2 = 15;
};
if (floor16.hitTestPoint(mouseX, mouseY, true)){
_local2 = 16;
};
if (query.circle0.hitTestPoint(mouseX, mouseY, true)){
_local3 = 0;
_local4 = 1;
};
if (query.circle1.hitTestPoint(mouseX, mouseY, true)){
_local3 = 1;
_local4 = 1;
};
if (query.circle2.hitTestPoint(mouseX, mouseY, true)){
_local3 = 2;
_local4 = 1;
};
if (query.circle3.hitTestPoint(mouseX, mouseY, true)){
_local3 = 3;
_local4 = 1;
};
if (query.circle4.hitTestPoint(mouseX, mouseY, true)){
_local3 = 4;
_local4 = 1;
};
if (query.circle5.hitTestPoint(mouseX, mouseY, true)){
_local3 = 5;
_local4 = 1;
};
if (query.circle6.hitTestPoint(mouseX, mouseY, true)){
_local3 = 6;
_local4 = 1;
};
if (_local4 == 1){
query.circle1.gotoAndStop(2);
query.circle2.gotoAndStop(2);
query.circle3.gotoAndStop(2);
query.circle4.gotoAndStop(2);
query.circle5.gotoAndStop(2);
query.circle6.gotoAndStop(2);
if (_local3 == 0){
stompTurnsLeft = (9 - nrBase);
if (stompTurnsLeft < 2){
stompTurnsLeft = 2;
};
smokeSprite.x = -100;
LandingZone = -2;
setPhase(1);
};
if (_local3 == 1){
if (query.option1.alpha > 0.9){
query.circle1.gotoAndStop(1);
houseTypeSelected = 1;
_local4 = 2;
};
};
if (_local3 == 2){
query.circle2.gotoAndStop(1);
houseTypeSelected = 2;
_local4 = 2;
};
if (_local3 == 3){
query.circle3.gotoAndStop(1);
houseTypeSelected = 3;
_local4 = 2;
};
if (_local3 == 4){
if (query.option4.alpha > 0.9){
query.circle4.gotoAndStop(1);
houseTypeSelected = 4;
_local4 = 2;
};
};
if (_local3 == 5){
if (query.option5.alpha > 0.9){
query.circle5.gotoAndStop(1);
houseTypeSelected = 5;
_local4 = 2;
};
};
if (_local3 == 6){
if (query.option6.alpha > 0.9){
query.circle6.gotoAndStop(1);
houseTypeSelected = 6;
_local4 = 2;
};
};
if (_local4 == 2){
query.circle0.gotoAndStop(2);
} else {
query.circle0.gotoAndStop(1);
houseTypeSelected = 0;
};
} else {
if (houseTypeSelected != 0){
if ((((_local2 == 1)) && ((floor1.currentFrame == 2)))){
buildOnAddress(1);
};
if ((((_local2 == 2)) && ((floor2.currentFrame == 2)))){
buildOnAddress(2);
};
if ((((_local2 == 3)) && ((floor3.currentFrame == 2)))){
buildOnAddress(3);
};
if ((((_local2 == 4)) && ((floor4.currentFrame == 2)))){
buildOnAddress(4);
};
if ((((_local2 == 5)) && ((floor5.currentFrame == 2)))){
buildOnAddress(5);
};
if ((((_local2 == 6)) && ((floor6.currentFrame == 2)))){
buildOnAddress(6);
};
if ((((_local2 == 7)) && ((floor7.currentFrame == 2)))){
buildOnAddress(7);
};
if ((((_local2 == 8)) && ((floor8.currentFrame == 2)))){
buildOnAddress(8);
};
if ((((_local2 == 9)) && ((floor9.currentFrame == 2)))){
buildOnAddress(9);
};
if ((((_local2 == 10)) && ((floor10.currentFrame == 2)))){
buildOnAddress(10);
};
if ((((_local2 == 11)) && ((floor11.currentFrame == 2)))){
buildOnAddress(11);
};
if ((((_local2 == 12)) && ((floor12.currentFrame == 2)))){
buildOnAddress(12);
};
if ((((_local2 == 13)) && ((floor13.currentFrame == 2)))){
buildOnAddress(13);
};
if ((((_local2 == 14)) && ((floor14.currentFrame == 2)))){
buildOnAddress(14);
};
if ((((_local2 == 15)) && ((floor15.currentFrame == 2)))){
buildOnAddress(15);
};
if ((((_local2 == 16)) && ((floor16.currentFrame == 2)))){
buildOnAddress(16);
};
updateQuery();
};
};
};
}
public function LisaIsUp(_arg1:TweenEvent):void{
LisaTween = new Tween(LisaSprite, "y", Regular.easeIn, jumpY, roofY, 0.5, true);
LisaTween.FPS = 40;
LisaTween.removeEventListener(TweenEvent.MOTION_FINISH, LisaIsUp);
LisaTween.addEventListener(TweenEvent.MOTION_FINISH, LisaIsDown);
footDown = (1 - footDown);
}
public function LisaIsDown(_arg1:TweenEvent):void{
LisaTween.removeEventListener(TweenEvent.MOTION_FINISH, LisaIsDown);
if (footDown == 0){
smokeSprite.x = ((LandingZone * 50) - 76);
footHitArea((LandingZone - 1));
} else {
smokeSprite.x = ((LandingZone * 50) + 36);
footHitArea((LandingZone + 1));
};
if (gameOver == false){
stompTurnsLeft--;
};
if (stompTurnsLeft == 0){
LisaXTween = new Tween(LisaSprite, "x", None.easeNone, LisaSprite.x, 1000, 0.9, true);
LisaXTween.FPS = 40;
LisaTween = new Tween(LisaSprite, "y", Regular.easeOut, roofY, 40, 0.5, true);
LisaTween.FPS = 40;
buildTurnsLeft = (4 + nrGov);
setPhase(0);
} else {
LandingZone = Math.floor((Math.random() * 18));
LisaXTween = new Tween(LisaSprite, "x", None.easeNone, LisaSprite.x, ((LandingZone * 50) - 26), 0.9, true);
LisaXTween.FPS = 40;
if (footDown == 0){
getMeHeight((LandingZone + 1));
} else {
getMeHeight((LandingZone - 1));
};
LisaTween = new Tween(LisaSprite, "y", Regular.easeOut, roofY, jumpY, 0.5, true);
LisaTween.FPS = 40;
LisaTween.addEventListener(TweenEvent.MOTION_FINISH, LisaIsUp);
roofY = roofYnew;
};
}
public function getMeHeight(_arg1):void{
var _local3:*;
var _local2:* = 0;
if ((((_arg1 > 0)) && ((_arg1 < 17)))){
_local3 = 0;
while (_local3 < 10) {
if ((((blockArray[(_arg1 - 1)][_local3].currentFrame > 1)) && ((blockArray[(_arg1 - 1)][_local3].currentFrame < 8)))){
_local2++;
};
_local3++;
};
};
jumpY = (80 - (_local2 * 20));
if (_local2 > 0){
roofYnew = (260 - (_local2 * 20));
} else {
roofYnew = 240;
};
}
public function footHitArea(_arg1):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = 0;
var _local3:* = false;
if ((((_arg1 > 0)) && ((_arg1 < 17)))){
_local4 = 0;
while (_local4 < 10) {
if ((((blockArray[(_arg1 - 1)][_local4].currentFrame > 1)) && ((blockArray[(_arg1 - 1)][_local4].currentFrame < 8)))){
_local2++;
};
_local4++;
};
smokeSprite.x = ((_arg1 * 50) - 26);
smokeSprite.y = (383 - (20 * _local2));
smokeSprite.gotoAndPlay(1);
if (_local2 > 0){
if (blockArray[(_arg1 - 1)][(_local2 - 1)].currentFrame != 7){
blockArray[(_arg1 - 1)][(_local2 - 1)].gotoAndStop(8);
} else {
_local3 = true;
};
};
if (_local2 < 11){
_local5 = (_local2 + 1);
while (_local5 < 11) {
blockArray[(_arg1 - 1)][_local2].gotoAndStop(0);
_local5++;
};
};
if (_local3 == false){
if (_local2 > -1){
_local6 = cityArray[(_arg1 - 1)][(_local2 - 1)];
if (_local6 == 1){
nrFlat--;
popValue = (popValue - 50);
} else {
if (_local6 == 2){
nrHouse--;
popValue = (popValue - 5);
} else {
if (_local6 == 3){
nrFood--;
} else {
if (_local6 == 4){
nrGov--;
} else {
if (_local6 == 5){
nrBase--;
};
};
};
};
};
cityArray[(_arg1 - 1)][(_local2 - 1)] = 0;
_local2--;
updateStats();
};
};
};
}
public function aniLisa():void{
if (footDown == 0){
if (LisaSprite.y > 160){
LisaSprite.gotoAndStop((4 + (myModel * 4)));
} else {
LisaSprite.gotoAndStop((3 + (myModel * 4)));
};
} else {
if (LisaSprite.y > 160){
LisaSprite.gotoAndStop((1 + (myModel * 4)));
} else {
LisaSprite.gotoAndStop((2 + (myModel * 4)));
};
};
if ((nrFood * 500) < popValue){
popValue--;
if ((((popValue < 1)) && ((phase == 0)))){
setPhase(1);
};
updateStats();
};
}
public function showBlocks(_arg1):void{
if (_arg1 == false){
floor1.gotoAndStop(1);
floor2.gotoAndStop(1);
floor3.gotoAndStop(1);
floor4.gotoAndStop(1);
floor5.gotoAndStop(1);
floor6.gotoAndStop(1);
floor7.gotoAndStop(1);
floor8.gotoAndStop(1);
floor9.gotoAndStop(1);
floor10.gotoAndStop(1);
floor11.gotoAndStop(1);
floor12.gotoAndStop(1);
floor13.gotoAndStop(1);
floor14.gotoAndStop(1);
floor15.gotoAndStop(1);
floor16.gotoAndStop(1);
} else {
if (canBuild(1) == true){
floor1.gotoAndStop(2);
} else {
floor1.gotoAndStop(3);
};
if (canBuild(2) == true){
floor2.gotoAndStop(2);
} else {
floor2.gotoAndStop(3);
};
if (canBuild(3) == true){
floor3.gotoAndStop(2);
} else {
floor3.gotoAndStop(3);
};
if (canBuild(4) == true){
floor4.gotoAndStop(2);
} else {
floor4.gotoAndStop(3);
};
if (canBuild(5) == true){
floor5.gotoAndStop(2);
} else {
floor5.gotoAndStop(3);
};
if (canBuild(6) == true){
floor6.gotoAndStop(2);
} else {
floor6.gotoAndStop(3);
};
if (canBuild(7) == true){
floor7.gotoAndStop(2);
} else {
floor7.gotoAndStop(3);
};
if (canBuild(8) == true){
floor8.gotoAndStop(2);
} else {
floor8.gotoAndStop(3);
};
if (canBuild(9) == true){
floor9.gotoAndStop(2);
} else {
floor9.gotoAndStop(3);
};
if (canBuild(10) == true){
floor10.gotoAndStop(2);
} else {
floor10.gotoAndStop(3);
};
if (canBuild(11) == true){
floor11.gotoAndStop(2);
} else {
floor11.gotoAndStop(3);
};
if (canBuild(12) == true){
floor12.gotoAndStop(2);
} else {
floor12.gotoAndStop(3);
};
if (canBuild(13) == true){
floor13.gotoAndStop(2);
} else {
floor13.gotoAndStop(3);
};
if (canBuild(14) == true){
floor14.gotoAndStop(2);
} else {
floor14.gotoAndStop(3);
};
if (canBuild(15) == true){
floor15.gotoAndStop(2);
} else {
floor15.gotoAndStop(3);
};
if (canBuild(16) == true){
floor16.gotoAndStop(2);
} else {
floor16.gotoAndStop(3);
};
};
}
public function canBuild(_arg1):Boolean{
var _local2:* = true;
var _local3:* = 0;
while (_local3 < 9) {
if (cityArray[(_arg1 - 1)][_local3] == 2){
_local2 = false;
};
if (cityArray[(_arg1 - 1)][_local3] == 3){
_local2 = false;
};
if (cityArray[(_arg1 - 1)][_local3] == 5){
_local2 = false;
};
_local3++;
};
if (cityArray[(_arg1 - 1)][9] != 0){
_local2 = false;
};
return (_local2);
}
public function buildOnAddress(_arg1):void{
var _local2:*;
var _local3:*;
if (buildTurnsLeft > 0){
buildTurnsLeft--;
_local2 = 9;
_local3 = 9;
while (_local3 > -1) {
if (cityArray[(_arg1 - 1)][_local3] == 0){
_local2 = _local3;
};
_local3--;
};
cityArray[(_arg1 - 1)][_local2] = houseTypeSelected;
blockArray[(_arg1 - 1)][_local2].gotoAndStop((houseTypeSelected + 1));
showBlocks(true);
if (houseTypeSelected == 1){
nrFlat++;
popValue = (popValue + 50);
};
if (houseTypeSelected == 2){
nrHouse++;
popValue = (popValue + 5);
};
if (houseTypeSelected == 3){
nrFood++;
};
if (houseTypeSelected == 4){
nrGov++;
};
if (houseTypeSelected == 5){
nrBase++;
};
updateStats();
};
if (buildTurnsLeft == 0){
stompTurnsLeft = (9 - nrBase);
if (stompTurnsLeft < 2){
stompTurnsLeft = 2;
};
smokeSprite.x = -100;
LandingZone = -2;
setPhase(1);
};
}
public function updateStats():void{
if (popValue > highScore){
highScore = popValue;
};
populationTopText.text = ("Population High: " + highScore);
popMaxValue = (nrFood * 500);
if (popValue < 0){
popValue = 0;
};
populationText.text = ((("Population: " + String(popValue)) + " / ") + String(popMaxValue));
}
function frame1(){
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
function frame2(){
stop();
phase = 0;
houseTypeSelected = 0;
footDown = 0;
LandingZone = -2;
roofY = 240;
roofYnew = 240;
jumpY = 50;
gameOver = false;
myModel = 0;
totModels = 4;
nrHouse = 3;
nrFood = 1;
nrGov = 0;
nrBase = 0;
nrFlat = 0;
popValue = 15;
highScore = 15;
popMaxValue = 500;
buildTurnsLeft = 4;
stompTurnsLeft = 9;
townNameText.text = ("Town name: " + theTownName);
cityArray = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
blockArray = [[a1, a2, a3, a4, a5, a6, a7, a8, a9, a10], [b1, b2, b3, b4, b5, b6, b7, b8, b9, b10], [c1, c2, c3, c4, c5, c6, c7, c8, c9, c10], [d1, d2, d3, d4, d5, d6, d7, d8, d9, d10], [e1, e2, e3, e4, e5, e6, e7, e8, e9, e10], [f1, f2, f3, f4, f5, f6, f7, f8, f9, f10], [g1, g2, g3, g4, g5, g6, g7, g8, g9, g10], [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10], [i1, i2, i3, i4, i5, i6, i7, i8, i9, i10], [j1, j2, j3, j4, j5, j6, j7, j8, j9, j10], [k1, k2, k3, k4, k5, k6, k7, k8, k9, k10], [l1, l2, l3, l4, l5, l6, l7, l8, l9, l10], [m1, m2, m3, m4, m5, m6, m7, m8, m9, m10], [n1, n2, n3, n4, n5, n6, n7, n8, n9, n10], [o1, o2, o3, o4, o5, o6, o7, o8, o9, o10], [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]];
blockArray[2][0].gotoAndStop(3);
blockArray[3][0].gotoAndStop(3);
blockArray[6][0].gotoAndStop(4);
blockArray[8][0].gotoAndStop(3);
setPhase(0);
stage.addEventListener(MouseEvent.CLICK, mouseClicked);
myTimer = setInterval(aniLisa, 150);
}
}
}//package SimpsonThreat_fla
Section 9
//smoke_24 (SimpsonThreat_fla.smoke_24)
package SimpsonThreat_fla {
import flash.display.*;
public dynamic class smoke_24 extends MovieClip {
public function smoke_24(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package SimpsonThreat_fla
Section 10
//emptyblock (emptyblock)
package {
import flash.display.*;
public dynamic class emptyblock extends MovieClip {
public var item5:h_base;
public var item6:h_block;
public var item1:h_flat;
public var item2:h_house;
public var item3:h_burger;
public var item4:h_gov;
public function emptyblock(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 11
//h_base (h_base)
package {
import flash.display.*;
public dynamic class h_base extends MovieClip {
public function h_base(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 12
//h_block (h_block)
package {
import flash.display.*;
public dynamic class h_block extends MovieClip {
public function h_block(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 13
//h_burger (h_burger)
package {
import flash.display.*;
public dynamic class h_burger extends MovieClip {
public function h_burger(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 14
//h_flat (h_flat)
package {
import flash.display.*;
public dynamic class h_flat extends MovieClip {
public function h_flat(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 15
//h_gov (h_gov)
package {
import flash.display.*;
public dynamic class h_gov extends MovieClip {
}
}//package
Section 16
//h_house (h_house)
package {
import flash.display.*;
public dynamic class h_house extends MovieClip {
public function h_house(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 17
//introLogo (introLogo)
package {
import flash.display.*;
public dynamic class introLogo extends MovieClip {
}
}//package
Section 18
//introStartButton (introStartButton)
package {
import flash.display.*;
public dynamic class introStartButton extends MovieClip {
}
}//package
Section 19
//movie_mc (movie_mc)
package {
import flash.display.*;
public dynamic class movie_mc extends MovieClip {
}
}//package