Section 1
//OpponentEngine (classes.engine.OpponentEngine)
package classes.engine {
import flash.display.*;
public class OpponentEngine extends MovieClip {
var randomize:Number;
var unique_nr:Array;
var Random_Player_Position:Number;
var horse_listing:Array;
var imienia:Array;
var speed:Number;
var Vacancies:Number;
var opponent_ammount:Number;// = 3
var opponentArray:Array;
var free_space:Number;
var up_line:Number;// = 160
var nameOpponentArray:Array;
var player:MovieClip;
var Size:Number;
var down_line:Number;// = 360
var height_track:Number;
var No_Name_Selected:Array;
var min_Break:Number;// = 20
var exist_horses:Array;
public function OpponentEngine(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
opponent_ammount = _arg3;
exist_horses = new Array();
No_Name_Selected = new Array();
unique_nr = new Array();
unique_nr.push((_arg2 - 1));
opponentArray = new Array();
nameOpponentArray = new Array();
player = _arg1;
speed = _arg4;
down_line = _arg5;
up_line = _arg6;
Size = _arg7;
free_space = _arg8;
Random_Player_Position = _arg9;
exist_horses.push(_arg1);
horse_listing = new Array();
horse_listing.push(horseracenr1, horseracenr2, horseracenr3, horseracenr4, horseracenr5, horseracenr6, horseracenr7, horseracenr8);
init();
}
public function init(){
height_track = (down_line - up_line);
min_Break = 20;
Vacancies = (height_track / (((opponent_ammount + 1) * player.height) - player.height));
randomize = Math.round((Math.random() * 7));
if (Vacancies > (opponent_ammount * min_Break)){
player.height = (player.height * ((Vacancies / (opponent_ammount + 1)) - min_Break));
};
initNames();
createOpponent();
}
private function createOpponent(){
var _local1:MovieClip;
var _local2:MovieClip;
var _local4:Number;
var _local5:*;
var _local3:Number = 1;
while (_local3 <= opponent_ammount) {
_local4 = 0;
do {
if (randomize == unique_nr[_local4]){
_local4 = 0;
randomize = Math.round((Math.random() * 7));
} else {
_local4++;
};
} while (_local4 < unique_nr.length);
unique_nr.push(randomize);
_local1 = new (horse_listing[randomize]);
_local1.zderzak.alpha = 0;
_local1.x = player.x;
_local1.y = (160 + (_local3 * free_space));
if (_local3 == Random_Player_Position){
_local1.y = 160;
};
_local1.scaleX = -(Size);
_local1.scaleY = Size;
_local1.Cage = ((_local3 * 3) + 1);
_local1.gwiazda.alpha = 0;
_local5 = Math.round((Math.random() * (imienia.length - 1)));
_local4 = 0;
do {
if (_local5 == No_Name_Selected[_local4]){
_local4 = 0;
_local5 = Math.round((Math.random() * (imienia.length - 1)));
} else {
_local4++;
};
} while (_local4 < No_Name_Selected.length);
No_Name_Selected.push(_local5);
_local1.horse_arrow.horse_txt.text = ("" + imienia[_local5]);
exist_horses.push(_local1);
_local2 = new box_name();
_local2.x = ((_local1.x - (_local1.width / 2)) - 50);
_local2.y = (_local1.y - 80);
_local2.horse_txt.text = ("" + _local1.horse_arrow.horse_txt.text);
_local1.addiction_speed = (Math.round((Math.random() * 6)) / 10);
_local1._distance = 0;
_local1._actual_speed = speed;
_local1.x = player.x;
opponentArray.push(_local1);
nameOpponentArray.push(_local2);
_local3++;
};
}
private function initNames():void{
imienia = new Array();
imienia.push("Absurd Plane", "Acceptance", "Achilles Heel", "Ali Babble", "All For The Gold", "Allouttalove", "Apollos Will", "Back Me Up", "Backa Boo", "Bad Effect", "Bad Knight", "Bear Bones", "Best Trier", "Big Game Hunter", "Big Globe", "Big Okie", "Black Knight", "Bluedemon", "Boo Boo Bear", "Brave Effort", "Broad Brush", "Bulkpak", "Bustamove", "Captain Havoc", "Carson Secrets", "Celestial Glory", "Celtic Rain", "Champ in Action", "Charlie Sukuru", "Charliehorse", "Checkmate", "Chilcat Charlie", "Chocomotive", "Cloudy Day", "Con Belleza", "Cool Recovery", "Crackshot", "Crazed Sun", "Crown Jewel", "D.Wayne Avenue", "Daisy Dukes", "Dancing Shadow", "Daniella", "Dark Pace", "Demon Begone", "Desert Elegance", "Desert Monsoon", "Desert Storm", "Didntraisenofool", "Dirty Deeds", "Double O Seven", "Doubleotsix", "Dutch Bahama", "Eatsomedirt", "Empty Handed", "Eternal Word", "FamousLastWord", "Fantasy Flight", "Fantasy Man", "Fasterthanfast", "Fight", "Finderskeepers", "First by a Mile", "First in Line", "Flame N Glory", "Fleetruffi", "Fletcher Triumph", "Flying Flora", "Formality", "Fortitude", "Frist Down Ezzy", "Funny Bridge", "Ghost Hunter", "Givethedevilhisdue", "Glowing Asset", "Gold Gift", "Golden Java", "Gran Dama", "Grand Stand", "Great Pleasure", "Grimacing", "Happy Gilmore", "Happy Puppy", "Hard Eight", "Havin Fun", "Hay Hoof Hearted", "Height of Fashion", "High Falutin", "Hoosier Daddy", "Huayun", "Ignitro", "Inevitable", "Iron Bull", "Jet", "Jiva Coolit", "Johnnie Be Good", "Johnnies Jet", "Juan Ina Million", "Jump The Queue", "Just a Desert Stor", "Just A Ham", "King Crisco", "King Gone", "Kwik Man", "Lilmissbluejeans", "Lionheart", "Little Iceberg", "Live To Tell", "Lmao", "Loco Guy", "Locomotive", "Lord", "Lotsa Moxie", "Love That Kash", "Lovinit", "Luke Warm", "Lunar Eclipse", "Luzerne", "Magik Dozen", "Major Moves", "Make My day", "Marshall Law", "Mean An Imposing", "Medieval Royalty", "Midnight", "Aces Wild", "All About Speed", "All Bidder", "Amazon Silver", "Andromeda Plane", "Ava Runs Wild", "Babee Angel", "Barkly", "Bella Nera", "Bites A Little", "Bitter Pill", "Black Arabian", "Black Gem", "Black Magik", "Blaze of Glory", "Blind Vision", "Blizzard of Ozz", "Boney Roanie", "Bonnes", "Bonnie Lass", "Braking The Bank", "Brewtality", "Bull Run", "Bullet Racer", "Burkes Law", "C Your Pictures", "Canarsiekid", "Cant Touch This", "Capital Eyes", "Caressive", "Careyese", "Casino Girl", "Charlotte Town", "Chelsea Dream", "Chickie Chickie", "Chief", "Chilly Club", "Chiobebe", "City Dancer", "Cleannancy", "Cochleate", "Cold Croc Ya", "Cold Heart", "Color of Money", "Comanche", "Comin Soon", "Corona Cartel", "Couldofshouldof", "CQ Jane", "Crazy Wylde", "Critical Sun", "Croatia", "Daily Double", "Daisy Cutter", "Dancin With Dynomi", "Dancing Wizard", "Dark Desire", "Dark Eyes", "Defamation", "Demonsteed", "Dirtyred", "Disco Dancer", "Down", "Download", "Dracarys", "Dreamcatcher", "DrifterS Escape", "Dry Heat", "Dubious Veiw", "Eires Beauty", "Electric Shock", "Elmer", "Enufwitdahaydude", "Eye Candy", "Far Conductor");
}
}
}//package classes.engine
Section 2
//RaceEngine (classes.engine.RaceEngine)
package classes.engine {
import flash.events.*;
import flash.display.*;
import classes.*;
import classes.userinterface.*;
import flash.utils.*;
public class RaceEngine extends MovieClip {
private var uiRace:UIRace;
var prepare_race:Timer;
var opponent_ammount:Number;// = 3
public var playerName:String;// = "new player"
var base_opponent_speed:Number;
public var playerNr:Number;// = 1
private var oddsArray:RandomOdds;
var nitro;// = 0
public var victory:Boolean;// = false
private var uiPlayer:UIPlayer;
var nitro_running:Boolean;// = false
var minieta_flaga:Boolean;// = false
var Slow:Number;// = 0.2
var ready:Boolean;// = true
var Remove:Boolean;// = false
var up_line:Number;// = 160
private var uiKeys:UIKeys;
var horse_run;// = 29
public var Scoring:Number;// = 0
var position_player:Number;
var turbo_wins:Timer;
var Last_Player_Position:Number;
var No_Of_Laps:Number;// = 0
var Size:Number;// = 0.65
var nitro_ammount:Number;// = 0
var speed:Number;// = 20
var trasa_end:Number;// = 18000
private var myEvent:MyEvent;
public var poziom:Number;// = 1
var center:Number;
public var Position:Number;// = 0
var count_down:Number;// = 3
var secondOfRace:Number;// = 0
var Cage;// = 0
private var cntOpponent:OpponentEngine;
var minieta_meta:Boolean;// = false
var horse_walk;// = 11
var down_line:Number;// = 360
var free_space:Number;// = 0
var globalTMP:Number;// = 1
public var raceNr:Number;// = 0
var background_speed:Number;// = 0
public function RaceEngine(){
oddsArray = new RandomOdds();
myEvent = new MyEvent();
turbo_wins = new Timer(1000);
}
public function startRace(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
uiRace = new UIRace();
uiKeys = new UIKeys();
this.addChild(uiRace);
this.addChild(uiKeys);
turbo_wins = new Timer(500);
prepare_race = new Timer(1000);
poziom = _arg3;
raceNr = _arg5;
Scoring = _arg4;
init();
playerName = _arg1;
playerNr = _arg2;
uiPlayer = new UIPlayer(playerNr, Size, free_space, Last_Player_Position);
center = (320 + (uiPlayer.player.width / 2));
cntOpponent = new OpponentEngine(uiPlayer.player, playerNr, opponent_ammount, speed, down_line, up_line, Size, free_space, Last_Player_Position);
this.addChild(uiPlayer);
this.addChild(cntOpponent);
odds_checking();
addEvents();
prepareRun();
uiRace.trasa.flaga.gotoAndStop("green");
uiRace.flag_1.gotoAndStop("green");
prepare_race.addEventListener(TimerEvent.TIMER, prepare_to_start);
prepare_race.start();
}
function remove_listeners(){
var _local1:Number = 0;
while (_local1 < cntOpponent.exist_horses.length) {
uiRace.horsesMc.removeChild(cntOpponent.exist_horses[_local1]);
_local1++;
};
uiKeys.removeEvents();
uiPlayer.player.removeEventListener(Event.ENTER_FRAME, move_player);
uiPlayer.player.removeEventListener(Event.ENTER_FRAME, move_opponent);
turbo_wins.removeEventListener(TimerEvent.TIMER, enable_nitro);
prepare_race.removeEventListener(TimerEvent.TIMER, prepare_to_start);
this.removeEventListener(Event.ENTER_FRAME, accelerated_move);
uiRace.big_bgd.removeEventListener(Event.ENTER_FRAME, move_bgd);
this.removeChild(uiPlayer);
this.removeChild(cntOpponent);
this.removeChild(uiRace);
this.removeChild(uiKeys);
dispatchEvent(new Event(myEvent.RACE_FINISH));
}
function move_player(_arg1:Event){
var _local9:Number;
var _local10:Number;
globalTMP++;
var _local2:Number = (speed + nitro);
var _local3:Number = uiPlayer.player.width;
var _local4:Number = (generateEnergyUseLevel(poziom) / 1200);
Position = 0;
var _local5:Number = 0;
while (_local5 < cntOpponent.exist_horses.length) {
if (uiPlayer.player != cntOpponent.exist_horses[_local9]){
if (uiPlayer.player._distance > cntOpponent.exist_horses[_local5]._distance){
cntOpponent.exist_horses[_local5].wyporzedzony = 0;
} else {
cntOpponent.exist_horses[_local5].wyporzedzony = 1;
};
Position = (Position + cntOpponent.exist_horses[_local5].wyporzedzony);
};
_local5++;
};
if (uiKeys.upArrow == true){
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX - (_local4 * 1.25));
uiPlayer.player.y = (uiPlayer.player.y - 2);
if (uiPlayer.player.y < up_line){
uiPlayer.player.y = (uiPlayer.player.y + 2);
};
_local9 = 0;
while (_local9 < cntOpponent.exist_horses.length) {
if (uiPlayer.player != cntOpponent.exist_horses[_local9]){
if (uiPlayer.player.zderzak.T.hitTestObject(cntOpponent.exist_horses[_local9].zderzak.B)){
uiPlayer.player.y = (uiPlayer.player.y + 2);
};
};
_local9++;
};
};
if (uiKeys.downArrow == true){
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX - (_local4 * 1.25));
uiPlayer.player.y = (uiPlayer.player.y + 2);
if (uiPlayer.player.y > down_line){
uiPlayer.player.y = (uiPlayer.player.y - 2);
};
_local9 = 0;
while (_local9 < cntOpponent.exist_horses.length) {
if (uiPlayer.player != cntOpponent.exist_horses[_local9]){
if (uiPlayer.player.zderzak.B.hitTestObject(cntOpponent.exist_horses[_local9].zderzak.T)){
uiPlayer.player.y = (uiPlayer.player.y - 2);
};
};
_local9++;
};
};
if ((((((uiKeys.rightArrow == true)) && ((uiKeys.leftArrow == false)))) && ((uiRace.energy.energyMask.scaleX > 0)))){
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX - (_local4 * (2 + (2 * uiRace.pace.paceMask.scaleX))));
if ((uiRace.energy.energyMask.scaleX > 0.1)){
uiPlayer.player._actual_speed = _local2;
} else {
uiPlayer.player._actual_speed = (_local2 * 0.9);
};
if ((uiRace.pace.paceMask.scaleX < 0.78)){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX + 0.02);
};
if ((uiRace.pace.paceMask.scaleX > 0.78)){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX - 0.003);
};
if ((uiPlayer.player.x > center)){
uiPlayer.player.x = (uiPlayer.player.x + 0);
} else {
uiPlayer.player.x = (uiPlayer.player.x + (Slow * 5));
};
_local9 = 0;
while (_local9 < cntOpponent.exist_horses.length) {
if (uiPlayer.player != cntOpponent.exist_horses[_local9]){
if (uiPlayer.player.zderzak.R.hitTestObject(cntOpponent.exist_horses[_local9].zderzak.L)){
uiPlayer.player._actual_speed = cntOpponent.exist_horses[_local9]._actual_speed;
uiPlayer.player.x = (uiPlayer.player.x - (Slow * 5));
};
};
_local9++;
};
uiPlayer.player._distance = (uiPlayer.player._distance + uiPlayer.player._actual_speed);
};
if ((((((uiKeys.rightArrow == true)) && ((uiKeys.leftArrow == false)))) && ((uiRace.energy.energyMask.scaleX <= 0)))){
if (uiRace.energy.energyMask.scaleX > 0.1){
uiPlayer.player._actual_speed = (_local2 * 0.9);
} else {
uiPlayer.player._actual_speed = (_local2 * 0.8);
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX + 0.0003);
};
uiPlayer.player._distance = (uiPlayer.player._distance + uiPlayer.player._actual_speed);
if (uiPlayer.player.x > _local3){
uiPlayer.player.x = (uiPlayer.player.x - Slow);
};
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX - _local4);
if (uiRace.pace.paceMask.scaleX > 0.35){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX - 0.02);
};
if (uiRace.pace.paceMask.scaleX < 0.33){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX + 0.02);
};
};
if ((((uiKeys.rightArrow == false)) && ((uiKeys.leftArrow == false)))){
if (uiRace.energy.energyMask.scaleX > 0.1){
uiPlayer.player._actual_speed = (_local2 * 0.9);
} else {
uiPlayer.player._actual_speed = (_local2 * 0.8);
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX + 0.0003);
};
uiPlayer.player._distance = (uiPlayer.player._distance + uiPlayer.player._actual_speed);
if (uiPlayer.player.x > _local3){
uiPlayer.player.x = (uiPlayer.player.x - Slow);
};
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX - _local4);
if (uiRace.pace.paceMask.scaleX > 0.35){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX - 0.02);
};
if (uiRace.pace.paceMask.scaleX < 0.33){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX + 0.02);
};
};
if ((((uiKeys.leftArrow == true)) && ((uiKeys.rightArrow == false)))){
uiPlayer.player._actual_speed = (_local2 * 0.7);
uiPlayer.player._distance = (uiPlayer.player._distance + uiPlayer.player._actual_speed);
uiRace.energy.energyMask.scaleX = (uiRace.energy.energyMask.scaleX + 0.0005);
if (uiPlayer.player.x > _local3){
uiPlayer.player.x = (uiPlayer.player.x - (Slow * 5));
};
if (uiRace.pace.paceMask.scaleX > 0){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX - 0.02);
};
};
if (uiKeys.space == true){
if ((((ready == true)) && ((nitro_ammount > 0)))){
nitro_running = true;
nitro = 2;
nitro_ammount--;
ready = false;
turbo_wins.start();
count_down = 3;
dispatchEvent(new Event(myEvent.SOUND_PLAY_WHIP));
if (nitro_ammount == 2){
uiRace.whips.whip_1.gotoAndStop("grey");
};
if (nitro_ammount == 1){
uiRace.whips.whip_2.gotoAndStop("grey");
};
if (nitro_ammount == 0){
uiRace.whips.whip_3.gotoAndStop("grey");
};
};
};
Scoring = (Scoring + uiPlayer.player._actual_speed);
if (nitro_running == true){
uiRace.pace.paceMask.scaleX = (uiRace.pace.paceMask.scaleX + 0.06);
if (uiRace.pace.paceMask.scaleX > 1){
uiRace.pace.paceMask.scaleX = 1;
};
};
var _local6:* = cntOpponent.exist_horses[Last_Player_Position];
cntOpponent.exist_horses[Last_Player_Position] = uiPlayer.player;
cntOpponent.exist_horses[0] = _local6;
var _local7:Number = 0;
while (_local7 < cntOpponent.exist_horses.length) {
_local10 = 0;
while (_local10 < cntOpponent.exist_horses.length) {
if (cntOpponent.exist_horses[_local7].y < cntOpponent.exist_horses[_local10].y){
swap(cntOpponent.exist_horses[_local10]);
};
_local10++;
};
_local7++;
};
cntOpponent.exist_horses[Last_Player_Position] = _local6;
cntOpponent.exist_horses[0] = uiPlayer.player;
swap(uiRace.www_adres_up);
swap(uiRace.status_bar);
swap(uiRace.pace);
swap(uiRace.energy);
swap(uiRace.trasa);
swap(uiRace.whips);
var _local8:Number = 0;
while (_local8 < cntOpponent.nameOpponentArray.length) {
swap(cntOpponent.nameOpponentArray[_local8]);
_local8++;
};
}
private function init(){
if (poziom >= 7){
Size = 0.7;
opponent_ammount = 5;
free_space = 40;
} else {
if (poziom >= 4){
Size = 0.85;
opponent_ammount = 4;
free_space = 50;
} else {
Size = 1;
opponent_ammount = 3;
free_space = 60;
};
};
Last_Player_Position = Math.round((Math.random() * opponent_ammount));
base_opponent_speed = (speed - 2.4);
}
function odds_checking(){
var _local6:Number;
var _local7:*;
uiRace.odds.gotoAndStop(1);
var _local1:Array = new Array();
_local1.push(speed, (base_opponent_speed + cntOpponent.exist_horses[1].addiction_speed), (base_opponent_speed + cntOpponent.exist_horses[2].addiction_speed), (base_opponent_speed + cntOpponent.exist_horses[3].addiction_speed));
uiRace.odds.kon_5_name.visible = false;
uiRace.odds.kon_6_name.visible = false;
uiRace.odds.kon_5_szanse.visible = false;
uiRace.odds.kon_6_szanse.visible = false;
if (opponent_ammount == 4){
uiRace.odds.gotoAndStop(2);
uiRace.odds.kon_5_name.text = cntOpponent.exist_horses[4].horse_arrow.horse_txt.text;
uiRace.odds.kon_5_name.visible = true;
uiRace.odds.kon_5_szanse.visible = true;
_local1.push((base_opponent_speed + cntOpponent.exist_horses[4].addiction_speed));
} else {
if (opponent_ammount == 5){
uiRace.odds.gotoAndStop(3);
uiRace.odds.kon_5_name.text = cntOpponent.exist_horses[4].horse_arrow.horse_txt.text;
uiRace.odds.kon_6_name.text = cntOpponent.exist_horses[5].horse_arrow.horse_txt.text;
uiRace.odds.kon_5_name.visible = true;
uiRace.odds.kon_5_szanse.visible = true;
uiRace.odds.kon_6_name.visible = true;
uiRace.odds.kon_6_szanse.visible = true;
_local1.push((base_opponent_speed + cntOpponent.exist_horses[4].addiction_speed), (base_opponent_speed + cntOpponent.exist_horses[5].addiction_speed));
};
};
var _local2:Number = 0;
while (_local2 < _local1.length) {
_local6 = 0;
while (_local6 < _local1.length) {
if (_local1[_local2] > _local1[_local6]){
_local7 = _local1[_local2];
_local1[_local2] = _local1[_local6];
_local1[_local6] = _local7;
};
_local6++;
};
_local2++;
};
uiRace.odds.kon_2_name.text = cntOpponent.exist_horses[1].horse_arrow.horse_txt.text;
uiRace.odds.kon_3_name.text = cntOpponent.exist_horses[2].horse_arrow.horse_txt.text;
uiRace.odds.kon_4_name.text = cntOpponent.exist_horses[3].horse_arrow.horse_txt.text;
var _local3:Array = oddsArray.getOpponentOdds(poziom);
var _local4:Number = oddsArray.getPlayerOdds(poziom);
_local2 = 0;
while (_local2 < _local1.length) {
if (speed == _local1[_local2]){
uiRace.odds[(("kon_" + 1) + "_szanse")].text = (("" + _local4) + " : 1");
};
_local2++;
};
var _local5:* = 1;
while (_local5 < cntOpponent.exist_horses.length) {
_local2 = 0;
while (_local2 < _local1.length) {
if ((Number(base_opponent_speed) + Number(cntOpponent.exist_horses[_local5].addiction_speed)) == Number(_local1[_local2])){
uiRace.odds[(("kon_" + (_local5 + 1)) + "_szanse")].text = (("" + _local3[(_local5 - 1)]) + " : 1");
};
_local2++;
};
_local5++;
};
}
private function addEvents(){
turbo_wins.addEventListener(TimerEvent.TIMER, enable_nitro);
prepare_race.addEventListener(TimerEvent.TIMER, prepare_to_start);
}
function swap(_arg1):void{
_arg1.parent.setChildIndex(_arg1, (_arg1.parent.numChildren - 1));
}
function track_engine(_arg1:Event){
var _local2:Number = 0;
var _local3:Number = uiPlayer.player._distance;
_local2 = Math.round((3599 * (_local3 / trasa_end)));
if (((trasa_end / 8) * 2) >= _local3){
_local2 = (_local2 + 3);
} else {
if (((trasa_end / 8) * 4) >= _local3){
_local2 = (_local2 + 3);
} else {
_local2 = Math.round((_local2 - 0.5));
};
};
uiRace.trasa.gotoAndStop(_local2);
if (_local3 > trasa_end){
if (No_Of_Laps == 0){
trasa_end = 12000;
uiRace.flag_1.gotoAndStop("red");
} else {
trasa_end = 18000;
uiRace.flag_1.gotoAndStop("green");
};
};
}
function start_race(){
if (secondOfRace >= 0){
uiPlayer.player.addEventListener(Event.ENTER_FRAME, move_player);
uiPlayer.player.addEventListener(Event.ENTER_FRAME, move_opponent);
uiRace.big_bgd.addEventListener(Event.ENTER_FRAME, move_bgd);
secondOfRace = 0;
background_speed = 0;
nitro = 0;
nitro_ammount = 3;
};
}
public function prepareRun(){
if (No_Of_Laps == 0){
trasa_end = 24000;
uiRace.flag_1.gotoAndStop("red");
} else {
trasa_end = 0x7D00;
uiRace.flag_1.gotoAndStop("green");
};
var _local1:Number = 0;
while (_local1 < cntOpponent.exist_horses.length) {
uiRace.horsesMc.addChild(cntOpponent.exist_horses[_local1]);
if ((((_local1 == Last_Player_Position)) && (!((_local1 == 0))))){
uiRace.horsesMc.swapChildren(cntOpponent.exist_horses[0], cntOpponent.exist_horses[_local1]);
};
_local1++;
};
var _local2:Number = 0;
while (_local2 < cntOpponent.nameOpponentArray.length) {
uiRace.namesMc.addChild(cntOpponent.nameOpponentArray[_local2]);
_local2++;
};
}
private function generateEnergyUseLevel(_arg1:Number):Number{
var _local2:Number = 0.5;
switch (_arg1){
case 1:
_local2 = 0.53;
break;
case 2:
_local2 = 0.535;
break;
case 3:
_local2 = 0.545;
break;
case 4:
_local2 = 0.565;
break;
case 5:
_local2 = 0.7;
break;
case 6:
_local2 = 0.7;
break;
case 7:
_local2 = 0.7;
break;
case 8:
_local2 = 0.7;
break;
case 9:
_local2 = 0.8;
break;
case 10:
_local2 = 0.8;
break;
default:
_local2 = 0.5;
break;
};
return (_local2);
}
function move_opponent(_arg1:Event){
var _local4:*;
var _local5:Number;
var _local6:Number;
var _local2:Number = uiPlayer.player.width;
var _local3:Number = 1;
while (_local3 <= cntOpponent.opponent_ammount) {
_local4 = (((base_opponent_speed + (poziom / 10)) + cntOpponent.opponentArray[(_local3 - 1)].addiction_speed) + (Math.round((Math.random() * 5)) / 10));
cntOpponent.opponentArray[(_local3 - 1)]._actual_speed = _local4;
_local5 = 0;
while (_local5 < cntOpponent.exist_horses.length) {
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[_local5]){
if (cntOpponent.opponentArray[(_local3 - 1)].x > cntOpponent.exist_horses[0].x){
if ((((cntOpponent.opponentArray[(_local3 - 1)].y < cntOpponent.exist_horses[0].y)) && ((down_line > cntOpponent.opponentArray[(_local3 - 1)].y)))){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y + (poziom / 100));
_local6 = 0;
while (_local6 < cntOpponent.exist_horses.length) {
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[_local6]){
if (cntOpponent.opponentArray[(_local3 - 1)].zderzak.B.hitTestObject(cntOpponent.exist_horses[_local6].zderzak.T)){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y - (poziom / 100));
};
};
_local6++;
};
} else {
if ((((cntOpponent.opponentArray[(_local3 - 1)].y > cntOpponent.exist_horses[0].y)) && ((up_line < cntOpponent.opponentArray[(_local3 - 1)].y)))){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y - (poziom / 100));
_local6 = 0;
while (_local6 < cntOpponent.exist_horses.length) {
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[_local6]){
if (cntOpponent.opponentArray[(_local3 - 1)].zderzak.T.hitTestObject(cntOpponent.exist_horses[_local6].zderzak.B)){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y + (poziom / 100));
};
};
_local6++;
};
};
};
};
if (cntOpponent.opponentArray[(_local3 - 1)].zderzak.R.hitTestObject(cntOpponent.exist_horses[_local5].zderzak.L)){
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[0]){
if ((((uiKeys.rightArrow == false)) || ((uiKeys.leftArrow == true)))){
cntOpponent.opponentArray[(_local3 - 1)]._distance = (cntOpponent.opponentArray[(_local3 - 1)]._distance - (cntOpponent.opponentArray[(_local3 - 1)]._actual_speed - cntOpponent.exist_horses[0]._actual_speed));
};
} else {
cntOpponent.opponentArray[(_local3 - 1)]._distance = (cntOpponent.opponentArray[(_local3 - 1)]._distance - (cntOpponent.opponentArray[(_local3 - 1)]._actual_speed - cntOpponent.exist_horses[_local5]._actual_speed));
};
if ((((cntOpponent.opponentArray[(_local3 - 1)].y > cntOpponent.exist_horses[0].y)) && ((down_line > cntOpponent.opponentArray[(_local3 - 1)].y)))){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y + (1 + (poziom / 10)));
_local6 = 0;
while (_local6 < cntOpponent.exist_horses.length) {
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[_local6]){
if (cntOpponent.opponentArray[(_local3 - 1)].zderzak.B.hitTestObject(cntOpponent.exist_horses[_local6].zderzak.T)){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y - (1 + (poziom / 10)));
};
};
_local6++;
};
} else {
if ((((cntOpponent.opponentArray[(_local3 - 1)].y < cntOpponent.exist_horses[0].y)) && ((up_line < cntOpponent.opponentArray[(_local3 - 1)].y)))){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y - (1 + (poziom / 10)));
_local6 = 0;
while (_local6 < cntOpponent.exist_horses.length) {
if (cntOpponent.opponentArray[(_local3 - 1)] != cntOpponent.exist_horses[_local6]){
if (cntOpponent.opponentArray[(_local3 - 1)].zderzak.T.hitTestObject(cntOpponent.exist_horses[_local6].zderzak.B)){
cntOpponent.opponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y + (1 + (poziom / 10)));
};
};
_local6++;
};
};
};
};
};
_local5++;
};
cntOpponent.opponentArray[(_local3 - 1)]._distance = (cntOpponent.opponentArray[(_local3 - 1)]._distance + cntOpponent.opponentArray[(_local3 - 1)]._actual_speed);
cntOpponent.opponentArray[(_local3 - 1)].x = (cntOpponent.opponentArray[(_local3 - 1)]._distance - cntOpponent.exist_horses[0]._distance);
cntOpponent.opponentArray[(_local3 - 1)].x = (cntOpponent.opponentArray[(_local3 - 1)].x + cntOpponent.exist_horses[0].x);
cntOpponent.nameOpponentArray[(_local3 - 1)].y = (cntOpponent.opponentArray[(_local3 - 1)].y - 80);
cntOpponent.nameOpponentArray[(_local3 - 1)].x = ((cntOpponent.opponentArray[(_local3 - 1)].x - (cntOpponent.opponentArray[(_local3 - 1)].width / 2)) - 50);
_local3++;
};
}
function move_bgd(_arg1:Event){
uiRace.big_bgd.x = (uiRace.big_bgd.x - ((background_speed + uiPlayer.player._actual_speed) / 5));
uiRace.grassland.x = (uiRace.grassland.x - ((background_speed + uiPlayer.player._actual_speed) / 5));
uiRace.bieznia_race.x = (uiRace.bieznia_race.x - (background_speed + uiPlayer.player._actual_speed));
if (uiRace.grassland.x < (0 - (uiRace.grassland_Width - 640))){
uiRace.grassland.x = (uiRace.grassland.x + (uiRace.grassland_Width - 640));
};
if (uiRace.big_bgd.x < (0 - (uiRace.big_bgd_Width - 640))){
uiRace.big_bgd.x = (uiRace.big_bgd.x + (uiRace.big_bgd_Width - 640));
};
if (uiRace.bieznia_race.x < (0 - (uiRace.bieznia_race_Width - 640))){
uiRace.bieznia_race.x = (uiRace.bieznia_race.x + (uiRace.bieznia_race_Width - 640));
};
if (No_Of_Laps == 0){
if (uiRace.flag_1.x < -170){
uiRace.flag_1.visible = false;
};
if (uiRace.startLine_1.x > -50){
uiRace.startLine_1.x = (uiRace.startLine_1.x - (background_speed + uiPlayer.player._actual_speed));
};
if ((((uiPlayer.player._distance > (trasa_end - 800))) && ((uiPlayer.player._distance < (trasa_end - 750))))){
uiRace.flag_1.visible = true;
uiRace.startLine_1.x = 800;
};
} else {
if (uiRace.startLine_1.x > -50){
uiRace.startLine_1.x = (uiRace.startLine_1.x - (background_speed + uiPlayer.player._actual_speed));
};
if (minieta_flaga == true){
uiRace.flag_1.x = (uiRace.flag_1.x - (background_speed + uiPlayer.player._actual_speed));
if (uiRace.flag_1.x < -300){
uiRace.flag_1.x = 800;
};
};
if (minieta_meta == true){
uiRace.startLine_1.x = 800;
};
if ((((uiPlayer.player._distance > (((trasa_end / 8) * 2) - 800))) && ((uiPlayer.player._distance < (((trasa_end / 8) * 2) - 750))))){
minieta_flaga = true;
};
if ((((uiPlayer.player._distance > (((trasa_end / 8) * 4) - 800))) && ((uiPlayer.player._distance < (((trasa_end / 8) * 4) - 750))))){
minieta_meta = true;
};
if ((((uiPlayer.player._distance >= (((trasa_end / 8) * 6) - 800))) && ((uiPlayer.player._distance < (((trasa_end / 8) * 6) - 750))))){
minieta_flaga = true;
};
if ((((uiPlayer.player._distance > (((trasa_end / 8) * 8) - 800))) && ((uiPlayer.player._distance < (((trasa_end / 8) * 8) - 750))))){
minieta_meta = true;
};
};
uiRace.flag_1.x = (uiRace.startLine_1.x - 130);
}
function prepare_to_start(_arg1:TimerEvent){
var _local2:Number;
var _local3:Number;
uiRace.GO.countdownTXT.text = uiRace.countdown.toString();
if (uiRace.countdown == 0){
if (Remove == false){
uiRace.GO.countdownTXT.text = "";
uiRace.GO.gotoAndPlay("go");
};
uiRace.removeOdds();
uiRace.trasa.flaga.gotoAndStop("red");
uiRace.flag_1.gotoAndStop("red");
uiRace.whips.whip_1.gotoAndStop("active");
uiRace.whips.whip_2.gotoAndStop("active");
uiRace.whips.whip_3.gotoAndStop("active");
nitro_ammount = 3;
ready = true;
this.addEventListener(Event.ENTER_FRAME, accelerated_move);
this.addEventListener(Event.ENTER_FRAME, track_engine);
start_race();
uiPlayer.player.gwiazda.gotoAndStop("end");
uiPlayer.player.gwiazda.scaleX = (uiPlayer.player.gwiazda.scaleY = 0.5);
uiPlayer.player.gwiazda.y = (uiPlayer.player.gwiazda.y + 30);
_local2 = 1;
while (_local2 <= cntOpponent.opponent_ammount) {
cntOpponent.exist_horses[_local2].horse_arrow.visible = false;
cntOpponent.exist_horses[_local2].horse_arrow.horse_txt.alpha = 0;
cntOpponent.nameOpponentArray[(_local2 - 1)].visible = false;
_local2++;
};
dispatchEvent(new Event(myEvent.SOUND_PLAY_RACE_START));
};
if (uiRace.countdown < 0){
secondOfRace++;
uiRace.www_adres_up.alpha = 1;
uiRace.table.alpha = 1;
_local3 = 0;
if (secondOfRace >= 60){
_local3 = 1;
};
if (secondOfRace >= 120){
_local3 = 2;
};
if ((((secondOfRace < 10)) || ((((secondOfRace >= 60)) && ((secondOfRace < 70)))))){
uiRace.table.countdownTXT.text = (((("Time: 0" + _local3) + ":0") + (secondOfRace - (_local3 * 60))) + " s.");
} else {
uiRace.table.countdownTXT.text = (((("Time: 0" + _local3) + ":") + (secondOfRace - (_local3 * 60))) + " s.");
};
if ((uiPlayer.player._distance + 400) < trasa_end){
uiRace.table.distance_TXT.text = (("" + ((Math.round((trasa_end - uiPlayer.player._distance)) - 400) / 100)) + " m left to end");
} else {
uiRace.table.distance_TXT.text = "0 it's finish";
};
uiRace.table.pointsTXT.text = ((("Race: " + raceNr) + "/3 Score: ") + Math.floor((Scoring / 100)));
if (uiPlayer.player._distance >= trasa_end){
dispatchEvent(new Event(myEvent.SOUND_STOP_ALL));
stop_race();
dispatchEvent(new Event(myEvent.SOUND_PLAY_RACE_FINISH));
};
};
if (uiRace.countdown > 0){
uiRace.GO.countdownTXT.text = uiRace.countdown.toString();
};
uiRace.countdown--;
}
function accelerated_move(_arg1:Event){
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local2:Number = 1;
while (_local2 < cntOpponent.exist_horses.length) {
_local3 = 1;
_local4 = Math.ceil(((_local3 * cntOpponent.exist_horses[_local2].Cage) + 2));
if (_local4 >= horse_walk){
cntOpponent.exist_horses[_local2].Cage = 0;
};
cntOpponent.exist_horses[_local2].gotoAndStop(_local4);
cntOpponent.exist_horses[_local2].Cage++;
_local2++;
};
if (nitro_running != true){
_local3 = 1;
_local4 = Math.ceil(((_local3 * cntOpponent.exist_horses[0].Cage) + 2));
if (_local4 >= horse_walk){
cntOpponent.exist_horses[0].Cage = 0;
};
cntOpponent.exist_horses[0].gotoAndStop(_local4);
cntOpponent.exist_horses[0].Cage++;
} else {
_local5 = horse_walk;
_local3 = 1.2;
_local4 = Math.ceil(((_local3 * cntOpponent.exist_horses[0].Cage) + 2));
if (_local4 >= horse_walk){
cntOpponent.exist_horses[0].Cage = 0;
};
cntOpponent.exist_horses[0].gotoAndStop(_local4);
cntOpponent.exist_horses[0].Cage++;
};
}
function enable_nitro(_arg1:TimerEvent){
count_down--;
if (count_down <= 0){
nitro_running = false;
nitro = 0;
turbo_wins.stop();
ready = true;
uiPlayer.player.gotoAndPlay("bieg");
};
}
function stop_race(){
var _local2:Number;
var _local1:Number = 0;
if (Position <= 1){
victory = true;
_local2 = 1;
while (_local2 < cntOpponent.exist_horses.length) {
if ((((cntOpponent.exist_horses[_local2]._distance > cntOpponent.exist_horses[0]._distance)) && ((cntOpponent.exist_horses[_local2]._distance > _local1)))){
_local1 = cntOpponent.exist_horses[_local2]._distance;
};
_local2++;
};
if (No_Of_Laps == 0){
Scoring = (Scoring + (((60 - secondOfRace) * 10) * poziom));
} else {
Scoring = (Scoring + (((90 - secondOfRace) * 10) * poziom));
};
Scoring = (Scoring + ((((trasa_end - _local1) / uiPlayer.player.width) * 100) * poziom));
Scoring = (Scoring * (1 + (0.1 * nitro_ammount)));
} else {
victory = false;
position_player = Position;
};
remove_listeners();
}
}
}//package classes.engine
Section 3
//RandomOdds (classes.engine.RandomOdds)
package classes.engine {
public class RandomOdds {
function shuffle(_arg1, _arg2):int{
var _local3:int = (Math.round((Math.random() * 2)) - 1);
return (_local3);
}
public function getPlayerOdds(_arg1:Number):Number{
var _local2:Number = 0.5;
switch (_arg1){
case 1:
_local2 = 2;
break;
case 2:
_local2 = 2;
break;
case 3:
_local2 = 3;
break;
case 4:
_local2 = 3;
break;
case 5:
_local2 = 4;
break;
case 6:
_local2 = 6;
break;
case 7:
_local2 = 8;
break;
case 8:
_local2 = 10;
break;
case 9:
_local2 = 20;
break;
case 10:
_local2 = 30;
break;
default:
_local2 = 30;
break;
};
return (_local2);
}
public function getOpponentOdds(_arg1:Number):Array{
var _local2:Array;
switch (_arg1){
case 1:
_local2 = new Array(3, 5, 8);
break;
case 2:
_local2 = new Array(4, 6, 10);
break;
case 3:
_local2 = new Array(4, 6, 10);
break;
case 4:
_local2 = new Array(2, 4, 8, 10);
break;
case 5:
_local2 = new Array(2, 3, 8, 12);
break;
case 6:
_local2 = new Array(2, 4, 10, 15);
break;
case 7:
_local2 = new Array(3, 4, 6, 20);
break;
case 8:
_local2 = new Array(3, 5, 6, 20, 25);
break;
case 9:
_local2 = new Array(3, 4, 5, 10, 15);
break;
case 10:
_local2 = new Array(3, 5, 8, 10, 25);
break;
default:
_local2 = new Array(3, 5, 8, 10, 25);
break;
};
_local2 = _local2.sort(shuffle);
return (_local2);
}
}
}//package classes.engine
Section 4
//GameSetting (classes.settings.GameSetting)
package classes.settings {
import flash.display.*;
public class GameSetting extends Sprite {
private var mySoundSetting:SoundSetting;
private var _victory:Boolean;// = false
private var horse_nr:Number;// = 1
private var Scoring:Number;// = 0
private var race_nr:Number;// = 1
private var horse_name:String;
private var position_player:Number;
private var poziom:Number;// = 1
public function GameSetting(){
mySoundSetting = new SoundSetting();
}
public function get mySound():SoundSetting{
return (mySoundSetting);
}
public function get level():Number{
return (poziom);
}
public function get horseNumber():Number{
return (horse_nr);
}
public function set level(_arg1:Number):void{
poziom = _arg1;
}
public function get horseName():String{
return (horse_name);
}
public function set horseName(_arg1:String):void{
horse_name = _arg1;
}
public function get victory():Boolean{
return (_victory);
}
public function set positionPlayer(_arg1:Number):void{
position_player = _arg1;
}
public function set points(_arg1:Number):void{
Scoring = _arg1;
}
public function set horseNumber(_arg1:Number):void{
horse_nr = _arg1;
}
public function get points():Number{
return (Scoring);
}
public function get positionPlayer():Number{
return (position_player);
}
public function set victory(_arg1:Boolean):void{
_victory = _arg1;
}
public function get raceNumber():Number{
return (race_nr);
}
public function set raceNumber(_arg1:Number):void{
race_nr = _arg1;
}
}
}//package classes.settings
Section 5
//SoundSetting (classes.settings.SoundSetting)
package classes.settings {
import flash.media.*;
public class SoundSetting extends Sound {
private var race_ST:SoundTransform;
private var race:Sound;
private var Button:Sound;
private var race_CH:SoundChannel;
private var mainLoops:Number;// = 100
private var mainVol:Number;// = 0.5
private var sfx_ST:SoundTransform;
private var opening:Sound;
private var sfx_CH:SoundChannel;
private var main_ST:SoundTransform;
private var opening_ST:SoundTransform;
private var main_CH:SoundChannel;
private var SFXVol:Number;// = 0.5
private var opening_CH:SoundChannel;
private var main:Sound;
public function SoundSetting(){
Button = new Button_sound();
main = new menuSound();
opening = new opengate();
race = new Backstreet_music();
init();
}
public function playMainSound(){
}
public function changeMainVolume(_arg1:Number){
mainVol = _arg1;
playButtonSound();
main_ST.volume = mainVol;
main_CH.soundTransform = main_ST;
}
private function playBackstreet():void{
race_CH = race.play();
race_ST = race_CH.soundTransform;
race_ST.volume = SFXVol;
race_CH.soundTransform = race_ST;
}
public function get sfxVolume():Number{
return (SFXVol);
}
private function playOpenGate():void{
opening_CH = opening.play();
opening_ST = opening_CH.soundTransform;
opening_ST.volume = mainVol;
opening_CH.soundTransform = opening_ST;
}
public function get mainVolume():Number{
return (mainVol);
}
public function playWhip(){
var _local1:Sound = new bat();
var _local2:SoundChannel = _local1.play();
_local2.soundTransform = new SoundTransform(SFXVol, 0);
}
public function init():void{
main_CH = main.play(0, mainLoops);
main_ST = main_CH.soundTransform;
main_ST.volume = mainVol;
main_CH.soundTransform = main_ST;
}
public function playRaceStartSound(){
playOpenGate();
playBackstreet();
}
public function playButtonSound(){
sfx_CH = Button.play();
sfx_ST = sfx_CH.soundTransform;
sfx_ST.volume = SFXVol;
sfx_CH.soundTransform = sfx_ST;
}
public function changeSFXVolume(_arg1:Number){
SFXVol = _arg1;
playButtonSound();
sfx_ST.volume = SFXVol;
sfx_CH.soundTransform = sfx_ST;
}
public function playFinishRace():void{
var _local1:Sound = new finish();
var _local2:SoundChannel = _local1.play();
_local2.soundTransform = new SoundTransform(SFXVol, 0);
}
public function stopAll(){
SoundMixer.stopAll();
}
}
}//package classes.settings
Section 6
//UICredits (classes.userinterface.UICredits)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UICredits extends MovieClip {
private var uiCredits:credits;
private var myEvent:MyEvent;
public function UICredits(){
myEvent = new MyEvent();
uiCredits = new credits();
uiCredits.stop();
uiCredits.addEventListener(myEvent.ANIMATION_COMPLETED, init);
this.addChild(uiCredits);
}
private function init(_arg1:Event){
uiCredits.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
uiCredits.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
uiCredits.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
uiCredits.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
function over(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
public function showCredits(){
uiCredits.gotoAndPlay(1);
}
}
}//package classes.userinterface
Section 7
//UIEndOfRace (classes.userinterface.UIEndOfRace)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIEndOfRace extends MovieClip {
private var myEvent:MyEvent;
private var loseScreen:gameOverScreen;
private var isItEnd:Boolean;// = false
private var isItWin:Boolean;
private var screen:win_lostmenu;
private var winScreen:levelscreen;
private var endGameScreen:gameEndScreen;
public function UIEndOfRace(){
screen = new win_lostmenu();
winScreen = new levelscreen();
loseScreen = new gameOverScreen();
endGameScreen = new gameEndScreen();
myEvent = new MyEvent();
winScreen.x = -320;
winScreen.y = -240;
loseScreen.x = -320;
loseScreen.y = -240;
endGameScreen.x = -320;
endGameScreen.y = -240;
loseScreen.visible = false;
winScreen.visible = false;
endGameScreen.visible = false;
screen.x = 320;
screen.y = 240;
screen.gotoAndStop(1);
this.addChild(screen);
}
public function showScreen(_arg1:Boolean, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number):void{
isItEnd = false;
loseScreen.visible = false;
winScreen.visible = false;
endGameScreen.visible = false;
screen.addEventListener(myEvent.ANIMATION_COMPLETED, showWinLoseScreen);
this.visible = true;
screen.visible = true;
isItWin = _arg1;
screen.gotoAndPlay(1);
if (isItWin == true){
if (_arg6 != 3){
initWinScreen(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
} else {
isItEnd = true;
screen.gotoAndStop("win_lost_check");
initEndGameScreen(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
};
} else {
initLoseScreen(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
};
}
private function initEndGameScreen(_arg1:Boolean, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number){
endGameScreen.pointsTxt.text = ("" + Math.round((_arg5 / 100)));
if (isItWin == true){
endGameScreen.racesTxt.text = ("" + _arg6);
} else {
endGameScreen.racesTxt.text = ("" + (_arg6 - 1));
};
}
private function initLoseScreen(_arg1:Boolean, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number){
loseScreen.pointsTxt.text = ("" + Math.round((_arg5 / 100)));
loseScreen.winRacesTxt.text = ("" + (_arg6 - 1));
loseScreen.yesBt.addEventListener(MouseEvent.CLICK, tryAgain);
loseScreen.noBt.addEventListener(MouseEvent.CLICK, returnToMainMenu);
}
function getRed(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(2);
Mouse.hide();
MovieClip(root).hand_1.gotoAndStop(2);
MovieClip(root).hand_1.alpha = 1;
}
function out(_arg1:MouseEvent){
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function showWinLoseScreen(_arg1:Event){
if (isItWin == true){
if (isItEnd == true){
screen.gotoAndStop("win");
screen.addChild(endGameScreen);
endGameScreen.visible = true;
} else {
screen.gotoAndStop("win");
screen.addChild(winScreen);
winScreen.visible = true;
};
} else {
screen.gotoAndStop("win");
screen.addChild(loseScreen);
loseScreen.visible = true;
};
}
private function returnToMainMenu(_arg1:MouseEvent){
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON, true));
dispatchEvent(new Event(myEvent.BACK_TO_MAIN_MENU, true));
}
private function tryAgain(_arg1:MouseEvent){
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON, true));
dispatchEvent(new Event(myEvent.RACE_TRY_AGAIN, true));
}
function race_nextlvl(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON, true));
dispatchEvent(new Event(myEvent.PLAY_NEXT_LEVEL, true));
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
destroyer();
}
private function gameOver(_arg1:MouseEvent){
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON, true));
dispatchEvent(new Event(myEvent.GAME_OVER, true));
}
function destroyer(){
Mouse.show();
winScreen.main_menu.hit_area.removeEventListener(MouseEvent.MOUSE_UP, Back_Menu);
winScreen.race_again.hit_area.removeEventListener(MouseEvent.MOUSE_UP, race_nextlvl);
winScreen.main_menu.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, getRed);
winScreen.race_again.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, getRed);
winScreen.main_menu.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, out);
winScreen.race_again.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, out);
}
function Back_Menu(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON, true));
dispatchEvent(new Event(myEvent.BACK_TO_MAIN_MENU, true));
}
private function initWinScreen(_arg1:Boolean, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number){
winScreen.main_menu.hit_area.alpha = 0;
winScreen.race_again.hit_area.alpha = 0;
winScreen.main_menu.hit_area.addEventListener(MouseEvent.MOUSE_UP, Back_Menu);
winScreen.race_again.hit_area.addEventListener(MouseEvent.MOUSE_UP, race_nextlvl);
winScreen.main_menu.hit_area.addEventListener(MouseEvent.MOUSE_OVER, getRed);
winScreen.race_again.hit_area.addEventListener(MouseEvent.MOUSE_OVER, getRed);
winScreen.main_menu.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
winScreen.race_again.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
winScreen.gotoAndStop(_arg2);
dispatchEvent(new Event(myEvent.SOUND_PLAY_MAIN, true));
winScreen.horse_name.text = _arg3;
winScreen.Points.text = ((("" + Math.round((_arg5 / 100))) + "\r\r\r\r") + _arg6);
winScreen.Next_Race_No.text = (_arg4 + 1).toString();
winScreen.Total_Win_Races.text = _arg6.toString();
if (_arg4 != 3){
} else {
winScreen.next_race_number.alpha = 0;
winScreen.Scoring_text.text = ((("" + Math.round((_arg5 / 100))) + "\r\r\r\r") + _arg6);
winScreen.race_again.hit_area.removeEventListener(MouseEvent.MOUSE_UP, race_nextlvl);
winScreen.race_again.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, getRed);
};
}
}
}//package classes.userinterface
Section 8
//UIGameBackground (classes.userinterface.UIGameBackground)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
public class UIGameBackground extends MovieClip {
var big_bgd;
var grassland_Width:Number;
var bieznia_race_Width:Number;
private var minieta_flaga:Boolean;// = false
var flag_1;
var grassland;
var bieznia_race;
var big_bgd_Width:Number;
var startLine_1;
private var minieta_meta:Boolean;// = false
private var background_speed:Number;// = 0
public function UIGameBackground(){
grassland = new MovieClip();
big_bgd = new MovieClip();
bieznia_race = new MovieClip();
startLine_1 = new MovieClip();
flag_1 = new MovieClip();
super();
}
function move_bgd(_arg1:Event, _arg2:MovieClip, _arg3:Number, _arg4:Number){
big_bgd.x = (big_bgd.x - ((background_speed + _arg2._actual_speed) / 5));
grassland.x = (grassland.x - ((background_speed + _arg2._actual_speed) / 5));
bieznia_race.x = (bieznia_race.x - (background_speed + _arg2._actual_speed));
if (grassland.x < (0 - (grassland_Width - 640))){
grassland.x = (grassland.x + (grassland_Width - 640));
};
if (big_bgd.x < (0 - (big_bgd_Width - 640))){
big_bgd.x = (big_bgd.x + (big_bgd_Width - 640));
};
if (bieznia_race.x < (0 - (bieznia_race_Width - 640))){
bieznia_race.x = (bieznia_race.x + (bieznia_race_Width - 640));
};
if (_arg3 == 0){
if ((((_arg2._distance > ((_arg4 / 2) - 800))) && ((flag_1.x > -300)))){
flag_1.x = (flag_1.x - (background_speed + _arg2._actual_speed));
};
if (startLine_1.x > -50){
startLine_1.x = (startLine_1.x - (background_speed + _arg2._actual_speed));
};
if ((((_arg2._distance > (_arg4 - 800))) && ((_arg2._distance < (_arg4 - 750))))){
startLine_1.x = 800;
};
} else {
if (startLine_1.x > -50){
startLine_1.x = (startLine_1.x - (background_speed + _arg2._actual_speed));
};
if (minieta_flaga == true){
flag_1.x = (flag_1.x - (background_speed + _arg2._actual_speed));
if (flag_1.x < -300){
minieta_flaga = false;
flag_1.x = 800;
};
};
if (minieta_meta == true){
minieta_meta = false;
startLine_1.x = 800;
};
if ((((_arg2._distance > (((_arg4 / 8) * 2) - 800))) && ((_arg2._distance < (((_arg4 / 8) * 2) - 750))))){
minieta_flaga = true;
};
if ((((_arg2._distance > (((_arg4 / 8) * 4) - 800))) && ((_arg2._distance < (((_arg4 / 8) * 4) - 750))))){
minieta_meta = true;
};
if ((((_arg2._distance >= (((_arg4 / 8) * 6) - 800))) && ((_arg2._distance < (((_arg4 / 8) * 6) - 750))))){
minieta_flaga = true;
};
if ((((_arg2._distance > (((_arg4 / 8) * 8) - 800))) && ((_arg2._distance < (((_arg4 / 8) * 8) - 750))))){
minieta_meta = true;
};
};
}
private function setPosition(){
grassland.x = 0;
grassland.y = 171.8;
grassland_Width = grassland.width;
big_bgd.x = 0;
big_bgd.y = 2.8;
big_bgd_Width = big_bgd.width;
bieznia_race.x = grassland.x;
bieznia_race.y = grassland.y;
bieznia_race_Width = grassland.width;
startLine_1.x = 190;
startLine_1.y = 210;
flag_1.x = 800;
flag_1.y = 132;
}
private function addAllChilds(){
grassland = addChild(new ground());
big_bgd = addChild(new back_ground());
bieznia_race = addChild(new bieznia());
startLine_1 = addChild(new startLine());
flag_1 = addChild(new flag());
}
}
}//package classes.userinterface
Section 9
//UIHallOfFame (classes.userinterface.UIHallOfFame)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIHallOfFame extends MovieClip {
private var HallOfFame:hofinterface;
private var myEvent:MyEvent;
public function UIHallOfFame(){
myEvent = new MyEvent();
HallOfFame = new hofinterface();
HallOfFame.stop();
HallOfFame.addEventListener(myEvent.ANIMATION_COMPLETED, init);
this.addChild(HallOfFame);
}
public function showHallOfFame(){
HallOfFame.gotoAndPlay(1);
}
function over(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function init(_arg1:Event){
HallOfFame.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
HallOfFame.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
HallOfFame.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
HallOfFame.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
}
}
}//package classes.userinterface
Section 10
//UIInstructions (classes.userinterface.UIInstructions)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIInstructions extends MovieClip {
private var uiInstructions:instructions;
private var myEvent:MyEvent;
public function UIInstructions(){
myEvent = new MyEvent();
uiInstructions = new instructions();
uiInstructions.stop();
uiInstructions.addEventListener(myEvent.ANIMATION_COMPLETED, init);
this.addChild(uiInstructions);
}
private function init(_arg1:Event){
uiInstructions.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
uiInstructions.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
uiInstructions.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
uiInstructions.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
}
public function showInstructions(){
uiInstructions.gotoAndPlay(1);
}
function over(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
}
}//package classes.userinterface
Section 11
//UIInstructionsBeforePlay (classes.userinterface.UIInstructionsBeforePlay)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIInstructionsBeforePlay extends MovieClip {
private var uiInstructionsBeforePlay:instructionsBeforePlay;
private var myEvent:MyEvent;
private var playScreen:UserinterfacePlayScreen;
private var mainMenu:UIMainMenu;
public function UIInstructionsBeforePlay(){
playScreen = new UserinterfacePlayScreen();
mainMenu = new UIMainMenu();
myEvent = new MyEvent();
uiInstructionsBeforePlay = new instructionsBeforePlay();
uiInstructionsBeforePlay.stop();
uiInstructionsBeforePlay.addEventListener(myEvent.ANIMATION_COMPLETED, init);
this.addChild(uiInstructionsBeforePlay);
}
function gone(_arg1:MouseEvent):void{
removeAllListeners();
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
function removeAllListeners(){
uiInstructionsBeforePlay.m1.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
uiInstructionsBeforePlay.m1.buttonMode = false;
uiInstructionsBeforePlay.m1.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
uiInstructionsBeforePlay.m1.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
}
function mainMenuButtonOut(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
function over(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
public function showInstructionsBeforePlay(){
uiInstructionsBeforePlay.gotoAndPlay(1);
uiInstructionsBeforePlay.visible = true;
}
private function init(_arg1:Event){
uiInstructionsBeforePlay.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
uiInstructionsBeforePlay.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
uiInstructionsBeforePlay.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
uiInstructionsBeforePlay.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
uiInstructionsBeforePlay.PlayNow.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
uiInstructionsBeforePlay.PlayNow.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
uiInstructionsBeforePlay.PlayNow.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
uiInstructionsBeforePlay.PlayNow.hit_area.addEventListener(MouseEvent.CLICK, showPlayScreen);
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function showPlayScreen(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_PLAY_SCREEN));
mainMenu.visible = false;
playScreen.visible = true;
uiInstructionsBeforePlay.visible = false;
}
function mainMenuButtonOver(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
}
}//package classes.userinterface
Section 12
//UIKeys (classes.userinterface.UIKeys)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
public class UIKeys extends MovieClip {
public var leftArrow:Boolean;// = false
public var space:Boolean;// = false
public var downArrow:Boolean;// = false
public var rightArrow:Boolean;// = false
public var upArrow:Boolean;// = false
public function UIKeys(){
this.addEventListener(Event.ADDED_TO_STAGE, init);
}
function keyPressedDown(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 37:
leftArrow = true;
rightArrow = false;
break;
case 39:
rightArrow = true;
leftArrow = false;
break;
case 38:
upArrow = true;
break;
case 40:
downArrow = true;
break;
case 32:
space = true;
break;
};
}
private function init(_arg1:Event){
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressedUp);
}
public function removeEvents(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyPressedUp);
}
function keyPressedUp(_arg1:KeyboardEvent){
switch (_arg1.keyCode){
case 37:
leftArrow = false;
break;
case 39:
rightArrow = false;
break;
case 38:
upArrow = false;
break;
case 40:
downArrow = false;
break;
case 32:
space = false;
break;
};
}
}
}//package classes.userinterface
Section 13
//UIMainMenu (classes.userinterface.UIMainMenu)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIMainMenu extends MovieClip {
private var myEvent:MyEvent;
private var mainMenu:rog;
public function UIMainMenu(){
myEvent = new MyEvent();
mainMenu = new rog();
mainMenu.x = (-5 + (640 / 2));
mainMenu.y = (-3 + (480 / 2));
mainMenu.addEventListener(myEvent.ANIMATION_COMPLETED, mainMenuInit);
this.addChild(mainMenu);
}
private function showHallOfFame(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_HALL_OF_FAME));
}
private function showInstructions(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_INSTRUCTIONS_BEFORE_PLAY));
}
private function showCredits(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_CREDITS));
}
private function showSettings(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_SETTINGS));
}
private function mainMenuInit(_arg1:Event){
mainMenu.m1.hit_area.addEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m2.hit_area.addEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m3.hit_area.addEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m4.hit_area.addEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m5.hit_area.addEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m1.addEventListener(myEvent.ANIMATION_COMPLETED, showPlayScreen);
mainMenu.m2.addEventListener(myEvent.ANIMATION_COMPLETED, showHallOfFame);
mainMenu.m3.addEventListener(myEvent.ANIMATION_COMPLETED, showInstructions);
mainMenu.m4.addEventListener(myEvent.ANIMATION_COMPLETED, showSettings);
mainMenu.m5.addEventListener(myEvent.ANIMATION_COMPLETED, showCredits);
mainMenu.m1.hit_area.addEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m2.hit_area.addEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m3.hit_area.addEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m4.hit_area.addEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m5.hit_area.addEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m1.hit_area.addEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m2.hit_area.addEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m3.hit_area.addEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m4.hit_area.addEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m5.hit_area.addEventListener(MouseEvent.MOUSE_UP, gone);
}
function removeAllListeners(){
mainMenu.m1.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m1.buttonMode = false;
mainMenu.m2.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m2.buttonMode = false;
mainMenu.m3.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m3.buttonMode = false;
mainMenu.m4.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m4.buttonMode = false;
mainMenu.m5.hit_area.removeEventListener(MouseEvent.MOUSE_OVER, mainMenuButtonOver);
mainMenu.m5.buttonMode = false;
mainMenu.m1.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m2.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m3.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m4.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m5.hit_area.removeEventListener(MouseEvent.MOUSE_UP, gone);
mainMenu.m1.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m2.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m3.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m4.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
mainMenu.m5.hit_area.removeEventListener(MouseEvent.MOUSE_OUT, mainMenuButtonOut);
}
function mainMenuButtonOut(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function showInstructionsBeforePlay(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_INSTRUCTIONS_BEFORE_PLAY));
}
public function showMainMenu(){
mainMenu.gotoAndPlay(1);
}
private function showPlayScreen(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_INSTRUCTIONS_BEFORE_PLAY));
}
function mainMenuButtonOver(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function gone(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
removeAllListeners();
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
}
}//package classes.userinterface
Section 14
//UIPlayer (classes.userinterface.UIPlayer)
package classes.userinterface {
import flash.display.*;
public class UIPlayer extends MovieClip {
private var Size:Number;
var horse_listing:Array;
var horse_nr:Number;// = 1
public var player:MovieClip;
private var Random_Player_Position:Number;
private var free_space:Number;
public function UIPlayer(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
horse_listing = new Array();
horse_nr = _arg1;
Size = _arg2;
Random_Player_Position = _arg4;
free_space = _arg3;
addHorse();
}
private function addHorse():void{
var _local2:Number;
horse_listing.push(horseracenr1, horseracenr2, horseracenr3, horseracenr4, horseracenr5, horseracenr6, horseracenr7, horseracenr8);
player = new (horse_listing[(horse_nr - 1)]);
player._actual_speed = 0;
player._distance = 0;
player.Cage = 0;
player.scaleX = -(Size);
player.scaleY = Size;
this.addChild(player);
player.horse_arrow.alpha = 0;
player.zderzak.alpha = 0;
player.x = 180;
player.y = (160 + (free_space * Random_Player_Position));
var _local1:Array = new Array();
_local1.push((horse_nr - 1));
var _local3:Array = new Array();
_local3.push(player);
}
}
}//package classes.userinterface
Section 15
//UIPlayScreen (classes.userinterface.UIPlayScreen)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UIPlayScreen extends MovieClip {
private var playScreen:UserinterfacePlayScreen;
public var playerNr:Number;
public var playerName:String;// = ""
private var myEvent:MyEvent;
public function UIPlayScreen(){
myEvent = new MyEvent();
playScreen = new UserinterfacePlayScreen();
playScreen.stop();
playScreen.addEventListener(myEvent.ANIMATION_COMPLETED, init);
this.addChild(playScreen);
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
function showHorse(_arg1:MouseEvent):void{
playerNr = Number(_arg1.target.parent.name.substr(4));
playScreen.nameField.visible = true;
playScreen.type1.gotoAndStop(1);
playScreen.type2.gotoAndStop(1);
playScreen.type3.gotoAndStop(1);
playScreen.type4.gotoAndStop(1);
playScreen.type5.gotoAndStop(1);
playScreen.type6.gotoAndStop(1);
playScreen.type7.gotoAndStop(1);
playScreen.type8.gotoAndStop(1);
_arg1.target.parent.gotoAndStop(2);
playScreen.horseImage_0.visible = false;
}
function over(_arg1:MouseEvent):void{
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function over_2(_arg1:MouseEvent){
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function Click(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
}
private function init(_arg1:Event){
playScreen.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over_2);
playScreen.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
playScreen.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
playScreen.race.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over_2);
playScreen.race.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.race.hit_area.addEventListener(MouseEvent.MOUSE_UP, goToRace);
playScreen.nameField.visible = false;
playScreen.nameField.imie.restrict = "A-Z0-9a-z";
playScreen.nameField.imie.maxChars = 12;
playScreen.type1.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type1.buttonMode = true;
playScreen.type2.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type2.buttonMode = true;
playScreen.type3.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type3.buttonMode = true;
playScreen.type4.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type4.buttonMode = true;
playScreen.type5.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type5.buttonMode = true;
playScreen.type6.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type6.buttonMode = true;
playScreen.type7.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type7.buttonMode = true;
playScreen.type8.hit_area.addEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type8.buttonMode = true;
playScreen.type1.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type2.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type3.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type4.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type5.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type6.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type7.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type8.addEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type1.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type2.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type3.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type4.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type5.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type6.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type7.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type8.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
playScreen.type1.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type2.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type3.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type4.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type5.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type6.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type7.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
playScreen.type8.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
}
private function startGame(_arg1:Event){
dispatchEvent(new Event(myEvent.START_GAME, true));
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
function remove_all_listeners_2(){
playScreen.type1.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type1.buttonMode = false;
playScreen.type2.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type2.buttonMode = false;
playScreen.type3.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type3.buttonMode = false;
playScreen.type4.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type4.buttonMode = false;
playScreen.type5.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type5.buttonMode = false;
playScreen.type6.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type6.buttonMode = false;
playScreen.type7.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type7.buttonMode = false;
playScreen.type8.removeEventListener(MouseEvent.MOUSE_UP, showHorse);
playScreen.type8.buttonMode = false;
playScreen.type1.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type2.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type3.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type4.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type5.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type6.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type7.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.type8.removeEventListener(MouseEvent.MOUSE_DOWN, Click);
playScreen.race.removeEventListener(myEvent.ANIMATION_COMPLETED, startGame);
}
public function goToRace(_arg1:MouseEvent):void{
if (playScreen.nameField.imie.text == ""){
playScreen.nameInfo.textColor = 0xFF0000;
} else {
remove_all_listeners_2();
playerName = playScreen.nameField.imie.text;
playScreen.race.removeEventListener(MouseEvent.MOUSE_OVER, over_2);
playScreen.race.removeEventListener(MouseEvent.MOUSE_UP, goToRace);
playScreen.race.addEventListener(myEvent.ANIMATION_COMPLETED, startGame);
_arg1.target.parent.gotoAndPlay(36);
dispatchEvent(new Event(myEvent.SET_PLAYER_NAME, true));
};
}
public function showPlayScreen(){
playScreen.gotoAndPlay(1);
}
}
}//package classes.userinterface
Section 16
//UIRace (classes.userinterface.UIRace)
package classes.userinterface {
import flash.display.*;
public class UIRace extends MovieClip {
public var big_bgd:MovieClip;
public var status_bar:MovieClip;
public var energy:MovieClip;
public var bieznia_race_Width:Number;
public var table:MovieClip;
public var pace:MovieClip;
public var flag_1:MovieClip;
public var grassland:MovieClip;
public var Remove:Boolean;// = false
public var www_adres_up:MovieClip;
public var big_bgd_Width:Number;
public var GO:MovieClip;
public var grassland_Width:Number;
public var odds:MovieClip;
public var horsesMc:MovieClip;
public var bieznia_race:MovieClip;
public var startLine_1:MovieClip;
public var countdown:Number;// = 3
public var trasa:MovieClip;
public var whips:MovieClip;
public var namesMc:MovieClip;
public function UIRace(){
GO = new justGo();
odds = new odds_table();
whips = new whipser();
www_adres_up = new www_adres();
table = new tablica();
flag_1 = new flag();
big_bgd = new back_ground();
status_bar = new statusbar();
trasa = new UITrasaMC();
grassland = new ground();
pace = new pace_class();
energy = new energy_class();
bieznia_race = new bieznia();
bieznia_race_Width = grassland.width;
startLine_1 = new startLine();
energy.energyMask.scaleX = 1;
pace.paceMask.scaleX = 0;
grassland_Width = grassland.width;
horsesMc = new MovieClip();
namesMc = new MovieClip();
setPosition();
addChilds();
}
private function addChilds():void{
this.addChild(www_adres_up);
this.addChild(grassland);
this.addChild(big_bgd);
this.addChild(bieznia_race);
this.addChild(startLine_1);
this.addChild(flag_1);
this.addChild(horsesMc);
this.addChild(namesMc);
this.addChild(GO);
this.addChild(odds);
this.addChild(table);
this.addChild(status_bar);
this.addChild(trasa);
this.addChild(whips);
this.addChild(pace);
this.addChild(energy);
}
public function removeOdds():void{
this.removeChild(odds);
}
private function setPosition():void{
GO.x = 320;
GO.y = 130;
odds.x = 200;
odds.y = 220;
whips.scaleX = (whips.scaleY = 0.734);
whips.x = 270;
whips.y = 435;
www_adres_up.x = 10;
www_adres_up.y = -2;
www_adres_up.alpha = 0;
table.x = 500;
table.y = -20;
table.alpha = 0;
flag_1.x = 800;
flag_1.y = 132;
big_bgd.x = 0;
big_bgd.y = 2.8;
big_bgd_Width = big_bgd.width;
pace.x = 460;
pace.y = 427;
energy.x = 460;
energy.y = 451;
status_bar.x = -87;
status_bar.y = 368.5;
trasa.scaleY = 1.1;
trasa.x = 22;
trasa.y = 420;
grassland.x = 0;
grassland.y = 171.8;
bieznia_race.x = grassland.x;
bieznia_race.y = grassland.y;
startLine_1.x = 190;
startLine_1.y = 210;
}
}
}//package classes.userinterface
Section 17
//UISettings (classes.userinterface.UISettings)
package classes.userinterface {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.ui.*;
public class UISettings extends MovieClip {
public var sfxVol:Number;
private var myEvent:MyEvent;
public var mainVol:Number;
private var uiSetting:settings;
public function UISettings(_arg1:Number, _arg2:Number){
mainVol = _arg1;
sfxVol = _arg2;
myEvent = new MyEvent();
uiSetting = new settings();
uiSetting.stop();
uiSetting.addEventListener(myEvent.ANIMATION_COMPLETED, init);
uiSetting.addEventListener(myEvent.CHANGE_MAIN_SOUND, changeMainSound);
uiSetting.addEventListener(myEvent.CHANGE_SFX_SOUND, changeSFXSound);
uiSetting.addEventListener(myEvent.SET_UISOUND, setSound);
this.addChild(uiSetting);
}
public function showSettings(){
uiSetting.gotoAndPlay(1);
}
private function changeSFXSound(_arg1:Event){
sfxVol = _arg1.target.volumeSFX.scaleX;
if (sfxVol < 0.1){
sfxVol = 0;
};
dispatchEvent(new Event(myEvent.CHANGE_SFX_SOUND, true));
}
function backToMain(_arg1:MouseEvent):void{
dispatchEvent(new Event(myEvent.SOUND_PLAY_BUTTON));
_arg1.target.parent.gotoAndPlay(36);
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
private function changeMainSound(_arg1:Event){
mainVol = _arg1.target.volume.scaleX;
if (mainVol < 0.1){
mainVol = 0;
};
dispatchEvent(new Event(myEvent.CHANGE_MAIN_SOUND, true));
}
private function back(_arg1:Event){
dispatchEvent(new Event(myEvent.SHOW_MAIN_MENU));
}
function musicControll(_arg1:MouseEvent):void{
if (mainVol >= 0.1){
mainVol = 0;
uiSetting.music.gotoAndStop(2);
} else {
mainVol = uiSetting.volume.scaleX;
uiSetting.music.gotoAndStop(1);
};
dispatchEvent(new Event(myEvent.CHANGE_MAIN_SOUND, true));
}
public function setSound(_arg1:Event){
uiSetting.volume.scaleX = mainVol;
uiSetting.volumeSFX.scaleX = sfxVol;
}
private function init(_arg1:Event){
uiSetting.back.hit_area.addEventListener(MouseEvent.MOUSE_OVER, over);
uiSetting.back.hit_area.addEventListener(MouseEvent.MOUSE_OUT, out);
uiSetting.back.hit_area.addEventListener(MouseEvent.MOUSE_UP, backToMain);
uiSetting.back.addEventListener(myEvent.ANIMATION_COMPLETED, back);
uiSetting.music.addEventListener(MouseEvent.MOUSE_OVER, over2);
uiSetting.music.addEventListener(MouseEvent.MOUSE_OUT, out);
uiSetting.music.addEventListener(MouseEvent.MOUSE_UP, musicControll);
uiSetting.SFX.addEventListener(MouseEvent.MOUSE_UP, SFXControll);
uiSetting.SFX.addEventListener(MouseEvent.MOUSE_OVER, over2);
uiSetting.SFX.addEventListener(MouseEvent.MOUSE_OUT, out);
}
function SFXControll(_arg1:MouseEvent):void{
if (sfxVol >= 0.1){
sfxVol = 0;
uiSetting.SFX.gotoAndStop(2);
} else {
sfxVol = uiSetting.volumeSFX.scaleX;
uiSetting.SFX.gotoAndStop(1);
};
dispatchEvent(new Event(myEvent.CHANGE_SFX_SOUND, true));
}
function over(_arg1:MouseEvent):void{
_arg1.target.parent.gotoAndPlay(26);
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
Mouse.show();
MovieClip(root).hand_1.alpha = 0;
}
function over2(_arg1:MouseEvent):void{
MovieClip(root).hand_1.gotoAndStop(2);
Mouse.hide();
MovieClip(root).hand_1.alpha = 1;
}
}
}//package classes.userinterface
Section 18
//UserInterface (classes.userinterface.UserInterface)
package classes.userinterface {
import classes.settings.*;
import flash.events.*;
import flash.display.*;
import classes.*;
public class UserInterface extends MovieClip {
private var playScreen:UIPlayScreen;
private var endOfRace:UIEndOfRace;
private var mySetting:GameSetting;
private var gameBackground:UIGameBackground;
private var myEvent:MyEvent;
private var instructionsBeforePlay:UIInstructionsBeforePlay;
private var credits:UICredits;
private var hallOfFame:UIHallOfFame;
private var instructions:UIInstructions;
private var settings:UISettings;
private var keys:UIKeys;
private var mainMenu:UIMainMenu;
public function UserInterface(_arg1:GameSetting){
myEvent = new MyEvent();
mySetting = _arg1;
mainMenu = new UIMainMenu();
playScreen = new UIPlayScreen();
hallOfFame = new UIHallOfFame();
instructions = new UIInstructions();
instructionsBeforePlay = new UIInstructionsBeforePlay();
settings = new UISettings(mySetting.mySound.mainVolume, mySetting.mySound.sfxVolume);
credits = new UICredits();
gameBackground = new UIGameBackground();
endOfRace = new UIEndOfRace();
addEvents();
addAllChilds();
}
private function showInstructions(_arg1:Event){
mainMenu.visible = false;
instructions.visible = true;
instructions.showInstructions();
}
private function startGame(_arg1:Event):void{
}
public function showEndOfRaceScreen(_arg1:Boolean, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number){
playScreen.visible = false;
hallOfFame.visible = false;
instructions.visible = false;
instructionsBeforePlay.visible = false;
credits.visible = false;
settings.visible = false;
mainMenu.visible = false;
endOfRace.visible = true;
endOfRace.showScreen(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
}
private function showPlayScreen(_arg1:Event){
mainMenu.visible = false;
playScreen.visible = true;
playScreen.showPlayScreen();
}
private function addEvents(){
mainMenu.addEventListener(myEvent.START_GAME, startGame);
mainMenu.addEventListener(myEvent.SHOW_PLAY_SCREEN, showPlayScreen);
mainMenu.addEventListener(myEvent.SHOW_HALL_OF_FAME, showHallOfFame);
mainMenu.addEventListener(myEvent.SHOW_INSTRUCTIONS, showInstructions);
mainMenu.addEventListener(myEvent.SHOW_INSTRUCTIONS_BEFORE_PLAY, showInstructionsBeforePlay);
mainMenu.addEventListener(myEvent.SHOW_CREDITS, showCredits);
mainMenu.addEventListener(myEvent.SHOW_SETTINGS, showSettings);
mainMenu.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
playScreen.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
hallOfFame.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
instructions.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
instructionsBeforePlay.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
instructionsBeforePlay.addEventListener(myEvent.SHOW_PLAY_SCREEN, showPlayScreen);
settings.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
credits.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
playScreen.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
hallOfFame.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
instructions.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
instructionsBeforePlay.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
credits.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
settings.addEventListener(myEvent.SHOW_MAIN_MENU, showMainMenu);
}
private function showMainMenu(_arg1:Event){
showMenu();
}
private function showCredits(_arg1:Event){
mainMenu.visible = false;
credits.visible = true;
credits.showCredits();
}
private function showHallOfFame(_arg1:Event){
mainMenu.visible = false;
hallOfFame.visible = true;
hallOfFame.showHallOfFame();
}
private function showInstructionsBeforePlay(_arg1:Event){
mainMenu.visible = false;
instructionsBeforePlay.visible = true;
instructionsBeforePlay.showInstructionsBeforePlay();
}
private function showSettings(_arg1:Event){
mainMenu.visible = false;
settings.visible = true;
settings.showSettings();
}
public function showMenu(){
playScreen.visible = false;
hallOfFame.visible = false;
instructions.visible = false;
instructionsBeforePlay.visible = false;
credits.visible = false;
settings.visible = false;
endOfRace.visible = false;
mainMenu.visible = true;
mainMenu.showMainMenu();
}
private function buttonSound(_arg1:Event){
mySetting.mySound.playButtonSound();
}
private function addAllChilds(){
playScreen.visible = false;
hallOfFame.visible = false;
instructions.visible = false;
instructionsBeforePlay.visible = false;
credits.visible = false;
settings.visible = false;
endOfRace.visible = false;
this.addChild(mainMenu);
this.addChild(playScreen);
this.addChild(hallOfFame);
this.addChild(instructions);
this.addChild(instructionsBeforePlay);
this.addChild(credits);
this.addChild(settings);
this.addChild(endOfRace);
}
}
}//package classes.userinterface
Section 19
//EmailController (classes.EmailController)
package classes {
public class EmailController {
public function sendEmail(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number){
}
}
}//package classes
Section 20
//Main (classes.Main)
package classes {
import classes.settings.*;
import flash.events.*;
import flash.display.*;
import classes.engine.*;
import classes.userinterface.*;
public class Main extends MovieClip {
private var mySetting:GameSetting;
private var gameRaceNr:Number;// = 1
private var myEvent:MyEvent;
private var gameTmpPoints:Number;// = 0
private var ui:UserInterface;
private var emailController:EmailController;
private var gamePlayerNumber:Number;// = 0
private var gamePlayerName:String;// = "new player"
private var myStage:Stage;
private var gamePoints:Number;// = 0
private var gameLevel:Number;// = 1
private var raceEngine:RaceEngine;
public function Main(_arg1:Stage){
myStage = _arg1;
myEvent = new MyEvent();
mySetting = new GameSetting();
ui = new UserInterface(mySetting);
raceEngine = new RaceEngine();
raceEngine.visible = false;
emailController = new EmailController();
addUIEvents();
addControllerEvents();
this.addChild(ui);
this.addChild(raceEngine);
}
private function playStartSound(_arg1:Event){
mySetting.mySound.playRaceStartSound();
}
private function stopSound(_arg1:Event){
mySetting.mySound.stopAll();
}
private function changeMainSound(_arg1:Event){
mySetting.mySound.changeMainVolume(_arg1.target.mainVol);
}
private function finishRace(_arg1:Event):void{
gameTmpPoints = _arg1.target.Scoring;
gamePlayerName = _arg1.target.playerName;
gamePlayerNumber = _arg1.target.playerNr;
gameRaceNr = _arg1.target.raceNr;
gameLevel = _arg1.target.poziom;
raceEngine.visible = false;
ui.visible = true;
mySetting.mySound.stopAll();
mySetting.mySound.init();
ui.showEndOfRaceScreen(_arg1.target.victory, _arg1.target.playerNr, _arg1.target.playerName, _arg1.target.poziom, _arg1.target.Scoring, _arg1.target.raceNr);
}
private function playWhip(_arg1:Event):void{
mySetting.mySound.playWhip();
}
private function addControllerEvents(){
raceEngine.addEventListener(myEvent.SOUND_PLAY_RACE_START, playStartSound);
raceEngine.addEventListener(myEvent.SOUND_PLAY_RACE_FINISH, playFinishSound);
raceEngine.addEventListener(myEvent.SOUND_STOP_ALL, stopSound);
raceEngine.addEventListener(myEvent.SOUND_PLAY_WHIP, playWhip);
raceEngine.addEventListener(myEvent.SOUND_PLAY_BUTTON, buttonSound);
raceEngine.addEventListener(myEvent.RACE_FINISH, finishRace);
}
private function changeSFXSound(_arg1:Event){
mySetting.mySound.changeSFXVolume(_arg1.target.sfxVol);
}
private function setPlayerName(_arg1:Event){
mySetting.horseName = _arg1.target.playerName;
}
private function buttonSound(_arg1:Event){
mySetting.mySound.playButtonSound();
}
private function backToMainMenu(_arg1:Event):void{
mySetting.mySound.stopAll();
mySetting.mySound.init();
gamePoints = 0;
gameTmpPoints = 0;
gameLevel = 1;
gameRaceNr = 1;
raceEngine.visible = false;
ui.visible = true;
ui.showMenu();
}
private function raceTryAgain(_arg1:Event):void{
gamePoints = 0;
gameTmpPoints = 0;
gameLevel = 1;
gameRaceNr = 1;
raceEngine.visible = true;
ui.visible = false;
gameRaceNr = 1;
mySetting.mySound.stopAll();
raceEngine.startRace(gamePlayerName, gamePlayerNumber, gameLevel, gameTmpPoints, gameRaceNr);
}
private function gameOver(_arg1:Event):void{
}
private function addUIEvents(){
ui.addEventListener(myEvent.CHANGE_MAIN_SOUND, changeMainSound);
ui.addEventListener(myEvent.CHANGE_SFX_SOUND, changeSFXSound);
ui.addEventListener(myEvent.SET_PLAYER_NAME, setPlayerName);
ui.addEventListener(myEvent.START_GAME, startGame);
ui.addEventListener(myEvent.RACE_TRY_AGAIN, raceTryAgain);
ui.addEventListener(myEvent.BACK_TO_MAIN_MENU, backToMainMenu);
ui.addEventListener(myEvent.SEND_EMAIL, sendEmail);
ui.addEventListener(myEvent.PLAY_NEXT_LEVEL, playNextLevel);
ui.addEventListener(myEvent.GAME_OVER, gameOver);
}
private function playFinishSound(_arg1:Event){
mySetting.mySound.playFinishRace();
}
private function startGame(_arg1:Event):void{
ui.visible = false;
raceEngine.visible = true;
mySetting.mySound.stopAll();
raceEngine.startRace(_arg1.target.playerName, _arg1.target.playerNr, gameLevel, gameTmpPoints, gameRaceNr);
}
private function sendEmail(_arg1:Event):void{
emailController.sendEmail(gamePlayerName, gamePlayerNumber, gameLevel, Math.round((gameTmpPoints / 100)));
}
private function playNextLevel(_arg1:Event):void{
raceEngine.visible = true;
ui.visible = false;
gamePoints = gameTmpPoints;
gameLevel = (gameLevel + 1);
gameRaceNr = (gameRaceNr + 1);
mySetting.mySound.stopAll();
raceEngine.startRace(gamePlayerName, gamePlayerNumber, gameLevel, gamePoints, gameRaceNr);
}
}
}//package classes
Section 21
//MyEvent (classes.MyEvent)
package classes {
public class MyEvent {
private static var showHallOfFame:String = "SHOW_HALL_OF_FAME";
private static var changeMainSound:String = "CHANGE_MAIN_SOUND";
private static var soundPlayRaceFinish:String = "SOUND_PLAY_RACE_FINISH";
private static var setPlayerName:String = "SET_PLAYER_NAME";
private static var backToMainMenu:String = "BACK_TO_MAIN_MENU";
private static var showPlayScreen:String = "SHOW_PLAY_SCREEN";
public static var soundFadeOut:String = "SOUND_FADE_OUT";
public static var animationCompleted:String = "animationCompleted";
private static var soundStopAll:String = "SOUND_STOP_ALL";
private static var showInstructionsBeforePlay:String = "SHOW_INSTRUCTIONS_BEFORE_PLAY";
private static var setUISound:String = "SET_UISOUND";
private static var soundPlayWhip:String = "SOUND_PLAY_WHIP";
private static var soundPlayMain:String = "SOUND_PLAY_MAIN";
private static var showSettings:String = "SHOW_SETTINGS";
private static var showInstructions:String = "SHOW_INSTRUCTIONS";
private static var showPlayScreen1:String = "SHOW_PLAY_SCREEN1";
private static var raceFinish:String = "RACE_FINISH";
private static var showMainMenu:String = "SHOW_MAIN_MENU";
private static var raceTryAgain:String = "RACE_TRY_AGAIN";
private static var changeSfxSound:String = "CHANGE_SFX_SOUND";
private static var showCredits:String = "SHOW_CREDITS";
private static var hideUIHand:String = "HIDE_UIHAND";
private static var gameOver:String = "GAME_OVER";
private static var showUIHand:String = "SHOW_UIHAND";
private static var soundPlayRaceStart:String = "SOUND_PLAY_RACE_START";
private static var startGame:String = "START_GAME";
private static var soundPlayButton:String = "SOUND_PLAY_BUTTON";
private static var sendEmail:String = "SEND_EMAIL";
private static var playNextLevel:String = "PLAY_NEXT_LEVEL";
public function get RACE_FINISH():String{
return (raceFinish);
}
public function get PLAY_NEXT_LEVEL():String{
return (playNextLevel);
}
public function get SHOW_UIHAND():String{
return (showUIHand);
}
public function get SOUND_PLAY_RACE_FINISH():String{
return (soundPlayRaceFinish);
}
public function get GAME_OVER():String{
return (gameOver);
}
public function get SEND_EMAIL():String{
return (sendEmail);
}
public function get SOUND_PLAY_BUTTON():String{
return (soundPlayButton);
}
public function get START_GAME():String{
return (startGame);
}
public function get ANIMATION_COMPLETED():String{
return (animationCompleted);
}
public function get SOUND_PLAY_WHIP():String{
return (soundPlayWhip);
}
public function get SOUND_STOP_ALL():String{
return (soundStopAll);
}
public function get SHOW_PLAY_SCREEN():String{
return (showPlayScreen);
}
public function get CHANGE_MAIN_SOUND():String{
return (changeMainSound);
}
public function get SOUND_PLAY_MAIN():String{
return (soundPlayMain);
}
public function get SHOW_INSTRUCTIONS_BEFORE_PLAY():String{
return (showInstructionsBeforePlay);
}
public function get SET_UISOUND():String{
return (setUISound);
}
public function get HIDE_UIHAND():String{
return (hideUIHand);
}
public function get SHOW_MAIN_MENU():String{
return (showMainMenu);
}
public function get SHOW_SETTINGS():String{
return (showSettings);
}
public function get SHOW_INSTRUCTIONS():String{
return (showInstructions);
}
public function get CHANGE_SFX_SOUND():String{
return (changeSfxSound);
}
public function get SET_PLAYER_NAME():String{
return (setPlayerName);
}
public function get RACE_TRY_AGAIN():String{
return (raceTryAgain);
}
public function get SOUND_PLAY_RACE_START():String{
return (soundPlayRaceStart);
}
public function get SHOW_HALL_OF_FAME():String{
return (showHallOfFame);
}
public function get SHOW_CREDITS():String{
return (showCredits);
}
public function get BACK_TO_MAIN_MENU():String{
return (backToMainMenu);
}
public function get SOUND_FADE_OUT():String{
return (soundFadeOut);
}
public function get SHOW_PLAY_SCREEN1():String{
return (showPlayScreen1);
}
}
}//package classes
Section 22
//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 23
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
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
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change: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){
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 continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
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 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 = 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 stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
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 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 get position():Number{
return (this.getPosition(this._time));
}
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 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 24
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time: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){
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 25
//backbutton_28 (HRS_0_fla.backbutton_28)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class backbutton_28 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function backbutton_28(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 52, frame53);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame53(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 26
//creditsbutton_62 (HRS_0_fla.creditsbutton_62)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class creditsbutton_62 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function creditsbutton_62(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 52, frame53);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame53(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 27
//DZWIEK_39 (HRS_0_fla.DZWIEK_39)
package HRS_0_fla {
import flash.display.*;
public dynamic class DZWIEK_39 extends MovieClip {
public function DZWIEK_39(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package HRS_0_fla
Section 28
//G_55 (HRS_0_fla.G_55)
package HRS_0_fla {
import flash.display.*;
public dynamic class G_55 extends MovieClip {
public function G_55(){
addFrameScript(254, frame255);
}
function frame255(){
stop();
gotoAndPlay(19);
}
}
}//package HRS_0_fla
Section 29
//glowakoniacs_54 (HRS_0_fla.glowakoniacs_54)
package HRS_0_fla {
import flash.display.*;
public dynamic class glowakoniacs_54 extends MovieClip {
public function glowakoniacs_54(){
addFrameScript(23, frame24, 38, frame39);
}
function frame39(){
stop();
}
function frame24(){
}
}
}//package HRS_0_fla
Section 30
//GW3_80 (HRS_0_fla.GW3_80)
package HRS_0_fla {
import flash.display.*;
public dynamic class GW3_80 extends MovieClip {
public function GW3_80(){
addFrameScript(20, frame21);
}
function frame21(){
gotoAndPlay(1);
}
}
}//package HRS_0_fla
Section 31
//halloffamebutton_59 (HRS_0_fla.halloffamebutton_59)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class halloffamebutton_59 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function halloffamebutton_59(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 53, frame54);
}
function frame25(){
stop();
}
function frame54(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame1(){
hit_area.alpha = 0;
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 32
//hors_16 (HRS_0_fla.hors_16)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class hors_16 extends MovieClip {
public var hit_area:MovieClip;
public function hors_16(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 2;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 33
//horse_17 (HRS_0_fla.horse_17)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_17 extends MovieClip {
public var hit_area:MovieClip;
public function horse_17(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 3;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 34
//horse_18 (HRS_0_fla.horse_18)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_18 extends MovieClip {
public var hit_area:MovieClip;
public function horse_18(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 4;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 35
//horse_19 (HRS_0_fla.horse_19)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_19 extends MovieClip {
public var hit_area:MovieClip;
public function horse_19(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 5;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 36
//horse_20 (HRS_0_fla.horse_20)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_20 extends MovieClip {
public var hit_area:MovieClip;
public function horse_20(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 6;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 37
//horse_21 (HRS_0_fla.horse_21)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_21 extends MovieClip {
public var hit_area:MovieClip;
public function horse_21(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 7;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 38
//horse_24 (HRS_0_fla.horse_24)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horse_24 extends MovieClip {
public var hit_area:MovieClip;
public function horse_24(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 8;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 39
//horseno_14 (HRS_0_fla.horseno_14)
package HRS_0_fla {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class horseno_14 extends MovieClip {
public var hit_area:MovieClip;
public function horseno_14(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame2(){
stop();
MovieClip(root).horse_nr = 1;
MovieClip(parent).nameField.gotoAndStop(MovieClip(root).horse_nr);
}
}
}//package HRS_0_fla
Section 40
//instructionsbutton_60 (HRS_0_fla.instructionsbutton_60)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class instructionsbutton_60 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function instructionsbutton_60(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 54, frame55);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame55(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 41
//mainmenubutton_72 (HRS_0_fla.mainmenubutton_72)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class mainmenubutton_72 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function mainmenubutton_72(){
addFrameScript(0, frame1, 10, frame11, 28, frame29);
}
function frame1(){
stop();
hit_area.alpha = 0;
}
function frame29(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.BACK_TO_MAIN_MENU, true));
}
function frame11(){
stop();
}
}
}//package HRS_0_fla
Section 42
//MainTimeline (HRS_0_fla.MainTimeline)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class MainTimeline extends MovieClip {
public var hand_1:hand;
public var myEvent:MyEvent;
public var p:Main;
public var preloader:Preloader;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
this.loaderInfo.addEventListener(Event.COMPLETE, startuj);
myEvent = new MyEvent();
preloader.addEventListener(myEvent.ANIMATION_COMPLETED, showUI);
}
function frame3(){
stop();
stage.frameRate = 30;
stop();
p = new Main(stage);
addChild(p);
hand_1.parent.setChildIndex(hand_1, (hand_1.parent.numChildren - 1));
hand_1.alpha = 0;
hand_1.x = mouseX;
hand_1.y = (mouseY + 1);
stage.addEventListener(MouseEvent.MOUSE_MOVE, poruszaj_reke);
}
public function showUI(_arg1:Event){
preloader.removeEventListener(myEvent.ANIMATION_COMPLETED, showUI);
this.gotoAndPlay(3);
}
public function startuj(_arg1:Event){
this.loaderInfo.removeEventListener(Event.COMPLETE, startuj);
preloader.gotoAndPlay(2);
}
public function preloading(_arg1:ProgressEvent):void{
var _local2:Number = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
preloader.procent.text = (int(_local2) + "%");
if (_local2 >= 99.5){
preloader.gotoAndPlay(3);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, preloading);
};
}
public function poruszaj_reke(_arg1:MouseEvent){
hand_1.x = mouseX;
hand_1.y = (mouseY + 1);
}
}
}//package HRS_0_fla
Section 43
//nameField_29 (HRS_0_fla.nameField_29)
package HRS_0_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nameField_29 extends MovieClip {
public var imie:TextField;
public function nameField_29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package HRS_0_fla
Section 44
//nextlevelbutton2_71 (HRS_0_fla.nextlevelbutton2_71)
package HRS_0_fla {
import flash.events.*;
import fl.transitions.easing.*;
import fl.transitions.*;
import flash.utils.*;
import flash.display.*;
import classes.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class nextlevelbutton2_71 extends MovieClip {
public var button_sfx_CH:SoundChannel;
public var myEvent:MyEvent;
public var p;
public var hit_area:MovieClip;
public function nextlevelbutton2_71(){
addFrameScript(0, frame1, 10, frame11, 28, frame29);
}
function frame1(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.PLAY_NEXT_LEVEL, true));
}
function frame11(){
stop();
}
function frame29(){
stop();
p = parent;
new Tween(this.p, "alpha", Strong.easeOut, 1, 0, 1, true);
button_sfx_CH = MovieClip(root).przycisk.play();
button_sfx_CH.soundTransform = new SoundTransform(MovieClip(root).SFXVol, 0);
MovieClip(root).gotoAndStop("game");
}
}
}//package HRS_0_fla
Section 45
//playbutton_58 (HRS_0_fla.playbutton_58)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class playbutton_58 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function playbutton_58(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 52, frame53);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame53(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 46
//podkladlogo2_10 (HRS_0_fla.podkladlogo2_10)
package HRS_0_fla {
import flash.display.*;
public dynamic class podkladlogo2_10 extends MovieClip {
public function podkladlogo2_10(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
}
}
}//package HRS_0_fla
Section 47
//racebutton_27 (HRS_0_fla.racebutton_27)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class racebutton_27 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function racebutton_27(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 46, frame47);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame47(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 48
//settingsbutton_61 (HRS_0_fla.settingsbutton_61)
package HRS_0_fla {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class settingsbutton_61 extends MovieClip {
public var hit_area:MovieClip;
public var myEvent:MyEvent;
public function settingsbutton_61(){
addFrameScript(0, frame1, 24, frame25, 34, frame35, 52, frame53);
}
function frame25(){
stop();
}
function frame1(){
hit_area.alpha = 0;
}
function frame53(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame35(){
stop();
}
}
}//package HRS_0_fla
Section 49
//SFX_46 (HRS_0_fla.SFX_46)
package HRS_0_fla {
import flash.display.*;
public dynamic class SFX_46 extends MovieClip {
public function SFX_46(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package HRS_0_fla
Section 50
//back_ground (back_ground)
package {
import flash.display.*;
public dynamic class back_ground extends MovieClip {
}
}//package
Section 51
//Backstreet_music (Backstreet_music)
package {
import flash.media.*;
public dynamic class Backstreet_music extends Sound {
}
}//package
Section 52
//bat (bat)
package {
import flash.media.*;
public dynamic class bat extends Sound {
}
}//package
Section 53
//bieznia (bieznia)
package {
import flash.display.*;
public dynamic class bieznia extends MovieClip {
public function bieznia(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 54
//box_name (box_name)
package {
import flash.display.*;
import flash.text.*;
public dynamic class box_name extends MovieClip {
public var horse_txt:TextField;
}
}//package
Section 55
//Button_sound (Button_sound)
package {
import flash.media.*;
public dynamic class Button_sound extends Sound {
}
}//package
Section 56
//credits (credits)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.net.*;
public dynamic class credits extends MovieClip {
public var btn_LLC:SimpleButton;
public var back:MovieClip;
public var myPlayEvent:MyEvent;
public var myEvent:MyEvent;
public var btn_HRG2:SimpleButton;
public var btn_HRG:SimpleButton;
public var btn_Link:SimpleButton;
public function credits(){
addFrameScript(39, frame40, 57, frame58, 76, frame77);
}
public function btnlink_Click(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.BeAJockey.com");
navigateToURL(_local2, "_blank");
}
public function btnHRG_Click(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.horseracegame.com");
navigateToURL(_local2, "_blank");
}
function frame40(){
btn_LLC.addEventListener(MouseEvent.CLICK, btnLink_Click);
btn_HRG.addEventListener(MouseEvent.CLICK, btnHRG_Click);
btn_HRG2.addEventListener(MouseEvent.CLICK, btnHRG_Click);
btn_Link.addEventListener(MouseEvent.CLICK, btnlink_Click);
}
function frame77(){
stop();
}
function frame58(){
stop();
myPlayEvent = new MyEvent();
dispatchEvent(new Event(myPlayEvent.SHOW_PLAY_SCREEN));
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
public function btnLink_Click(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.horseracingisfun.com");
navigateToURL(_local2, "_blank");
}
}
}//package
Section 57
//energy_class (energy_class)
package {
import flash.display.*;
public dynamic class energy_class extends MovieClip {
public var energyMask:MovieClip;
}
}//package
Section 58
//finish (finish)
package {
import flash.media.*;
public dynamic class finish extends Sound {
}
}//package
Section 59
//flag (flag)
package {
import flash.display.*;
public dynamic class flag extends MovieClip {
public function flag(){
addFrameScript(0, frame1, 25, frame26, 59, frame60);
}
function frame26(){
stop();
}
function frame1(){
stop();
}
function frame60(){
gotoAndStop(1);
}
}
}//package
Section 60
//gameEndScreen (gameEndScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameEndScreen extends MovieClip {
public var pointsTxt:TextField;
public var racesTxt:TextField;
public var btn_Link:SimpleButton;
public var emailBt:SimpleButton;
public function gameEndScreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
btn_Link.addEventListener(MouseEvent.CLICK, btnLink_Click);
}
public function btnLink_Click(_arg1:MouseEvent):void{
var myevent = _arg1;
var PageURL:String = ExternalInterface.call("window.location.href.toString");
var variables:URLVariables = new URLVariables();
variables.Points = "10$";
variables.PageURL = PageURL;
var myRequest:URLRequest = new URLRequest("http://www.horseracegame.com/be_a_jockey/");
myRequest.method = URLRequestMethod.POST;
myRequest.contentType = "application/x-www-form-urlencoded";
myRequest.data = variables;
try {
navigateToURL(myRequest);
} catch(e:Error) {
};
}
}
}//package
Section 61
//gameOverScreen (gameOverScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameOverScreen extends MovieClip {
public var winRacesTxt:TextField;
public var pointsTxt:TextField;
public var noBt:SimpleButton;
public var yesBt:SimpleButton;
public var btn_Link:SimpleButton;
public function gameOverScreen(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
btn_Link.addEventListener(MouseEvent.CLICK, btnLink_Click);
}
public function btnLink_Click(_arg1:MouseEvent):void{
var myevent = _arg1;
var PageURL:String = ExternalInterface.call("window.location.href.toString");
var variables:URLVariables = new URLVariables();
variables.Points = "5$";
variables.PageURL = PageURL;
var myRequest:URLRequest = new URLRequest("http://www.horseracegame.com/be_a_jockey/");
myRequest.method = URLRequestMethod.POST;
myRequest.contentType = "application/x-www-form-urlencoded";
myRequest.data = variables;
try {
navigateToURL(myRequest);
} catch(e:Error) {
};
}
}
}//package
Section 62
//ground (ground)
package {
import flash.display.*;
public dynamic class ground extends MovieClip {
}
}//package
Section 63
//hand (hand)
package {
import flash.display.*;
public dynamic class hand extends MovieClip {
public function hand(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 64
//hofinterface (hofinterface)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class hofinterface extends MovieClip {
public var back:MovieClip;
public var myEvent:MyEvent;
public function hofinterface(){
addFrameScript(65, frame66, 98, frame99);
}
function frame99(){
stop();
}
function frame66(){
stop();
myEvent = new MyEvent();
this.dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
}
}//package
Section 65
//horseracenr1 (horseracenr1)
package {
import flash.display.*;
public dynamic class horseracenr1 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr1(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 66
//horseracenr2 (horseracenr2)
package {
import flash.display.*;
public dynamic class horseracenr2 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr2(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 67
//horseracenr3 (horseracenr3)
package {
import flash.display.*;
public dynamic class horseracenr3 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr3(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 68
//horseracenr4 (horseracenr4)
package {
import flash.display.*;
public dynamic class horseracenr4 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr4(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 69
//horseracenr5 (horseracenr5)
package {
import flash.display.*;
public dynamic class horseracenr5 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr5(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 70
//horseracenr6 (horseracenr6)
package {
import flash.display.*;
public dynamic class horseracenr6 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr6(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 71
//horseracenr7 (horseracenr7)
package {
import flash.display.*;
public dynamic class horseracenr7 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr7(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 72
//horseracenr8 (horseracenr8)
package {
import flash.display.*;
public dynamic class horseracenr8 extends MovieClip {
public var horse_arrow:MovieClip;
public var zderzak:MovieClip;
public var gwiazda:MovieClip;
public function horseracenr8(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
gotoAndPlay("bieg");
}
}
}//package
Section 73
//instructions (instructions)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class instructions extends MovieClip {
public var back:MovieClip;
public var track:track_dynamic;
public var myEvent:MyEvent;
public function instructions(){
addFrameScript(51, frame52, 57, frame58, 98, frame99);
}
function frame58(){
stop();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame52(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame99(){
stop();
}
}
}//package
Section 74
//instructionsBeforePlay (instructionsBeforePlay)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class instructionsBeforePlay extends MovieClip {
public var PlayNow:MovieClip;
public var back:MovieClip;
public var track:track_dynamic;
public var myEvent:MyEvent;
public function instructionsBeforePlay(){
addFrameScript(51, frame52, 57, frame58, 98, frame99);
}
function frame52(){
stop();
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame99(){
stop();
}
function frame58(){
stop();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
}
}//package
Section 75
//Interface (Interface)
package {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Interface extends MovieClip {
public var playScreen:UserinterfacePlayScreen;
public var hallScreen:hofinterface;
public var horse_nr:Number;
public var horse_name:String;
public var typeNr:String;
public var przycisk:Sound;
public function Interface(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
horse_name = "";
przycisk = new Button_sound();
play();
}
public function przycisk_button(){
var _local1:SoundChannel = MovieClip(root).przycisk.play();
_local1.soundTransform = new SoundTransform(MovieClip(root).SFXVol, 0);
}
function frame2(){
stop();
}
}
}//package
Section 76
//justGo (justGo)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class justGo extends MovieClip {
public var countdownTXT:TextField;
public function justGo(){
addFrameScript(0, frame1, 16, frame17);
}
function frame17(){
stop();
MovieClip(root).usuwac = true;
}
function frame1(){
stop();
}
}
}//package
Section 77
//levelscreen (levelscreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class levelscreen extends MovieClip {
public var Next_Race_No:TextField;
public var Total_Win_Races:TextField;
public var main_menu:MovieClip;
public var Points:TextField;
public var next_race_number:MovieClip;
public var horse_name:TextField;
public var race_again:MovieClip;
public function levelscreen(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame4(){
stop();
}
function frame6(){
stop();
}
function frame2(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 78
//menuSound (menuSound)
package {
import flash.media.*;
public dynamic class menuSound extends Sound {
}
}//package
Section 79
//odds_table (odds_table)
package {
import flash.display.*;
import flash.text.*;
public dynamic class odds_table extends MovieClip {
public var kon_5_szanse:TextField;
public var kon_3_szanse:TextField;
public var kon_6_name:TextField;
public var kon_4_name:TextField;
public var kon_2_name:TextField;
public var kon_1_szanse:TextField;
public var kon_6_szanse:TextField;
public var kon_4_szanse:TextField;
public var kon_2_szanse:TextField;
public var kon_5_name:TextField;
public var kon_3_name:TextField;
public var kon_1_name:TextField;
public function odds_table(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 80
//opengate (opengate)
package {
import flash.media.*;
public dynamic class opengate extends Sound {
}
}//package
Section 81
//pace_class (pace_class)
package {
import flash.display.*;
public dynamic class pace_class extends MovieClip {
public var paceMask:MovieClip;
}
}//package
Section 82
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.text.*;
public dynamic class Preloader extends MovieClip {
public var procent:TextField;
public var myEvent:MyEvent;
public function Preloader(){
addFrameScript(0, frame1, 11, frame12);
}
function frame1(){
stop();
}
function frame12(){
stop();
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
}
}//package
Section 83
//rog (rog)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
public dynamic class rog extends MovieClip {
public var m1:MovieClip;
public var m2:MovieClip;
public var glowaNaStarcie:MovieClip;
public var m4:MovieClip;
public var m3:MovieClip;
public var m5:MovieClip;
public var myEvent:MyEvent;
public function rog(){
addFrameScript(0, frame1, 66, frame67);
}
function frame1(){
glowaNaStarcie.gotoAndPlay(1);
}
function frame67(){
stop();
myEvent = new MyEvent();
this.dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
}
}//package
Section 84
//settings (settings)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class settings extends MovieClip {
public var volumeSFX:MovieClip;
public var plusSFX:SimpleButton;
public var myEvent:MyEvent;
public var plus:SimpleButton;
public var volume:MovieClip;
public var SFX:MovieClip;
public var back:MovieClip;
public var music:MovieClip;
public var minus:SimpleButton;
public var minusSFX:SimpleButton;
public function settings(){
addFrameScript(0, frame1, 33, frame34, 37, frame38, 43, frame44, 45, frame46, 51, frame52);
}
public function over_1(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(2);
MovieClip(root).hand_1.alpha = 1;
Mouse.hide();
}
public function incSFX(_arg1:MouseEvent):void{
if (volumeSFX.scaleX < 1){
volumeSFX.scaleX = (volumeSFX.scaleX + 0.1);
dispatchEvent(new Event(myEvent.CHANGE_SFX_SOUND));
SFX.gotoAndStop(1);
};
}
public function out(_arg1:MouseEvent){
MovieClip(root).hand_1.gotoAndStop(1);
MovieClip(root).hand_1.alpha = 0;
Mouse.show();
}
public function incSound(_arg1:MouseEvent):void{
if (volume.scaleX < 1){
volume.scaleX = (volume.scaleX + 0.1);
dispatchEvent(new Event(myEvent.CHANGE_MAIN_SOUND));
music.gotoAndStop(1);
};
}
function frame38(){
plus.addEventListener(MouseEvent.MOUSE_UP, incSound);
minus.addEventListener(MouseEvent.MOUSE_UP, decSound);
plus.addEventListener(MouseEvent.MOUSE_OVER, over_1);
minus.addEventListener(MouseEvent.MOUSE_OVER, over_1);
plus.addEventListener(MouseEvent.MOUSE_OUT, out);
minus.addEventListener(MouseEvent.MOUSE_OUT, out);
}
function frame52(){
stop();
}
public function decSFX(_arg1:MouseEvent):void{
if (volumeSFX.scaleX > 0.1){
volumeSFX.scaleX = (volumeSFX.scaleX - 0.1);
dispatchEvent(new Event(myEvent.CHANGE_SFX_SOUND));
SFX.gotoAndStop(1);
};
}
function frame1(){
myEvent = new MyEvent();
}
function frame34(){
dispatchEvent(new Event(myEvent.SET_UISOUND));
}
public function decSound(_arg1:MouseEvent):void{
if (volume.scaleX > 0.1){
volume.scaleX = (volume.scaleX - 0.1);
dispatchEvent(new Event(myEvent.CHANGE_MAIN_SOUND));
music.gotoAndStop(1);
};
}
function frame46(){
stop();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
function frame44(){
plusSFX.addEventListener(MouseEvent.MOUSE_UP, incSFX);
minusSFX.addEventListener(MouseEvent.MOUSE_UP, decSFX);
plusSFX.addEventListener(MouseEvent.MOUSE_OVER, over_1);
plusSFX.addEventListener(MouseEvent.MOUSE_OUT, out);
minusSFX.addEventListener(MouseEvent.MOUSE_OVER, over_1);
minusSFX.addEventListener(MouseEvent.MOUSE_OUT, out);
}
}
}//package
Section 85
//startLine (startLine)
package {
import flash.display.*;
public dynamic class startLine extends MovieClip {
}
}//package
Section 86
//statusbar (statusbar)
package {
import flash.display.*;
public dynamic class statusbar extends MovieClip {
}
}//package
Section 87
//tablica (tablica)
package {
import flash.display.*;
import flash.text.*;
public dynamic class tablica extends MovieClip {
public var distance_TXT:TextField;
public var pointsTXT:TextField;
public var countdownTXT:TextField;
}
}//package
Section 88
//track_dynamic (track_dynamic)
package {
import flash.display.*;
public dynamic class track_dynamic extends MovieClip {
public var maska_1:MovieClip;
public var maska_2:MovieClip;
public var maska_3:MovieClip;
public var maska_4:MovieClip;
public function track_dynamic(){
addFrameScript(0, frame1, 0x0E0E, frame3599);
}
function frame1(){
stop();
}
function frame3599(){
stop();
stop();
}
}
}//package
Section 89
//UITrasaMC (UITrasaMC)
package {
import flash.display.*;
public dynamic class UITrasaMC extends MovieClip {
public var flaga:MovieClip;
public function UITrasaMC(){
addFrameScript(0, frame1, 0x0E0E, frame3599);
}
function frame1(){
stop();
}
function frame3599(){
stop();
}
}
}//package
Section 90
//UserinterfacePlayScreen (UserinterfacePlayScreen)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.text.*;
public dynamic class UserinterfacePlayScreen extends MovieClip {
public var type3:MovieClip;
public var type4:MovieClip;
public var type6:MovieClip;
public var type7:MovieClip;
public var race:MovieClip;
public var myEvent:MyEvent;
public var nameInfo:TextField;
public var back:MovieClip;
public var horseImage_0:MovieClip;
public var nameField:MovieClip;
public var type1:MovieClip;
public var type2:MovieClip;
public var type5:MovieClip;
public var type8:MovieClip;
public function UserinterfacePlayScreen(){
addFrameScript(98, frame99);
}
function frame99(){
myEvent = new MyEvent();
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
stop();
}
}
}//package
Section 91
//whipser (whipser)
package {
import flash.display.*;
public dynamic class whipser extends MovieClip {
public var whip_1:MovieClip;
public var whip_2:MovieClip;
public var whip_3:MovieClip;
public function whipser(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 92
//win_lostmenu (win_lostmenu)
package {
import flash.events.*;
import flash.display.*;
import classes.*;
import flash.utils.*;
public dynamic class win_lostmenu extends MovieClip {
public var lost_screen:MovieClip;
public var losowanie:Number;
public var bubble_up:MovieClip;
public var myTimer:Timer;
public var myEvent:MyEvent;
public function win_lostmenu(){
addFrameScript(0, frame1, 15, frame16, 236, frame237, 237, frame238, 238, frame239, 245, frame246);
}
public function kolejnyEkran(_arg1:TimerEvent){
stage.removeEventListener(MouseEvent.MOUSE_DOWN, wcisnieta_mysz);
myTimer.removeEventListener(TimerEvent.TIMER, kolejnyEkran);
gotoAndStop("win_lost_check");
}
function frame1(){
myEvent = new MyEvent();
play();
}
function frame237(){
}
function frame16(){
stop();
losowanie = (Math.round((Math.random() * 8)) + 1);
myTimer = new Timer(9000);
myTimer.addEventListener(TimerEvent.TIMER, kolejnyEkran);
bubble_up.gotoAndStop(losowanie);
myTimer.start();
stage.addEventListener(MouseEvent.MOUSE_DOWN, wcisnieta_mysz);
}
function frame239(){
stop();
}
function frame238(){
stop();
stage.removeEventListener(MouseEvent.MOUSE_DOWN, wcisnieta_mysz);
dispatchEvent(new Event(myEvent.ANIMATION_COMPLETED));
}
public function wcisnieta_mysz(_arg1:MouseEvent){
stage.removeEventListener(MouseEvent.MOUSE_DOWN, wcisnieta_mysz);
myTimer.removeEventListener(TimerEvent.TIMER, kolejnyEkran);
gotoAndStop("win_lost_check");
}
function frame246(){
stop();
}
}
}//package
Section 93
//www_adres (www_adres)
package {
import flash.display.*;
public dynamic class www_adres extends MovieClip {
}
}//package