Section 1
//Extender (com.axel.fog.blackhouse.Extender)
package com.axel.fog.blackhouse {
import flash.display.*;
public class Extender extends MovieClip {
public var hit:Boolean;
public function Extender():void{
addFrameScript(0, frame1);
hit = false;
}
function frame1(){
stop();
}
}
}//package com.axel.fog.blackhouse
Section 2
//GameScreen (com.axel.fog.blackhouse.GameScreen)
package com.axel.fog.blackhouse {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
public class GameScreen extends MovieClip {
private const _gravity:Number = 0.4;
public var dist_txt:TextField;
public var skip_mc:MovieClip;
private var _mainScr:Main;
private var _distanceWindow:distanceBurstMC;
private var _scrollCounter:int;// = 0
private var _resetSpawnTime:int;// = 2500
private var _distToTexas:int;// = 196500
public var scrollHolder_mc:MovieClip;
private var _dontSpawn:Boolean;
private var _launcher:Object;
private var _transition:Boolean;
private var _scrollNext:BgHolder;
public var power_mc:MovieClip;
private var _scrollCurrentBg:String;
public var obamaAnim_mc:MovieClip;
public var bag_mc:MovieClip;
public var hs_txt:TextField;
public var turret_mc:turretMC;
private var _gameReady:Boolean;
private var _extenderArray:Array;
public var bushAnim_mc:MovieClip;
private var _soundManager:SoundHandler;
private var _projectile:Object;
public var arrow_mc:MovieClip;
private var _scrollNextBg:String;
public var projectile_mc:MovieClip;
public var mask_mc:MovieClip;
private var _spawnInt;
private var _overTrue:Boolean;
public var obama_mc:MovieClip;
private var _scrollCurrent:BgHolder;
private var _gameDone:Boolean;
public function GameScreen(_arg1:Main):void{
_distanceWindow = new distanceBurstMC();
_scrollCurrent = new BgHolder();
_scrollNext = new BgHolder();
_scrollCounter = 0;
_dontSpawn = new Boolean();
_transition = new Boolean();
_extenderArray = new Array();
_soundManager = new SoundHandler();
_gameReady = new Boolean();
_distToTexas = 196500;
_resetSpawnTime = 2500;
_gameDone = new Boolean();
_overTrue = new Boolean();
super();
_mainScr = _arg1;
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
power_mc.bar_mc.scaleX = 0;
obama_mc.stop();
obama_mc.addEventListener("kick", startKick);
turret_mc.visible = false;
obamaAnim_mc.addEventListener("animDone", animDone);
SoundMixer.soundTransform = new SoundTransform(0.5);
}
private function createProjectile():void{
_projectile = new Object();
_projectile.mc = projectile_mc;
_projectile.initialDistance = _projectile.mc.x;
_projectile.dx = 0;
_projectile.dy = 0;
_projectile.speed = 0;
_projectile.totalSpeed = 50;
_projectile.firstShot = false;
_projectile.shotInt;
_projectile.chargeInt;
_projectile.newY = 0;
_projectile.distance = 0;
_projectile.tempDistance = 0;
_projectile.speedReduction = 5;
_projectile.speedIncrease = 5;
_projectile.speedGain = 3;
_projectile.testInt;
_projectile.newDist = 0;
_projectile.mc.gotoAndStop("start");
}
private function mouseMove(_arg1:MouseEvent):void{
if (!_projectile.firstShot){
followMouse(turret_mc);
};
}
private function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
private function addedToStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
gameStart();
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
_soundManager.playBg();
if (!_mainScr._introDone){
_mainScr._introDone = true;
} else {
showGame();
};
hs_txt.text = (String(_mainScr._highScore) + "Km");
}
public function dispose():void{
clearInterval(_projectile.shotInt);
_distanceWindow.removeEventListener(MouseEvent.CLICK, distWinClick);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
obamaAnim_mc.removeEventListener("animDone", animDone);
}
private function mouseUp(_arg1:MouseEvent):void{
if (((_projectile.firstShot) || ((mouseX < _projectile.mc.x)))){
return;
};
}
private function distanceBurst(_arg1:Boolean=false):void{
var _local2:int;
_local2 = _projectile.tempDistance;
if (_arg1){
_distanceWindow.gotoAndStop("over");
dist_txt.text = "0Km";
_overTrue = true;
} else {
_distanceWindow.score_txt.text = (String(Math.floor((_distToTexas / 100))) + "Km");
};
_distanceWindow.x = 320;
_distanceWindow.y = 200;
_mainScr.addChild(_distanceWindow);
_gameDone = true;
}
private function hitTester():void{
var _local1:int;
_local1 = 0;
while (_local1 < _extenderArray.length) {
if (((_projectile.mc.hitTestObject(_extenderArray[_local1])) && (!(_extenderArray[_local1].hit)))){
_soundManager.playSfx("punch");
_extenderArray[_local1].hit = true;
_extenderArray[_local1].nextFrame();
clearInterval(_projectile.shotInt);
clearInterval(_spawnInt);
_projectile.speed = (_projectile.speed + Math.floor((_projectile.speed * 0.1)));
fireBullet();
};
_local1++;
};
}
private function initExtender():void{
var _local1:Extender;
var _local2:int;
_local1 = new Extender();
_local1.x = 660;
_local1.y = 250;
_extenderArray.push(_local1);
_local2 = randRange(1, 5);
switch (_local2){
case 1:
_local1.gotoAndStop("McCain");
break;
case 2:
_local1.gotoAndStop("Kuklux");
break;
case 3:
_local1.gotoAndStop("Sarah");
break;
case 4:
_local1.gotoAndStop("Bill");
break;
case 5:
_local1.gotoAndStop("Hillary");
break;
};
scrollHolder_mc.addChild(_local1);
}
private function showGame():void{
skip_mc.visible = false;
obamaAnim_mc.stop();
obamaAnim_mc.visible = false;
bushAnim_mc.stop();
bushAnim_mc.visible = false;
_projectile.testInt = setInterval(increaseCharge, 30);
obama_mc.visible = true;
projectile_mc.visible = true;
arrow_mc.visible = true;
mask_mc.y = 0;
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
_gameReady = true;
}
private function whichBgToScroll():void{
var _local1:int;
_local1 = _projectile.tempDistance;
trace(_local1);
if ((((_local1 >= 6000)) && (!(_transition)))){
_transition = true;
_scrollCurrentBg = "transition";
_scrollNextBg = "scroll2";
} else {
if ((((_local1 >= 6000)) && ((_local1 < 13000)))){
_scrollCurrentBg = "scroll3";
_scrollNextBg = "scroll3";
} else {
if ((((_local1 >= 13000)) && ((_local1 < 20000)))){
_scrollCurrentBg = "scroll4";
_scrollNextBg = "scroll4";
} else {
if (_local1 >= 25000){
_scrollCurrentBg = "scroll5";
_scrollNextBg = "scroll6";
};
};
};
};
}
private function moveProjectile():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = (_distToTexas / 100);
if (_local1 <= 0){
trace("you managed to kick bush all the way to texas!");
clearInterval(_projectile.shotInt);
distanceBurst(true);
return;
};
if (obama_mc.x > -250){
obama_mc.x = (obama_mc.x - _projectile.dx);
bag_mc.x = (bag_mc.x - _projectile.dx);
} else {
obama_mc.visible = false;
};
_local2 = randRange(1, 100);
if (_local2 <= 5){
if (!_dontSpawn){
initExtender();
_dontSpawn = true;
trace("created extender");
};
};
moveExtenders();
hitTester();
_local3 = _projectile.dx;
_projectile.tempDistance = (_projectile.tempDistance + _local3);
dist_txt.text = (String(Math.floor((_distToTexas / 100))) + "Km");
_distToTexas = (_distToTexas - (_local3 * 5));
_projectile.mc.rotation = (_projectile.mc.rotation + 3);
_projectile.dy = (_projectile.dy + _gravity);
_local4 = new Point(_projectile.mc.x, _projectile.mc.y);
_local5 = this.localToGlobal(_local4);
checkScroll();
if ((((scrollHolder_mc.y >= 0)) && ((_local5.y <= 200)))){
scrollHolder_mc.y = (scrollHolder_mc.y - _projectile.dy);
obama_mc.y = (obama_mc.y - _projectile.dy);
bag_mc.y = (bag_mc.y - _projectile.dy);
if (scrollHolder_mc.y < 0){
scrollHolder_mc.y = -0.1;
};
} else {
_projectile.mc.y = (_projectile.mc.y + _projectile.dy);
if (_local5.y <= 200){
scrollHolder_mc.y = 0;
};
};
_projectile.newY = _projectile.mc.y;
if ((((_projectile.mc.y > 380)) && ((_projectile.speed > 0)))){
_soundManager.playSfx("hit");
_projectile.mc.y = 380;
_local6 = randRange(2, 7);
if (_projectile.mc.currentFrame != _local6){
_projectile.mc.gotoAndStop(_local6);
} else {
_projectile.mc.gotoAndStop(randRange(2, 6));
};
clearInterval(_projectile.shotInt);
clearInterval(_spawnInt);
_projectile.speed = Math.floor((_projectile.speed * 0.75));
fireBullet();
} else {
if (_projectile.speed <= 0){
clearInterval(_projectile.shotInt);
distanceBurst();
};
};
}
private function charge():void{
_projectile.speed = (_projectile.speed + 2);
if (_projectile.speed >= _projectile.totalSpeed){
clearInterval(_projectile.chargeInt);
obama_mc.play();
};
power_mc.bar_mc.scaleX = (_projectile.speed / _projectile.totalSpeed);
}
private function distWinClick(_arg1:MouseEvent):void{
}
private function mouseDown(_arg1:MouseEvent):void{
if (!_gameReady){
showGame();
} else {
if (((((!(_projectile.firstShot)) && ((mouseX > (_projectile.mc.x + _projectile.mc.width))))) && ((mouseY < arrow_mc.y)))){
clearInterval(_projectile.testInt);
obama_mc.play();
_projectile.firstShot = true;
} else {
if (_gameDone){
trace("endgame");
if (_overTrue){
_mainScr._highScore = 0;
} else {
if (_mainScr._highScore == 0){
_mainScr._highScore = (_distToTexas / 100);
trace(_mainScr._highScore);
} else {
if (_mainScr._highScore >= (_distToTexas / 100)){
_mainScr._highScore = (_distToTexas / 100);
};
};
};
_mainScr.removeChild(_distanceWindow);
_mainScr.loadScreen("gameScreen");
_soundManager.stopBg();
} else {
_soundManager.playSfx("buzz");
};
};
};
}
private function decreaseCharge():void{
_projectile.speed = (_projectile.speed - _projectile.speedGain);
if (_projectile.speed < 0){
clearInterval(_projectile.testInt);
_projectile.testInt = setInterval(increaseCharge, 30);
};
power_mc.bar_mc.scaleX = (_projectile.speed / _projectile.totalSpeed);
}
private function fireBullet():void{
var _local1:*;
var _local2:*;
_local1 = _launcher.degrees;
_local2 = ((_local1 / 180) * Math.PI);
_projectile.dx = Math.cos(_local2);
_projectile.dy = Math.sin(_local2);
_projectile.dx = (_projectile.dx * _projectile.speed);
_projectile.dy = (_projectile.dy * _projectile.speed);
_projectile.firstShot = true;
_projectile.shotInt = setInterval(moveProjectile, 30);
_spawnInt = setInterval(resetSpawn, _resetSpawnTime);
}
private function animDone(_arg1:Event):void{
showGame();
}
private function moveExtenders():void{
var _local1:int;
_local1 = 0;
while (_local1 < _extenderArray.length) {
_extenderArray[_local1].x = (_extenderArray[_local1].x - _projectile.dx);
if (_extenderArray[_local1].x < -50){
scrollHolder_mc.removeChild(_extenderArray[_local1]);
_extenderArray.splice(_local1, 1);
};
_local1++;
};
}
private function resetSpawn():void{
_dontSpawn = false;
}
private function followMouse(_arg1:MovieClip):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = (mouseX - _arg1.x);
_local3 = (mouseY - _arg1.y);
_local4 = Math.atan((_local3 / _local2));
_local5 = ((_local4 * 180) / Math.PI);
if (_local2 < 0){
_local5 = (_local5 - 180);
};
_launcher.degrees = _local5;
_launcher.mc.rotation = _local5;
arrow_mc.rotation = _local5;
}
private function gameStart():void{
dist_txt.text = (String(Math.floor((_distToTexas / 100))) + "Km");
_launcher = new Object();
_launcher.mc = turret_mc;
_launcher.degrees = 0;
_scrollNextBg = "scroll2";
_scrollNext.gotoAndStop(_scrollNextBg);
_scrollNext.x = _scrollCurrent.width;
scrollHolder_mc.addChild(_scrollCurrent);
scrollHolder_mc.addChild(_scrollNext);
createProjectile();
obama_mc.visible = false;
projectile_mc.visible = false;
arrow_mc.visible = false;
}
private function increaseCharge():void{
_projectile.speed = (_projectile.speed + _projectile.speedGain);
if (_projectile.speed > _projectile.totalSpeed){
clearInterval(_projectile.testInt);
_projectile.testInt = setInterval(decreaseCharge, 30);
};
power_mc.bar_mc.scaleX = (_projectile.speed / _projectile.totalSpeed);
}
private function startKick(_arg1:Event):void{
fireBullet();
_projectile.mc.gotoAndStop(randRange(2, 5));
_soundManager.playSfx("punch");
arrow_mc.visible = false;
bag_mc.visible = true;
}
private function checkScroll():void{
var _local1:Number;
_local1 = (_projectile.dx * 1);
_scrollCurrent.x = (_scrollCurrent.x - _local1);
_scrollNext.x = (_scrollNext.x - _local1);
if (_scrollCurrent.x <= -(_scrollCurrent.width)){
if (_scrollCounter < 1){
_scrollCurrentBg = "scroll1";
};
_scrollCurrent.gotoAndStop(_scrollCurrentBg);
_scrollCurrent.x = ((_scrollNext.x + _scrollNext.width) - 2);
_scrollCounter++;
};
if (_scrollNext.x <= -(_scrollNext.width)){
whichBgToScroll();
_scrollNext.gotoAndStop(_scrollNextBg);
_scrollNext.x = ((_scrollCurrent.x + _scrollCurrent.width) - 2);
};
}
}
}//package com.axel.fog.blackhouse
Section 3
//SoundHandler (com.axel.fog.blackhouse.SoundHandler)
package com.axel.fog.blackhouse {
import flash.events.*;
import flash.media.*;
public class SoundHandler {
private var _bg:Sound;
private var _sfx:Sound;
private var _sfxChannel:SoundChannel;
private var _bgChannel:SoundChannel;
public function SoundHandler(){
_bgChannel = new SoundChannel();
_sfxChannel = new SoundChannel();
_sfx = new Sound();
_bg = new Sound();
super();
}
private function soundCompleteHandler(_arg1:Event):void{
_bgChannel = _bg.play();
_bgChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
public function stopBg():void{
_bgChannel.stop();
}
public function playSfx(_arg1:String){
switch (_arg1){
case "hit":
_sfx = new hitSound();
break;
case "punch":
_sfx = new punchSound();
break;
case "buzz":
_sfx = new BuzzSound();
break;
};
_sfxChannel = _sfx.play();
}
public function playBg():void{
_bg = new bgSound();
_bgChannel = _bg.play();
_bgChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
}
}//package com.axel.fog.blackhouse
Section 4
//TitleScreen (com.axel.fog.blackhouse.TitleScreen)
package com.axel.fog.blackhouse {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
public class TitleScreen extends MovieClip {
private var _soundCheck:Boolean;
public var minifoggy_btn:MovieClip;
private var _mainScr:Main;
public var playmore_btn:SimpleButton;
public var sound_mc:MovieClip;
public var start_btn:SimpleButton;
public function TitleScreen(_arg1:Main):void{
_soundCheck = new Boolean();
super();
_mainScr = _arg1;
_soundCheck = true;
start_btn.addEventListener(MouseEvent.CLICK, startClick);
playmore_btn.addEventListener(MouseEvent.CLICK, playmoreClick);
minifoggy_btn.addEventListener(MouseEvent.CLICK, fogClick);
sound_mc.addEventListener(MouseEvent.CLICK, soundSwitch);
sound_mc.buttonMode = true;
}
private function soundSwitch(_arg1:MouseEvent):void{
if (_soundCheck){
trace("off");
sound_mc.gotoAndStop("off");
SoundMixer.soundTransform = new SoundTransform(0);
_soundCheck = false;
} else {
trace("on");
sound_mc.gotoAndStop("on");
SoundMixer.soundTransform = new SoundTransform(1);
_soundCheck = true;
};
}
public function dispose():void{
start_btn.removeEventListener(MouseEvent.CLICK, startClick);
}
private function fogClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeonlinegames.com/?blackhouse"), "_blank");
}
private function playmoreClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freegamesforyourwebsite.com/?blackhouse"), "_blank");
}
private function startClick(_arg1:MouseEvent):void{
_mainScr.loadScreen("gameScreen");
}
}
}//package com.axel.fog.blackhouse
Section 5
//bagMC_35 (fog_blackhouse_fla.bagMC_35)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class bagMC_35 extends MovieClip {
public function bagMC_35(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.visible = false;
}
}
}//package fog_blackhouse_fla
Section 6
//bushIntro_44 (fog_blackhouse_fla.bushIntro_44)
package fog_blackhouse_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bushIntro_44 extends MovieClip {
public function bushIntro_44(){
addFrameScript(169, frame170);
}
function frame170(){
stop();
this.visible = false;
MovieClip(this.parent).projectile_mc.visible = true;
MovieClip(this.parent).obamaAnim_mc.play();
}
}
}//package fog_blackhouse_fla
Section 7
//fog_67 (fog_blackhouse_fla.fog_67)
package fog_blackhouse_fla {
import flash.display.*;
import flash.media.*;
public dynamic class fog_67 extends MovieClip {
public var channel:SoundChannel;
public var fogsound:fogaudio;
public var loadednow2:MovieClip;
public function fog_67(){
addFrameScript(70, frame71, 190, frame191);
}
function frame71(){
fogsound = new fogaudio();
channel = fogsound.play();
}
function frame191(){
stop();
}
}
}//package fog_blackhouse_fla
Section 8
//mainBarMC_51 (fog_blackhouse_fla.mainBarMC_51)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class mainBarMC_51 extends MovieClip {
public var bar_mc:MovieClip;
}
}//package fog_blackhouse_fla
Section 9
//mcLinkages_1 (fog_blackhouse_fla.mcLinkages_1)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class mcLinkages_1 extends MovieClip {
public function mcLinkages_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fog_blackhouse_fla
Section 10
//mcNewLogoSpin2_69 (fog_blackhouse_fla.mcNewLogoSpin2_69)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class mcNewLogoSpin2_69 extends MovieClip {
public var mcNotice:MovieClip;
public function mcNewLogoSpin2_69(){
addFrameScript(0, frame1, 119, frame120);
}
function frame1(){
mcNotice.visible = false;
}
function frame120(){
stop();
}
}
}//package fog_blackhouse_fla
Section 11
//mcSounds_71 (fog_blackhouse_fla.mcSounds_71)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class mcSounds_71 extends MovieClip {
public function mcSounds_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fog_blackhouse_fla
Section 12
//obamaIntro_46 (fog_blackhouse_fla.obamaIntro_46)
package fog_blackhouse_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class obamaIntro_46 extends MovieClip {
public var sub_mc:MovieClip;
public function obamaIntro_46(){
addFrameScript(0, frame1, 1, frame2, 89, frame90, 110, frame111, 129, frame130);
}
function frame90(){
sub_mc.gotoAndStop(1);
}
function frame1(){
stop();
}
function frame111(){
this.visible = false;
MovieClip(this.parent).obama_mc.visible = true;
}
function frame2(){
stop();
}
function frame130(){
stop();
dispatchEvent(new Event("animDone"));
}
}
}//package fog_blackhouse_fla
Section 13
//ObamaMC_42 (fog_blackhouse_fla.ObamaMC_42)
package fog_blackhouse_fla {
import flash.events.*;
import flash.display.*;
public dynamic class ObamaMC_42 extends MovieClip {
public function ObamaMC_42(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
dispatchEvent(new Event("kick"));
}
function frame1(){
stop();
}
}
}//package fog_blackhouse_fla
Section 14
//prelMCxcopy_ovidiu2_66 (fog_blackhouse_fla.prelMCxcopy_ovidiu2_66)
package fog_blackhouse_fla {
import flash.display.*;
import flash.text.*;
public dynamic class prelMCxcopy_ovidiu2_66 extends MovieClip {
public var procent:TextField;
public function prelMCxcopy_ovidiu2_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package fog_blackhouse_fla
Section 15
//projectileMC_37 (fog_blackhouse_fla.projectileMC_37)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class projectileMC_37 extends MovieClip {
public function projectileMC_37(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package fog_blackhouse_fla
Section 16
//soundSwitchMC_57 (fog_blackhouse_fla.soundSwitchMC_57)
package fog_blackhouse_fla {
import flash.display.*;
public dynamic class soundSwitchMC_57 extends MovieClip {
public function soundSwitchMC_57(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package fog_blackhouse_fla
Section 17
//BgHolder (BgHolder)
package {
import flash.display.*;
public dynamic class BgHolder extends MovieClip {
public function BgHolder(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 18
//bgSound (bgSound)
package {
import flash.media.*;
public dynamic class bgSound extends Sound {
}
}//package
Section 19
//BuzzSound (BuzzSound)
package {
import flash.media.*;
public dynamic class BuzzSound extends Sound {
}
}//package
Section 20
//distanceBurstMC (distanceBurstMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class distanceBurstMC extends MovieClip {
public var score_txt:TextField;
public function distanceBurstMC(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 21
//fogaudio (fogaudio)
package {
import flash.media.*;
public dynamic class fogaudio extends Sound {
}
}//package
Section 22
//hitSound (hitSound)
package {
import flash.media.*;
public dynamic class hitSound extends Sound {
}
}//package
Section 23
//LoaderClip (LoaderClip)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class LoaderClip extends MovieClip {
public var loader:URLLoader;
public var btnFoggy:SimpleButton;
public var variables:URLVariables;
public var request:URLRequest;
public var loadednow:MovieClip;
public var pre1:MovieClip;
public function LoaderClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
variables = new URLVariables(("gid=277&url=" + loaderInfo.url));
request = new URLRequest();
request.url = "http://www.freegamesforyourwebsite.com/stats.php";
request.method = URLRequestMethod.POST;
request.data = variables;
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, completeHandlers);
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load URL");
};
btnFoggy.addEventListener(MouseEvent.MOUSE_DOWN, linkfeed);
}
public function linkfeed(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freegamesforyourwebsite.com/click.php?gid=277&area=loader");
navigateToURL(_local2, "_blank");
}
public function completeHandlers(_arg1:Event):void{
trace("SENT INFO");
}
}
}//package
Section 24
//Main (Main)
package {
import flash.display.*;
import com.axel.fog.blackhouse.*;
public class Main extends Sprite {
private var _currentScreen;
public var _highScore:int;// = 0
public var _introDone:Boolean;
public function Main():void{
_introDone = new Boolean();
_highScore = 0;
super();
_currentScreen = new TitleScreen(this);
addChild(_currentScreen);
}
public function loadScreen(_arg1:String){
_currentScreen.dispose();
removeChild(_currentScreen);
switch (_arg1){
case "gameScreen":
_currentScreen = new GameScreen(this);
break;
case "titleScreen":
_currentScreen = new TitleScreen(this);
break;
};
addChild(_currentScreen);
}
}
}//package
Section 25
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class Preloader extends MovieClip {
var loadMC:LoaderClip;
var Furl:String;// = ""
var debug:Boolean;// = true
var Main:Class;
public function Preloader(){
loadMC = new LoaderClip();
Furl = "";
debug = true;
super();
addChild(loadMC);
loadMC.x = 0;
loadMC.y = 0;
addEventListener(Event.ENTER_FRAME, progressHandler);
}
function enterframeHandler(){
loadMC.gotoAndStop(2);
loadMC.addEventListener(Event.ENTER_FRAME, enter1frameHandler);
trace("OK");
}
function progressHandler(_arg1:Event){
loadMC.pre1.procent.text = Math.floor(((loaderInfo.bytesLoaded * 100) / loaderInfo.bytesTotal)).toFixed();
loadMC.pre1.gotoAndStop(loadMC.pre1.procent.text);
if (Number(loadMC.pre1.procent.text) >= 99){
Furl = loaderInfo.url;
removeEventListener(Event.ENTER_FRAME, progressHandler);
enterframeHandler();
};
}
function completeHandler(_arg1:Event){
this.addEventListener(Event.ENTER_FRAME, enterframeHandler);
trace("OKIDOKI");
}
function enter1frameHandler(_arg1:Event){
trace("HERE");
trace(loadMC.loadednow.currentFrame);
if (loadMC.loadednow.currentFrame >= 190){
if ((((Furl.indexOf("freeonlinegames.com") >= 0)) && ((Furl.indexOf("file:") == -1)))){
loadMC.removeEventListener(Event.ENTER_FRAME, enter1frameHandler);
loadMC.parent.removeChild(loadMC);
Main = (loaderInfo.applicationDomain.getDefinition("Main") as Class);
addChild(new Main());
} else {
if (debug){
loadMC.removeEventListener(Event.ENTER_FRAME, enter1frameHandler);
loadMC.parent.removeChild(loadMC);
Main = (loaderInfo.applicationDomain.getDefinition("Main") as Class);
addChild(new Main());
} else {
loadMC.loadednow.loadednow2.mcNotice.visible = true;
};
};
};
}
}
}//package
Section 26
//punchSound (punchSound)
package {
import flash.media.*;
public dynamic class punchSound extends Sound {
}
}//package
Section 27
//turretMC (turretMC)
package {
import flash.display.*;
public dynamic class turretMC extends MovieClip {
}
}//package