Section 1
//gameslist_24 (crazykissracer_fla.gameslist_24)
package crazykissracer_fla {
import flash.display.*;
public dynamic class gameslist_24 extends MovieClip {
public function gameslist_24(){
addFrameScript(80, frame81);
}
function frame81(){
stop();
}
}
}//package crazykissracer_fla
Section 2
//Help_67 (crazykissracer_fla.Help_67)
package crazykissracer_fla {
import flash.display.*;
public dynamic class Help_67 extends MovieClip {
public function Help_67(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package crazykissracer_fla
Section 3
//loading_2 (crazykissracer_fla.loading_2)
package crazykissracer_fla {
import flash.display.*;
public dynamic class loading_2 extends MovieClip {
public function loading_2(){
addFrameScript(0, frame1, 99, frame100);
}
function frame100(){
stop();
}
function frame1(){
stop();
}
}
}//package crazykissracer_fla
Section 4
//particular_30 (crazykissracer_fla.particular_30)
package crazykissracer_fla {
import flash.display.*;
public dynamic class particular_30 extends MovieClip {
public function particular_30(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
}
}
}//package crazykissracer_fla
Section 5
//Timeline_1 (crazykissracer_fla.Timeline_1)
package crazykissracer_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Timeline_1 extends MovieClip {
public var con:SimpleButton;
public var loadMC:MovieClip;
public var mc:SimpleButton;
public function Timeline_1(){
addFrameScript(0, frame1, 12, frame13);
}
public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com"), "_blank");
}
function frame1(){
stop();
mc.addEventListener(MouseEvent.CLICK, onClick);
}
function frame13(){
stop();
con.addEventListener(MouseEvent.CLICK, onClick1);
}
public function onClick1(_arg1:MouseEvent):void{
MovieClip(this.parent).gotoAndStop(2);
}
}
}//package crazykissracer_fla
Section 6
//Timeline_23 (crazykissracer_fla.Timeline_23)
package crazykissracer_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Timeline_23 extends MovieClip {
public var mc:SimpleButton;
public function Timeline_23(){
addFrameScript(0, frame1, 58, frame59, 119, frame120);
}
function frame59(){
}
function frame120(){
MovieClip(this.parent).gotoAndStop(5);
}
function frame1(){
mc.addEventListener(MouseEvent.CLICK, onClick);
}
public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com"), "_blank");
}
}
}//package crazykissracer_fla
Section 7
//Timeline_50 (crazykissracer_fla.Timeline_50)
package crazykissracer_fla {
import flash.display.*;
public dynamic class Timeline_50 extends MovieClip {
public function Timeline_50(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.buttonMode = true;
}
function frame2(){
stop();
this.buttonMode = true;
}
}
}//package crazykissracer_fla
Section 8
//Timeline_51 (crazykissracer_fla.Timeline_51)
package crazykissracer_fla {
import flash.display.*;
public dynamic class Timeline_51 extends MovieClip {
public function Timeline_51(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
this.buttonMode = true;
}
function frame2(){
stop();
this.buttonMode = true;
}
}
}//package crazykissracer_fla
Section 9
//Timeline_54 (crazykissracer_fla.Timeline_54)
package crazykissracer_fla {
import flash.display.*;
public dynamic class Timeline_54 extends MovieClip {
public var bomb:MovieClip;
public var hit:MovieClip;
public var car:MovieClip;
public function Timeline_54(){
addFrameScript(0, frame1, 1, frame2);
}
function frame2(){
stop();
bomb.visible = false;
bomb.stop();
}
function frame1(){
stop();
bomb.visible = false;
bomb.stop();
}
}
}//package crazykissracer_fla
Section 10
//Timeline_60 (crazykissracer_fla.Timeline_60)
package crazykissracer_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_60 extends MovieClip {
public function Timeline_60(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
dispatchEvent(new Event("fail"));
}
}
}//package crazykissracer_fla
Section 11
//Timeline_65 (crazykissracer_fla.Timeline_65)
package crazykissracer_fla {
import flash.display.*;
public dynamic class Timeline_65 extends MovieClip {
public function Timeline_65(){
addFrameScript(26, frame27);
}
function frame27(){
gotoAndPlay(2);
}
}
}//package crazykissracer_fla
Section 12
//GamesListAPIAS3 (GamesList.as3.GamesListAPIAS3)
package GamesList.as3 {
import flash.net.*;
public class GamesListAPIAS3 {
private static var HighScore_Pass:String;
private static var HighScore_GameName:String;
private static var HighScore_ScoreID:String;
private static var HighScore_RequestURL:URLRequest;
public static function submitScore(_arg1:Number):void{
trace("submitscore");
var _local2:* = GamesListMD5AS3.calculate(((HighScore_Pass + HighScore_ScoreID) + _arg1));
HighScore_RequestURL.url = ((((((("http://www.gameslist.com/submitscore.php?game=" + HighScore_GameName) + "&scoreid=") + HighScore_ScoreID) + "&score=") + _arg1) + "&key=") + _local2);
navigateToURL(HighScore_RequestURL, "_blank");
}
public static function config(_arg1:String, _arg2:String):void{
HighScore_GameName = _arg1;
HighScore_Pass = _arg2;
HighScore_RequestURL = new URLRequest();
}
public static function GenerateScoreID():void{
var _local1:Date = new Date();
HighScore_ScoreID = (_local1.getTime() + String((Math.floor((Math.random() * 9000)) + 1000)));
}
}
}//package GamesList.as3
Section 13
//GamesListMD5AS3 (GamesList.as3.GamesListMD5AS3)
package GamesList.as3 {
public class GamesListMD5AS3 {
private static var hexChars:String = "0123456789abcdef";
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((rol(_local9, _arg7) + _arg3));
}
public static function calculate(_arg1:String):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((toHex(_local2) + toHex(_local3)) + toHex(_local4)) + toHex(_local5)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
private static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
}
}//package GamesList.as3
Section 14
//Masked (masked.Masked)
package masked {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Masked extends Sprite {
private var timer:Timer;
private var repeat:int;
private var fun:Function;
public function Masked(_arg1:Number){
this.graphics.beginFill(0);
this.graphics.drawRect(0, 0, 733, 550);
this.graphics.endFill();
repeat = int(((_arg1 * 1000) / 50));
timer = new Timer(50, repeat);
}
public function toDrak(_arg1:Function):void{
timer.addEventListener(TimerEvent.TIMER, onTimer1);
timer.start();
this.alpha = 0;
this.fun = _arg1;
}
public function toLight(_arg1:Function):void{
timer.addEventListener(TimerEvent.TIMER, onTimer2);
timer.start();
this.alpha = 1;
this.fun = _arg1;
}
private function onTimer2(_arg1:Event):void{
this.alpha = ((repeat - timer.currentCount) / repeat);
if (timer.currentCount == repeat){
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, onTimer2);
timer = null;
fun();
fun = null;
if (this.parent){
this.parent.removeChild(this);
};
};
}
private function onTimer1(_arg1:Event):void{
this.alpha = (timer.currentCount / repeat);
if (timer.currentCount == repeat){
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, onTimer1);
timer = null;
fun();
fun = null;
if (this.parent){
this.parent.removeChild(this);
};
};
}
}
}//package masked
Section 15
//BeginScene (view.BeginScene)
package view {
import flash.events.*;
import flash.net.*;
public class BeginScene {
public function BeginScene(){
KissGame.instance.resource.gotoAndStop(1, "begin");
KissGame.instance.addScriptToNextframe(init);
}
private function init():void{
KissGame.instance.addEventListener(MouseEvent.CLICK, onMouseClick);
}
private function onMouseClick(_arg1:MouseEvent):void{
switch (_arg1.target.name){
case "newGameBn":
KissGame.instance.removeEventListener(MouseEvent.CLICK, onMouseClick);
new GameScene();
break;
case "moreGameBn":
navigateToURL(new URLRequest("http://www.gameslist.com/"), "_blank");
break;
case "webSiteBn":
navigateToURL(new URLRequest("http://www.gameslist.com/freegames"), "_blank");
break;
};
}
}
}//package view
Section 16
//FailScene (view.FailScene)
package view {
import flash.events.*;
import flash.display.*;
import GamesList.as3.*;
import flash.text.*;
import masked.*;
import vo.*;
import flash.net.*;
public class FailScene {
private var _masked:Masked;
private var bestScore:SimpleButton;
private var score:TextField;
private var backBn:SimpleButton;
private var playAgainBn:SimpleButton;
private var moreGameBn:SimpleButton;
public function FailScene(){
KissGame.instance.resource.gotoAndStop(1, "fail");
KissGame.instance.addScriptToNextframe(init);
_masked = new Masked(1);
KissGame.instance.resource.parent.addChild(_masked);
_masked.toLight(init);
}
private function onPlayAgainBn(_arg1:MouseEvent):void{
this.destory();
new GameScene();
}
private function onMoreGameBn(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com/"), "_blank");
}
private function onWebSite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com/freegames"), "_blank");
}
private function onbestScore(_arg1:MouseEvent):void{
GamesListAPIAS3.submitScore(Def.highScore);
}
private function init():void{
playAgainBn = KissGame.instance.getMovie("playAgainBn");
moreGameBn = KissGame.instance.getMovie("moreGameBn");
bestScore = KissGame.instance.getMovie("bestScore");
backBn = KissGame.instance.getMovie("backBn");
playAgainBn.addEventListener(MouseEvent.CLICK, onPlayAgainBn);
moreGameBn.addEventListener(MouseEvent.CLICK, onMoreGameBn);
bestScore.addEventListener(MouseEvent.CLICK, onbestScore);
backBn.addEventListener(MouseEvent.CLICK, onBackBn);
KissGame.instance.getMovie("webSite").addEventListener(MouseEvent.CLICK, onWebSite);
score = KissGame.instance.getMovie("score");
score.text = (("(" + Def.highScore) + "m)");
}
private function onBackBn(_arg1:MouseEvent):void{
this.destory();
new BeginScene();
}
private function destory():void{
_masked = null;
playAgainBn.removeEventListener(MouseEvent.CLICK, onPlayAgainBn);
moreGameBn.removeEventListener(MouseEvent.CLICK, onMoreGameBn);
backBn.removeEventListener(MouseEvent.CLICK, onBackBn);
KissGame.instance.getMovie("webSite").removeEventListener(MouseEvent.CLICK, onWebSite);
playAgainBn = null;
moreGameBn = null;
backBn = null;
}
}
}//package view
Section 17
//GameScene (view.GameScene)
package view {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import vo.*;
import flash.utils.*;
import flash.ui.*;
public class GameScene {
private var gameIsWin:Boolean;// = false
private var oldTime:Number;// = 0
public var keyObj:Object;
private var bag:MovieClip;
private var bomb:MovieClip;
public var carAr:Array;
private var text:TextField;
public var kissCar:MovieClip;
private var carSprite:Sprite;
private var gamePaused:Boolean;// = false
private var help:MovieClip;
public var kissIng:Boolean;// = false
public var speed:int;// = 10
private var timeSec:int;// = 0
private var timerAr:Array;
private var gameOver:Boolean;// = false
private var m:int;// = 0
public function GameScene(){
keyObj = new Object();
carAr = [];
timerAr = [];
super();
KissGame.instance.resource.gotoAndStop(1, "game");
KissGame.instance.addScriptToNextframe(init);
}
private function create(_arg1:TimerEvent):void{
var _local2:MovieClip;
_local2 = ranCar((Math.random() * 2));
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
_arg1.target.stop();
_arg1.target.removeEventListener(TimerEvent.TIMER, create);
}
private function gameWin():void{
gameIsWin = true;
kissCar.stop();
if (((kissCar) && (kissCar.parent))){
kissCar.parent.removeChild(kissCar);
};
destroy();
new WinScene();
}
private function destroyAllCar():void{
var _local1:int = carSprite.numChildren;
while (_local1 > 0) {
carSprite.removeChild(carSprite.getChildAt(0));
_local1--;
};
}
private function allCarStop():void{
var _local1:int;
while (_local1 < carAr.length) {
carAr[_local1].stop();
_local1++;
};
}
private function removeAllCar():void{
var _local1:int;
while (_local1 < carAr.length) {
carSprite.removeChild(carAr[_local1]);
carAr.splice(_local1, 1);
_local1++;
};
}
public function init():void{
initCar();
carSprite = new Sprite();
KissGame.instance.container.addChild(carSprite);
KissGame.instance.stage.addEventListener(Event.ENTER_FRAME, onFrame);
KissGame.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onDown);
KissGame.instance.stage.addEventListener(KeyboardEvent.KEY_UP, onUp);
KissGame.instance.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouDown);
KissGame.instance.stage.addEventListener(MouseEvent.MOUSE_UP, onMouUp);
help.addEventListener(MouseEvent.CLICK, gameBegin);
Def.isSound = true;
if (!Def.sound){
Def.sound = new GameSound();
};
Def.sound.backSoundPlay();
Def.playing = true;
gamePause();
}
public function onDown(_arg1:KeyboardEvent):void{
keyObj[_arg1.keyCode] = true;
}
private function initCar():void{
kissCar = KissGame.instance.getMovie("mycar");
text = KissGame.instance.getMovie("textF");
text.text = "0m";
bag = KissGame.instance.getMovie("bag");
help = KissGame.instance.getMovie("help");
bomb = kissCar.bomb;
bomb.addEventListener("fail", gameLose);
}
private function startAllTimer():void{
var _local1:int;
while (_local1 < timerAr.length) {
timerAr[_local1].start();
_local1++;
};
}
private function gameLose(_arg1:Event):void{
kissCar.stop();
if (((kissCar) && (kissCar.parent))){
kissCar.parent.removeChild(kissCar);
};
KissGame.instance.resource.gotoAndStop(1, "begin");
new FailScene();
}
private function gamePause():void{
stopAllTimer();
gamePaused = true;
stopBag(bag);
allCarStop();
KissGame.instance.stage.removeEventListener(Event.ENTER_FRAME, onFrame);
KissGame.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onDown);
KissGame.instance.stage.removeEventListener(KeyboardEvent.KEY_UP, onUp);
KissGame.instance.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouDown);
KissGame.instance.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouUp);
}
public function juggHit():void{
var _local1:int;
while (_local1 < carAr.length) {
if (((kissCar.hit.hitTestObject(carAr[_local1].car.hit)) && (!(gameOver)))){
destroy();
gameOver = true;
kissCar.bomb.visible = true;
kissCar.bomb.play();
kissCar.car.visible = false;
};
_local1++;
};
}
public function whenToCreate():void{
if (carAr.length == 0){
createCar((Math.random() * 4));
};
}
private function gameStart():void{
startAllTimer();
gamePaused = false;
playBag(bag);
allCarPlay();
KissGame.instance.stage.addEventListener(Event.ENTER_FRAME, onFrame);
KissGame.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onDown);
KissGame.instance.stage.addEventListener(KeyboardEvent.KEY_UP, onUp);
KissGame.instance.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouDown);
KissGame.instance.stage.addEventListener(MouseEvent.MOUSE_UP, onMouUp);
}
private function playBag(_arg1:MovieClip):void{
var _local2:int;
while (_local2 < _arg1.numChildren) {
if ((_arg1.getChildAt(_local2) is MovieClip)){
MovieClip(_arg1.getChildAt(_local2)).play();
};
_local2++;
};
}
private function ranCar(_arg1:int):MovieClip{
var _local2:MovieClip;
var _local3:int;
var _local4:Class;
var _local5:int;
var _local6:Class;
var _local7:int;
var _local8:Class;
var _local9:int;
if (_arg1 == 0){
_local3 = (Math.random() * 3);
_local4 = KissGame.instance.getClass(("carl" + _local3));
_local2 = new (_local4);
_local2.x = ((295 + (Math.random() * 50)) - 30);
_local2.y = 229;
} else {
if (_arg1 == 1){
_local5 = (Math.random() * 3);
_local6 = KissGame.instance.getClass(("carr" + _local5));
_local2 = new (_local6);
_local2.x = ((320 + (Math.random() * 50)) - 30);
_local2.y = 227;
} else {
_local7 = (Math.random() * 3);
_local9 = ((320 + (Math.random() * 50)) - 50);
if (_local9 < 320){
_local8 = KissGame.instance.getClass(("carl" + _local7));
} else {
_local8 = KissGame.instance.getClass(("carr" + _local7));
};
_local2 = new (_local8);
_local2.x = _local9;
_local2.y = 227;
};
};
return (_local2);
}
public function createCar(_arg1:int):void{
var _local2:MovieClip;
var _local3:Timer;
switch (_arg1){
case 0:
_local2 = ranCar(0);
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
_local3 = new Timer(1500, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
if (Math.random() < 0.8){
_local3 = new Timer(3000, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
};
break;
case 1:
_local2 = ranCar(1);
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
_local3 = new Timer(1500, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
if (Math.random() < 0.8){
_local3 = new Timer(3000, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
};
break;
case 2:
_local2 = ranCar(1);
carSprite.addChildAt(_local2, 0);
_local2.x = ((357 + (Math.random() * 50)) - 30);
_local2.y = 227;
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
_local2 = ranCar(0);
carSprite.addChildAt(_local2, 0);
_local2.x = ((295 + (Math.random() * 50)) - 30);
_local2.y = 229;
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
if (Math.random() < 0.8){
_local3 = new Timer(2000, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
};
break;
case 3:
_local2 = ranCar((Math.random() * 2));
carSprite.addChildAt(_local2, 0);
carAr.push(_local2);
_local3 = new Timer(1500, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
if (Math.random() < 0.5){
_local3 = new Timer(3000, 1);
_local3.start();
_local3.addEventListener(TimerEvent.TIMER, create);
timerAr.push(_local3);
};
break;
};
}
private function stopBag(_arg1:MovieClip):void{
var _local2:int;
while (_local2 < _arg1.numChildren) {
if ((_arg1.getChildAt(_local2) is MovieClip)){
MovieClip(_arg1.getChildAt(_local2)).stop();
};
_local2++;
};
}
private function stopAllTimer():void{
var _local1:int;
while (_local1 < timerAr.length) {
timerAr[_local1].stop();
_local1++;
};
}
public function onFrame(_arg1:Event):void{
getGameTime();
ctrl();
whenToDel();
juggHit();
isKissing();
}
private function getGameTime():void{
var _local1:Number = getTimer();
var _local2:Number = (_local1 - oldTime);
if (int((_local2 / 1000)) >= 1){
timeSec++;
oldTime = _local1;
whenToCreate();
};
}
private function gameBegin(_arg1:Event):void{
KissGame.instance.stage.addEventListener(MouseEvent.CLICK, onTakle);
help.removeEventListener(MouseEvent.CLICK, gameBegin);
help.parent.removeChild(help);
gameStart();
}
private function detroyTimer():void{
var _local1:int;
while (_local1 < timerAr.length) {
timerAr[_local1].removeEventListener(TimerEvent.TIMER, create);
_local1++;
};
}
private function soundOn():void{
Def.isSound = false;
Def.sound.backSoundPlay();
}
private function allCarPlay():void{
var _local1:int;
while (_local1 < carAr.length) {
carAr[_local1].play();
_local1++;
};
}
private function soundOff():void{
Def.isSound = true;
Def.sound.backSoundPlay();
}
public function onUp(_arg1:KeyboardEvent):void{
keyObj[_arg1.keyCode] = false;
}
public function ctrl():void{
if (kissIng){
return;
};
if (keyObj[Keyboard.LEFT]){
kissCar.x = (kissCar.x - speed);
};
if (keyObj[Keyboard.RIGHT]){
kissCar.x = (kissCar.x + speed);
};
if (kissCar.x > 573){
kissCar.x = 573;
};
if (kissCar.x < 53){
kissCar.x = 53;
};
}
public function onMouUp(_arg1:Event):void{
kissIng = false;
kissCar.gotoAndStop(1);
Def.sound.stopKiss();
}
public function whenToDel():void{
var _local1:int;
while (_local1 < carAr.length) {
if (carAr[_local1].currentFrame == carAr[_local1].totalFrames){
carSprite.removeChild(carAr[_local1]);
carAr.splice(_local1, 1);
trace(carSprite.numChildren);
};
_local1++;
};
}
private function onTakle(_arg1:Event):void{
switch (_arg1.target.name){
case "backBn":
destroy();
KissGame.instance.resource.gotoAndStop(1, "begin");
new BeginScene();
break;
case "pauseBn":
if (_arg1.target.currentFrame == 1){
_arg1.target.gotoAndStop(2);
gamePause();
} else {
_arg1.target.gotoAndStop(1);
gameStart();
};
break;
case "musicBn":
if (_arg1.target.currentFrame == 1){
_arg1.target.gotoAndStop(2);
soundOn();
} else {
_arg1.target.gotoAndStop(1);
soundOff();
};
break;
case "replayBn":
destroy();
KissGame.instance.resource.gotoAndStop(1, "begin");
new GameScene();
break;
default:
break;
};
}
private function destroy():void{
Def.highScore = m;
Def.playing = false;
Def.isSound = false;
Def.sound.backSoundPlay();
Def.sound.stopKiss();
Def.sound.destroy();
allCarStop();
destroyAllCar();
gameOver = true;
detroyTimer();
carAr = [];
timerAr = [];
if (carSprite.parent){
carSprite.parent.removeChild(carSprite);
};
KissGame.instance.stage.removeEventListener(Event.ENTER_FRAME, onFrame);
KissGame.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onDown);
KissGame.instance.stage.removeEventListener(KeyboardEvent.KEY_UP, onUp);
KissGame.instance.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouDown);
KissGame.instance.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouUp);
KissGame.instance.stage.removeEventListener(MouseEvent.CLICK, onTakle);
}
public function isKissing():void{
if (kissIng){
m++;
text.text = (m + "m");
if (m > 3000){
gameWin();
};
};
}
public function onMouDown(_arg1:Event):void{
kissIng = true;
kissCar.gotoAndStop(2);
Def.sound.kiss();
}
}
}//package view
Section 18
//WinScene (view.WinScene)
package view {
import flash.events.*;
import flash.display.*;
import GamesList.as3.*;
import flash.text.*;
import masked.*;
import vo.*;
import flash.net.*;
public class WinScene {
private var _masked:Masked;
private var bestScore:SimpleButton;
private var score:TextField;
private var backBn:SimpleButton;
private var playAgainBn:SimpleButton;
private var moreGameBn:SimpleButton;
public function WinScene(){
KissGame.instance.resource.gotoAndStop(1, "win");
KissGame.instance.addScriptToNextframe(init);
_masked = new Masked(1);
KissGame.instance.resource.parent.addChild(_masked);
_masked.toLight(init);
}
private function onPlayAgainBn(_arg1:MouseEvent):void{
this.destory();
new GameScene();
}
private function onMoreGameBn(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com/"), "_blank");
}
private function onWebSite(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.gameslist.com/freegames"), "_blank");
}
private function onbestScore(_arg1:MouseEvent):void{
GamesListAPIAS3.submitScore(Def.highScore);
}
private function init():void{
playAgainBn = KissGame.instance.getMovie("playAgainBn");
moreGameBn = KissGame.instance.getMovie("moreGameBn");
backBn = KissGame.instance.getMovie("backBn");
score = KissGame.instance.getMovie("score");
bestScore = KissGame.instance.getMovie("bestScore");
score.text = (("(" + Def.highScore) + "m)");
playAgainBn.addEventListener(MouseEvent.CLICK, onPlayAgainBn);
moreGameBn.addEventListener(MouseEvent.CLICK, onMoreGameBn);
backBn.addEventListener(MouseEvent.CLICK, onBackBn);
KissGame.instance.getMovie("webSiteBn").addEventListener(MouseEvent.CLICK, onWebSite);
bestScore.addEventListener(MouseEvent.CLICK, onbestScore);
}
private function onBackBn(_arg1:MouseEvent):void{
this.destory();
new BeginScene();
}
private function destory():void{
_masked = null;
playAgainBn.removeEventListener(MouseEvent.CLICK, onPlayAgainBn);
moreGameBn.removeEventListener(MouseEvent.CLICK, onMoreGameBn);
backBn.removeEventListener(MouseEvent.CLICK, onBackBn);
KissGame.instance.getMovie("webSiteBn").removeEventListener(MouseEvent.CLICK, onWebSite);
playAgainBn = null;
moreGameBn = null;
backBn = null;
}
}
}//package view
Section 19
//Def (vo.Def)
package vo {
public class Def {
public static var isSound:Boolean = true;
public static var carAr:Array = [];
public static var playing:Boolean = false;
public static var sound:GameSound;
public static var gameLvl:int = 1;
public static var highScore:int = 0;
public static var freshTime:int = 1;
public static var gameTime:int = 100;
}
}//package vo
Section 20
//GameSound (vo.GameSound)
package vo {
import flash.media.*;
public class GameSound {
private var kissCh:SoundChannel;
private var backSound:Sound;
private var sound:Array;
private var backSoundCh:SoundChannel;
public function GameSound(){
sound = [];
super();
backSound = (new (KissGame.instance.getClass("引擎声")) as Sound);
sound[0] = (new (KissGame.instance.getClass("KISS")) as Sound);
sound[1] = (new (KissGame.instance.getClass("SOFTKISS")) as Sound);
sound[2] = (new (KissGame.instance.getClass("SOFTKISS2")) as Sound);
}
public function stopKiss():void{
if (kissCh){
kissCh.stop();
};
}
public function destroy():void{
this.kissCh = null;
this.backSoundCh = null;
}
public function stopSound():void{
if (backSoundCh){
backSoundCh.stop();
};
}
public function backSoundPlay():void{
if (Def.isSound){
if (backSoundCh){
backSound.play(backSoundCh.position);
} else {
backSoundCh = backSound.play(0, 999);
};
} else {
if (backSoundCh){
backSoundCh.stop();
};
};
}
public function kiss():void{
if (Def.isSound){
kissCh = sound[0].play(0, 999);
};
}
}
}//package vo
Section 21
//carl0 (carl0)
package {
import flash.display.*;
public dynamic class carl0 extends MovieClip {
public var car:MovieClip;
public function carl0(){
addFrameScript(139, frame140);
}
function frame140(){
stop();
this.visible = false;
}
}
}//package
Section 22
//carl1 (carl1)
package {
import flash.display.*;
public dynamic class carl1 extends MovieClip {
public var car:MovieClip;
public function carl1(){
addFrameScript(134, frame135);
}
function frame135(){
stop();
this.visible = false;
}
}
}//package
Section 23
//carl2 (carl2)
package {
import flash.display.*;
public dynamic class carl2 extends MovieClip {
public var car:MovieClip;
public function carl2(){
addFrameScript(112, frame113);
}
function frame113(){
stop();
this.visible = false;
}
}
}//package
Section 24
//carr0 (carr0)
package {
import flash.display.*;
public dynamic class carr0 extends MovieClip {
public var car:MovieClip;
public function carr0(){
addFrameScript(129, frame130);
}
function frame130(){
stop();
this.visible = false;
}
}
}//package
Section 25
//carr1 (carr1)
package {
import flash.display.*;
public dynamic class carr1 extends MovieClip {
public var car:MovieClip;
public function carr1(){
addFrameScript(149, frame150);
}
function frame150(){
stop();
this.visible = false;
}
}
}//package
Section 26
//carr2 (carr2)
package {
import flash.display.*;
public dynamic class carr2 extends MovieClip {
public var car:MovieClip;
public function carr2(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
this.visible = false;
}
}
}//package
Section 27
//KISS (KISS)
package {
import flash.media.*;
public dynamic class KISS extends Sound {
}
}//package
Section 28
//KissGame (KissGame)
package {
import flash.events.*;
import flash.display.*;
import GamesList.as3.*;
import view.*;
import flash.text.*;
public class KissGame extends MovieClip {
public var help:MovieClip;
public var loading:MovieClip;
public var bag:MovieClip;
public var bestScore:SimpleButton;
public var musicBn:MovieClip;
public var score:TextField;
public var moreGameBn:SimpleButton;
public var container:DisplayObjectContainer;
public var backBn:SimpleButton;
public var resource:MovieClip;
public var newGameBn:SimpleButton;
public var pauseBn:MovieClip;
public var webSiteBn:SimpleButton;
public var mycar:MovieClip;
public var replayBn:SimpleButton;
public var playAgainBn:SimpleButton;
public var textF:TextField;
public var webSite:SimpleButton;
public static var instance:KissGame;
public function KissGame(){
addFrameScript(0, frame1, 4, frame5, 7, frame8);
instance = this;
}
public function onEnter(_arg1:Event):void{
var _local2:int = int(((loaderInfo.bytesLoaded / loaderInfo.bytesTotal) * 100));
trace(_local2);
loading.loadMC.gotoAndStop(_local2);
if (_local2 == 100){
loading.play();
this.removeEventListener(Event.ENTER_FRAME, onEnter);
};
}
function frame1(){
stop();
this.addEventListener(Event.ENTER_FRAME, onEnter);
MochiBot.track(this, "4f637295");
GamesListAPIAS3.config("Crazy-Kiss-Racer", "2430asdlfk23asdf");
}
public function begin():void{
resource = this;
container = this.parent;
new BeginScene();
}
function frame8(){
GamesListAPIAS3.GenerateScoreID();
}
public function addScriptToNextframe(_arg1:Function):void{
var frameNum:int;
var onEnter:Function;
var fun = _arg1;
onEnter = function (_arg1:Event):void{
frameNum++;
if (frameNum == 2){
fun();
removeEventListener(Event.ENTER_FRAME, onEnter);
};
};
this.addEventListener(Event.ENTER_FRAME, onEnter);
frameNum = 0;
}
public function getClass(_arg1:String):Class{
return ((this.loaderInfo.applicationDomain.getDefinition(_arg1) as Class));
}
function frame5(){
begin();
}
public function getMovie(_arg1:String){
return (this.resource.getChildByName(_arg1));
}
}
}//package
Section 29
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 30
//SOFTKISS (SOFTKISS)
package {
import flash.media.*;
public dynamic class SOFTKISS extends Sound {
}
}//package
Section 31
//SOFTKISS2 (SOFTKISS2)
package {
import flash.media.*;
public dynamic class SOFTKISS2 extends Sound {
}
}//package
Section 32
//引擎声 (引擎声)
package {
import flash.media.*;
public dynamic class 引擎声 extends Sound {
}
}//package