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");
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));
};
ASSetPropFlags(String.prototype, null, 1);
ASSetPropFlags(Array.prototype, null, 1);
Symbol 120 MovieClip [BackgroundGUI_mc] Frame 1
#initclip 103
Object.registerClass("BackgroundGUI_mc", com.KidFighting.BackgroundGUI);
#endinitclip
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 169 MovieClip [item_barrels] Frame 1
#initclip 92
Object.registerClass("item_barrels", com.KidFighting.items.ItemBarrels);
#endinitclip
stop();
Symbol 179 MovieClip [item_table] Frame 1
#initclip 93
Object.registerClass("item_table", com.KidFighting.items.ItemWoodentable);
#endinitclip
stop();
Symbol 185 MovieClip [item_bell] Frame 1
#initclip 94
Object.registerClass("item_bell", com.KidFighting.items.ItemIronbell);
#endinitclip
stop();
Symbol 192 MovieClip [item_casino] Frame 1
#initclip 95
Object.registerClass("item_casino", com.KidFighting.items.ItemCasino);
#endinitclip
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 1
stop();
Symbol 562 MovieClip Frame 1
stop();
Symbol 654 MovieClip Frame 1
stop();
Symbol 751 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 1
stop();
Symbol 949 MovieClip Frame 1
stop();
Symbol 1049 MovieClip Frame 1
stop();
Symbol 1149 MovieClip Frame 1
stop();
Symbol 1270 MovieClip Frame 1
stop();
Symbol 1354 MovieClip Frame 1
stop();
Symbol 1368 MovieClip Frame 21
Symbol 1378 MovieClip [characterManager_mc] Frame 1
#initclip 96
Object.registerClass("characterManager_mc", com.KidFighting.CharacterManager);
#endinitclip
Symbol 1379 MovieClip [effect_mc] Frame 1
#initclip 97
Object.registerClass("effect_mc", com.KidFighting.EffectSys);
#endinitclip
Symbol 1382 MovieClip Frame 1
stop();
Symbol 1397 MovieClip Frame 1
stop();
Symbol 1411 MovieClip Frame 1
stop();
Symbol 1424 MovieClip Frame 1
stop();
Symbol 1435 MovieClip Frame 1
stop();
Symbol 1463 MovieClip Frame 62
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1490 MovieClip Frame 42
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1517 MovieClip Frame 42
ds.controls.SoundPlayer.playSound("Fight");
Symbol 1549 MovieClip Frame 1
stop();
Symbol 1583 MovieClip [roundGUI_mc] Frame 1
#initclip 98
Object.registerClass("roundGUI_mc", com.KidFighting.RoundGUI);
#endinitclip
stop();
Symbol 1591 MovieClip Frame 1
stop();
Symbol 1593 MovieClip Frame 1
stop();
Symbol 1595 MovieClip Frame 1
stop();
Symbol 1597 MovieClip Frame 1
stop();
Symbol 1602 MovieClip Frame 1
stop();
Symbol 1604 MovieClip Frame 1
stop();
Symbol 1606 MovieClip Frame 1
stop();
Symbol 1608 MovieClip Frame 1
stop();
Symbol 1632 MovieClip [StatusPanelGUI_mc] Frame 1
#initclip 99
Object.registerClass("StatusPanelGUI_mc", com.KidFighting.StatusPanelGUI);
#endinitclip
Symbol 1637 MovieClip Frame 1
stop();
Symbol 1639 MovieClip Frame 1
stop();
Symbol 1652 MovieClip Frame 1
stop();
Symbol 1659 MovieClip Frame 1
stop();
Symbol 1664 MovieClip Frame 1
stop();
Symbol 1669 MovieClip Frame 1
stop();
Symbol 1674 MovieClip Frame 1
stop();
Symbol 1681 MovieClip Frame 1
stop();
Symbol 1688 MovieClip Frame 1
stop();
Symbol 1693 MovieClip Frame 1
stop();
Symbol 1698 MovieClip Frame 1
stop();
Symbol 1703 MovieClip Frame 1
stop();
Symbol 1704 MovieClip Frame 21
stop();
Symbol 1705 MovieClip Frame 1
stop();
Symbol 1717 MovieClip Frame 1
stop();
Symbol 1718 MovieClip [SelectCharacterGUI_mc] Frame 1
#initclip 100
Object.registerClass("SelectCharacterGUI_mc", com.KidFighting.SelectCharacterGUI);
#endinitclip
stop();
Symbol 1724 MovieClip Frame 8
if (com.KidFighting.GameOverGUI.isLoggedin) {
submit_mc._visible = true;
} else {
submit_mc._visible = false;
}
Symbol 1724 MovieClip Frame 25
submit_mc.onRelease = function () {
com.KidFighting.GameOverGUI.submitHighScore();
};
replay_mc.onRelease = function () {
com.KidFighting.GameOverGUI.replay();
};
stop();
Symbol 1734 MovieClip Frame 274
if (com.KidFighting.GameOverGUI.isLoggedin) {
submit_btn._visible = true;
} else {
submit_btn._visible = false;
}
Symbol 1734 MovieClip Frame 291
stop();
submit_btn.onRelease = function () {
com.KidFighting.GameOverGUI.submitHighScore();
};
replay_btn.onRelease = function () {
com.KidFighting.GameOverGUI.replay();
};
Symbol 1735 MovieClip [GameOverGUI_mc] Frame 1
#initclip 101
Object.registerClass("GameOverGUI_mc", com.KidFighting.GameOverGUI);
#endinitclip
Symbol 1743 MovieClip [startGameGUI] Frame 1
#initclip 102
Object.registerClass("startGameGUI", com.KidFighting.StartGameGUI);
#endinitclip
stop();
Symbol 3 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 1745 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 1746 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 1747 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 4 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;
}
function isRunning() {
return(m_timerId != -1);
}
var m_timerId = -1;
}
Symbol 1748 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);
if (player2.brother != undefined) {
player2.brother.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);
if (player2.brother != undefined) {
player2.brother.addEventListener("onFightActivated", com.KidFighting.FightTrigger);
}
player2.addEventListener("onFightActivated", com.KidFighting.FightTrigger);
}
static function onFightActivated(evtObj) {
if ((player1.status == "lose") || (player2.status == "lose")) {
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.direction == "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", hurtEff:evtObj.blockHitEff});
} else {
updateInput({activer:_local1, motion:"blockUp", hurtEff:evtObj.blockHitEff});
}
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 (player2.brother) {
player2.brother.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 1749 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 1750 MovieClip [__Packages.com.KidFighting.AiController] Frame 0
class com.KidFighting.AiController
{
var _timer, _owner, skillKeyList, dispatchEvent;
function AiController () {
_timer = new ds.controls.Timer();
_timer.interval = 33;
_timer.func = mx.utils.Delegate.create(this, update);
}
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("");
//return(owner);
}
function getDistance() {
return(Math.abs(owner.ani._x - owner.opponent.ani._x));
}
function getFlyItemSkill() {
for (var _local2 in owner.skillList) {
if (owner.skillList[_local2].type == "flyItem") {
return(owner.skillList[_local2]);
}
}
return(null);
}
function update() {
var _local8 = com.KidFighting.AiController;
var _local10 = "nothing";
var _local13;
var _local3 = false;
if ((random(3) == 1) && (getDistance() > 80)) {
var _local2 = getFlyItemSkill();
if (_local2 != null) {
_local10 = "skill";
var _local7 = _local2.keys;
_local3 = true;
}
} else if (getDistance() > 80) {
_local10 = "move";
if (random(2) == 1) {
_local13 = ((owner.side == 1) ? "right" : "left");
} else if (random(4) == 1) {
_local10 = "jump";
_local13 = ((owner.side == 1) ? "right" : "left");
} else if (random(5) == 1) {
_local10 = "skill";
}
} else if (random(2) == 1) {
_local10 = "skill";
} else if (random(7) == 1) {
_local10 = "down";
} else if (random(5) == 1) {
_local10 = "jump";
_local13 = directionList[random(directionList.length)];
} else {
_local10 = "move";
_local13 = directionList[random(directionList.length)];
}
if ((owner.uniqueId > 7) && (!_local3)) {
var _local4 = owner.opponent.status;
var _local6;
var _local5;
switch (_local4) {
case "block" :
if (getDistance() < 45) {
_local6 = true;
_local5 = true;
}
break;
case "skill" :
if (random(2) == 1) {
_local10 = "jump";
_local13 = ((owner.side == 1) ? "right" : "left");
} else {
_local10 = "skill";
}
if (getDistance() < 60) {
_local10 = "move";
_local13 = ((owner.side == 1) ? "left" : "right");
}
break;
case "normal" :
case "left" :
case "right" :
if (getDistance() > 50) {
_local10 = "move";
_local13 = ((owner.side == 1) ? "right" : "left");
} else if (random(2) == 1) {
_local10 = "skill";
}
break;
}
}
if (((owner.isInvincible || (owner.direction == "up")) || (owner.status == "hurt")) || (owner.status == "cought")) {
return(undefined);
}
if (_local10 == "skill") {
if (_local7 == undefined) {
var _local7 = skillKeyList[random(skillKeyList.length)];
}
if (_local6 == undefined) {
var _local6 = Boolean(random(2));
}
if (_local5 == undefined) {
var _local5 = Boolean(random(2));
}
dispatchEvent({activer:owner, type:"updateInput", motion:"skill", skillKeys:_local7, isPunch:_local6, isKick:_local5});
} else {
dispatchEvent({activer:owner, type:"updateInput", motion:_local10, direction:_local13});
}
if (owner.uniqueId > 7) {
if ((((owner.status != "skill") && (owner.status != "kick")) && (owner.status != "punch")) && (owner.direction != "up")) {
owner.direction = ((owner.side == -1) ? "right" : "left");
}
}
}
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"];
}
Symbol 1751 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 1752 MovieClip [__Packages.com.KidFighting.StartGameGUI] Frame 0
class com.KidFighting.StartGameGUI extends MovieClip
{
static var _sprite;
var startgame_btn;
function StartGameGUI () {
super();
_sprite = this;
startgame_btn.onRelease = function () {
com.KidFighting.StartGameGUI.onReleaseFunc();
};
}
static function onReleaseFunc() {
hide();
com.KidFighting.Game.main();
}
static function show() {
_sprite._visible = true;
}
static function hide() {
_sprite._visible = false;
}
}
Symbol 1753 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";
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 1754 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, maxShow:history.length});
}
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 < 10) {
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();
} else if (evtObj.command == "traceStatus") {
com.KidFighting.FightTrigger.player1.traceStatus();
com.KidFighting.FightTrigger.player2.traceStatus();
} else if (evtObj.command == "decLife") {
com.KidFighting.FightTrigger.player2.crtHP = 1;
}
}
static var history = [];
static var mRnd = 1;
static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.Story);
static var _inited = initialize();
}
Symbol 1755 MovieClip [__Packages.com.KidFighting.objects.CObject] Frame 0
class com.KidFighting.objects.CObject
{
var ani;
function CObject () {
}
function destroy() {
ani.removeMovieClip();
}
}
Symbol 5 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 1756 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, _performedSkill, crtHP, orgX, side, ani, isInvincible, 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 performingSkill() {
return(_performedSkill);
}
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;
if ((status == "left") || (status == "right")) {
movNormal();
}
}
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.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;
var jumpStep = Math.round(jump / 15);
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, jumpStep, function () {
o.startYTween(mx.transitions.easing.Regular.easeIn, o.orgY, jumpStep, function () {
o.correctPosition();
o.correctOffside();
if (o.status != "hurt") {
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;
var jumpStep = Math.round(jump / 15);
startXTween(null, _local2, jumpStep * 2);
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, jumpStep, function () {
o.startYTween(mx.transitions.easing.Regular.easeIn, o.orgY, jumpStep, function () {
o.correctPosition();
o.correctOffside();
if (o.status != "hurt") {
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;
var jumpStep = Math.round(jump / 15);
startXTween(null, -_local2, jumpStep * 2);
startYTween(mx.transitions.easing.Strong.easeOut, ani._y - jump, jumpStep, function () {
o.startYTween(mx.transitions.easing.Regular.easeIn, o.orgY, jumpStep, function () {
o.correctPosition();
o.correctOffside();
if (o.status != "hurt") {
o.movNormal();
}
});
});
}
function mtPower() {
status = "punch";
direction = "";
updaterObj.onEnterFrame = function () {
if (this.updater.hitTest()) {
delete this.onEnterFrame;
}
};
updateSide();
var o = this;
onceAni(lbP2, function () {
o.movNormal();
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtKick() {
status = "kick";
direction = "";
updaterObj.onEnterFrame = function () {
if (this.updater.hitTest()) {
delete this.onEnterFrame;
}
};
updateSide();
var o = this;
onceAni(lbK2, function () {
o.movNormal();
});
ds.controls.SoundPlayer.playSound("BasicAttack_" + sex);
}
function mtDownPower() {
status = "punch";
direction = "down";
updaterObj.onEnterFrame = function () {
if (this.updater.hitTest()) {
delete this.onEnterFrame;
}
};
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 () {
if (this.updater.hitTest()) {
delete this.onEnterFrame;
}
};
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(hurtEff) {
startInvincible(0.1);
status = "block";
updateSide();
var o = this;
onceAni(lbUpB, function () {
o.movNormal();
});
if (!isOnEdge()) {
startXTween(null, (-side) * (opponent.strength * 3), 7);
} else if ((opponent.status != "skill") && (_performedSkill.type != "flyItem")) {
opponent.startXTween(null, side * (opponent.strength * 2), 5);
}
ds.controls.SoundPlayer.playSound("Block");
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 45);
}
}
function mtBlockDown(hurtEff) {
startInvincible(0.1);
status = "block";
var oldDirection = direction;
updateSide();
var o = this;
onceAni(lbDnB, function () {
if (o.direction == oldDirection) {
o.status = "down";
o.ani.gotoAndStop(o.lbDn);
o.getInstance().gotoAndStop(o.getInstance()._totalframes);
} else {
o.movStandUp();
}
});
if (!isOnEdge()) {
startXTween(null, (-side) * (opponent.strength * 3), 7);
} else if ((opponent.status != "skill") && (_performedSkill.type != "flyItem")) {
opponent.startXTween(null, side * (opponent.strength * 2), 5);
}
ds.controls.SoundPlayer.playSound("Block");
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 15);
}
}
function isOnEdge(off) {
if (off == undefined) {
off = 5;
}
if ((ani._x < (50 + off)) || (ani._x > (Stage.width - (50 + off)))) {
return(true);
}
return(false);
}
function mtBlastHurt(hurtEff) {
updaterObj.onEnterFrame = undefined;
status = "thrown";
side = -opponent.side;
updateSide();
var o = this;
onceAni(lbThrown, function () {
o.movNormal();
o.startInvincible(0.1);
});
startXTween(null, (-side) * (70 + (opponent.strength * 5)), 6 + Math.abs(Math.round((o.orgY - o.ani._y) / 9)));
if ((direction == "up") || (status == "jump")) {
_twnY.stop();
startYTween(null, ani._y - 10, 6, function () {
o.startYTween(null, o.orgY, Math.abs(Math.round((o.orgY - o.ani._y) / 9)), function () {
o.correctPosition();
o.correctOffside();
});
});
}
if (isOnEdge()) {
if ((opponent.status != "skill") && (_performedSkill.type != "flyItem")) {
opponent.startXTween(null, side * 30, 7, null);
}
}
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (random(10) * side), (ani._y - 30) - random(30));
}
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;
status = "hurt";
if (!isOnEdge()) {
startXTween(null, (-side) * (opponent.strength * 5), 7, null);
} else if ((opponent.status != "skill") && (_performedSkill.type != "flyItem")) {
opponent.startXTween(null, side * (opponent.strength * 3), 7, null);
}
onceAni(lbH1, function () {
o.movNormal();
o.startInvincible(0.1);
});
side = -opponent.side;
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();
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) {
if (HP > 0) {
status = "hurt";
var o = this;
side = -opponent.side;
updateSide();
onceAni(lbH1, function () {
o.movNormal();
o.startInvincible(0.1);
});
if (!isOnEdge()) {
startXTween(null, (-side) * (opponent.strength * 5), 5);
} else if ((opponent.status != "skill") && (_performedSkill.type != "flyItem")) {
opponent.startXTween(null, side * (opponent.strength * 3), 5);
}
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 15);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
} else {
movLose();
if (hurtEff != "nothing") {
com.KidFighting.EffectSys.generate(hurtEff, null, this, ani._x + (10 * side), ani._y - 15);
}
ds.controls.SoundPlayer.playSound("ConnectedHit");
}
}
function mtCought() {
_twnX.stop();
_twnY.stop();
updaterObj.onEnterFrame = undefined;
status = "cought";
direction = "";
ani._x = opponent.ani._x - (side * 5);
ani._y = orgY - 15;
side = -opponent.side;
onceAni(lbCought);
}
function mtThrown() {
updaterObj.onEnterFrame = undefined;
status = "thrown";
direction = "";
var o = this;
onceAni(lbThrown, function () {
o.movNormal();
o.startInvincible(0.8);
});
startXTween(null, side * (100 + (opponent.strength * 8)), 10);
startYTween(null, orgY, 4);
}
function movLoseTimeOut() {
status = "lose";
updateSide();
onceAni(lbLose);
}
function movLose() {
if (status != "thrown") {
updateSide();
onceAni(lbHDie);
startXTween(null, (-side) * (130 + (opponent.strength * 10)), 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 _local4 = ((blockHitEff == undefined) ? "Block" : (blockHitEff));
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.side == 1)) && (opponent.direction == "left")) || (((side == 1) && (opponent.side == -1)) && (opponent.direction == "right"))) {
dispatchEvent({type:"onFightActivated", activer:this, getHurt:false, blockHitEff:_local4, blockHitValue:blockHitValue});
return(-1);
}
dispatchEvent({type:"onFightActivated", activer:this, getHurt:true, hitEff:hitEff, hurtValue:hitValue, isNoAnimation:_local3, hurtFunc:aniFunc});
return(1);
}
}
return(0);
}
function doMotion(evtObj) {
var _local3 = evtObj.motion;
var _local5 = evtObj.direction;
var _local2 = "";
var _local6;
var _local8 = false;
if (((((_local3 == "win") || (_local3 == "lose")) || (_local3 == "intro")) || (_local3 == "hurtUp")) || (_local3 == "hurtDown")) {
if ((status == "skill") && (!_performedSkill.invincible)) {
setSkillMotionFinished(_performedSkill);
_local8 = true;
} else if ((status != "thrown") && (status != "hurt")) {
_local8 = 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 (_local8 || ((((((((status != "jump") && (status != "punch")) && (status != "kick")) && (status != "hurt")) && (status != "cought")) && (status != "thrown")) && (status != "skill")) && (status != "block"))) {
if ((_local3 == "skill") && (direction != "up")) {
if ((((status == "left") || (status == "right")) || (status == "normal")) || (status == "down")) {
var _local7;
if (evtObj.isPunch && (evtObj.isKick)) {
_local7 = getSkillByName("Throw");
} else {
_local7 = getSkill(evtObj.skillKeys);
}
if (_local7 != null) {
_local2 = "doSkill";
_local6 = _local7.name;
} else if (evtObj.isPunch) {
if (status == "down") {
_local2 = "mtDownPower";
} else {
_local2 = "mtPower";
}
} else if (evtObj.isKick) {
if (status == "down") {
_local2 = "mtDownKick";
} else {
_local2 = "mtKick";
}
}
}
} else 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") || (status == "jump")) {
_local2 = "mtBlastHurt";
} else {
_local2 = "mtHurtUp";
}
_local6 = evtObj.hurtEff;
}
} else if (_local3 == "hurtDown") {
if (status != "hurt") {
if ((direction == "up") || (status == "jump")) {
_local2 = "mtBlastHurt";
} else {
_local2 = "mtHurtDown";
}
_local6 = evtObj.hurtEff;
}
} else if (_local3 == "blockUp") {
if (status != "block") {
_local2 = "mtBlockUp";
_local6 = evtObj.hurtEff;
}
} else if (_local3 == "blockDown") {
if (status != "block") {
_local2 = "mtBlockDown";
_local6 = evtObj.hurtEff;
}
} 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 != "") {
if (_local2 != "doSkill") {
updaterObj.onEnterFrame = undefined;
}
this[_local2](_local6);
}
}
}
function doSkill(skl) {
if (typeof(skl) == "string") {
skl = getSkillByName(skl);
}
if (_performedSkill != null) {
return(undefined);
}
if (skl.condition()) {
updaterObj.onEnterFrame = undefined;
status = "skill";
direction = "";
var o = this;
onceAni(skl.lable, function () {
o.movNormal();
o.correctPosition();
o.correctOffside();
});
setSkillMotionStarted(skl);
}
}
function setSkillMotionStarted(skl) {
if (skl.type != "call") {
_performedSkill = skl;
}
skl.perform();
}
function setSkillMotionFinished(skl) {
if ((status != "win") || (status != "lose")) {
if (skl.performing) {
_twnF.stop();
if (skl.effect != undefined) {
skl.onMotionStopped();
}
}
_performedSkill = null;
}
}
function getCoughtCondition() {
if ((((((((HP > 0) && (!isInvincible)) && (status != "thrown")) && (status != "kick")) && (status != "punch")) && (status != "hurt")) && (direction != "up")) && (Math.abs(ani._x - opponent.ani._x) < 42)) {
if (_performedSkill != null) {
if (_performedSkill.type == "self") {
return(false);
}
}
return(true);
}
return(false);
}
function traceStatus() {
}
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 6 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 7 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 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 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 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 1757 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 1758 MovieClip [__Packages.com.KidFighting.objects.CSkill] Frame 0
class com.KidFighting.objects.CSkill
{
var type, performing, invincible, _lable, _observer;
function CSkill () {
type = "item";
performing = false;
invincible = false;
}
function set lable(lb) {
_lable = lb;
//return(lable);
}
function get lable() {
return(_lable);
}
function onMotionFinished() {
}
function onMotionStopped() {
}
function onMotionUpdated() {
}
function condition() {
return(!performing);
}
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);
}
}
Symbol 8 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 onEnterFrame() {
broadcastMessage("onMotionUpdated", observingTween);
}
function toString() {
return("[TweenObserver]");
}
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);
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(ds.transitions.TweenObserver.prototype);
}
Symbol 1759 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 1760 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
}
Symbol 1761 MovieClip [__Packages.com.KidFighting.EffectSys] Frame 0
class com.KidFighting.EffectSys extends MovieClip
{
static var _es, addEventListener, dispatchEvent, removeEventListener;
function EffectSys () {
super();
_es = this;
com.KidFighting.effects.EffHurt;
com.KidFighting.effects.EffBlock;
com.KidFighting.effects.EffSlice;
com.KidFighting.effects.EffYell;
com.KidFighting.effects.EffWave;
com.KidFighting.effects.EffAxe;
com.KidFighting.effects.EffDynamite;
com.KidFighting.effects.EffExplosion;
com.KidFighting.effects.EffScissors;
com.KidFighting.effects.EffBottle;
com.KidFighting.effects.EffKnife;
com.KidFighting.effects.EffBlade;
com.KidFighting.effects.EffBuddhistPalm;
com.KidFighting.effects.EffIcecream;
com.KidFighting.effects.EffIcecreamSplash;
com.KidFighting.effects.EffBottleSplash;
}
static function generate(clsName, twn, ch, x, y) {
var _local1;
var _local3;
if (clsName == undefined) {
clsName = "Hurt";
}
if (typeof(clsName) == "string") {
_local3 = _es.attachMovie(("eff" + clsName) + "_mc", "eff" + _es.getNextHighestDepth(), _es.getNextHighestDepth());
}
_local1 = new com.KidFighting.effects["Eff" + clsName](_local3, twn, ch, x, y);
if (_local1 == null) {
_local3.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 1762 MovieClip [__Packages.com.KidFighting.objects.CEffect] Frame 0
class com.KidFighting.objects.CEffect extends com.KidFighting.objects.CObject
{
var _twn, ani, visX, visY, 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;
visX = x;
visY = 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 != "cought")) && (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;
ani.owner = null;
destroy();
}
function start() {
ani._x = visX;
ani._y = visY;
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 1763 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 1764 MovieClip [__Packages.com.KidFighting.effects.EffBlock] Frame 0
class com.KidFighting.effects.EffBlock extends com.KidFighting.objects.CEffect
{
var init;
function EffBlock ($ani, twn, ch, x, y) {
super();
$ani._rotation = random(360);
init($ani, twn, ch, x, y);
}
}
Symbol 1765 MovieClip [__Packages.com.KidFighting.effects.EffSlice] Frame 0
class com.KidFighting.effects.EffSlice extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffSlice ($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 = 20;
}
Symbol 1766 MovieClip [__Packages.com.KidFighting.effects.EffYell] Frame 0
class com.KidFighting.effects.EffYell extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffYell ($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 = 30;
}
Symbol 1767 MovieClip [__Packages.com.KidFighting.effects.EffWave] Frame 0
class com.KidFighting.effects.EffWave extends com.KidFighting.objects.CEffect
{
var type, init, ani, owner, stop, hurtValue;
function EffWave ($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 = 18;
}
Symbol 1768 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 1769 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, y, 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, "Explosion")) {
stop();
} else if (ani._y >= owner.orgY) {
skill.explode(ani._x);
stop();
}
}
function destroy() {
super.destroy();
delete _twnY;
}
function onPauseGame() {
super.onPauseGame();
if (_twnY.isPlaying) {
_twnY.pause();
}
}
function onResumeGame() {
super.onResumeGame();
_twnY.resume();
}
var movingSpeed = 15;
}
Symbol 1770 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 1771 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 1772 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 1773 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 1774 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 1775 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 1776 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 1777 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, y, 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, "IcecreamSplash")) {
stop();
} else if (ani._y >= owner.orgY) {
skill.explode(ani._x);
stop();
}
}
function destroy() {
super.destroy();
delete _twnY;
}
function onPauseGame() {
super.onPauseGame();
if (_twnY.isPlaying) {
_twnY.pause();
}
}
function onResumeGame() {
super.onResumeGame();
_twnY.resume();
}
var movingSpeed = 15;
}
Symbol 1778 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 1779 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 1780 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 = 80;
speed = 8;
strength = 8;
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 1781 MovieClip [__Packages.com.KidFighting.skills.SklKnife] Frame 0
class com.KidFighting.skills.SklKnife extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, 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;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1782 MovieClip [__Packages.com.KidFighting.skills.SklDynamite] Frame 0
class com.KidFighting.skills.SklDynamite extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect2, 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;
type = "flyItem";
}
function condition() {
if (effect2 && (effect2.performing)) {
return(false);
}
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 30), owner.orgY - 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) {
effect2 = com.KidFighting.EffectSys.generate("Explosion", null, owner, x, owner.orgY);
effect2.owner = owner;
effect2.hurtValue = hurtValue2;
effect2.addEffectListener(this);
}
function onMotionStopped() {
if (effect2.performing) {
return(undefined);
}
effect2.removeEffectListener(this);
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
var hurtValue2 = 2;
}
Symbol 1783 MovieClip [__Packages.com.KidFighting.skills.SklThrow] Frame 0
class com.KidFighting.skills.SklThrow extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, invincible, owner, performing, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklThrow () {
super();
name = "Throw";
keys = (com.KidFighting.Input.A + ",") + com.KidFighting.Input.S;
effStartFrame = 6;
hurtValue = 25;
type = "self";
invincible = true;
}
function condition() {
return(owner.opponent.getCoughtCondition());
}
function perform() {
performing = true;
owner.startInvincible(0.8);
hurtValue = owner.strength * 3;
owner.opponent.mtCought();
if (owner.ani.getDepth() < owner.opponent.ani.getDepth()) {
owner.ani.swapDepths(owner.opponent.ani);
}
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);
if (owner.isOnEdge(20)) {
owner.correctPosition();
}
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1784 MovieClip [__Packages.com.KidFighting.skills.SklBuddhishPalm] Frame 0
class com.KidFighting.skills.SklBuddhishPalm extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklBuddhishPalm () {
super();
name = "BuddhistPalm";
keys = (((com.KidFighting.Input.DOWN + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 5;
hurtValue = 18;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1785 MovieClip [__Packages.com.KidFighting.skills.SklFly] Frame 0
class com.KidFighting.skills.SklFly extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, hit, movingSpeed, owner, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklFly () {
super();
name = "Fly";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 4;
hurtValue = 15;
type = "self";
}
function perform() {
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 1786 MovieClip [__Packages.com.KidFighting.characters.MaleFighter] Frame 0
class com.KidFighting.characters.MaleFighter extends com.KidFighting.characters.Sing
{
var m_skillList, addSkill, skill5, skill4, skill3, skill2, skill1;
function MaleFighter () {
super();
delete m_skillList;
m_skillList = {};
addSkill(skill5);
addSkill(skill4);
addSkill(skill3);
addSkill(skill2);
addSkill(skill1);
}
function autoAddSkill() {
}
}
Symbol 1787 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, lbS2, addSkill, skill2, lbS1, skill3, lbCatch, skill4, lbS4, skill5, lbS5;
function Fong () {
super();
uniqueId = 2;
name = "Fong";
sex = "female";
maxHP = 100;
jump = 90;
speed = 10;
strength = 5;
winLable = 8;
skill1 = new com.KidFighting.skills.SklBottle();
skill1.lable = lbS2;
addSkill(skill1);
skill2 = new com.KidFighting.skills.SklIcecream();
skill2.lable = lbS1;
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 1788 MovieClip [__Packages.com.KidFighting.skills.SklBottle] Frame 0
class com.KidFighting.skills.SklBottle extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklBottle () {
super();
name = "Bottle";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 10;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1789 MovieClip [__Packages.com.KidFighting.skills.SklIcecream] Frame 0
class com.KidFighting.skills.SklIcecream extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner, effect2;
function SklIcecream () {
super();
name = "Icecream";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.S;
effStartFrame = 3;
hurtValue = 15;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 30), owner.orgY - 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) {
effect2 = com.KidFighting.EffectSys.generate("IcecreamSplash", null, owner, x, owner.orgY);
effect2.addEffectListener(this);
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1790 MovieClip [__Packages.com.KidFighting.skills.SklBlade] Frame 0
class com.KidFighting.skills.SklBlade extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklBlade () {
super();
name = "Blade";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 15;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1791 MovieClip [__Packages.com.KidFighting.skills.SklDragon] Frame 0
class com.KidFighting.skills.SklDragon extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, 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;
type = "self";
}
function perform() {
owner.startInvincible(0.2);
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) && (twn.obj._currentframe < 13)) {
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 1792 MovieClip [__Packages.com.KidFighting.characters.FemaleFighter] Frame 0
class com.KidFighting.characters.FemaleFighter extends com.KidFighting.characters.Fong
{
var m_skillList, addSkill, skill5, skill4, skill3, skill2, skill1;
function FemaleFighter () {
super();
delete m_skillList;
m_skillList = {};
addSkill(skill5);
addSkill(skill4);
addSkill(skill3);
addSkill(skill2);
addSkill(skill1);
}
function autoAddSkill() {
}
}
Symbol 1793 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 = 55;
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 1794 MovieClip [__Packages.com.KidFighting.skills.SklBoneRush] Frame 0
class com.KidFighting.skills.SklBoneRush extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklBoneRush () {
super();
name = "BoneRush";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 17;
type = "self";
}
function perform() {
owner.startInvincible(0.1);
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 1795 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 1796 MovieClip [__Packages.com.KidFighting.skills.SklScissors] Frame 0
class com.KidFighting.skills.SklScissors extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklScissors () {
super();
name = "Scissors";
keys = (((com.KidFighting.Input.DOWN + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 4;
hurtValue = 10;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1797 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 = 70;
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 1798 MovieClip [__Packages.com.KidFighting.skills.SklTailorRotate] Frame 0
class com.KidFighting.skills.SklTailorRotate extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, maxHit, owner, performing, hit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklTailorRotate () {
super();
name = "TailorRotate";
keys = (((com.KidFighting.Input.RIGHT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 18;
type = "self";
}
function perform() {
maxHit = 3;
owner.startInvincible(0.1);
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) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
}
} else if ((maxHit--) > 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
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 1799 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 = 75;
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 1800 MovieClip [__Packages.com.KidFighting.skills.SklCoolieKick] Frame 0
class com.KidFighting.skills.SklCoolieKick extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, owner, maxHit, 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.S;
effStartFrame = 3;
hurtValue = 15;
type = "self";
}
function perform() {
performing = true;
owner.startInvincible(0.1);
maxHit = 4;
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) && (twn.obj._currentframe < 15)) {
if (!hit) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
}
} else if ((maxHit--) == 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
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 1801 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 = 85;
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 1802 MovieClip [__Packages.com.KidFighting.skills.SklDonutStick] Frame 0
class com.KidFighting.skills.SklDonutStick extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, owner, maxHit, hit, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklDonutStick () {
super();
name = "DonutStick";
keys = (((((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 3;
hurtValue = 18;
type = "self";
}
function perform() {
performing = true;
owner.startInvincible(0.1);
maxHit = 5;
hit = false;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("donut_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
ds.controls.SoundPlayer.playSound("tin_special1_2");
}
} else if ((maxHit--) > 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1803 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 = 70;
speed = 9;
strength = 10;
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 1804 MovieClip [__Packages.com.KidFighting.skills.SklAxe] Frame 0
class com.KidFighting.skills.SklAxe extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklAxe () {
super();
name = "Axe";
keys = (((com.KidFighting.Input.DOWN + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 5;
hurtValue = 15;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 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 1805 MovieClip [__Packages.com.KidFighting.characters.Landlord] Frame 0
class com.KidFighting.characters.Landlord extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Landlord () {
super();
uniqueId = 9;
name = "Landlord";
maxHP = (crtHP = 100);
jump = 80;
speed = 8;
strength = 10;
winLable = 15;
var _local3 = new com.KidFighting.skills.SklWave();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1806 MovieClip [__Packages.com.KidFighting.skills.SklWave] Frame 0
class com.KidFighting.skills.SklWave extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklWave () {
super();
name = "Wave";
keys = (((((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 5;
hurtValue = 20;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("landlord_special1");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1807 MovieClip [__Packages.com.KidFighting.characters.Landlady] Frame 0
class com.KidFighting.characters.Landlady extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch;
function Landlady () {
super();
uniqueId = 10;
name = "Landlady";
maxHP = (crtHP = 100);
jump = 40;
speed = 4;
strength = 20;
winLable = 16;
var _local3 = new com.KidFighting.skills.SklYell();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
}
}
Symbol 1808 MovieClip [__Packages.com.KidFighting.skills.SklYell] Frame 0
class com.KidFighting.skills.SklYell extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklYell () {
super();
name = "Yell";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 7;
hurtValue = 25;
type = "flyItem";
}
function condition() {
return((!effect.performing) && (super.condition()));
}
function perform() {
performing = true;
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("landlady_special1");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1809 MovieClip [__Packages.com.KidFighting.characters.Tim] Frame 0
class com.KidFighting.characters.Tim extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbCatch, brother, status, onceAni, lbWin, shadow;
function Tim () {
super();
uniqueId = 11;
name = "Tim";
maxHP = (crtHP = 100);
jump = 80;
speed = 12;
strength = 8;
winLable = 17;
var _local3 = new com.KidFighting.skills.SklTimStrike();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklCallBrotherSlice();
_local3.lable = 1;
addSkill(_local3);
brother = new com.KidFighting.characters.Dey(this);
brother.ani = com.KidFighting.CharacterManager.generateInstance("ch_dey");
}
function movWin() {
super.movWin();
brother.movWin();
status = "win";
onceAni(lbWin);
shadow.destroy();
shadow = undefined;
}
function destroy() {
super.destroy();
brother.destroy();
}
function setup(side) {
super.setup(side);
brother.setup(side);
}
}
Symbol 1810 MovieClip [__Packages.com.KidFighting.skills.SklTimStrike] Frame 0
class com.KidFighting.skills.SklTimStrike extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, hit, maxHit, owner, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklTimStrike () {
super();
name = "TimStrike";
keys = (((((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.DOWN) + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 7;
hurtValue = 25;
type = "self";
}
function perform() {
performing = true;
hit = false;
maxHit = 8;
owner.updateSide();
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("tin_special1_1");
}
function onMotionUpdated(twn) {
if ((twn.obj._currentframe > effStartFrame) && (twn.obj._currentframe < 13)) {
if (!hit) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
ds.controls.SoundPlayer.playSound("tin_special1_2");
}
} else if ((maxHit--) > 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
owner.ani._x = owner.ani._x + movingSpeed;
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 60;
}
Symbol 1811 MovieClip [__Packages.com.KidFighting.skills.SklCallBrotherSlice] Frame 0
class com.KidFighting.skills.SklCallBrotherSlice extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, type, owner;
function SklCallBrotherSlice () {
super();
name = "CallBrotherSlice";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.S;
effStartFrame = 1;
type = "call";
}
function condition() {
return(owner.brother.skill.condition());
}
function perform() {
owner.brother.doSkill(owner.brother.skill.name);
}
}
Symbol 1812 MovieClip [__Packages.com.KidFighting.characters.Dey] Frame 0
class com.KidFighting.characters.Dey extends com.KidFighting.objects.CCharacter
{
var lbWin, name, maxHP, crtHP, skill, addSkill, brother, ani, movNormal;
function Dey (myBrother) {
super();
lbWin = 3;
name = "Dey";
maxHP = (crtHP = 100);
skill = new com.KidFighting.skills.SklSlice();
skill.lable = 2;
addSkill(skill);
brother = myBrother;
}
function setup(side) {
super.setup(side);
ani._x = 580;
movNormal();
}
}
Symbol 1813 MovieClip [__Packages.com.KidFighting.skills.SklSlice] Frame 0
class com.KidFighting.skills.SklSlice extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, effect, performing, owner;
function SklSlice () {
super();
name = "Slice";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.LEFT) + ",") + com.KidFighting.Input.S;
effStartFrame = 3;
hurtValue = 15;
type = "flyItem";
}
function condition() {
return(super.condition() && (!effect.performing));
}
function perform() {
performing = true;
owner.startInvincible(0.1);
effect = com.KidFighting.EffectSys.generate(name, owner._twnF, owner, owner.ani._x + (owner.side * 5), owner.orgY - 35);
effect.effStartFrame = effStartFrame;
effect.hurtValue = hurtValue;
effect.looping = true;
effect.movingSpeed = owner.side * effect.movingSpeed;
effect.addEffectListener(this);
ds.controls.SoundPlayer.playSound("tin_special2");
}
function onMotionStopped() {
effect.removeEffectListener(this);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1814 MovieClip [__Packages.com.KidFighting.characters.Flame] Frame 0
class com.KidFighting.characters.Flame extends com.KidFighting.objects.CCharacter
{
var uniqueId, name, maxHP, crtHP, jump, speed, strength, winLable, lbS1, addSkill, lbS2, lbCatch;
function Flame () {
super();
uniqueId = 12;
name = "Flame";
maxHP = (crtHP = 100);
jump = 75;
speed = 11;
strength = 20;
winLable = 18;
var _local3 = new com.KidFighting.skills.SklFlamePunch();
_local3.lable = lbS1;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklFlameStrike();
_local3.lable = lbS2;
addSkill(_local3);
_local3 = new com.KidFighting.skills.SklThrow();
_local3.lable = lbCatch;
_local3.hurtValue = 35;
addSkill(_local3);
}
}
Symbol 1815 MovieClip [__Packages.com.KidFighting.skills.SklFlamePunch] Frame 0
class com.KidFighting.skills.SklFlamePunch extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, owner, maxHit, hit, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklFlamePunch () {
super();
name = "FlamePunch";
keys = (((com.KidFighting.Input.RIGHT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.A;
effStartFrame = 2;
hurtValue = 30;
type = "self";
}
function perform() {
performing = true;
owner.startInvincible(0.2);
maxHit = 10;
hit = false;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("flame_special1");
}
function onMotionUpdated(twn) {
if (twn.obj._currentframe > effStartFrame) {
if (!hit) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
ds.controls.SoundPlayer.playSound("tin_special1_2");
}
} else if ((maxHit--) > 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
}
Symbol 1816 MovieClip [__Packages.com.KidFighting.skills.SklFlameStrike] Frame 0
class com.KidFighting.skills.SklFlameStrike extends com.KidFighting.objects.CSkill
{
var name, keys, effStartFrame, hurtValue, type, performing, hit, owner, maxHit, movingSpeed, observeCharacterTween, onMotionFinished, unobserveCharacterTween;
function SklFlameStrike () {
super();
name = "FlameStrike";
keys = (((com.KidFighting.Input.LEFT + ",") + com.KidFighting.Input.RIGHT) + ",") + com.KidFighting.Input.S;
effStartFrame = 8;
hurtValue = 35;
type = "self";
}
function perform() {
performing = true;
hit = false;
owner.updateSide();
maxHit = 10;
movingSpeed = owner.side * characterMovingSpeed;
observeCharacterTween(owner._twnF);
onMotionFinished = onMotionStopped;
ds.controls.SoundPlayer.playSound("flame_special2");
}
function onMotionUpdated(twn) {
if ((twn.obj._currentframe > effStartFrame) && (twn.obj._currentframe < 14)) {
if (!hit) {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
if (hit) {
maxHit--;
ds.controls.SoundPlayer.playSound("tin_special1_2");
}
} else if ((maxHit--) > 0) {
if (hit == 1) {
owner.opponent.mtBlastHurt("Hurt");
} else {
hit = owner.hitTest(owner.getInstance().hitBlock, null, hurtValue, null, null, true, "mtBlastHurt");
}
}
owner.ani._x = owner.ani._x + movingSpeed;
owner.correctOffside();
}
}
function onMotionStopped() {
unobserveCharacterTween(owner._twnF);
performing = false;
owner.setSkillMotionFinished(this);
}
var characterMovingSpeed = 65;
}
Symbol 1817 MovieClip [__Packages.com.KidFighting.CharacterManager] Frame 0
class com.KidFighting.CharacterManager extends MovieClip
{
static var _cm;
function CharacterManager () {
super();
_cm = this;
}
static function generateInstance(instanceStr) {
return(_cm[instanceStr].duplicateMovieClip("fighter" + _cm.getNextHighestDepth(), _cm.getNextHighestDepth()));
}
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, com.KidFighting.characters.Landlord, com.KidFighting.characters.Landlady, com.KidFighting.characters.Tim, com.KidFighting.characters.Flame];
static var aniEnemyList = ["ch_bone", "ch_barber", "ch_tailor", "ch_coolie", "ch_donut", "ch_brotherSum", "ch_landlord", "ch_landlady", "ch_tim", "ch_flame"];
static var selectedList = [];
}
Symbol 1818 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) {
if (selected_enemy_id < 6) {
_mc.avator_mc["a" + (selected_enemy_id + 1)].gotoAndStop(2);
} else {
_mc.avator_mc["a" + (selected_enemy_id + 1)].gotoAndStop(3);
}
}
selected_enemy_id++;
if (selected_enemy_id > 5) {
_mc.avator_mc["a" + (selected_enemy_id + 1)].gotoAndStop(2);
}
_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 1819 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 1820 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 1821 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, isWin) {
_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();
if (isWin != undefined) {
if (isWin) {
_gui.winSymbol_mc.gotoAndStop(1);
} else {
_gui.winSymbol_mc.gotoAndStop(2);
}
}
}
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"});
}, true);
});
} else {
show(TIMEOUT, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"gameOver"});
}, false);
});
}
} else if (evtObj.win == 0) {
show(KO, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"nextRound"});
}, true);
});
} else {
show(KO, function () {
com.KidFighting.RoundGUI.show(evtObj.winnerLable, function () {
com.KidFighting.RoundGUI.dispatchEvent({type:"gameOver"});
}, false);
});
}
}
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 1822 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 1823 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, maxShow) {
_sprite.skills_txt.text = "";
var _local3 = 0;
for (var _local5 in aList) {
_local3++;
if (_local3 > maxShow) {
break;
}
var _local1 = aList[_local5].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[_local5].name == "Throw") {
_local1 = "Close " + _local1.replace(",", "+");
} else {
_local1 = _local1.replace(",", " ");
}
_sprite.skills_txt.text = _sprite.skills_txt.text + (((_local3 + ":") + _local1) + newline);
}
}
static function onUpdateSkill(evtObj) {
suckSkills(evtObj.skillList, evtObj.maxShow);
}
}
Symbol 1824 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 1825 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 1826 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 1827 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 1828 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";
}
}
Symbol 1 MovieClip [__Packages.DSAS2Lib] Frame 0
class DSAS2Lib
{
function DSAS2Lib () {
ds.controls.SoundPlayer;
ds.controls.Timer;
ds.transitions.Tween;
ds.transitions.TweenObserver;
}
static var name = "Demon.S ActionScript 2 Library";
}