Frame 1
_quality = "low";
Stage.align = "C";
Stage.scaleMode = "noScale";
System.security.allowDomain("www.kungfuhustle.com", "61.145.117.78", "61.145.117.79", "61.145.117.80");
System.security.loadPolicyFile("http://www.kungfuhustle.com/crossdomain.xml");
ASSetPropFlags(Array.prototype, null, 1);
Symbol 90 MovieClip [BackgroundGUI_mc] Frame 1
#initclip 85
Object.registerClass("BackgroundGUI_mc", com.KidFighting.BackgroundGUI);
#endinitclip
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 138 MovieClip [item_barrels] Frame 1
#initclip 74
Object.registerClass("item_barrels", com.KidFighting.items.ItemBarrels);
#endinitclip
stop();
Symbol 148 MovieClip [item_table] Frame 1
#initclip 75
Object.registerClass("item_table", com.KidFighting.items.ItemWoodentable);
#endinitclip
stop();
Symbol 154 MovieClip [item_bell] Frame 1
#initclip 76
Object.registerClass("item_bell", com.KidFighting.items.ItemIronbell);
#endinitclip
stop();
Symbol 161 MovieClip [item_casino] Frame 1
#initclip 77
Object.registerClass("item_casino", com.KidFighting.items.ItemCasino);
#endinitclip
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 532 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 721 MovieClip Frame 1
stop();
Symbol 816 MovieClip Frame 1
stop();
Symbol 919 MovieClip Frame 1
stop();
Symbol 920 MovieClip [characterManager_mc] Frame 1
#initclip 78
Object.registerClass("characterManager_mc", com.KidFighting.CharacterManager);
#endinitclip
Symbol 921 MovieClip [effect_mc] Frame 1
#initclip 79
Object.registerClass("effect_mc", com.KidFighting.EffectSys);
#endinitclip
Symbol 924 MovieClip Frame 1
stop();
Symbol 939 MovieClip Frame 1
stop();
Symbol 953 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 1
stop();
Symbol 977 MovieClip Frame 1
stop();
Symbol 1005 MovieClip Frame 62
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1032 MovieClip Frame 42
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1059 MovieClip Frame 42
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1120 MovieClip [roundGUI_mc] Frame 1
#initclip 80
Object.registerClass("roundGUI_mc", com.KidFighting.RoundGUI);
#endinitclip
stop();
Symbol 1128 MovieClip Frame 1
stop();
Symbol 1130 MovieClip Frame 1
stop();
Symbol 1132 MovieClip Frame 1
stop();
Symbol 1134 MovieClip Frame 1
stop();
Symbol 1139 MovieClip Frame 1
stop();
Symbol 1141 MovieClip Frame 1
stop();
Symbol 1143 MovieClip Frame 1
stop();
Symbol 1145 MovieClip Frame 1
stop();
Symbol 1169 MovieClip [StatusPanelGUI_mc] Frame 1
#initclip 81
Object.registerClass("StatusPanelGUI_mc", com.KidFighting.StatusPanelGUI);
#endinitclip
Symbol 1174 MovieClip Frame 1
stop();
Symbol 1176 MovieClip Frame 1
stop();
Symbol 1189 MovieClip Frame 1
stop();
Symbol 1194 MovieClip Frame 1
stop();
Symbol 1199 MovieClip Frame 1
stop();
Symbol 1204 MovieClip Frame 1
stop();
Symbol 1209 MovieClip Frame 1
stop();
Symbol 1214 MovieClip Frame 1
stop();
Symbol 1215 MovieClip Frame 21
stop();
Symbol 1216 MovieClip Frame 1
stop();
Symbol 1316 MovieClip Frame 1
stop();
Symbol 1317 MovieClip Frame 1
stop();
Symbol 1318 MovieClip Frame 1
stop();
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1331 MovieClip Frame 1
stop();
Symbol 1332 MovieClip [SelectCharacterGUI_mc] Frame 1
#initclip 82
Object.registerClass("SelectCharacterGUI_mc", com.KidFighting.SelectCharacterGUI);
#endinitclip
stop();
Symbol 1338 MovieClip Frame 8
if (com.KidFighting.GameOverGUI.isLoggedin) {
submit_mc._visible = true;
} else {
submit_mc._visible = false;
}
Symbol 1338 MovieClip Frame 25
submit_mc.onRelease = function () {
com.KidFighting.GameOverGUI.submitHighScore();
};
replay_mc.onRelease = function () {
com.KidFighting.GameOverGUI.replay();
};
stop();
Symbol 1348 MovieClip Frame 274
if (com.KidFighting.GameOverGUI.isLoggedin) {
submit_btn._visible = true;
} else {
submit_btn._visible = false;
}
Symbol 1348 MovieClip Frame 291
stop();
submit_btn.onRelease = function () {
com.KidFighting.GameOverGUI.submitHighScore();
};
replay_btn.onRelease = function () {
com.KidFighting.GameOverGUI.replay();
};
Symbol 1349 MovieClip [GameOverGUI_mc] Frame 1
#initclip 83
Object.registerClass("GameOverGUI_mc", com.KidFighting.GameOverGUI);
#endinitclip
Symbol 1353 MovieClip Frame 100
stop();
Symbol 1362 MovieClip [startGameGUI] Frame 1
#initclip 84
Object.registerClass("startGameGUI", com.KidFighting.StartGameGUI);
#endinitclip
stop();
Symbol 1364 MovieClip [__Packages.ds.controls.SoundPlayer] Frame 0
class ds.controls.SoundPlayer
{
function SoundPlayer () {
}
static function playSound(name_str, type) {
if (isMute) {
return(undefined);
}
if (typeof(holder[name_str]) != "movieclip") {
var _local2 = holder.createEmptyMovieClip(name_str, holder.getNextHighestDepth());
_local2._sound = new Sound(_local2);
_local2._sound.attachSound(name_str);
_local2._linkage = name_str;
if (type == "loop") {
_local2._type = "loop";
_local2._sound.onSoundComplete = function () {
this.start();
};
} else {
holder[name_str]._type = "effect";
}
}
if (holder[name_str]._type == "loop") {
holder[name_str]._sound.start(0, 999999);
} else {
holder[name_str]._sound.start();
}
}
static function stopSound(name_str) {
if (typeof(holder[name_str]) == "movieclip") {
holder[name_str]._sound.stop();
}
}
static function stopAll() {
for (var _local1 in holder) {
holder[_local1]._sound.stop();
}
}
static function playAll() {
if (isMute) {
return(undefined);
}
for (var _local1 in holder) {
holder[_local1]._sound.start();
}
}
static function mute() {
isMute = true;
stopAll();
}
static function unmute() {
isMute = false;
for (var _local1 in holder) {
if (holder[_local1]._type == "loop") {
holder[_local1]._sound.start();
}
}
}
static var holder = _root.createEmptyMovieClip("_soundholder", _root.getNextHighestDepth());
static var isMute = false;
}
Symbol 1365 MovieClip [__Packages.com.KidFighting.GameOverGUI] Frame 0
class com.KidFighting.GameOverGUI extends MovieClip
{
static var _sprite;
var _visible, gotoAndStop;
function GameOverGUI () {
super();
_sprite = this;
_visible = false;
gotoAndStop(1);
com.KidFighting.Leaderboard.addListener(com.KidFighting.GameOverGUI);
com.KidFighting.Leaderboard.loginCheck();
}
static function onGetLoginStatus(r) {
isLoggedin = r;
}
static function onResetGame() {
_sprite._visible = false;
}
static function onGameOver() {
_sprite.gotoAndStop(1);
_sprite.movie.gotoAndPlay(1);
show();
}
static function onClearStage() {
_sprite.gotoAndStop(2);
_sprite.movie.gotoAndPlay(1);
show();
}
static function submitHighScore() {
if (isLoggedin) {
com.KidFighting.Leaderboard.saveScore(com.KidFighting.FightTrigger.score);
hide();
com.KidFighting.StartGameGUI.show();
}
}
static function replay() {
hide();
com.KidFighting.StartGameGUI.show();
}
static function show() {
_sprite._visible = true;
}
static function hide() {
_sprite._visible = false;
}
static var isLoggedin = false;
}
Symbol 1366 MovieClip [__Packages.com.KidFighting.Leaderboard] Frame 0
class com.KidFighting.Leaderboard
{
static var send_lvars, receive_lvars, _response;
function Leaderboard () {
}
static function loginCheck() {
send_lvars = new LoadVars();
send_lvars.xmlInput = "<login-check-request />";
receive_lvars = new LoadVars();
receive_lvars.onLoad = function (success) {
if (success) {
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.parseXML(this.xmlOutput);
if ((_local2.firstChild.nodeName == "login-check-response") && (Number(_local2.firstChild.attributes.code) == 0)) {
com.KidFighting.Leaderboard.broadcastMessage("onGetLoginStatus", true);
} else {
com.KidFighting.Leaderboard.broadcastMessage("onGetLoginStatus", false);
}
} else {
com.KidFighting.Leaderboard.broadcastMessage("onGetLoginStatus", false);
}
};
send_lvars.sendAndLoad((DATA_FEED_URL + "?rand=") + random(9999), receive_lvars, "POST");
}
static function saveScore(score) {
if (score == 0) {
handleResult(-1);
return(undefined);
}
send_lvars = new LoadVars();
send_lvars.xmlInput = ((("<save-score-request gameId=\"" + String(GAME_ID)) + "\" score=\"") + String(score)) + "\" />";
receive_lvars = new LoadVars();
receive_lvars.onLoad = function (success) {
if (success) {
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.parseXML(this.xmlOutput);
com.KidFighting.Leaderboard.handleResult(Number(_local2.firstChild.attributes.code));
com.KidFighting.Leaderboard.notify();
} else {
com.KidFighting.Leaderboard.handleResult(-1);
}
};
send_lvars.sendAndLoad((DATA_FEED_URL + "?rand=") + random(9999), receive_lvars, "POST");
}
static function handleResult(code, data) {
_response(code, data);
}
static function notify() {
var _local1 = new LocalConnection();
_local1.send("leaderboard", "onLeaderboardUpdate");
}
static function get onResponse() {
return(_response);
}
static function set onResponse(response_func) {
_response = response_func;
//return(onResponse);
}
static function staticIint() {
AsBroadcaster.initialize(com.KidFighting.Leaderboard);
return(true);
}
static var DATA_FEED_URL = "../../../calls/dataFeed.php";
static var GAME_ID = 2;
static var initialized = staticIint();
}
Symbol 1367 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent == undefined) {
_local1[eventObj.type](eventObj);
} else {
_local1.handleEvent(eventObj);
}
} else if (_local1[eventObj.type] != undefined) {
_local1[eventObj.type](eventObj);
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
}
Symbol 1368 MovieClip [__Packages.ds.controls.Timer] Frame 0
class ds.controls.Timer
{
var func, interval;
function Timer (f, i) {
if (f) {
func = f;
}
if (i) {
interval = i;
}
m_timerId = -1;
}
function start(_func, _interval) {
if (m_timerId != -1) {
stop();
}
if (_func && (func != _func)) {
func = _func;
}
if (_interval && (interval != _interval)) {
interval = _interval;
}
m_timerId = setInterval(func, interval);
}
function stop() {
clearInterval(m_timerId);
m_timerId = -1;
}
var m_timerId = -1;
}
Symbol 1369 MovieClip [__Packages.com.KidFighting.FightTrigger] Frame 0
class com.KidFighting.FightTrigger
{
static var removeEventListener, addEventListener, dispatchEvent, p1WinTimes, p2WinTimes;
function FightTrigger () {
}
static function get idPlayer1() {
return(player1.uniqueId);
}
static function get idPlayer2() {
return(player2.uniqueId);
}
static function joinP1(chSet) {
if (player1 != null) {
removeEventListener("onResumeGame", player1);
removeEventListener("onPauseGame", player1);
player1.removeEventListener("onFightActivated", com.KidFighting.FightTrigger);
player1.destroy();
player1 = undefined;
}
player1 = new chSet.cls();
player1.ani = chSet.ani;
player1.controller = null;
com.KidFighting.Input.owner = player1;
addEventListener("onResumeGame", player1);
addEventListener("onPauseGame", player1);
player1.addEventListener("onFightActivated", com.KidFighting.FightTrigger);
score = 0;
}
static function joinP2(chSet) {
if (player2 != null) {
removeEventListener("onPauseGame", player2.controller);
removeEventListener("onResumeGame", player2.controller);
removeEventListener("onFightStart", player2.controller);
removeEventListener("onFightEnd", player2.controller);
player2.controller.removeEventListener("updateInput", com.KidFighting.FightTrigger);
delete player2.controller;
removeEventListener("onResumeGame", player2);
removeEventListener("onPauseGame", player2);
player2.removeEventListener("onFightActivated", com.KidFighting.FightTrigger);
player2.destroy();
player2 = null;
}
player2 = new chSet.cls();
player2.ani = chSet.ani;
var _local1 = new com.KidFighting.AiController();
_local1.level = 10;
player2.controller = _local1;
_local1.owner = player2;
_local1.addEventListener("updateInput", com.KidFighting.FightTrigger);
addEventListener("onResumeGame", player2);
addEventListener("onPauseGame", player2);
addEventListener("onPauseGame", player2.controller);
addEventListener("onResumeGame", player2.controller);
addEventListener("onFightStart", player2.controller);
addEventListener("onFightEnd", player2.controller);
player2.addEventListener("onFightActivated", com.KidFighting.FightTrigger);
}
static function onFightActivated(evtObj) {
if ((player1.status == "win") || (player2.status == "win")) {
return(undefined);
}
var _local3 = evtObj.activer;
var _local1 = _local3.opponent;
if (evtObj.getHurt) {
if ((_local1.status != "hurt") && (_local1.status != "thrown")) {
var _local4 = ((evtObj.hurtValue == undefined) ? (_local3.strength) : (evtObj.hurtValue));
if ((_local1.crtHP - _local4) > 0) {
_local1.crtHP = _local1.crtHP - _local4;
} else {
_local1.crtHP = 0;
}
if (!evtObj.isNoAnimation) {
if (_local3.status == "down") {
updateInput({activer:_local1, motion:"hurtDown", hurtEff:evtObj.hitEff});
} else {
updateInput({activer:_local1, motion:"hurtUp", hurtEff:evtObj.hitEff});
}
} else if (evtObj.hurtFunc) {
_local1[evtObj.hurtFunc]();
}
if (_local3 == player1) {
score = score + ((_local4 * 15) + 40);
}
dispatchEvent({type:"updateLife", p1Life:player1.HP, p2Life:player2.HP, score:score});
checkWinLose();
}
} else if (_local1.status == "down") {
updateInput({activer:_local1, motion:"blockDown"});
} else {
updateInput({activer:_local1, motion:"blockUp"});
}
dispatchEvent(evtObj);
}
static function updateInput(evtObj) {
evtObj.activer.doMotion(evtObj);
}
static function onFightStart(evtObj) {
updateInput({activer:player1, motion:"normal"});
updateInput({activer:player2, motion:"normal"});
dispatchEvent({type:"onFightStart"});
}
static function onRoundInit(evtObj) {
player1.setup("left");
player2.setup("right");
player1.opponent = player2;
player2.opponent = player1;
if (_root.sideUpdater_mc == undefined) {
_root.createEmptyMovieClip("sideUpdater_mc", _root.getNextHighestDepth());
var o = com.KidFighting.FightTrigger;
_root.sideUpdater_mc.onEnterFrame = function () {
if (o.player1.ani._x > o.player2.ani._x) {
o.player1.side = -1;
o.player2.side = 1;
} else {
o.player1.side = 1;
o.player2.side = -1;
}
if (o.player1.status == "normal") {
o.player1.updateSide();
}
if (o.player2.status == "normal") {
o.player2.updateSide();
}
};
}
if (evtObj.round == 1) {
p1WinTimes = 0;
p2WinTimes = 0;
updateInput({activer:player1, motion:"intro"});
updateInput({activer:player2, motion:"intro"});
} else {
updateInput({activer:player1, motion:"normal"});
updateInput({activer:player2, motion:"normal"});
}
}
static function onTimeOut(evtObj) {
checkWinLose(true);
}
static function checkWinLose(isTimeOut) {
if (((((!isTimeOut) && (player1.HP > 0)) && (player2.HP > 0)) || (player1.status == "win")) || (player2.status == "win")) {
return(undefined);
}
delay_timer.interval = 2000;
if (player1.HP > player2.HP) {
delay_timer.func = function () {
com.KidFighting.FightTrigger.delay_timer.stop();
com.KidFighting.FightTrigger.updateInput({activer:com.KidFighting.FightTrigger.player1, motion:"win"});
};
p1WinTimes++;
player1.freeze();
if (player2.HP == 0) {
ds.controls.SoundPlayer.playSound("KO_" + player2.sex);
}
} else {
delay_timer.func = function () {
com.KidFighting.FightTrigger.delay_timer.stop();
com.KidFighting.FightTrigger.updateInput({activer:com.KidFighting.FightTrigger.player2, motion:"win"});
};
p2WinTimes++;
player2.freeze();
if (player1.HP == 0) {
ds.controls.SoundPlayer.playSound("KO_" + player1.sex);
}
}
delay_timer.start();
if ((p1WinTimes > 1) || (p2WinTimes > 1)) {
if (p1WinTimes > p2WinTimes) {
dispatchEvent({type:"endRound", roundClear:true, win:0, winnerLable:player1.winLable, p1WinTimes:p1WinTimes, p2WinTimes:p2WinTimes, timeout:isTimeOut});
} else {
dispatchEvent({type:"endRound", roundClear:true, win:1, winnerLable:player2.winLable, p1WinTimes:p1WinTimes, p2WinTimes:p2WinTimes, timeout:isTimeOut});
}
} else {
dispatchEvent({type:"endRound", roundClear:false, p1WinTimes:p1WinTimes, p2WinTimes:p2WinTimes, timeout:isTimeOut});
}
dispatchEvent({type:"onFightEnd"});
dispatchEvent({type:"updateLife", p1Life:player1.HP, p2Life:player2.HP, score:score});
}
static function pauseGame(evtObj) {
if (evtObj.value) {
dispatchEvent({type:"onPauseGame"});
} else {
dispatchEvent({type:"onResumeGame"});
}
}
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.FightTrigger);
static var score = 0;
static var player1 = null;
static var player2 = null;
static var delay_timer = new ds.controls.Timer();
}
Symbol 1370 MovieClip [__Packages.com.KidFighting.Input] Frame 0
class com.KidFighting.Input
{
static var dispatchEvent, keyTimerLast;
function Input () {
}
static function initialize() {
Key.addListener(com.KidFighting.Input);
keyPressedGroup = [];
enabled = true;
updateTimer.func = function () {
com.KidFighting.Input.updateDirection();
};
updateTimer.interval = 33;
reset();
return(true);
}
static function reset() {
keyBuffer = [];
keyTimer.stop();
keyPressedGroup[A] = (keyPressedGroup[S] = (keyPressedGroup[P] = (keyPressedGroup[UP] = (keyPressedGroup[DOWN] = (keyPressedGroup[RIGHT] = (keyPressedGroup[LEFT] = 0))))));
}
static function enable() {
enabled = true;
paused = false;
updateTimer.start();
}
static function disable() {
enabled = false;
paused = true;
updateTimer.stop();
}
static function updateDirection() {
if (keyPressedGroup[UP]) {
if (keyPressedGroup[RIGHT]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"jump", direction:"right"});
} else if (keyPressedGroup[LEFT]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"jump", direction:"left"});
} else {
dispatchEvent({activer:owner, type:"updateInput", motion:"jump", direction:""});
}
} else if (keyPressedGroup[RIGHT]) {
if (keyPressedGroup[UP]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"jump", direction:"right"});
} else if (keyPressedGroup[DOWN]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"down", direction:"right"});
} else {
dispatchEvent({activer:owner, type:"updateInput", motion:"move", direction:"right"});
}
} else if (keyPressedGroup[LEFT]) {
if (keyPressedGroup[UP]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"jump", direction:"left"});
} else if (keyPressedGroup[DOWN]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"down", direction:"left"});
} else {
dispatchEvent({activer:owner, type:"updateInput", motion:"move", direction:"left"});
}
} else if (keyPressedGroup[DOWN]) {
dispatchEvent({activer:owner, type:"updateInput", motion:"down", direction:""});
}
}
static function onKeyUp() {
var _local1 = Key.getCode();
keyPressedGroup[_local1] = 0;
if (!enabled) {
return(undefined);
}
if (_local1 == M) {
muted = !muted;
dispatchEvent({activer:owner, type:"switchMute", value:muted});
}
if (_local1 == P) {
paused = !paused;
dispatchEvent({activer:owner, type:"pauseGame", value:paused});
}
updateAfterEvent();
if (paused) {
return(undefined);
}
var _local2 = (((_local1 == UP) || (_local1 == DOWN)) || (_local1 == LEFT)) || (_local1 == RIGHT);
dispatchEvent({activer:owner, type:"updateInput", motion:"nothing", isDirection:_local2});
}
static function onKeyDown() {
var _local1 = Key.getCode();
if (!keyPressedGroup[_local1]) {
keyPressedGroup[_local1] = 1;
if ((!enabled) || (paused)) {
return(undefined);
}
if ((_local1 == A) || (_local1 == S)) {
var _local2 = "";
if ((getTimer() - keyTimerLast) < INPUT_DELAY) {
_local2 = (keyBuffer.join() + ",") + _local1;
}
keyTimer.stop();
var sklObj = {activer:owner, type:"updateInput", motion:"skill", skillKeys:_local2, isPunch:Key.isDown(A), isKick:Key.isDown(S)};
keyTimer.start(function () {
com.KidFighting.Input.keyTimer.stop();
com.KidFighting.Input.dispatchEvent(sklObj);
}, 33);
keyBuffer.length = 0;
} else {
if (owner.side == -1) {
if (_local1 == LEFT) {
_local1 = RIGHT;
} else if (_local1 == RIGHT) {
_local1 = LEFT;
}
}
if (keyBuffer.length == 0) {
keyTimerLast = getTimer();
}
keyBuffer.push(_local1);
}
updateAfterEvent();
}
}
static function assignKeySet(keySet) {
UP = keySet.UP;
DOWN = keySet.DOWN;
LEFT = keySet.LEFT;
RIGHT = keySet.RIGHT;
A = keySet.PUNCH;
S = keySet.KICK;
P = keySet.PAUSE;
M = keySet.MUTE;
}
static function onRoundInit(evtObj) {
reset();
disable();
}
static function onFightStart(evtObj) {
enable();
}
static function onRoundEnd(evtObj) {
disable();
}
static var UP = 38;
static var DOWN = 40;
static var LEFT = 37;
static var RIGHT = 39;
static var INPUT_DELAY = 450;
static var A = "65";
static var S = "83";
static var P = "80";
static var M = "77";
static var keyTimer = new ds.controls.Timer();
static var keyPressedGroup = [];
static var keyBuffer = [];
static var enabled = true;
static var paused = false;
static var muted = false;
static var updateTimer = new ds.controls.Timer();
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.Input);
static var _inited = initialize();
static var owner = null;
}
Symbol 1371 MovieClip [__Packages.com.KidFighting.AiController] Frame 0
class com.KidFighting.AiController
{
var _ai_level, _timer, _owner, skillKeyList, dispatchEvent;
function AiController () {
_ai_level = 1;
_timer = new ds.controls.Timer();
_timer.interval = level * 100;
var o = this;
_timer.func = function () {
o.update();
};
}
function get level() {
return(_ai_level);
}
function set level(lv) {
if ((lv < 21) && (lv > 0)) {
_ai_level = lv;
}
//return(level);
}
function get owner() {
return(_owner);
}
function set owner(ow) {
_owner = ow;
skillKeyList = [];
for (var _local2 in _owner.m_skillList) {
if (_owner.m_skillList[_local2].name != "Throw") {
skillKeyList.push(_local2);
}
}
skillKeyList.push("");
skillKeyList.push("");
skillKeyList.push("");
//return(owner);
}
function getDistance() {
return(Math.abs(owner.ani._x - owner.opponent.ani._x));
}
function update() {
var _local4 = com.KidFighting.AiController;
var _local6 = "nothing";
var _local9;
var _local2 = false;
if (!_local2) {
if (getDistance() > 70) {
_local6 = "move";
if (random(level * 2) < 8) {
_local9 = ((owner.side == 1) ? "right" : "left");
} else if (random(level * 2) == 1) {
_local6 = "jump";
_local9 = directionList[random(directionList.length)];
} else if (random(3) == 1) {
_local6 = "skill";
} else {
_local9 = directionList[random(directionList.length)];
}
} else if (random(2) == 1) {
_local6 = "skill";
} else if (random(10) == 1) {
_local6 = "down";
} else if (random(5) == 1) {
_local6 = "jump";
_local9 = directionList[random(directionList.length)];
} else {
_local6 = "move";
_local9 = directionList[random(directionList.length)];
}
}
if (owner.isInvincible && (owner.direction == "up")) {
return(undefined);
}
if (_local6 == "skill") {
var _local3 = skillKeyList[random(skillKeyList.length)];
dispatchEvent({activer:owner, type:"updateInput", motion:"skill", skillKeys:_local3, isPunch:Boolean(random(2)), isKick:Boolean(random(2))});
} else {
dispatchEvent({activer:owner, type:"updateInput", motion:_local6, direction:_local9});
}
}
function start() {
_timer.start();
}
function stop() {
_timer.stop();
}
function onPauseGame() {
stop();
}
function onResumeGame() {
start();
}
function onFightStart() {
start();
}
function onFightEnd() {
stop();
}
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.AiController.prototype);
static var motionList = ["jump", "down", "move", "nothing"];
static var directionList = ["right", "left", "move"];
}
Symbol 1372 MovieClip [__Packages.com.KidFighting.StartGameGUI] Frame 0
class com.KidFighting.StartGameGUI extends MovieClip
{
static var _sprite;
var loadingbar, loading_txt;
function StartGameGUI () {
super();
_sprite = this;
loadingbar.gotoAndStop(1);
loading_txt.text = "LOADING... ...";
loadingbar.onEnterFrame = function () {
var _local3 = Math.round((100 * _root.getBytesLoaded()) / _root.getBytesTotal());
this.gotoAndStop(_local3);
if ((_local3 == 100) && (_root.getBytesLoaded() > 300)) {
com.KidFighting.StartGameGUI._sprite.gotoAndStop(2);
com.KidFighting.StartGameGUI._sprite.startgame_btn.onRelease = function () {
com.KidFighting.StartGameGUI.onReleaseFunc();
};
delete this.onEnterFrame;
}
};
}
static function onReleaseFunc() {
hide();
com.KidFighting.Game.main();
}
static function show() {
_sprite._visible = true;
}
static function hide() {
_sprite._visible = false;
}
}
Symbol 1373 MovieClip [__Packages.com.KidFighting.Game] Frame 0
class com.KidFighting.Game
{
function Game () {
}
static function main() {
fscommand ("trapallkeys", true);
fscommand ("showmenu", false);
_root._quality = "low";
Array.prototype.remove = function (x) {
var _local3 = this;
var _local2 = 0;
if (_local3[_local3.length - 1] == x) {
_local3.pop();
return(true);
}
while (_local2 < _local3.length) {
if (_local3[_local2] == x) {
_local3.splice(_local2, 1);
return(true);
}
_local2++;
}
return(false);
};
String.prototype.replace = function (str, rep) {
return(this.split(str).join(rep));
};
com.KidFighting.Input.disable();
com.KidFighting.Story.initialize();
com.KidFighting.Input.addEventListener("updateInput", com.KidFighting.FightTrigger);
com.KidFighting.Input.addEventListener("pauseGame", com.KidFighting.FightTrigger);
com.KidFighting.Input.addEventListener("pauseGame", com.KidFighting.StageTimer);
com.KidFighting.Input.addEventListener("pauseGame", com.KidFighting.Story);
com.KidFighting.Input.addEventListener("pauseGame", com.KidFighting.EffectSys);
com.KidFighting.Input.addEventListener("switchMute", com.KidFighting.Story);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.FightTrigger);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.RoundGUI);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.StageStatus);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.StageTimer);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.Input);
com.KidFighting.Story.addEventListener("onRoundInit", com.KidFighting.BackgroundGUI);
com.KidFighting.Story.addEventListener("onRoundEnd", com.KidFighting.RoundGUI);
com.KidFighting.Story.addEventListener("onRoundEnd", com.KidFighting.StageStatus);
com.KidFighting.Story.addEventListener("onRoundEnd", com.KidFighting.StageTimer);
com.KidFighting.Story.addEventListener("onRoundEnd", com.KidFighting.Input);
com.KidFighting.Story.addEventListener("onRoundEnd", com.KidFighting.BackgroundGUI);
com.KidFighting.Story.addEventListener("onTimeOut", com.KidFighting.FightTrigger);
com.KidFighting.Story.addEventListener("onFightStart", com.KidFighting.FightTrigger);
com.KidFighting.Story.addEventListener("onFightStart", com.KidFighting.StageTimer);
com.KidFighting.Story.addEventListener("onFightStart", com.KidFighting.Input);
com.KidFighting.Story.addEventListener("onPauseGame", com.KidFighting.StageStatus);
com.KidFighting.Story.addEventListener("onUpdateLife", com.KidFighting.StageStatus);
com.KidFighting.Story.addEventListener("onRoundCleared", com.KidFighting.SelectCharacterGUI);
com.KidFighting.Story.addEventListener("onGameOver", com.KidFighting.GameOverGUI);
com.KidFighting.Story.addEventListener("onClearStage", com.KidFighting.GameOverGUI);
com.KidFighting.Story.addEventListener("onUpdateSkill", com.KidFighting.StatusPanelGUI);
com.KidFighting.RoundGUI.addEventListener("fightStart", com.KidFighting.Story);
com.KidFighting.RoundGUI.addEventListener("nextRound", com.KidFighting.Story);
com.KidFighting.RoundGUI.addEventListener("gameOver", com.KidFighting.Story);
com.KidFighting.StageTimer.addEventListener("timeOut", com.KidFighting.Story);
com.KidFighting.FightTrigger.addEventListener("endRound", com.KidFighting.Story);
com.KidFighting.FightTrigger.addEventListener("updateLife", com.KidFighting.Story);
com.KidFighting.FightTrigger.addEventListener("onFightActivated", com.KidFighting.BackgroundGUI);
com.KidFighting.SelectCharacterGUI.addEventListener("selectPlayer", com.KidFighting.Story);
com.KidFighting.SelectCharacterGUI.addEventListener("selectEnemy", com.KidFighting.Story);
}
}
Symbol 1374 MovieClip [__Packages.com.KidFighting.Story] Frame 0
class com.KidFighting.Story
{
static var dispatchEvent;
function Story () {
}
static function initialize() {
history.length = 0;
mRnd = 1;
reset();
return(true);
}
static function selectPlayer(evtObj) {
var _local1 = com.KidFighting.CharacterManager.select(evtObj.id);
if (_local1 != null) {
com.KidFighting.FightTrigger.joinP1(_local1);
}
}
static function selectEnemy(evtObj) {
nextEnemy();
}
static function updateSkill() {
dispatchEvent({type:"onUpdateSkill", skillList:com.KidFighting.FightTrigger.player1.skillList});
}
static function nextEnemy() {
var _local1 = com.KidFighting.CharacterManager.selectNextEnemy();
if (_local1 != null) {
com.KidFighting.FightTrigger.joinP2(_local1);
mRnd = 1;
history.push({win:false, round:mRnd});
com.KidFighting.FightTrigger.player1.autoAddSkill();
updateSkill();
dispatchEvent({type:"onRoundInit", round:mRnd, idPlayer1:com.KidFighting.FightTrigger.__get__idPlayer1(), idPlayer2:com.KidFighting.FightTrigger.__get__idPlayer2(), enemyId:history.length});
}
}
static function nextRound() {
var _local1 = history[history.length - 1];
if (_local1.win) {
if (history.length < 6) {
dispatchEvent({type:"onRoundCleared"});
} else {
dispatchEvent({type:"onClearStage"});
}
} else {
mRnd++;
_local1.round = mRnd;
dispatchEvent({type:"onRoundInit", round:mRnd, idPlayer1:com.KidFighting.FightTrigger.__get__idPlayer1(), idPlayer2:com.KidFighting.FightTrigger.__get__idPlayer2()});
}
}
static function reset() {
com.KidFighting.CharacterManager.reset();
com.KidFighting.SelectCharacterGUI.reset();
com.KidFighting.StageStatus.reset();
}
static function pauseGame(evtObj) {
dispatchEvent({type:"onPauseGame", value:evtObj.value});
}
static function endRound(evtObj) {
if (evtObj.roundClear) {
if (evtObj.win == 0) {
history[history.length - 1].win = true;
}
}
evtObj.type = "onRoundEnd";
dispatchEvent(evtObj);
}
static function fightStart(evtObj) {
dispatchEvent({type:"onFightStart"});
}
static function timeOut() {
dispatchEvent({type:"onTimeOut"});
}
static function gameOver() {
dispatchEvent({type:"onGameOver"});
}
static function updateLife(evtObj) {
evtObj.type = "onUpdateLife";
dispatchEvent(evtObj);
}
static function switchMute(evtObj) {
if (evtObj.value) {
ds.controls.SoundPlayer.mute();
} else {
ds.controls.SoundPlayer.unmute();
}
}
static function debug(evtObj) {
if (evtObj.command == "prevPlayer") {
if (history.length > 0) {
com.KidFighting.CharacterManager.selectedList.pop();
com.KidFighting.CharacterManager.selectedList.pop();
}
history.pop();
history.pop();
nextEnemy();
} else if (evtObj.command == "nextPlayer") {
nextEnemy();
}
}
static var history = [];
static var mRnd = 1;
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.Story);
static var _inited = initialize();
}
Symbol 1375 MovieClip [__Packages.com.KidFighting.objects.CObject] Frame 0
class com.KidFighting.objects.CObject
{
var ani;
function CObject () {
}
function destroy() {
ani.removeMovieClip();
}
}
Symbol 1376 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
}
Symbol 1377 MovieClip [__Packages.com.KidFighting.objects.CCharacter] Frame 0
class com.KidFighting.objects.CCharacter extends com.KidFighting.objects.CObject
{
var m_skillList, orgY, orgScale, updaterObj, _twnF, _twnX, _twnY, crtHP, orgX, side, ani, isInvincible, _performedSkill, maxHP, opponent, jump, speed, invTimer, dispatchEvent;
function CCharacter () {
super();
mx.events.EventDispatcher.initialize(this);
m_skillList = {};
orgY = 325;
orgScale = 100;
updaterObj = {};
_twnF = new ds.transitions.Tween(null, "_currentframe", null, 1, 1, 1);
_twnX = new ds.transitions.Tween(null, "_x", null, 1, 1, 1);
_twnY = new ds.transitions.Tween(null, "_y", null, 1, 1, 1);
updaterObj.updater = this;
_global.MovieClip.addListener(updaterObj);
}
function get HP() {
return(crtHP);
}
function get skillList() {
return(m_skillList);
}
function setup(strSide) {
if ((strSide == "left") || (strSide == "right")) {
if (strSide == "left") {
orgX = 160;
side = 1;
} else {
orgX = 470;
side = -1;
}
if (shadow == undefined) {
shadow = new com.KidFighting.objects.CShadow();
shadow.follow(ani);
}
_twnX.obj = ani;
_twnY.obj = ani;
status = "normal";
direction = "";
isInvincible = false;
for (var _local2 in m_skillList) {
m_skillList[_local2].performing = false;
}
_performedSkill = null;
crtHP = maxHP;
ani._x = orgX;
ani._y = orgY;
orgScale = 100;
ani._xscale = orgScale;
updateSide();
return(true);
}
return(false);
}
function freeze() {
updaterObj.onEnterFrame = undefined;
status = "normal";
}
function onceAni(lb, cb) {
_twnF.stop();
delete _twnF.onMotionFinished;
ani.gotoAndStop(lb);
var _local2 = getInstance();
_twnF.obj = _local2;
_twnF.__set__finish(_twnF.__set__duration(_local2._totalframes));
if (cb != undefined) {
_twnF.onMotionFinished = cb;
}
_twnF.start();
}
function loopAni(lb) {
delete _twnF.onMotionFinished;
_twnF.stop();
ani.gotoAndStop(lb);
getInstance().play();
}
function correctPosition() {
if (Math.abs(ani._x - opponent.ani._x) < 30) {
ani._x = ani._x - (30 * side);
}
}
function correctOffside() {
if (ani._x > (Stage.width - 50)) {
ani._x = Stage.width - 50;
} else if (ani._x < 50) {
ani._x = 50;
}
}
function updateSide(sd) {
if (sd != undefined) {
side = sd;
}
if ((orgScale * side) != ani._xscale) {
ani._xscale = orgScale * side;
}
}
function startXTween(func, mov, step, cb) {
_twnX.stop();
if ((ani._x + mov) > (Stage.width - 50)) {
mov = (Stage.width - 50) - ani._x;
} else if ((ani._x + mov) < 50) {
mov = -(ani._x - 50);
}
var _local3 = this;
var callback = cb;
_twnX.__set__func(func);
_twnX.begin = ani._x;
_twnX.__set__finish(ani._x + mov);
_twnX.__set__duration(step);
_twnX.onMotionFinished = function () {
callback();
};
_twnX.start(true);
}
function startYTween(func, aim, step, cb) {
_twnY.stop();
_twnY.__set__func(func);
_twnY.begin = ani._y;
_twnY.__set__finish(aim);
_twnY.__set__duration(step);
var _local2 = this;
_twnY.callback = cb;
_twnY.onMotionFinished = function (twn) {
twn.callback();
};
_twnY.start(true);
}
function addSkill(skl) {
skl.owner = this;
m_skillList[skl.keys] = skl;
}
function getSkill(keyBuffer) {
return(m_skillList[keyBuffer]);
}
function getSkillByName(name) {
for (var _local3 in m_skillList) {
if (m_skillList[_local3].name == name) {
return(m_skillList[_local3]);
}
}
return(null);
}
function randomGetSkill() {
for (var _local2 in m_skillList) {
if ((random(5) == 2) && (m_skillList[_local2].name != "Throw")) {
return(m_skillList[_local2]);
}
}
return(m_skillList[0]);
}
function movNormal() {
if (crtHP > 0) {
status = "normal";
direction = "";
updaterObj.onEnterFrame = undefined;
loopAni(lbNormal);
updateSide();
}
}
function movRight() {
direction = (status = "right");
if (side == 1) {
loopAni(lbR);
} else {
loopAni(lbL);
}
updaterObj.onEnterFrame = function () {
var _local2 = this.updater;
if (((_local2.side == -1) || ((_local2.status == "right") && ((_local2.ani._x + _local2.speed) < (_local2.opponent.ani._x - 30)))) || (_local2.opponent.status == "jump")) {
if ((_local2.ani._x + _local2.speed) < (Stage.width - 50)) {
_local2.ani._x = _local2.ani._x + _local2.speed;
} else {
_local2.ani._x = Stage.width - 50;
}
}
_local2.updateSide();
};
}
function movLeft() {
direction = (status = "left");
if (side == 1) {
loopAni(lbL);
} else {
loopAni(lbR);
}
updaterObj.onEnterFrame = function () {
var _local2 = this.updater;
if (((_local2.side == 1) || ((_local2.ani._x - _local2.speed) > (_local2.opponent.ani._x + 30))) || (_local2.opponent.status == "jump")) {
if (_local2.ani._x > (50 + _local2.speed)) {
_local2.ani._x = _local2.ani._x - _local2.speed;
} else {
_local2.ani._x = 50;
}
}
_local2.updateSide();
};
}
function movDown() {
status = "down";
direction = "down";
onceAni(lbDn);
}
function movStandUp() {
status = "standup";
direction = "";
var o = this;
onceAni(lbDnGetup, function () {
o.movNormal();
});
updateSide();
}
function movJump() {
status = "jump";
direction = "up";
updateSide();
onceAni(lbJp);
var o = this;
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, 4, function () {
o.startYTween(mx.transitions.easing.Bounce.easeIn, o.orgY, 4, function () {
o.correctPosition();
o.correctOffside();
o.movNormal();
});
});
}
function movJumpRight() {
status = "jump";
direction = "up";
if (side == 1) {
onceAni(lbJpR);
} else {
onceAni(lbJpL);
}
updateSide();
var _local2 = 80 + (speed * 3);
if ((ani._x + _local2) > (Stage.width - 51)) {
_local2 = (Stage.width - 51) - ani._x;
}
var o = this;
startXTween(null, _local2, 8);
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, 4, function () {
o.startYTween(mx.transitions.easing.Bounce.easeIn, o.orgY, 4, function () {
o.correctPosition();
o.correctOffside();
o.movNormal();
});
});
}
function movJumpLeft() {
status = "jump";
direction = "up";
if (side == 1) {
onceAni(lbJpL);
} else {
onceAni(lbJpR);
}
updateSide();
var _local2 = 80 + (speed * 3);
if ((ani._x - _local2) < 50) {
_local2 = ani._x - 50;
}
var o = this;
startXTween(null, -_local2, 8);
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, 4, function () {
o.startYTween(mx.transitions.easing.Bounce.easeIn, o.orgY, 4, function () {
o.correctPosition();
o.correctOffside();
o.movNormal();
});
});
}
function mtPower() {
status = "punch";
direction = "";
updaterObj.onEnterFrame = function () {
this.updater.hitTest();
};
updateSide();
var o = this;
onceAni(lbP2, function () {
o.movNormal();
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtKick() {
status = "kick";
direction = "";
updaterObj.onEnterFrame = function () {
this.updater.hitTest();
};
updateSide();
var o = this;
onceAni(lbK2, function () {
o.movNormal();
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtDownPower() {
status = "punch";
direction = "down";
updaterObj.onEnterFrame = function () {
this.updater.hitTest();
};
updateSide();
var o = this;
onceAni(lbDnP2, function () {
o.updaterObj.onEnterFrame = undefined;
if (o.direction == "down") {
o.status = "down";
o.ani.gotoAndStop(o.lbDn);
o.getInstance().gotoAndStop(o.getInstance()._totalframes);
} else {
o.movStandUp();
}
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtDownKick() {
status = "kick";
direction = "down";
updaterObj.onEnterFrame = function () {
this.updater.hitTest();
};
updateSide();
var o = this;
onceAni(lbDnK2, function () {
o.updaterObj.onEnterFrame = undefined;
if (o.direction == "down") {
o.status = "down";
o.ani.gotoAndStop(o.lbDn);
o.getInstance().gotoAndStop(o.getInstance()._totalframes);
} else {
o.movStandUp();
}
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtBlockUp() {
startInvincible(0.4);
status = "block";
var oldDirection = direction;
updateSide();
var o = this;
onceAni(lbUpB, function () {
o.movNormal();
o.direction = oldDirection;
});
startXTween(null, (-side) * 30, 7);
ds.controls.SoundPlayer.playSound("Block");
}
function mtBlockDown() {
startInvincible(0.4);
status = "block";
var oldDirection = direction;
updateSide();
var o = this;
onceAni(lbDnB, function () {
if (o.direction == "down") {
o.status = "down";
o.ani.gotoAndStop(o.lbDn);
o.getInstance().gotoAndStop(o.getInstance()._totalframes);
} else {
o.movStandUp();
}
o.direction = oldDirection;
});
startXTween(null, (-side) * 30, 7);
ds.controls.SoundPlayer.playSound("Block");
}
function mtBlastHurt(hurtEff) {
updaterObj.onEnterFrame = undefined;
isInvincible = true;
status = "thrown";
updateSide();
var o = this;
onceAni(lbThrown, function () {
o.movNormal();
o.startInvincible(0.2);
});
startXTween(null, (-side) * (70 + (speed * 2)), 10);
if (direction == "up") {
_twnY.stop();
startYTween(null, ani._y - 10, 6, function () {
o.startYTween(null, o.orgY, 8, function () {
o.correctPosition();
o.correctOffside();
});
});
}
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 35);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
}
function startInvincible(time) {
if (invTimer == undefined) {
invTimer = new ds.controls.Timer();
}
isInvincible = true;
invTimer.stop();
invTimer.interval = time * 1000;
var o = this;
invTimer.func = function () {
o.invTimer.stop();
o.isInvincible = false;
};
invTimer.start();
}
function mtHurtUp(hurtEff) {
if (HP > 0) {
var o = this;
isInvincible = true;
status = "hurt";
onceAni(lbH1, function () {
o.movNormal();
o.startInvincible(0.1);
});
startXTween(null, (-side) * (speed * 3), 7, null);
updaterObj.onEnterFrame = function () {
var _local2 = this.updater;
if ((_local2.getInstance()._currentframe >= 5) && (_local2.ani._y == _local2.orgY)) {
delete this.onEnterFrame;
}
};
updateSide();
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 45);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
} else {
movLose();
updateSide();
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 45);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
}
}
function mtHurtDown(hurtEff) {
isInvincible = true;
status = "hurt";
updaterObj.onEnterFrame = function () {
var _local2 = this.updater;
if (_local2.getInstance()._currentframe >= 5) {
delete this.onEnterFrame;
}
};
var o = this;
updateSide();
onceAni(lbH1, function () {
o.movNormal();
o.startInvincible(0.1);
});
startXTween(null, (-side) * (speed * 3), 4);
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 15);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
}
function mtCought() {
updaterObj.onEnterFrame = undefined;
status = "cought";
direction = "";
ani._x = opponent.ani._x - (side * 5);
ani._y = orgY - 15;
onceAni(lbCought);
_twnX.stop();
_twnY.stop();
}
function mtThrown() {
updaterObj.onEnterFrame = undefined;
status = "thrown";
direction = "";
var o = this;
onceAni(lbThrown, function () {
o.movNormal();
o.startInvincible(0.2);
});
startXTween(null, side * (130 + (speed * 2)), 10);
startYTween(null, orgY, 4);
}
function movLoseTimeOut() {
status = "lose";
updateSide();
onceAni(lbLose);
}
function movLose() {
if (status != "thrown") {
updateSide();
onceAni(lbHDie);
startXTween(null, (-side) * (130 + (speed * 2)), 10);
}
status = "lose";
}
function movWin() {
status = "win";
onceAni(lbWin);
}
function movIntro() {
status = "intro";
onceAni(lbIntro);
}
function destroy() {
super.destroy();
shadow.destroy();
}
function getInstance() {
return(ani.getInstanceAtDepth(-16383));
}
function onPauseGame() {
if (_twnF.isPlaying) {
_twnF.stop();
}
if (_twnX.isPlaying) {
_twnX.stop();
}
if (_twnY.isPlaying) {
_twnY.stop();
}
getInstance().stop();
_global.MovieClip.removeListener(updaterObj);
}
function onResumeGame() {
_twnF.resume();
_twnX.resume();
_twnY.resume();
if (status == "normal") {
getInstance().play();
}
_global.MovieClip.addListener(updaterObj);
}
function hitTest(aMc, hitEff, hitValue, blockHitEff, blockHitValue, isNoAni, aniFunc) {
var _local2 = ((aMc == undefined) ? (getInstance().hitBlock) : (aMc));
hitEff = ((hitEff == undefined) ? "Hurt" : (hitEff));
var _local3 = Boolean(isNoAni);
if (_local2 != undefined) {
if (((Boolean(_local2.hitTest(opponent.getInstance().hitBody)) && (opponent.status != "hurt")) && (!opponent.isInvincible)) && (opponent.status != "thrown")) {
if (ani.getDepth() < opponent.ani.getDepth()) {
ani.swapDepths(opponent.ani);
}
if (((side == -1) && (opponent.direction == "left")) || ((side == 1) && (opponent.direction == "right"))) {
dispatchEvent({type:"onFightActivated", activer:this, getHurt:false, blockHitEff:blockHitEff, blockHitValue:blockHitValue});
} else {
dispatchEvent({type:"onFightActivated", activer:this, getHurt:true, hitEff:hitEff, hurtValue:hitValue, isNoAnimation:_local3, hurtFunc:aniFunc});
}
return(true);
}
}
return(false);
}
function doMotion(evtObj) {
var _local3 = evtObj.motion;
var _local5 = evtObj.direction;
var _local2 = "";
var _local6;
var _local7 = false;
if (((((_local3 == "win") || (_local3 == "lose")) || (_local3 == "intro")) || (_local3 == "hurtUp")) || (_local3 == "hurtDown")) {
if ((status == "skill") && (!_performedSkill.invincible)) {
setSkillMotionFinished(_performedSkill);
_local7 = true;
} else if ((status != "thrown") && (status != "hurt")) {
_local7 = true;
}
} else if ((status == "punch") || (status == "kick")) {
if (_local3 == "down") {
direction = "down";
} else if ((_local3 == "right") || (_local3 == "left")) {
direction = "";
}
}
if ((status == "down") && ((_local5 == "left") || (_local5 == "right"))) {
direction = _local5;
}
if (_local7 || ((((((((status != "jump") && (status != "punch")) && (status != "kick")) && (status != "hurt")) && (status != "cought")) && (status != "thrown")) && (status != "skill")) && (status != "block"))) {
if (_local3 == "move") {
if ((_local5 == "right") && (status != "right")) {
_local2 = "movRight";
} else if ((_local5 == "left") && (status != "left")) {
_local2 = "movLeft";
}
} else if ((_local3 == "jump") && (direction != "up")) {
if (_local5 == "right") {
_local2 = "movJumpRight";
} else if (_local5 == "left") {
_local2 = "movJumpLeft";
} else {
_local2 = "movJump";
}
} else if (((_local3 == "down") && (direction != "down")) && (status != "down")) {
_local2 = "movDown";
} else if (_local3 == "hurtUp") {
if (status != "hurt") {
if (direction == "up") {
_local2 = "mtBlastHurt";
} else {
_local2 = "mtHurtUp";
}
_local6 = evtObj.hurtEff;
}
} else if (_local3 == "hurtDown") {
if (status != "hurt") {
_local2 = "mtHurtDown";
_local6 = evtObj.hurtEff;
}
} else if (_local3 == "blockUp") {
if (status != "block") {
_local2 = "mtBlockUp";
}
} else if (_local3 == "blockDown") {
if (status != "block") {
_local2 = "mtBlockDown";
}
} else if (_local3 == "skill") {
if ((((status == "left") || (status == "right")) || (status == "normal")) || (status == "down")) {
var _local8 = getSkill(evtObj.skillKeys);
if (_local8 != null) {
_local2 = "doSkill";
_local6 = _local8;
} else if (evtObj.isPunch && evtObj.isKick) {
if ((_performedSkill == null) && (direction != "up")) {
_local8 = getSkillByName("Throw");
if (_local8 != null) {
if (opponent.setCoughtMotion()) {
_local2 = "doSkill";
_local6 = _local8;
}
}
}
} else if (evtObj.isPunch) {
if (status == "down") {
_local2 = "mtDownPower";
} else if (direction != "up") {
_local2 = "mtPower";
}
} else if (evtObj.isKick) {
if (status == "down") {
_local2 = "mtDownKick";
} else if (direction != "up") {
_local2 = "mtKick";
}
}
}
} else if (_local3 == "cought") {
} else if (_local3 == "thrown") {
} else if (_local3 == "blastHurt") {
_local2 = "mtBlastHurt";
_local6 = evtObj.hurtEff;
} else if (_local3 == "win") {
_local2 = "movWin";
} else if (_local3 == "lose") {
if (crtHP > 0) {
_local2 = "movLoseTimeOut";
} else {
_local2 = "movLose";
}
} else if (_local3 == "intro") {
_local2 = "movIntro";
} else if (_local3 == "normal") {
_local2 = "movNormal";
} else if ((_local3 == "nothing") && evtObj.isDirection) {
if ((status == "left") || (status == "right")) {
_local2 = "movNormal";
} else if (status == "down") {
_local2 = "movStandUp";
}
}
if (_local2 != "") {
updaterObj.onEnterFrame = undefined;
this[_local2](_local6);
}
}
}
function doSkill(skl) {
if (_performedSkill != null) {
return(undefined);
}
if (!skl.performing) {
updaterObj.onEnterFrame = undefined;
status = "skill";
direction = ((side == 1) ? "right" : "left");
var o = this;
onceAni(skl.__get__lable(), function () {
o.movNormal();
o.correctPosition();
o.correctOffside();
});
setSkillMotionStarted(skl);
}
}
function setSkillMotionStarted(skl) {
_performedSkill = skl;
skl.perform();
}
function setSkillMotionFinished(skl) {
if (skl.performing) {
_twnF.stop();
if (skl.effect != undefined) {
skl.onMotionStopped();
}
}
_performedSkill = null;
}
function setCoughtMotion() {
if (((((((HP > 0) && (!isInvincible)) && (status != "thrown")) && (status != "skill")) && (status != "hurt")) && (direction != "up")) && (Math.abs(ani._x - opponent.ani._x) < 42)) {
mtCought();
if (ani.getDepth() > opponent.ani.getDepth()) {
ani.swapDepths(opponent.ani);
}
return(true);
}
return(false);
}
var lbNormal = 1;
var lbR = 2;
var lbL = 3;
var lbDn = 4;
var lbDnGetup = 5;
var lbJp = 6;
var lbJpR = 7;
var lbJpL = 8;
var lbK1 = 9;
var lbK2 = 10;
var lbK3 = 11;
var lbDnK1 = 12;
var lbDnK2 = 13;
var lbDnK3 = 14;
var lbJpK1 = 15;
var lbJpK2 = 16;
var lbJpK3 = 17;
var lbJpRLK1 = 18;
var lbJpRLK2 = 19;
var lbJpRLK3 = 20;
var lbMidK1 = 21;
var lbMidK2 = 22;
var lbMidK3 = 23;
var lbP1 = 24;
var lbP2 = 25;
var lbP3 = 26;
var lbDnP1 = 27;
var lbDnP2 = 28;
var lbDnP3 = 29;
var lbJpP1 = 30;
var lbJpP2 = 31;
var lbJpP3 = 32;
var lbJpRLP1 = 33;
var lbJpRLP2 = 34;
var lbJpRLP3 = 35;
var lbMidP1 = 36;
var lbMidP2 = 37;
var lbMidP3 = 38;
var lbCatch = 39;
var lbCought = 40;
var lbThrown = 41;
var lbH1 = 42;
var lbH2 = 43;
var lbH3 = 44;
var lbDnH1 = 45;
var lbDnH2 = 46;
var lbDnH3 = 47;
var lbJpH1 = 48;
var lbJpH2 = 49;
var lbJpH3 = 50;
var lbJpRLH1 = 51;
var lbJpRLH2 = 52;
var lbJpRLH3 = 53;
var lbMidH1 = 54;
var lbMidH2 = 55;
var lbMidH3 = 56;
var lbHGetup = 57;
var lbHDie = 58;
var lbUpB = 59;
var lbMidB = 60;
var lbDnB = 61;
var lbWin = 62;
var lbLose = 63;
var lbS1 = 64;
var lbS2 = 65;
var lbS3 = 66;
var lbS4 = 67;
var lbS5 = 68;
var lbIntro = 71;
var direction = "";
var shadow = null;
var sex = "male";
var status = "normal";
static var _evt = mx.events.EventDispatcher;
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(com.KidFighting.objects.CCharacter.prototype);
}
Symbol 1378 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
}
Symbol 1379 MovieClip [__Packages.ds.transitions.Tween] Frame 0
class ds.transitions.Tween
{
var obj, prop, begin, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isYoyo, isFinished, isPlaying, _fps, prevPos, _pos, change, _intervalID;
function Tween ($obj, $prop, $func, $begin, $finish, $duration) {
mx.transitions.OnEnterFrameBeacon.init();
obj = $obj;
prop = $prop;
begin = $begin;
duration = ($duration);
if ($func) {
func = ($func);
}
finish = ($finish);
_listeners = [];
addListener(this);
if ((arguments.length = obj != null)) {
start(obj[$prop] == begin);
}
}
function get func() {
return(_func);
}
function set func(f) {
if (f == null) {
_func = function (t, b, c, d) {
return(((c * t) / d) + b);
};
} else {
_func = f;
}
//return(func);
}
function set time(t) {
prevTime = _time;
if (t >= duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else if (isYoyo) {
yoyo();
broadcastMessage("onMotionYoyo", this);
} else {
_time = t;
update();
stop();
isFinished = true;
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
if (prop == "_currentframe") {
_pos = Math.floor(p);
obj.gotoAndStop(_pos);
} else {
obj[prop] = (_pos = p);
}
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo($finish, $duration) {
begin = position;
finish = ($finish);
if ($duration != undefined) {
duration = ($duration);
}
start(true);
}
function yoyo() {
stopEnterFrame();
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
clearInterval(_intervalID);
_global.MovieClip.addListener(this);
} else {
_global.MovieClip.removeListener(this);
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isFinished = false;
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start(inPosition) {
if (inPosition) {
_time = 0;
} else {
rewind();
}
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function pause() {
stopEnterFrame();
broadcastMessage("onMotionPaused", this);
}
function resume() {
if (isFinished) {
return(undefined);
}
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
update();
}
function nextFrame() {
time = (_time + 1);
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
time = (_time - 1);
}
function toString() {
return("[Tween]");
}
function update() {
position = (getPosition(_time));
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(ds.transitions.Tween.prototype);
function _func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1380 MovieClip [__Packages.com.KidFighting.objects.CShadow] Frame 0
class com.KidFighting.objects.CShadow extends com.KidFighting.objects.CObject
{
var ani;
function CShadow () {
super();
ani = _root.shadow_GUI.shadow.duplicateMovieClip("shadow" + _root.shadow_GUI.getNextHighestDepth(), _root.shadow_GUI.getNextHighestDepth());
}
function follow(aMc) {
var mc = aMc;
ani.onEnterFrame = function () {
this._x = mc._x;
};
}
}
Symbol 1381 MovieClip [__Packages.com.KidFighting.objects.CSkill] Frame 0
class com.KidFighting.objects.CSkill
{
var _lable, _observer;
function CSkill () {
}
function set lable(lb) {
_lable = lb;
//return(lable);
}
function get lable() {
return(_lable);
}
function onMotionFinished() {
}
function onMotionStopped() {
}
function onMotionUpdated() {
}
function perform() {
}
function stop() {
}
function observeCharacterTween(twn) {
_observer = ds.transitions.TweenObserver.observeTween(twn);
addListener(this);
}
function unobserveCharacterTween() {
removeListener(this);
_observer.unobserve();
}
function addListener(lsn) {
_observer.addListener(lsn);
}
function removeListener(lsn) {
_observer.removeListener(lsn);
}
var invincible = false;
var performing = false;
}
Symbol 1382 MovieClip [__Packages.ds.transitions.TweenObserver] Frame 0
class ds.transitions.TweenObserver
{
var _listeners, observingTween, tweenEnterFrame, broadcastMessage;
function TweenObserver () {
}
static function observeTween(twn) {
var _local1 = new ds.transitions.TweenObserver();
_local1.observe(twn);
return(_local1);
}
static function unobserveTween(twn) {
return(Boolean(twn._observer.unobserve()));
}
function observe(twn) {
if (twn._observer != undefined) {
twn._observer.unobserve();
}
_listeners = [];
observingTween = twn;
observingTween._listeners.unshift(this);
observingTween._observer = this;
tweenEnterFrame = observingTween.onEnterFrame;
observingTween.onEnterFrame = function () {
this.nextFrame();
this._observer.onEnterFrame();
};
}
function unobserve() {
if (observingTween._observer == this) {
observingTween.removeListener(this);
_listeners = [];
observingTween.onEnterFrame = tweenEnterFrame;
return(true);
}
return(false);
}
function onMotionLooped() {
broadcastMessage("onMotionLooped", observingTween);
}
function onMotionYoyo() {
broadcastMessage("onMotionYoyo", observingTween);
}
function onMotionStarted() {
broadcastMessage("onMotionStarted", observingTween);
}
function onMotionFinished() {
broadcastMessage("onMotionFinished", observingTween);
}
function onMotionStopped() {
broadcastMessage("onMotionStopped", observingTween);
}
function onEnterFrame() {
broadcastMessage("onMotionUpdated", observingTween);
}
function toString() {
return("[TweenObserver]");
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(ds.transitions.TweenObserver.prototype);
}
Symbol 1383 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
}
Symbol 1384 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
}
Symbol 1385 MovieClip [__Packages.com.KidFighting.EffectSys] Frame 0
class com.KidFighting.EffectSys extends MovieClip
{
static var _es, addEventListener, dispatchEvent, removeEventListener;
function EffectSys () {
super();
_es = this;
}
static function generate(clsName, twn, ch, x, y) {
var _local1 = null;
var _local2;
if (clsName == undefined) {
clsName = "Hurt";
}
if (typeof(clsName) == "string") {
_local2 = _es.attachMovie(("eff" + clsName) + "_mc", "eff" + _es.getNextHighestDepth(), _es.getNextHighestDepth());
}
switch (clsName) {
case "Hurt" :
_local1 = new com.KidFighting.effects.EffHurt(_local2, twn, ch, x, y);
break;
case "Knife" :
_local1 = new com.KidFighting.effects.EffKnife(_local2, twn, ch, x, y);
break;
case "Dynamite" :
_local1 = new com.KidFighting.effects.EffDynamite(_local2, twn, ch, x, y);
break;
case "Explosion" :
_local1 = new com.KidFighting.effects.EffExplosion(_local2, twn, ch, x, y);
break;
case "BuddhistPalm" :
_local1 = new com.KidFighting.effects.EffBuddhistPalm(_local2, twn, ch, x, y);
break;
case "Blade" :
_local1 = new com.KidFighting.effects.EffBlade(_local2, twn, ch, x, y);
break;
case "Icecream" :
_local1 = new com.KidFighting.effects.EffIcecream(_local2, twn, ch, x, y);
break;
case "IcecreamSplash" :
_local1 = new com.KidFighting.effects.EffIcecreamSplash(_local2, twn, ch, x, y);
break;
case "Bottle" :
_local1 = new com.KidFighting.effects.EffBottle(_local2, twn, ch, x, y);
break;
case "BottleSplash" :
_local1 = new com.KidFighting.effects.EffBottleSplash(_local2, twn, ch, x, y);
break;
case "Scissors" :
_local1 = new com.KidFighting.effects.EffScissors(_local2, twn, ch, x, y);
break;
case "Axe" :
_local1 = new com.KidFighting.effects.EffAxe(_local2, twn, ch, x, y);
break;
default :
_local2 = _es.createEmptyMovieClip("eff" + _es.getNextHighestDepth(), _es.getNextHighestDepth());
_local1 = new com.KidFighting.objects.CEffect(_local2, twn, ch, x, y);
}
if ((_local1 == null) || (_local1 == undefined)) {
_local2.removeMovieClip();
} else {
registerEffect(_local1);
}
return(_local1);
}
static function registerEffect(eff) {
addEventListener("onPauseGame", eff);
addEventListener("onResumeGame", eff);
eff.addEffectListener(com.KidFighting.EffectSys);
}
static function pauseGame(evtObj) {
if (evtObj.value) {
dispatchEvent({type:"onPauseGame"});
} else {
dispatchEvent({type:"onResumeGame"});
}
}
static function onMotionStopped(twn) {
twn.owner.removeEffectListener(com.KidFighting.EffectSys);
removeEventListener("onPauseGame", twn.owner);
removeEventListener("onResumeGame", twn.owner);
}
static function getOpponentFlyEffItem(aEffMc) {
for (var _local2 in _es) {
if ((_es[_local2].type == "flyItem") && (_es[_local2] != aEffMc)) {
return(_es[_local2]);
}
}
return(null);
}
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.EffectSys);
}
Symbol 1386 MovieClip [__Packages.com.KidFighting.objects.CEffect] Frame 0
class com.KidFighting.objects.CEffect extends com.KidFighting.objects.CObject
{
var _twn, ani, type, owner, _eff_observer, _ch_observer, onMotionUpdated, onMotionStopped, performing, destroy;
function CEffect () {
super();
}
function get looping() {
return(_twn.looping);
}
function set looping(lp) {
_twn.looping = Boolean(lp);
//return(looping);
}
function init($ani, twn, ch, x, y) {
ani = $ani;
_twn = new ds.transitions.Tween(null, "_currentframe", null, 1, ani._totalframes, ani._totalframes);
_twn.obj = ani;
_twn.owner = this;
ani.gotoAndStop(1);
ani._visible = false;
ani._x = x;
ani._y = y;
ani.type = type;
ani.owner = this;
owner = ch;
_eff_observer = ds.transitions.TweenObserver.observeTween(_twn);
if (twn != null) {
_ch_observer = ds.transitions.TweenObserver.observeTween(twn);
onMotionUpdated = onCharacterMotionUpdated;
addCharacterListener(this);
} else {
start();
}
onMotionStopped = onEffectMotionFinished;
}
function onCharacterMotionUpdated(twn) {
if ((twn.obj._currentframe >= effStartFrame) && (effStartFrame != -1)) {
removeCharacterListener(this);
if (((owner.status != "hurt") && (owner.status != "thown")) && (owner.HP > 0)) {
start();
} else {
onEffectMotionFinished();
}
}
}
function onEffectMotionUpdated() {
}
function onEffectMotionFinished(twn) {
if (_ch_observer) {
_ch_observer.unobserve();
removeCharacterListener(this);
}
_eff_observer.unobserve();
if (effStartFrame != -1) {
removeEffectListener(this);
ani._visible = false;
}
performing = false;
destroy();
}
function start() {
performing = true;
onMotionUpdated = onEffectMotionUpdated;
addEffectListener(this);
ani._visible = true;
_twn.start();
}
function stop() {
_twn.stop();
}
function addCharacterListener(lsn) {
_ch_observer.addListener(lsn);
}
function removeCharacterListener(lsn) {
_ch_observer.removeListener(lsn);
}
function addEffectListener(lsn) {
_eff_observer.addListener(lsn);
}
function removeEffectListener(lsn) {
_eff_observer.removeListener(lsn);
}
function onPauseGame() {
if (_twn.isPlaying) {
_twn.pause();
}
}
function onResumeGame() {
_twn.resume();
}
var effStartFrame = -1;
}
Symbol 1387 MovieClip [__Packages.com.KidFighting.effects.EffHurt] Frame 0
class com.KidFighting.effects.EffHurt extends com.KidFighting.objects.CEffect
{
var init;
function EffHurt ($ani, twn, ch, x, y) {
super();
$ani._rotation = random(360);
init($ani, twn, ch, x, y);
}
}
Symbol 1388 MovieClip [__Packages.com.KidFighting.effects.EffKnife] Frame 0
class com.KidFighting.effects.EffKnife extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffKnife ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1389 MovieClip [__Packages.com.KidFighting.effects.EffDynamite] Frame 0
class com.KidFighting.effects.EffDynamite extends com.KidFighting.objects.CEffect
{
var init, _twnY, ani, owner, stop, hurtValue, skill;
function EffDynamite ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
init($ani, twn, ch, x, y);
_twnY = new ds.transitions.Tween(ani, "_y", mx.transitions.easing.Bounce.easeOut, ani._y, ani._y - 60, 12);
var lastY = ch.orgY;
_twnY.onMotionFinished = function (twn) {
this.func = null;
this.onMotionFinished = undefined;
this.continueTo(lastY, 6);
};
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
movingSpeed = movingSpeed - (0.5 * owner.side);
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, "Explosion", hurtValue)) {
stop();
} else if (ani._y >= owner.orgY) {
skill.explode(ani._x);
stop();
}
}
function onPauseGame() {
super.onPauseGame();
if (_twnY.isPlaying) {
_twnY.pause();
}
}
function onResumeGame() {
super.onResumeGame();
_twnY.resume();
}
var movingSpeed = 15;
}
Symbol 1390 MovieClip [__Packages.com.KidFighting.effects.EffExplosion] Frame 0
class com.KidFighting.effects.EffExplosion extends com.KidFighting.objects.CEffect
{
var init, owner, ani, hurtValue;
function EffExplosion ($ani, twn, ch, x, y) {
super();
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
owner.hitTest(ani, null, hurtValue);
}
}
Symbol 1391 MovieClip [__Packages.com.KidFighting.effects.EffBuddhistPalm] Frame 0
class com.KidFighting.effects.EffBuddhistPalm extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffBuddhistPalm ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1392 MovieClip [__Packages.com.KidFighting.effects.EffBlade] Frame 0
class com.KidFighting.effects.EffBlade extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffBlade ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1393 MovieClip [__Packages.com.KidFighting.effects.EffIcecream] Frame 0
class com.KidFighting.effects.EffIcecream extends com.KidFighting.objects.CEffect
{
var init, _twnY, ani, owner, stop, hurtValue, skill;
function EffIcecream ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
init($ani, twn, ch, x, y);
_twnY = new ds.transitions.Tween(ani, "_y", mx.transitions.easing.Bounce.easeOut, ani._y, ani._y - 40, 10);
var lastY = ch.orgY;
_twnY.onMotionFinished = function (twn) {
this.func = null;
this.onMotionFinished = undefined;
this.continueTo(lastY, 6);
};
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
movingSpeed = movingSpeed - (0.5 * owner.side);
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, "IcecreamSplash", hurtValue)) {
stop();
} else if (ani._y >= owner.orgY) {
skill.explode(ani._x);
stop();
}
}
function onPauseGame() {
super.onPauseGame();
if (_twnY.isPlaying) {
_twnY.pause();
}
}
function onResumeGame() {
super.onResumeGame();
_twnY.resume();
}
var movingSpeed = 15;
}
Symbol 1394 MovieClip [__Packages.com.KidFighting.effects.EffIcecreamSplash] Frame 0
class com.KidFighting.effects.EffIcecreamSplash extends com.KidFighting.objects.CEffect
{
var init;
function EffIcecreamSplash ($ani, twn, ch, x, y) {
super();
init($ani, twn, ch, x, y);
}
}
Symbol 1395 MovieClip [__Packages.com.KidFighting.effects.EffBottle] Frame 0
class com.KidFighting.effects.EffBottle extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffBottle ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1396 MovieClip [__Packages.com.KidFighting.effects.EffBottleSplash] Frame 0
class com.KidFighting.effects.EffBottleSplash extends com.KidFighting.objects.CEffect
{
var init;
function EffBottleSplash ($ani, twn, ch, x, y) {
super();
$ani._rotation = random(360);
init($ani, twn, ch, x, y);
}
}
Symbol 1397 MovieClip [__Packages.com.KidFighting.effects.EffScissors] Frame 0
class com.KidFighting.effects.EffScissors extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffScissors ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1398 MovieClip [__Packages.com.KidFighting.effects.EffAxe] Frame 0
class com.KidFighting.effects.EffAxe extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffAxe ($ani, twn, ch, x, y) {
super();
$ani._xscale = $ani._xscale * ch.side;
type = "flyItem";
init($ani, twn, ch, x, y);
}
function onEffectMotionUpdated() {
ani._x = ani._x + movingSpeed;
var _local2 = com.KidFighting.EffectSys.getOpponentFlyEffItem(ani);
if (_local2 && (ani.hitTest(_local2))) {
com.KidFighting.EffectSys.generate("Hurt", null, owner, ani._x, ani._y);
_local2.owner.stop();
stop();
return(undefined);
}
if ((ani._x < -50) || (ani._x > (Stage.width + 50))) {
stop();
}
if (owner.hitTest(ani, null, hurtValue)) {
stop();
}
}
var movingSpeed = 15;
}
Symbol 1399 MovieClip [__Packages.com.KidFighting.characters.Sing] Frame 0
class com.KidFighting.characters.Sing extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, jump, speed, strength, winLable, skill1, lbS1, addSkill, skill2, lbS2, skill3, lbCatch, skill4, lbS4, skill5, lbS5;
function Sing () {
super();
uniqueId = 1;
name = "Sing";
maxHP = 100;
jump = 100;
speed = 8;
strength = 5;
winLable = 7;
skill1 = new com.KidFighting.skills.SklKnife();
skill1.lable = lbS1;
addSkill(skill1);
skill2 = new com.KidFighting.skills.SklDynamite();
skill2.lable = lbS2;
addSkill(skill2);
skill3 = new com.KidFighting.skills.SklThrow();
skill3.lable = lbCatch;
addSkill(skill3);
skill4 = new com.KidFighting.skills.SklBuddhishPalm();
skill4.lable = lbS4;
addSkill(skill4);
skill5 = new com.KidFighting.skills.SklFly();
skill5.lable = lbS5;
addSkill(skill5);
}
}
Symbol 1400 MovieClip [__Packages.com.KidFighting.skills.SklKnife] Frame 0
class com.KidFighting.skills.SklKnife extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklKnife () {
super();
name = "Knife";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.A;
effStartFrame = 5;
hurtValue = 10;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("BasicAttack_male");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1401 MovieClip [__Packages.com.KidFighting.skills.SklDynamite] Frame 0
class com.KidFighting.skills.SklDynamite extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklDynamite () {
super();
name = "Dynamite";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.S;
effStartFrame = 6;
hurtValue = 15;
}
function perform() {
if ((!effect.performing) && (effect != undefined)) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 30), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.skill = this;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("BasicAttack_male");
}
function explode(x) {
effect = com.KidFighting.EffectSys.generate("Explosion", null, owner, x, owner.orgY);
effect.owner = owner;
effect.hurtValue = hurtValue2;
effect.addEffectListener(this);
}
function onMotionStopped() {
effect.removeEffectListener(this);
effect = undefined;
performing = false;
owner.setSkillMotionFinished(this);
}
var hurtValue2 = 2;
}
Symbol 1402 MovieClip [__Packages.com.KidFighting.skills.SklThrow] Frame 0
class com.KidFighting.skills.SklThrow extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, performing, observeCharacterTween, owner, onMotionFinished, unobserveCharacterTween;
function SklThrow () {
super();
name = "Throw";
keys = (com.KidFighting.Input.A + ",") + com.KidFighting.Input.S;
effStartFrame = 5;
hurtValue = 25;
}
function perform() {
performing = true;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("BasicAttack_" + owner.sex);
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe == effStartFrame) {
owner.dispatchEvent({type:"onFightActivated", activer:owner, getHurt:true, hitEff:"nothing", hurtValue:hurtValue, isNoAnimation:true});
owner.opponent.mtThrown();
owner.opponent.updateSide(owner.side);
owner.updateSide(-owner.side);
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1403 MovieClip [__Packages.com.KidFighting.skills.SklBuddhishPalm] Frame 0
class com.KidFighting.skills.SklBuddhishPalm extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklBuddhishPalm () {
super();
name = "BuddhistPalm";
keys = (((com.KidFighting.Input.DOWN + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 12;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("sing_special4");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1404 MovieClip [__Packages.com.KidFighting.skills.SklFly] Frame 0
class com.KidFighting.skills.SklFly extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklFly () {
super();
name = "Fly";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
owner.startInvincible(0.3);
performing = true;
hit = false;
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("sing_special5");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
owner.ani._x = owner.ani._x + movingSpeed;
if (owner.opponent.direction != "up") {
owner.correctPosition();
}
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 15;
}
Symbol 1405 MovieClip [__Packages.com.KidFighting.characters.MaleFighter] Frame 0
class com.KidFighting.characters.MaleFighter extends com.KidFighting.characters.Sing
{
var m_skillList, wintime, addSkill;
function MaleFighter () {
super();
delete m_skillList;
m_skillList = {};
wintime = 0;
}
function autoAddSkill() {
wintime++;
if ((wintime > 0) && (wintime < 6)) {
addSkill(this["skill" + wintime]);
}
}
}
Symbol 1406 MovieClip [__Packages.com.KidFighting.characters.Fong] Frame 0
class com.KidFighting.characters.Fong extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, sex, maxHP, jump, speed, strength, winLable, skill1, lbS1, addSkill, skill2, lbS2, skill3, lbCatch, skill4, lbS4, skill5, lbS5;
function Fong () {
super();
uniqueId = 2;
name = "Fong";
sex = "female";
maxHP = 100;
jump = 120;
speed = 10;
strength = 3;
winLable = 8;
skill1 = new com.KidFighting.skills.SklIcecream();
skill1.lable = lbS1;
addSkill(skill1);
skill2 = new com.KidFighting.skills.SklBottle();
skill2.lable = lbS2;
addSkill(skill2);
skill3 = new com.KidFighting.skills.SklThrow();
skill3.lable = lbCatch;
addSkill(skill3);
skill4 = new com.KidFighting.skills.SklBlade();
skill4.lable = lbS4;
addSkill(skill4);
skill5 = new com.KidFighting.skills.SklDragon();
skill5.lable = lbS5;
addSkill(skill5);
}
}
Symbol 1407 MovieClip [__Packages.com.KidFighting.skills.SklIcecream] Frame 0
class com.KidFighting.skills.SklIcecream extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklIcecream () {
super();
name = "Icecream";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.S;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
if ((!effect.performing) && (effect != undefined)) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 30), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.skill = this;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("BasicAttack_female");
}
function explode(x) {
effect = com.KidFighting.EffectSys.generate("IcecreamSplash", null, owner, x, owner.orgY);
effect.addEffectListener(this);
}
function onMotionStopped() {
effect.removeEffectListener(this);
effect = undefined;
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1408 MovieClip [__Packages.com.KidFighting.skills.SklBottle] Frame 0
class com.KidFighting.skills.SklBottle extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklBottle () {
super();
name = "Bottle";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 10;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("BasicAttack_female");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1409 MovieClip [__Packages.com.KidFighting.skills.SklBlade] Frame 0
class com.KidFighting.skills.SklBlade extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklBlade () {
super();
name = "Blade";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("fong_special4");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1410 MovieClip [__Packages.com.KidFighting.skills.SklDragon] Frame 0
class com.KidFighting.skills.SklDragon extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklDragon () {
super();
name = "Dragon";
keys = (((((com.KidFighting.Input.RIGHT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
owner.startInvincible(0.3);
performing = true;
hit = false;
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("fong_special5");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
owner.ani._x = owner.ani._x + movingSpeed;
if (owner.opponent.direction != "up") {
owner.correctPosition();
}
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 10;
}
Symbol 1411 MovieClip [__Packages.com.KidFighting.characters.FemaleFighter] Frame 0
class com.KidFighting.characters.FemaleFighter extends com.KidFighting.characters.Fong
{
var m_skillList, wintime, addSkill;
function FemaleFighter () {
super();
delete m_skillList;
m_skillList = {};
wintime = 0;
}
function autoAddSkill() {
wintime++;
if ((wintime > 0) && (wintime < 6)) {
addSkill(this["skill" + wintime]);
}
}
}
Symbol 1412 MovieClip [__Packages.com.KidFighting.characters.Bone] Frame 0
class com.KidFighting.characters.Bone extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbCatch, addSkill, lbS1;
function Bone () {
super();
uniqueId = 3;
name = "Bone";
maxHP = (crtHP = 100);
jump = 70;
speed = 6;
strength = 9;
winLable = 9;
var _local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklBoneRush();
_local3.lable = lbS1;
addSkill(_local3);
}
}
Symbol 1413 MovieClip [__Packages.com.KidFighting.skills.SklBoneRush] Frame 0
class com.KidFighting.skills.SklBoneRush extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklBoneRush () {
super();
name = "BoneRush";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.S;
effStartFrame = 3;
hurtValue = 17;
}
function perform() {
owner.startInvincible(0.2);
performing = true;
hit = false;
owner.updateSide();
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("bone_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
owner.ani._x = owner.ani._x + movingSpeed;
if (owner.opponent.direction != "up") {
owner.correctPosition();
}
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 15;
}
Symbol 1414 MovieClip [__Packages.com.KidFighting.characters.Barbor] Frame 0
class com.KidFighting.characters.Barbor extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Barbor () {
super();
uniqueId = 4;
name = "Barbor";
maxHP = (crtHP = 100);
jump = 70;
speed = 6;
strength = 6;
winLable = 10;
var _local3 = new com.KidFighting.skills.SklScissors();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1415 MovieClip [__Packages.com.KidFighting.skills.SklScissors] Frame 0
class com.KidFighting.skills.SklScissors extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklScissors () {
super();
name = "Scissors";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 10;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("barber_special1");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1416 MovieClip [__Packages.com.KidFighting.characters.Tailor] Frame 0
class com.KidFighting.characters.Tailor extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Tailor () {
super();
uniqueId = 5;
name = "Tailor";
maxHP = (crtHP = 100);
jump = 75;
speed = 7;
strength = 10;
winLable = 11;
var _local3 = new com.KidFighting.skills.SklTailorRotate();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1417 MovieClip [__Packages.com.KidFighting.skills.SklTailorRotate] Frame 0
class com.KidFighting.skills.SklTailorRotate extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklTailorRotate () {
super();
name = "TailorRotate";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.S;
effStartFrame = 3;
hurtValue = 18;
}
function perform() {
owner.startInvincible(0.3);
performing = true;
hit = false;
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("tailor_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
owner.ani._x = owner.ani._x + movingSpeed;
if (owner.opponent.direction != "up") {
owner.correctPosition();
}
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 12;
}
Symbol 1418 MovieClip [__Packages.com.KidFighting.characters.Coolie] Frame 0
class com.KidFighting.characters.Coolie extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Coolie () {
super();
uniqueId = 6;
name = "Coolie";
maxHP = (crtHP = 100);
jump = 100;
speed = 8;
strength = 6;
winLable = 12;
var _local3 = new com.KidFighting.skills.SklCoolieKick();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1419 MovieClip [__Packages.com.KidFighting.skills.SklCoolieKick] Frame 0
class com.KidFighting.skills.SklCoolieKick extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, performing, owner, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklCoolieKick () {
super();
name = "CoolieKick";
keys = (((((com.KidFighting.Input.RIGHT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
performing = true;
owner.startInvincible(0.3);
hit = false;
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("coolie_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
owner.ani._x = owner.ani._x + movingSpeed;
if (owner.opponent.direction != "up") {
owner.correctPosition();
}
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 10;
}
Symbol 1420 MovieClip [__Packages.com.KidFighting.characters.Donut] Frame 0
class com.KidFighting.characters.Donut extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Donut () {
super();
uniqueId = 7;
name = "Donut";
maxHP = (crtHP = 100);
jump = 75;
speed = 8;
strength = 10;
winLable = 13;
var _local3 = new com.KidFighting.skills.SklDonutStick();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1421 MovieClip [__Packages.com.KidFighting.skills.SklDonutStick] Frame 0
class com.KidFighting.skills.SklDonutStick extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, performing, owner, hit, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklDonutStick () {
super();
name = "DonutStick";
keys = (((((com.KidFighting.Input.RIGHT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 18;
}
function perform() {
performing = true;
owner.startInvincible(0.5);
hit = false;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("donut_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
if (owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt")) {
hit = true;
}
}
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1422 MovieClip [__Packages.com.KidFighting.characters.BrotherSum] Frame 0
class com.KidFighting.characters.BrotherSum extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function BrotherSum () {
super();
uniqueId = 8;
name = "BrotherSum";
maxHP = (crtHP = 100);
jump = 100;
speed = 10;
strength = 12;
winLable = 14;
var _local3 = new com.KidFighting.skills.SklAxe();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1423 MovieClip [__Packages.com.KidFighting.skills.SklAxe] Frame 0
class com.KidFighting.skills.SklAxe extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, effect, performing, owner;
function SklAxe () {
super();
name = "Axe";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 15;
}
function perform() {
if (effect.performing) {
return(undefined);
}
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.ani._y - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("sum_special1");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1424 MovieClip [__Packages.com.KidFighting.CharacterManager] Frame 0
class com.KidFighting.CharacterManager extends MovieClip
{
static var _cm;
function CharacterManager () {
super();
_cm = this;
}
static function select(id) {
if (isNaN(id)) {
id = selectedList.length - 1;
}
if (selectedList.length == charEnemyClsList) {
return(null);
}
var _local2;
var _local3;
if (id >= charClsList.length) {
id = id - charClsList.length;
_local2 = charEnemyClsList[id];
_local3 = _cm[aniEnemyList[id]].duplicateMovieClip("fighter" + _cm.getNextHighestDepth(), _cm.getNextHighestDepth());
} else {
_local2 = charClsList[id];
_local3 = _cm[aniList[id]].duplicateMovieClip("fighter" + _cm.getNextHighestDepth(), _cm.getNextHighestDepth());
}
selectedList.push(_local2);
return({cls:_local2, ani:_local3});
}
static function randomSelectEnemy() {
return(select(random(charClsList.length + charEnemyClsList.length)));
}
static function selectNextEnemy() {
return(select((charClsList.length + selectedList.length) - 1));
}
static function reset() {
selectedList = [];
}
static var charClsList = [com.KidFighting.characters.MaleFighter, com.KidFighting.characters.FemaleFighter];
static var aniList = ["ch_maleFighter", "ch_femaleFighter"];
static var charEnemyClsList = [com.KidFighting.characters.Bone, com.KidFighting.characters.Barbor, com.KidFighting.characters.Tailor, com.KidFighting.characters.Coolie, com.KidFighting.characters.Donut, com.KidFighting.characters.BrotherSum];
static var aniEnemyList = ["ch_bone", "ch_barber", "ch_tailor", "ch_coolie", "ch_donut", "ch_brotherSum"];
static var selectedList = [];
}
Symbol 1425 MovieClip [__Packages.com.KidFighting.SelectCharacterGUI] Frame 0
class com.KidFighting.SelectCharacterGUI extends MovieClip
{
static var _mc, dispatchEvent;
function SelectCharacterGUI () {
super();
_mc = this;
delay_timer.func = mx.utils.Delegate.create(com.KidFighting.SelectCharacterGUI, onSelectedEnemy);
delay_timer.interval = 4000;
}
static function reset() {
var _local1 = _mc;
selected_char_id = -1;
selected_enemy_id = -1;
_local1._visible = true;
_local1.gotoAndStop(1);
_mc.c1.gotoAndStop(2);
_local1.s1.onRelease = function () {
com.KidFighting.SelectCharacterGUI.selected_char_id = 0;
com.KidFighting.SelectCharacterGUI.selectPlayer();
ds.controls.SoundPlayer.playSound("vSelectCharector");
};
_local1.s2.onRelease = function () {
com.KidFighting.SelectCharacterGUI.selected_char_id = 1;
com.KidFighting.SelectCharacterGUI.selectPlayer();
ds.controls.SoundPlayer.playSound("vSelectCharector");
};
_local1.s1.onRollOver = function () {
com.KidFighting.SelectCharacterGUI._mc.c1.gotoAndStop(2);
com.KidFighting.SelectCharacterGUI._mc.c2.gotoAndStop(1);
if (com.KidFighting.SelectCharacterGUI._mc.c2.getDepth() > com.KidFighting.SelectCharacterGUI._mc.c1.getDepth()) {
ds.controls.SoundPlayer.playSound("charectorOn");
com.KidFighting.SelectCharacterGUI._mc.c2.swapDepths(com.KidFighting.SelectCharacterGUI._mc.c1);
}
};
_local1.s2.onRollOver = function () {
com.KidFighting.SelectCharacterGUI._mc.c1.gotoAndStop(1);
com.KidFighting.SelectCharacterGUI._mc.c2.gotoAndStop(2);
if (com.KidFighting.SelectCharacterGUI._mc.c2.getDepth() < com.KidFighting.SelectCharacterGUI._mc.c1.getDepth()) {
com.KidFighting.SelectCharacterGUI._mc.c2.swapDepths(com.KidFighting.SelectCharacterGUI._mc.c1);
ds.controls.SoundPlayer.playSound("charectorOn");
}
};
}
static function selectPlayer() {
_mc.gotoAndStop(2);
_mc.p1.gotoAndStop(selected_char_id + 1);
_mc.p1Name_txt.gotoAndStop(selected_char_id + 1);
dispatchEvent({type:"selectPlayer", id:selected_char_id});
selectNextPlayer();
}
static function selectNextPlayer() {
if (selected_enemy_id != -1) {
_mc.avator_mc["a" + (selected_enemy_id + 1)].gotoAndStop(2);
}
selected_enemy_id++;
_mc.p2.gotoAndStop(3 + selected_enemy_id);
_mc.p2Name_txt.gotoAndStop(3 + selected_enemy_id);
_mc._visible = true;
_mc.avator_mc.gotoAndPlay(2);
delay_timer.start();
}
static function onSelectedEnemy() {
delay_timer.stop();
dispatchEvent({type:"selectEnemy", id:selected_enemy_id});
_mc._visible = false;
}
static function onRoundCleared() {
selectNextPlayer();
}
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.SelectCharacterGUI);
static var delay_timer = new ds.controls.Timer();
static var selected_char_id = -1;
static var selected_enemy_id = -1;
}
Symbol 1426 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1427 MovieClip [__Packages.com.KidFighting.StageStatus] Frame 0
class com.KidFighting.StageStatus
{
function StageStatus () {
}
static function reset() {
_root.score_mc.s1.gotoAndStop(1);
_root.score_mc.s2.gotoAndStop(1);
_root.score_mc.s3.gotoAndStop(1);
_root.score_mc.s4.gotoAndStop(1);
_root.score_mc.s5.gotoAndStop(1);
_root.score_mc.s6.gotoAndStop(1);
_root.score_mc.s7.gotoAndStop(1);
}
static function onRoundInit(evtObj) {
_root.names1_mc.gotoAndStop(evtObj.idPlayer1);
_root.names2_mc.gotoAndStop(evtObj.idPlayer2);
_root.heads1_mc.gotoAndStop(evtObj.idPlayer1);
_root.heads2_mc.gotoAndStop(evtObj.idPlayer2);
_root.p1life.gotoAndStop(1);
_root.p2life.gotoAndStop(1);
_root.help_mc._visible = false;
if (evtObj.round == 1) {
_root.p1win1.gotoAndStop(1);
_root.p1win2.gotoAndStop(1);
_root.p2win1.gotoAndStop(1);
_root.p2win2.gotoAndStop(1);
}
}
static function onRoundEnd(evtObj) {
if (evtObj.p1WinTimes > 0) {
_root["p1win" + evtObj.p1WinTimes].gotoAndStop(2);
}
if (evtObj.p2WinTimes > 0) {
_root["p2win" + evtObj.p2WinTimes].gotoAndStop(2);
}
}
static function onPauseGame(evtObj) {
if (evtObj.value) {
_root.help_mc._visible = true;
} else {
_root.help_mc._visible = false;
}
}
static function onUpdateLife(evtObj) {
_root.p1life.gotoAndStop(101 - evtObj.p1Life);
_root.p2life.gotoAndStop(101 - evtObj.p2Life);
var _local2 = evtObj.score;
_root.score_mc.s1.gotoAndStop(Math.floor(_local2 % 10) + 1);
_root.score_mc.s2.gotoAndStop(Math.floor((_local2 / 10) % 10) + 1);
_root.score_mc.s3.gotoAndStop(Math.floor((_local2 / 100) % 10) + 1);
_root.score_mc.s4.gotoAndStop(Math.floor((_local2 / 1000) % 10) + 1);
_root.score_mc.s5.gotoAndStop(Math.floor((_local2 / 10000) % 10) + 1);
_root.score_mc.s6.gotoAndStop(Math.floor((_local2 / 100000) % 10) + 1);
_root.score_mc.s7.gotoAndStop(Math.floor((_local2 / 1000000) % 10) + 1);
}
}
Symbol 1428 MovieClip [__Packages.com.KidFighting.StageTimer] Frame 0
class com.KidFighting.StageTimer
{
function StageTimer () {
}
static function initialize() {
_tm.func = function () {
com.KidFighting.StageTimer._time--;
_root.gametimer_mc.t2.gotoAndStop(Math.floor(com.KidFighting.StageTimer._time % 10) + 1);
_root.gametimer_mc.t1.gotoAndStop(Math.floor(com.KidFighting.StageTimer._time / 10) + 1);
if (com.KidFighting.StageTimer._time < 10) {
ds.controls.SoundPlayer.playSound("Countdown");
}
if (com.KidFighting.StageTimer._time == 0) {
com.KidFighting.StageTimer.dispatchEvent({type:"timeOut"});
}
};
_tm.interval = 1000;
return(true);
}
static function pauseGame(evtObj) {
if (evtObj.value) {
_tm.stop();
} else {
_tm.start();
}
}
static function onRoundInit(evtObj) {
_tm.stop();
_time = 99;
_root.gametimer_mc.t1.gotoAndStop(10);
_root.gametimer_mc.t2.gotoAndStop(10);
}
static function onFightStart(evtObj) {
_tm.start();
}
static function onRoundEnd(evtObj) {
_tm.stop();
}
static var _tm = new ds.controls.Timer();
static var _time = 99;
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.StageTimer);
static var _inited = initialize();
}
Symbol 1429 MovieClip [__Packages.com.KidFighting.RoundGUI] Frame 0
class com.KidFighting.RoundGUI extends MovieClip
{
static var _gui;
function RoundGUI () {
super();
_gui = this;
}
static function initialize() {
_gui.gotoAndStop(1);
_twnF = new ds.transitions.Tween(null, "_currentframe", null, 1, 1, 1);
return(true);
}
static function getInstance() {
return(_gui.getInstanceAtDepth(-16383));
}
static function show(lableId, cb) {
_gui.gotoAndStop(lableId);
var callback = cb;
var _local1 = getInstance();
_twnF.obj = _local1;
_twnF.begin = 1;
_twnF.__set__finish(_twnF.__set__duration(_local1._totalframes));
_twnF.onMotionFinished = function () {
callback();
};
_twnF.start();
}
static function onRoundInit(evtObj) {
if (evtObj.round == 1) {
_twnF.stop();
gotoAndStop (1);
}
show(com.KidFighting.RoundGUI["ROUND" + evtObj.round], function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"fightStart"});
});
}
static function onRoundEnd(evtObj) {
if (evtObj.winnerLable == undefined) {
if (evtObj.timeout) {
show(TIMEOUT, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"nextRound"});
});
} else {
show(KO, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"nextRound"});
});
}
} else if (evtObj.timeout) {
if (evtObj.win == 0) {
show(TIMEOUT, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"nextRound"});
});
});
} else {
show(TIMEOUT, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"gameOver"});
});
});
}
} else if (evtObj.win == 0) {
show(KO, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"nextRound"});
});
});
} else {
show(KO, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"gameOver"});
});
});
}
}
static var ROUND1 = 2;
static var ROUND2 = 3;
static var ROUND3 = 4;
static var TIMEOUT = 5;
static var KO = 6;
static var _twnF = null;
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.RoundGUI);
static var _inited = initialize();
}
Symbol 1430 MovieClip [__Packages.com.KidFighting.BackgroundGUI] Frame 0
class com.KidFighting.BackgroundGUI extends MovieClip
{
static var _sprite, _playingSound;
function BackgroundGUI () {
super();
_sprite = this;
}
static function onRoundInit(evtObj) {
var _local2 = evtObj.enemyId;
if (_local2 != undefined) {
ds.controls.SoundPlayer.stopSound(_playingSound);
if (_local2 >= 6) {
_sprite.gotoAndStop(2);
_playingSound = "Music_loop_axegang";
_root.bg_item1.hide();
_root.bg_item2.hide();
_root.bg_item3.show();
_root.bg_item4.show();
} else {
_sprite.gotoAndStop(1);
_playingSound = "Music_loop_pigsty";
_root.bg_item1.show();
_root.bg_item2.show();
_root.bg_item3.hide();
_root.bg_item4.hide();
}
}
ds.controls.SoundPlayer.playSound(_playingSound, "loop");
}
static function onRoundEnd() {
ds.controls.SoundPlayer.stopSound(_playingSound);
}
static function onFightActivated(evtObj) {
for (var _local2 in _items) {
_items[_local2].fightActivated(evtObj);
}
}
static var _items = [_root.bg_item1, _root.bg_item2, _root.bg_item3, _root.bg_item4];
}
Symbol 1431 MovieClip [__Packages.com.KidFighting.StatusPanelGUI] Frame 0
class com.KidFighting.StatusPanelGUI extends MovieClip
{
static var _sprite;
function StatusPanelGUI () {
super();
_sprite = this;
}
static function suckSkills(aList) {
_sprite.skills_txt.text = "";
var _local3 = 0;
for (var _local4 in aList) {
_local3++;
}
for (var _local4 in aList) {
var _local1 = aList[_local4].keys;
_local1 = _local1.replace(com.KidFighting.Input.LEFT, "Back");
_local1 = _local1.replace(com.KidFighting.Input.RIGHT, "Forward");
_local1 = _local1.replace(com.KidFighting.Input.DOWN, "Down");
_local1 = _local1.replace(com.KidFighting.Input.UP, "Up");
_local1 = _local1.replace(com.KidFighting.Input.A, "Punch");
_local1 = _local1.replace(com.KidFighting.Input.S, "Kick");
if (aList[_local4].name == "Throw") {
_local1 = "Close " + _local1.replace(",", "+");
} else {
_local1 = _local1.replace(",", " ");
}
_sprite.skills_txt.text = (((_local3 + ":") + _local1) + newline) + _sprite.skills_txt.text;
_local3--;
}
}
static function onUpdateSkill(evtObj) {
suckSkills(evtObj.skillList);
}
}
Symbol 1432 MovieClip [__Packages.com.KidFighting.objects.CItem] Frame 0
class com.KidFighting.objects.CItem extends MovieClip
{
var area, hitArea, _twnF, _totalframes, name, gotoAndStop, _visible, hitTest;
function CItem () {
super();
if (area != undefined) {
hitArea = area;
}
reset();
hide();
}
function movBreak() {
if (breakable) {
breakable = false;
_twnF = new ds.transitions.Tween(this, "_currentframe", null, 1, _totalframes, _totalframes);
ds.controls.SoundPlayer.playSound("Crashing_" + name);
}
}
function reset() {
breakable = true;
gotoAndStop(1);
}
function fightActivated(evtObj) {
if (_visible && (breakable)) {
var _local2 = evtObj.activer.opponent;
if (hitTest(_local2.ani) && (((_local2.status == "hurt") || (_local2.status == "thrown")) || (_local2.status == "lose"))) {
movBreak();
}
}
}
function show() {
reset();
_visible = true;
}
function hide() {
_visible = false;
}
var breakable = true;
}
Symbol 1433 MovieClip [__Packages.com.KidFighting.items.ItemBarrels] Frame 0
class com.KidFighting.items.ItemBarrels extends com.KidFighting.objects.CItem
{
var name;
function ItemBarrels () {
super();
name = "barrels";
}
}
Symbol 1434 MovieClip [__Packages.com.KidFighting.items.ItemWoodentable] Frame 0
class com.KidFighting.items.ItemWoodentable extends com.KidFighting.objects.CItem
{
var name;
function ItemWoodentable () {
super();
name = "woodentable";
}
}
Symbol 1435 MovieClip [__Packages.com.KidFighting.items.ItemIronbell] Frame 0
class com.KidFighting.items.ItemIronbell extends com.KidFighting.objects.CItem
{
var name;
function ItemIronbell () {
super();
name = "ironbell";
}
}
Symbol 1436 MovieClip [__Packages.com.KidFighting.items.ItemCasino] Frame 0
class com.KidFighting.items.ItemCasino extends com.KidFighting.objects.CItem
{
var name;
function ItemCasino () {
super();
name = "casino";
}
}