Frame 1
stop();
var url2 = "timeforkids";
var urlArr = _root._url.split("/", 3);
var legal = false;
_root.logoCount = 0;
_root.playBtn._visible = false;
onEnterFrame = function () {
_root.loadText = ("Loading:" + Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100)) + "%";
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
loadText = "";
onEnterFrame = null;
_root.playBtn._visible = true;
}
};
Instance of Symbol 18 MovieClip "logoBtn" in Frame 1
on (release) {
getURL ("http://www.agame.com/", "_blank");
}
Frame 4
function Message(aMsg) {
var _local2 = aMsg._Message;
var _local1 = aMsg._Value;
trace("APP: " + _local2);
if (_local2 == "MSG_PANELMAIN") {
tPM._Visible = true;
tPM._Enabled = true;
tPB._Visible = false;
tPA._Visible = false;
tPG._Visible = false;
}
if (_local2 == "MSG_PANELBATTLE") {
tPM._Visible = false;
if (_local1) {
tPB.Init();
}
tPB._Visible = true;
tPA._Visible = false;
tPG._Visible = false;
}
if (_local2 == "MSG_PANELASSIGN") {
tPM._Visible = false;
tPB._Visible = false;
tPA._Visible = true;
tPA._PlayerIndex1 = _local1._PlayerIndex1;
tPA._PlayerIndex2 = _local1._PlayerIndex2;
tPA._Level = _local1._Level;
tPG._Visible = false;
}
if (_local2 == "MSG_PANELGAME") {
tPM._Visible = false;
tPB._Visible = false;
tPA._Visible = false;
tPG._Visible = true;
tPG.Init();
tPG._PlayerInfo1 = _local1._PlayerInfo1;
tPG._PlayerInfo2 = _local1._PlayerInfo2;
tPG._Level = _local1._Level;
tPG._Enabled = true;
}
if (_local2 == "MSG_WIN") {
if (tPB._Level > 1) {
tPB._Level--;
tPM._Visible = false;
tPB._Visible = true;
tPA._Visible = false;
tPG._Visible = false;
} else {
tPM._Visible = true;
tPB._Visible = false;
tPA._Visible = false;
tPG._Visible = false;
tPM.ShowPanel("Win");
}
tPG._Enabled = false;
}
if (_local2 == "MSG_LOSE") {
tPM._Visible = true;
tPM.ShowPanel("Lose");
tPB._Visible = false;
tPA._Visible = false;
tPG._Visible = false;
tPG._Enabled = false;
}
}
this._xscale = 80;
this._yscale = 80;
fscommand ("showmenu", false);
Stage.scaleMode = "NoScale";
_root._quality = "MEDIUM";
var tPM = (new fefa.TPanelMain(this, _root));
tPM._Visible = true;
var tPB = (new fefa.TPanelBattle(this, _root));
tPB._Visible = false;
var tPA = (new fefa.TPanelAssign(this, _root));
tPA._Visible = false;
var tPG = (new fefa.TPanelGame(this, _root));
tPG._Visible = false;
stop();
Symbol 13 Button
on (press) {
removeMovieClip(loader);
_root.gotoAndStop(2);
}
Symbol 20 Button
on (press) {
getURL ("http://www.gameboltz.com", "_blank");
}
Symbol 1282 MovieClip [__Packages.fefa.TObject] Frame 0
class fefa.TObject
{
var _Self, _Owner;
function TObject (aOwner) {
_ReferenceCount++;
_Self = this;
_Owner = aOwner;
}
static var _ReferenceCount = 0;
}
Symbol 1283 MovieClip [__Packages.fefa.TPanelObject] Frame 0
class fefa.TPanelObject extends fefa.TObject
{
var _Parent, _Panel, _Self, pEnabled;
function TPanelObject (aOwner, aParent) {
super(aOwner);
_Parent = aParent;
_Panel = _Parent.createEmptyMovieClip("_mcPanel" + fefa.TObject._ReferenceCount, _Parent.getNextHighestDepth());
}
function Destroy() {
delete _Self;
}
function set _X(Value) {
_Panel._x = Value;
//return(_X);
}
function get _X() {
return(_Panel._x);
}
function set _Y(Value) {
_Panel._y = Value;
//return(_Y);
}
function get _Y() {
return(_Panel._y);
}
function get _Width() {
return(_Panel._width);
}
function get _Height() {
return(_Panel._height);
}
function set _Visible(Value) {
_Panel._Visible = Value;
//return(_Visible);
}
function get _Visible() {
return(_Panel._Visible);
}
function set _Enabled(Value) {
pEnabled = Value;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
}
Symbol 1284 MovieClip [__Packages.fefa.TPanelMain] Frame 0
class fefa.TPanelMain extends fefa.TPanelObject
{
var _SNDBG, _SNDGameOver, _SNDWinner, _SNDBTNEnter, _SNDBTNClick, _MC, _Panel, _Self, _MCPanelHelp, _MCGameOver, _MCWinner, pEnabled, __get___Visible, _Owner;
function TPanelMain (aOwner, aParent) {
super(aOwner, aParent);
_SNDBG = new Sound();
_SNDBG.attachSound("SND_BG");
_SNDGameOver = new Sound();
_SNDGameOver.attachSound("SND_GAMEOVER");
_SNDWinner = new Sound();
_SNDWinner.attachSound("SND_WINNER");
_SNDBTNEnter = new Sound();
_SNDBTNEnter.attachSound("SND_BTN_ENTER");
_SNDBTNClick = new Sound();
_SNDBTNClick.attachSound("SND_BTN_CLICK");
_MC = _Panel.attachMovie("PanelMain", "mcPanelMain", 1);
_MC.BTN_Start._Owner = _Self;
_MC.BTN_Start.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.BTN_Start.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMESTART"});
};
_MC.BTN_StarQ._Owner = _Self;
_MC.BTN_StarQ.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.BTN_StarQ.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_STARQ"});
};
_MC.BTN_Help._Owner = _Self;
_MC.BTN_Help.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.BTN_Help.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMEHELP"});
};
_MC.BTN_Exit._Owner = _Self;
_MC.BTN_Exit.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.BTN_Exit.onRelease = function () {
this._Owner._SNDBTNClick.start();
};
_MCPanelHelp = _Panel.attachMovie("PanelHelp", "mcPanelHelp", 2);
_MCPanelHelp._x = (800 - _MCPanelHelp._width) / 2;
_MCPanelHelp._y = (600 - _MCPanelHelp._height) / 2;
_MCPanelHelp.BTN_OK._Owner = _Self;
_MCPanelHelp.BTN_OK.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCPanelHelp.BTN_OK.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMEHELP"});
};
_MCGameOver = _Panel.attachMovie("PanelGameOver", "mcPanelGameOver", 3);
_MCGameOver.stop();
_MCWinner = _Panel.attachMovie("PanelWinner", "mcPanelWinner", 4);
_MCWinner.stop();
_MCWinner.BTN_OK._Owner = _Self;
_MCWinner.BTN_OK.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCWinner.BTN_OK.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_INITIALIZE"});
};
Init();
}
function Init() {
_SNDBG.start(0, 99999);
_MCPanelHelp._visible = false;
_MCGameOver._visible = false;
_MCWinner._visible = false;
_Enabled = (true);
}
function set _Enabled(Value) {
pEnabled = Value;
_MC.BTN_Start.enabled = _Enabled;
_MC.BTN_StarQ.enabled = _Enabled;
_MC.BTN_Help.enabled = _Enabled;
_MC.BTN_Exit.enabled = _Enabled;
_MCPanelHelp.BTN_OK.enabled = _Enabled;
_MC.enabled = _Enabled;
_MCPanelHelp.enabled = _Enabled;
_MCGameOver.enabled = _Enabled;
_MCWinner.enabled = _Enabled;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
function set _Visible(Value) {
_Panel._visible = Value;
_Enabled = (Value);
//return(__get___Visible());
}
function Message(aMsg) {
var _local2 = aMsg._Message;
if (_local2 == "MSG_INITIALIZE") {
Init();
}
if (_local2 == "MSG_GAMESTART") {
_MCPanelHelp._visible = false;
_Owner.Message({_Message:"MSG_PANELBATTLE", _Value:true});
}
if (_local2 == "MSG_GAMEHELP") {
_MCPanelHelp._visible = !_MCPanelHelp._visible;
_MC.BTN_Start.enabled = !_MCPanelHelp._visible;
_MC.BTN_StarQ.enabled = !_MCPanelHelp._visible;
_MC.BTN_Help.enabled = !_MCPanelHelp._visible;
_MC.BTN_Exit.enabled = !_MCPanelHelp._visible;
}
}
function ShowPanel(Value) {
if (Value == "Lose") {
_Self._Enabled = false;
_SNDBG.stop();
_SNDGameOver.start();
_MCGameOver.gotoAndPlay(1);
_MCGameOver._visible = true;
var _local2 = {_Message:"MSG_INITIALIZE"};
var _local3 = new fefa.TTimerEvent(_Self, _local2, 5000);
}
if (Value == "Win") {
_Self._Enabled = false;
_SNDBG.stop();
_SNDWinner.start();
_MCWinner._visible = true;
}
}
}
Symbol 1285 MovieClip [__Packages.fefa.TTimerEvent] Frame 0
class fefa.TTimerEvent extends fefa.TObject
{
var _Msg, _Time, _TimerID, _Self, _Owner;
function TTimerEvent (aOwner, aMsg, aTime) {
super(aOwner);
_Msg = aMsg;
_Time = int(aTime / 10);
_TimerID = setInterval(_Self, "Timer", 10);
}
function Timer() {
if (_global._PAUSE) {
return(undefined);
}
_Time--;
if (_Time <= 0) {
TimeOut();
}
}
function TimeOut() {
clearInterval(_TimerID);
_Owner.Message(_Msg);
}
}
Symbol 1286 MovieClip [__Packages.fefa.TPanelAssign] Frame 0
class fefa.TPanelAssign extends fefa.TPanelObject
{
var _MCBG1, _Panel, _MC, _Self, _TOTALPOINT1, pLevel, _Owner;
function TPanelAssign (aOwner, aParent) {
super(aOwner, aParent);
trace("CLASS TPanelMain");
_MCBG1 = _Panel.attachMovie("BG1", "mcBG1", 1);
_MCBG1.stop();
_MC = _Panel.attachMovie("PanelAssign", "mcPanelAssign", 2);
_MC.BTN_PowerDec1._Owner = _Self;
_MC.BTN_PowerDec1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_PowerDec1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_POWERDEC"});
};
_MC.BTN_PowerAdd1._Owner = _Self;
_MC.BTN_PowerAdd1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_PowerAdd1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_POWERADD"});
};
_MC.BTN_SpeedDec1._Owner = _Self;
_MC.BTN_SpeedDec1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_SpeedDec1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_SPEEDDEC"});
};
_MC.BTN_SpeedAdd1._Owner = _Self;
_MC.BTN_SpeedAdd1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_SpeedAdd1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_SPEEDADD"});
};
_MC.BTN_SkillDec1._Owner = _Self;
_MC.BTN_SkillDec1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_SkillDec1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_SKILLDEC"});
};
_MC.BTN_SkillAdd1._Owner = _Self;
_MC.BTN_SkillAdd1.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_SkillAdd1.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_SKILLADD"});
};
_MC.BTN_Back._Owner = _Self;
_MC.BTN_Back.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_Back.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_PROCESSBACK"});
};
_MC.BTN_OK._Owner = _Self;
_MC.BTN_OK.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MC.BTN_OK.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_PROCESSNEXT"});
};
Init();
}
function Init() {
_TOTALPOINT1 = 10;
_Point1 = (0);
_Power1 = (3);
_Skill1 = (4);
_Speed1 = (3);
_Power2 = (5);
_Speed2 = (5);
_Skill2 = (5);
_PlayerIndex1 = (1);
_PlayerIndex2 = (1);
_MC.mcPlayerHead2.gotoAndStop(1);
}
function set _PlayerIndex1(Value) {
_MC.mcPlayer1.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayer1) {
_MC.mcPlayer1[_local2].gotoAndStop(2);
}
//return(_PlayerIndex1);
}
function get _PlayerIndex1() {
return(_MC.mcPlayer1._currentframe);
}
function set _PlayerIndex2(Value) {
_MC.mcPlayer2.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayer2) {
_MC.mcPlayer2[_local2].gotoAndStop(2);
}
//return(_PlayerIndex2);
}
function get _PlayerIndex2() {
return(_MC.mcPlayer2._currentframe);
}
function set _Level(Value) {
pLevel = Value;
_MC.mcPlayerHead2.gotoAndStop(Value);
_MCBG1.gotoAndStop((4 - Value) + 1);
if (_Level == 4) {
_Power2 = (1);
_Speed2 = (2);
_Skill2 = (2);
} else if (_Level == 3) {
_Power2 = (3);
_Speed2 = (2);
_Skill2 = (3);
} else if (_Level == 2) {
_Power2 = (3);
_Speed2 = (4);
_Skill2 = (4);
} else if (_Level == 1) {
_Power2 = (5);
_Speed2 = (5);
_Skill2 = (5);
}
//return(_Level);
}
function get _Level() {
return(pLevel);
}
function set _Point1(Value) {
_MC.mcPoint1.gotoAndStop(Value + 1);
//return(_Point1);
}
function get _Point1() {
return(_MC.mcPoint1._currentframe - 1);
}
function onPointChange() {
_Point1 = (((_TOTALPOINT1 - _Power1) - _Speed1) - _Skill1);
}
function set _Power1(Value) {
_MC.mcPower1.gotoAndStop(Value + 1);
//return(_Power1);
}
function get _Power1() {
return(_MC.mcPower1._currentframe - 1);
}
function set _Speed1(Value) {
_MC.mcSpeed1.gotoAndStop(Value + 1);
//return(_Speed1);
}
function get _Speed1() {
return(_MC.mcSpeed1._currentframe - 1);
}
function set _Skill1(Value) {
_MC.mcSkill1.gotoAndStop(Value + 1);
//return(_Skill1);
}
function get _Skill1() {
return(_MC.mcSkill1._currentframe - 1);
}
function set _Power2(Value) {
_MC.mcPower2.gotoAndStop(Value + 1);
//return(_Power2);
}
function get _Power2() {
return(_MC.mcPower2._currentframe - 1);
}
function set _Speed2(Value) {
_MC.mcSpeed2.gotoAndStop(Value + 1);
//return(_Speed2);
}
function get _Speed2() {
return(_MC.mcSpeed2._currentframe - 1);
}
function set _Skill2(Value) {
_MC.mcSkill2.gotoAndStop(Value + 1);
//return(_Skill2);
}
function get _Skill2() {
return(_MC.mcSkill2._currentframe - 1);
}
function Message(aMsg) {
var _local2 = aMsg._Message;
if (_local2 == "MSG_PROCESSBACK") {
_Owner.Message({_Message:"MSG_PANELBATTLE", _Value:false});
}
if (_local2 == "MSG_PROCESSNEXT") {
var _local5 = {_Index:_PlayerIndex1, _Speed:_Speed1, _Skill:_Skill1, _Power:_Power1};
var _local3 = {_Index:_PlayerIndex2, _Speed:_Speed2, _Skill:_Skill2, _Power:_Power2};
var _local4 = {_PlayerInfo1:_local5, _PlayerInfo2:_local3, _Level:_Level};
_Owner.Message({_Message:"MSG_PANELGAME", _Value:_local4});
}
if (_local2 == "MSG_POWERDEC") {
_Power1 = (_Power1 - 1);
onPointChange();
}
if (_local2 == "MSG_POWERADD") {
if (_Point1 > 0) {
_Power1 = (_Power1 + 1);
onPointChange();
}
}
if (_local2 == "MSG_SPEEDDEC") {
_Speed1 = (_Speed1 - 1);
onPointChange();
}
if (_local2 == "MSG_SPEEDADD") {
if (_Point1 > 0) {
_Speed1 = (_Speed1 + 1);
onPointChange();
}
}
if (_local2 == "MSG_SKILLDEC") {
_Skill1 = (_Skill1 - 1);
onPointChange();
}
if (_local2 == "MSG_SKILLADD") {
if (_Point1 > 0) {
_Skill1 = (_Skill1 + 1);
onPointChange();
}
}
}
}
Symbol 1287 MovieClip [__Packages.fefa.TPlaySound] Frame 0
class fefa.TPlaySound extends Sound
{
var _Self;
function TPlaySound (aParent, aLinkName) {
super(aParent);
_Self = this;
_Self.attachSound(aLinkName);
_Self.setVolume(_Volume);
_Self.start();
}
function onSoundComplete() {
delete _Self;
}
static var _Volume = 100;
}
Symbol 1288 MovieClip [__Packages.fefa.TPanelGame] Frame 0
class fefa.TPanelGame extends fefa.TPanelObject
{
var _MCCourt, _Panel, _Court, _Self, _MCGame, _TennisPlayer2, _MCNet, _NetY, _NetHeight, _Ball, _TennisPlayer1, _MCInfo, _Info, __get___Visible, pEnabled, __get___Level, __get___PlayerInfo1, __get___PlayerInfo2, _Owner;
function TPanelGame (aOwner, aParent) {
super(aOwner, aParent);
_MCCourt = _Panel.createEmptyMovieClip("mcCourt", 1);
_Court = new fefa.TPanelGameCourt(_Self, _MCCourt);
_MCGame = _Panel.createEmptyMovieClip("mcGame", 2);
_TennisPlayer2 = new fefa.TTennisPlayer(_Self, _MCGame);
_TennisPlayer2._ControlEnabled = false;
_MCNet = _MCGame.attachMovie("Net", "mcNet", _MCGame.getNextHighestDepth());
_MCNet._x = 188;
_MCNet._y = 283;
_NetY = 320;
_NetHeight = 40;
_Ball = new fefa.TBall(_Self, _MCGame);
_TennisPlayer1 = new fefa.TTennisPlayer(_Self, _MCGame);
_TennisPlayer1._ControlEnabled = true;
_TennisPlayer1.Stop();
_MCInfo = _Panel.createEmptyMovieClip("mcInfo", 3);
_Info = new fefa.TPanelGameInfo(_Self, _MCInfo);
Init();
}
function Init() {
_Info.Init();
_Ball.Hide();
_TennisPlayer1._Move._MCX = 400;
_TennisPlayer1._Move._MCY = 340;
_TennisPlayer1._Ball = _Ball;
_TennisPlayer1._TennisModelID = 1;
_TennisPlayer1._ID = 1;
_TennisPlayer1._AutoControl = false;
_TennisPlayer1._Action = "Normal";
_TennisPlayer1._Speed = 2;
_TennisPlayer1._PlayerJumpSpeed = 3;
_TennisPlayer1._Enabled = true;
_TennisPlayer2._Move._MCX = 400;
_TennisPlayer2._Move._MCY = 300;
_TennisPlayer2._Ball = _Ball;
_TennisPlayer2._ID = 2;
_TennisPlayer2._AutoControl = true;
_TennisPlayer2._Action = "Normal";
_TennisPlayer2._Speed = 1;
_TennisPlayer2._PlayerJumpSpeed = 1.5;
_TennisPlayer2._Enabled = true;
_Self._Enabled = false;
}
function set _Visible(Value) {
trace("bu hui ba" + Value);
_Panel._visible = Value;
if (Value == false) {
_TennisPlayer1._Lock = true;
}
//return(__get___Visible());
}
function set _Enabled(Value) {
if (_Enabled != Value) {
if (Value) {
_Info.ShowPanel("Start");
_TennisPlayer1.Message({_Message:"KEY_DIRECTION", _Value:0});
}
}
pEnabled = Value;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
function set _Level(Value) {
_Info._Level = Value;
_Court._Index = (4 - Value) + 1;
_Info._Head2 = Value;
switch (Value) {
case 4 :
_TennisPlayer2._TennisModelID = 3;
break;
case 3 :
_TennisPlayer2._TennisModelID = 4;
break;
case 2 :
_TennisPlayer2._TennisModelID = 5;
break;
case 1 :
_TennisPlayer2._TennisModelID = 2;
}
//return(__get___Level());
}
function set _PlayerInfo1(aObj) {
_Info._PlayerIndex1 = aObj._Index;
_TennisPlayer1._Speed = 1.8 + (aObj._Speed / 5);
_TennisPlayer1._Skill = aObj._Skill;
_TennisPlayer1._Power = aObj._Power;
//return(__get___PlayerInfo1());
}
function set _PlayerInfo2(aObj) {
_Info._PlayerIndex2 = aObj._Index;
_TennisPlayer2._Speed = 1.2 + (aObj._Speed / 5);
_TennisPlayer2._Skill = aObj._Skill;
_TennisPlayer2._Power = aObj._Power;
//return(__get___PlayerInfo2());
}
function Message(Msg) {
if (_Self._Enabled == false) {
return(undefined);
}
var _local5 = Msg._Message;
var _local2 = Msg._Value;
if (_local5 == "MSG_HITEXIST") {
if (_Ball._Enabled == false) {
return(undefined);
}
var _local15 = _local2._HitMC;
var _local7 = _local2._ID;
if (_local7 == _Ball._HitID) {
return(undefined);
}
var _local9 = _local2._Sender;
var _local11 = _local2._Speed;
var _local24 = _local2._Throw;
var _local28 = _local2._Angle;
var _local3 = _local2._LR;
var _local25 = _local2._Action;
var _local4 = _local2._Direction;
var _local6 = _local2._Skill;
var _local16 = Math.abs(_local9._Panel._y - _Ball._Panel._y);
if (_local16 < 4) {
if (_local15.hitTest(_Ball._HitMC)) {
if (_local7 == 1) {
if (_Ball._HitCount < 1) {
_local3 = 0;
if ((_local4 >= 2) && (_local4 <= 4)) {
_local3 = 1;
}
if ((_local4 >= 6) && (_local4 <= 8)) {
_local3 = -1;
}
var _local19 = 0;
if ((_local4 >= 4) && (_local4 <= 6)) {
_local19 = 1;
}
if (((_local4 >= 1) && (_local4 <= 2)) || (_local4 == 8)) {
_local19 = -1;
}
if (_TennisPlayer1._ServeX1 >= 400) {
var _local12 = (330 + (40 * _local3)) + (random(20) * _local3);
} else {
var _local12 = (470 + (40 * _local3)) + (random(20) * _local3);
}
var _local10 = 270 + ((10 + random(5)) * _local19);
} else {
_local3 = 0;
if ((_local4 >= 2) && (_local4 <= 4)) {
_local3 = 1;
}
if ((_local4 >= 6) && (_local4 <= 8)) {
_local3 = -1;
}
var _local19 = 0;
if ((_local4 >= 4) && (_local4 <= 6)) {
_local19 = 1;
}
if (((_local4 >= 1) && (_local4 <= 2)) || (_local4 == 8)) {
_local19 = -1;
}
var _local12 = (((-random(10 + (20 * (5 - _local6)))) * _local3) + (120 * _local3)) + 400;
var _local10 = (((-random(4 + (4 * (5 - _local6)))) * _local3) + (40 * _local19)) + 220;
}
_Ball.Temp();
_Ball.InHitB(_local9, _local7, _local11, _local12, _local10, _Ball._X, _Ball._Y);
}
if (_local7 == 2) {
if (_Ball._HitCount < 1) {
if (_TennisPlayer2._ServeX1 >= 400) {
var _local12 = 400 - random(100);
} else {
var _local12 = 400 + random(100);
}
var _local10 = random(60) + 360;
} else {
var _local8 = random(3);
if (_local8 == 0) {
var _local12 = (random(60) + 400) - 30;
var _local10 = (random(40) + 480) - 20;
} else if (_local8 == 1) {
_local3 = ((_TennisPlayer1._PlayerX > 400) ? 1 : -1);
var _local19 = ((_TennisPlayer1._PlayerY > 440) ? -1 : 1);
var _local12 = (((-random(20 + (30 * (5 - _local6)))) * _local3) + (150 * _local3)) + 400;
var _local10 = (((-random(10 + (5 * (5 - _local6)))) * _local3) + (40 * _local19)) + 480;
} else if (_local8 == 2) {
_local3 = ((_TennisPlayer1._PlayerX > 400) ? -1 : 1);
var _local19 = ((_TennisPlayer1._PlayerY > 440) ? -1 : 1);
var _local12 = (((-random(20 + (30 * (5 - _local6)))) * _local3) + (150 * _local3)) + 400;
var _local10 = (((-random(10 + (5 * (5 - _local6)))) * _local3) + (40 * _local19)) + 480;
}
}
_Ball.Temp();
_Ball.InHitB(_local9, _local7, _local11, _local12, _local10, _Ball._X, _Ball._Y);
}
}
}
return(undefined);
}
if (_local5 == "MSG_BALLPOINTCHANGE") {
if (_local2._HitID == 2) {
_TennisPlayer1.BallPointChange(_local2._X, _local2._Y);
}
if (_local2._HitID == 1) {
_TennisPlayer2.BallPointChange(_local2._X, _local2._Y);
}
_Court.SetCat(_local2._X, _local2._Y);
return(undefined);
}
if (_local5 == "MSG_BALLFALLPOINT") {
var _local26 = _local2._X;
var _local23 = _local2._Y;
var _local7 = _local2._HitID;
return(undefined);
}
if (_local5 == "MSG_BALLANGLECHANGE") {
if (_local2._HitID == 2) {
_TennisPlayer1.GetStrikePoint(_local2._Angle, _local2._X, _local2._Y);
}
if (_local2._HitID == 1) {
_TennisPlayer2.GetStrikePoint(_local2._Angle, _local2._X, _local2._Y);
}
return(undefined);
}
if (_local5 == "MSG_BALLFALLPOINTFIRST") {
if (_local2._HitID == 2) {
_TennisPlayer1.BallFallPointFirst(_local2._X, _local2._Y);
}
if (_local2._HitID == 1) {
_TennisPlayer2.BallFallPointFirst(_local2._X, _local2._Y);
}
return(undefined);
}
if (_local5 == "MSG_BUTTONLOCK") {
trace("PanelGameLOCK:" + _local2);
_TennisPlayer1._Lock = _local2;
}
if (_local5 == "MSG_PAUSEEND") {
_TennisPlayer1.Message(Msg);
}
if (_local5 == "MSG_WINNERB") {
var _local7 = _local2;
if (_local7 == 1) {
_TennisPlayer1.PropInfo("Score", "");
} else {
_TennisPlayer2.PropInfo("Score", "");
}
}
if (_local5 == "MSG_PLAYERSCORE") {
var _local20 = _local2._ID;
var _local14 = _local2._Prop;
if (_local20 == 1) {
_TennisPlayer1.PropInfo(_local14, "BALLSERVEBEGIN");
} else {
_TennisPlayer2.PropInfo(_local14, "BALLSERVEBEGIN");
}
}
if (_local5 == "MSG_NUMBERASTART") {
_TennisPlayer1._Action = "Normal";
_TennisPlayer2._Action = "Normal";
}
if (_local5 == "MSG_GAMEFINISH") {
var _local22 = _local2;
if (_local22 == 1) {
_Owner.Message({_Message:"MSG_WIN"});
} else {
_Owner.Message({_Message:"MSG_LOSE"});
}
}
if (_local5 == "MSG_BALLSERVE") {
_Ball.Init();
_Ball.Hide();
if (_Info._ServeID == 1) {
_Court.SetCat(400, 600);
trace("1P \u53D1\u7403:" + _Info._ScoreNumber);
if ((_Info._ScoreNumber % 2) == 0) {
_TennisPlayer1.MoveTo(500, 550, true, "BALLSERVE");
_TennisPlayer2.MoveTo(340, 180, true);
_TennisPlayer1._ServeX1 = 400;
_TennisPlayer1._ServeX2 = 600;
} else {
_TennisPlayer1.MoveTo(300, 550, true, "BALLSERVE");
_TennisPlayer2.MoveTo(500, 180, true);
_TennisPlayer1._ServeX1 = 200;
_TennisPlayer1._ServeX2 = 400;
}
}
if (_Info._ServeID == 2) {
_Court.SetCat(400, 0);
if ((_Info._ScoreNumber % 2) == 0) {
_TennisPlayer1.MoveTo(500, 550, true);
_TennisPlayer2.MoveTo(340, 180, true, "BALLSERVE");
_TennisPlayer2._ServeX1 = 200;
_TennisPlayer2._ServeX2 = 400;
} else {
_TennisPlayer1.MoveTo(300, 550, true);
_TennisPlayer2.MoveTo(500, 180, true, "BALLSERVE");
_TennisPlayer2._ServeX1 = 400;
_TennisPlayer2._ServeX2 = 600;
}
}
}
if (_local5 == "MSG_BALLTOUCHGROUND") {
var _local7 = _local2._HitID;
var _local13 = _local2._Number;
var _local12 = _local2._PosX;
var _local10 = _local2._PosY;
if (_local13 == 1) {
if (_Ball._HitCount < 1) {
var _local21 = (((_Info._NumberA % 2) == 1) ? 1 : 2);
ServeBallError(_local21);
} else if (_Ball._HitCount == 1) {
if (_local7 == 1) {
if (_local10 > 320) {
} else {
var _local17 = _Court.GetHit(_local12, _local10);
if (_local17 != 1) {
ServeBallError(_local7);
}
}
}
} else {
var _local17 = _Court.GetHit(_local12, _local10);
if (_local17 == 3) {
_Info.ScoreB(((_local7 == 1) ? 2 : 1));
_Ball._Enabled = false;
if (_local7 == 1) {
_TennisPlayer1.PropInfo("OutSide", "BALLSERVEBEGIN");
} else {
_TennisPlayer2.PropInfo("OutSide", "BALLSERVEBEGIN");
}
}
}
} else if (_local13 == 2) {
if (_Ball._Enabled) {
_Ball._Enabled = false;
_TennisPlayer1.Stop();
_Info.ScoreB(_local7);
}
}
}
if (_local5 == "MSG_BALLFALLBEGIN") {
if ((_Info._NumberA % 2) == 1) {
_TennisPlayer1.BallFallBegin();
}
if ((_Info._NumberA % 2) == 0) {
_TennisPlayer2.BallFallBegin();
}
}
if (_local5 == "MSG_GAMEEXIT") {
_Self._Enabled = false;
_TennisPlayer1.DelKeyListener();
_Owner.Message({_Message:"MSG_PANELMAIN"});
}
}
function ServeBallError(aID) {
_Ball._Enabled = false;
_Info._ServeNumber++;
var _local2 = ((aID == 1) ? (_TennisPlayer1) : (_TennisPlayer2));
if (_Info._ServeNumber == 1) {
_local2.PropInfo("Error", "SERVECANCEL");
} else if (_Info.ScoreB(((aID == 1) ? 2 : 1))) {
_local2.PropInfo("Error", "BALLSERVEBEGIN");
}
}
function GetAngle(X1, Y1, X2, Y2) {
var _local3 = X1 - X2;
var _local2 = Y1 - Y2;
var _local1 = Math.atan2(_local2, _local3) * 57.2957795130823;
if (_local1 < 0) {
_local1 = _local1 + 360;
}
_local1 = 360 - int(_local1);
return(_local1);
}
}
Symbol 1289 MovieClip [__Packages.fefa.TPanelGameCourt] Frame 0
class fefa.TPanelGameCourt extends fefa.TPanelObject
{
var _MC, _Panel, _MCCat, pIndex;
function TPanelGameCourt (aOwner, aParent) {
super(aOwner, aParent);
_MC = _Panel.attachMovie("CourtPackage", "mcCourt", 1);
_MC.stop();
_MCCat = _MC.mcCat;
SetCat(400, 300);
}
function set _Index(Value) {
pIndex = Value;
_MC.gotoAndStop(_Index);
//return(_Index);
}
function get _Index() {
return(pIndex);
}
function GetHit(aPosX, aPosY) {
var _local2 = 3;
if (_MC.CourtHitB.hitTest(aPosX, aPosY, true)) {
_local2 = 1;
} else if (_MC.CourtHitA.hitTest(aPosX, aPosY, true)) {
_local2 = 2;
}
return(_local2);
}
function SetCat(aPosX, aPosY) {
var _local2 = aPosY;
if (_local2 < 180) {
_MCCat.gotoAndStop(7);
} else if (_local2 > 540) {
_MCCat.gotoAndStop(1);
} else {
var _local3 = 6 - int(((_local2 - 180) / 360) * 5);
_MCCat.gotoAndStop(_local3);
}
}
}
Symbol 1290 MovieClip [__Packages.fefa.TTennisPlayer] Frame 0
class fefa.TTennisPlayer extends fefa.TPanelObject
{
var _Move, _Self, _MCShadow, _Panel, _Model, _MCPropInfo, _SNDProp, _Index, _MoveValue, _MoveLR, _TennisIndex, _PlayerWalkSpeed, _PlayerJumpSpeed, _BallThrowSpeed, _BallShotSpeed, _AutoControl, _Control, _MuteStrike, _PropInfoTime, _Skill, __get___Power, pLock, pAction, pBall, pEnabled, _ID, _BallFallPointFirstY, _BallShotPointX, _BallShotPointY, _PropInfoTimeValue, _Parent, _Owner, _BallSpeed, _BallFallPointFirstX;
function TTennisPlayer (aOwner, aParent) {
super(aOwner, aParent);
_Move = new fefa.TTennisPlayerMove(_Self);
_MCShadow = _Panel.attachMovie("PlayerShadow", "mcPlayerShadow", _Panel.getNextHighestDepth());
_Model = new fefa.TTennisPlayerModel(_Self, _Panel);
_MCPropInfo = _Panel.attachMovie("PropInfo", "mcPropInfo", _Panel.getNextHighestDepth());
_SNDProp = new Sound();
_SNDProp.attachSound("SND_MSG_SCORE");
Init();
}
function Init() {
_Index = 0;
_MoveValue = 0;
_MoveLR = 0;
_TennisIndex = -1;
_PlayerWalkSpeed = 2;
_PlayerJumpSpeed = 3;
_Action = ("Normal");
_BallThrowSpeed = 4;
_BallShotSpeed = 4;
_AutoControl = false;
_Control = null;
_Move._MC = _Panel;
_Move._Speed = _PlayerWalkSpeed;
_MuteStrike = false;
_Model._FramesOfSecond = 40;
_MCPropInfo._y = -100;
_MCPropInfo._visible = false;
_PropInfoTime = 1000;
_Skill = 0;
_Enabled = (false);
}
function set _Power(Value) {
_BallShotSpeed = 4 + (Value / 10);
//return(__get___Power());
}
function set _Lock(Value) {
pLock = Value;
if (_Lock) {
}
//return(_Lock);
}
function get _Lock() {
return(pLock);
}
function set _Action(Value) {
pAction = Value;
if (_Action == "Serve") {
PropInfo("Serve");
}
//return(_Action);
}
function get _Action() {
return(pAction);
}
function set _Ball(aObj) {
pBall = aObj;
//return(_Ball);
}
function get _Ball() {
return(pBall);
}
function set _Enabled(Value) {
pEnabled = Value;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
function set _TennisModelID(Value) {
_Model._ID = Value;
//return(_TennisModelID);
}
function get _TennisModelID() {
return(_Model._ID);
}
function Destroy() {
}
function set _Speed(Value) {
_PlayerWalkSpeed = Value;
_Move._Speed = _PlayerWalkSpeed;
//return(_Speed);
}
function get _Speed() {
return(_Move._Speed);
}
function set _ControlEnabled(Value) {
trace("_ControlEnabled........" + Value);
if (Value) {
delete _Control;
_Control = null;
_Control = new fefa.TTennisPlayerControl(_Self);
} else {
delete _Control;
_Control = null;
}
//return(_ControlEnabled);
}
function get _ControlEnabled() {
return(((_Control == null) ? false : true));
}
function MoveTo(aX, aY, aAutoChangeModel, aEvent) {
_Self._Move.MoveTo(int(aX), int(aY), aAutoChangeModel, aEvent);
}
function GetStrikePoint(aAngle, aX, aY) {
var _local2 = new Object();
_local2._AngleA = Math.abs(270 - aAngle);
if (_ID == 1) {
_local2._LineB = _BallFallPointFirstY + aY;
} else {
_local2._LineB = _BallFallPointFirstY - aY;
}
_local2._LineC = _local2._LineB / Math.cos(_local2._AngleA * (Math.PI/180));
_local2._LineA = Math.sqrt((_local2._LineC * _local2._LineC) - (_local2._LineB * _local2._LineB));
var _local3 = new Object();
if (aAngle <= (270 - (180 * (_ID - 1)))) {
_local3._x = aX - (_local2._LineA * ((_ID == 1) ? 1 : -1));
_local3._y = _BallFallPointFirstY;
} else {
_local3._x = aX + (_local2._LineA * ((_ID == 1) ? 1 : -1));
_local3._y = _BallFallPointFirstY;
}
_BallShotPointX = _local3._x;
_BallShotPointY = _local3._y;
if (_AutoControl) {
MoveTo((_local3._x - 20) + random(40), _local3._y, true);
}
return(_local3);
}
function StrikePoint(aX, aY) {
if (_AutoControl) {
MoveTo((aX - 20) + random(40), aY, true);
}
}
function PropInfo(Value, EndEvent) {
if (_Model._Action == "Move") {
_Model.Model("Move", 0);
}
if (Value == "Score") {
_MCPropInfo.gotoAndStop(1);
_SNDProp.start();
}
if (Value == "Error") {
_MCPropInfo.gotoAndStop(2);
_SNDProp.start();
}
if (Value == "OutSide") {
_MCPropInfo.gotoAndStop(3);
_SNDProp.start();
}
if (Value == "Deuce") {
_MCPropInfo.gotoAndStop(4);
_SNDProp.start();
}
if (Value == "Lead") {
_MCPropInfo.gotoAndStop(5);
_SNDProp.start();
}
if (Value == "Serve") {
if (_ID == 1) {
_MCPropInfo.gotoAndStop(7);
} else {
_MCPropInfo.gotoAndStop(6);
}
}
_MCPropInfo._visible = true;
_PropInfoTimeValue = _PropInfoTime;
var _local3 = {_Porp:Value, _Event:EndEvent};
var _local5 = new fefa.TTimerEvent(_Self, {_Message:"MSG_PROPEVENT", _Value:_local3}, _PropInfoTime);
}
function Fog(aX, aY) {
var _local4 = 0;
while (_local4 < 5) {
var _local3 = _Parent.getNextHighestDepth();
var _local2 = _Parent.attachMovie("PlayerEffect1", "PlayerEffect" + _local3, _local3);
_local2._x = (aX - 20) + random(40);
_local2._y = ((aY - 10) + random(20)) + 5;
_local2._xscale = 50 + random(50);
_local2._yscale = 50 + random(50);
_local2._alpha = random(50) + 25;
_local2._rotation = 30 - random(15);
_local2.gotoAndPlay(random(10));
_local4++;
}
}
function Stop() {
_MoveValue = 0;
_Model.Model("Move", _MoveValue);
}
function Message(aMessage) {
if (_Enabled == false) {
return(undefined);
}
if (aMessage._Message == "MSG_PROPEVENT") {
_MCPropInfo._visible = false;
if (aMessage._Value._Event == "BALLSERVE") {
_Self._Action = "Serve";
if (_AutoControl) {
StrikeAnalyze();
}
}
trace((_Action + "::::") + _MoveValue);
if (_Action == "Serve") {
} else {
_Model.Model("Move", _MoveValue);
}
if (aMessage._Value._Event == "BALLSERVEBEGIN") {
_Owner.Message({_Message:"MSG_BALLSERVE"});
}
if (aMessage._Value._Event == "SERVECANCEL") {
_Self.ServeCancel();
}
}
if (aMessage._Message == "MSG_MOVESTOP") {
if (_ID == 1) {
trace("MSG_MOVESTOP");
}
_Model.Model("Move", _MoveValue);
Fog(_PlayerX, _PlayerY);
if (aMessage._Value._PosEvent == "BALLSERVE") {
_Model.Model("Move", 0);
_Self.PropInfo("Serve", "BALLSERVE");
}
}
if (aMessage._Message == "MSG_MOVEANGLE") {
if (aMessage._Value._AutoChangeModel) {
var _local9 = aMessage._Value._Angle;
var _local4 = 180 - (_local9 * 57.2957795130823);
if (_local4 < 0) {
_local4 = _local4 + 360;
}
var _local5 = 0;
if ((_local4 >= 0) && (_local4 <= 80)) {
_local5 = 3;
} else if ((_local4 > 80) && (_local4 <= 100)) {
_local5 = 1;
} else if ((_local4 > 100) && (_local4 <= 260)) {
_local5 = 7;
} else if ((_local4 > 260) && (_local4 <= 280)) {
_local5 = 5;
} else if ((_local4 > 280) && (_local4 <= 360)) {
_local5 = 3;
}
var _local6 = {_Action:"Move", _Value:_local5};
var _local8 = {_Message:"MSG_MODELCHANGE", _Value:_local6};
_Model.Message(_local8);
if (_ID == 2) {
}
Fog(_PlayerX, _PlayerY);
}
}
if (aMessage._Message == "MSG_PAUSEEND") {
if (_MCPropInfo._visible) {
return(undefined);
}
if (_Lock) {
return(undefined);
}
if (_AutoControl == false) {
if (_Move._PosMove == false) {
_Model.Model("Move", _MoveValue);
}
}
}
if (aMessage._Message == "MSG_MODELPLAYEREND") {
_MuteStrike = false;
if (_Lock) {
_Model.Model("Move", 0);
} else {
_Model.Model("Move", _MoveValue);
}
if (_AutoControl) {
if (_Action == "Normal") {
MoveTo(400, 200 + random(40), true);
}
}
}
if (aMessage._Message == "MSG_HITEXIST") {
aMessage._Value._ID = _ID;
aMessage._Value._Sender = _Self;
aMessage._Value._Speed = _BallSpeed;
aMessage._Value._Throw = _BallThrowSpeed / 2;
aMessage._Value._Direction = _MoveValue;
aMessage._Value._Skill = _Skill;
if (_AutoControl) {
aMessage._Value._LR = ((_PlayerX > 400) ? -1 : 1);
} else {
aMessage._Value._LR = _MoveLR;
}
aMessage._Value._Action = _Action;
_Owner.Message(aMessage);
}
if (aMessage._Message == "MSG_MODELCHANGE") {
var _local7 = aMessage._Value._Action;
var _local6 = aMessage._Value._Value;
if (_local7 == "Move") {
_Move._Speed = _PlayerWalkSpeed;
_Move._Direction = _local6;
} else {
_Move.Stop();
}
_Model.Message(aMessage);
}
if (aMessage._Message == "KEY_DIRECTION") {
if (_MoveValue != aMessage._Value) {
_MoveValue = aMessage._Value;
if (_MCPropInfo._visible) {
return(undefined);
}
if (_global._PAUSE) {
return(undefined);
}
if (_Move._PosMove) {
return(undefined);
}
if (_Lock) {
return(undefined);
}
switch (_MoveValue) {
case 0 :
case 1 :
_MoveLR = 0;
break;
case 2 :
case 3 :
case 4 :
_MoveLR = 1;
break;
case 5 :
_MoveLR = 0;
break;
case 6 :
case 7 :
case 8 :
_MoveLR = -1;
}
if (_Action == "Normal") {
_Model.Model("Move", _MoveValue);
Fog(_PlayerX, _PlayerY);
} else if (_Action == "Serve") {
var _local5 = 0;
_local5 = ((_MoveLR == 1) ? 3 : (_local5));
_local5 = ((_MoveLR == -1) ? 7 : (_local5));
_Model.Model("Move", _local5);
}
}
}
if (aMessage._Message == "MSG_MOVE") {
var _local6 = aMessage._Value;
_Move._Direction = _local6;
}
if (aMessage._Message == "KEY_BUTTON") {
var _local6 = aMessage._Value;
if (_MCPropInfo._visible) {
return(undefined);
}
if (_Move._PosMove) {
return(undefined);
}
if (_global._PAUSE) {
return(undefined);
}
if (_Lock) {
return(undefined);
}
if (_local6 == 1) {
StrikeAnalyze();
}
}
}
function BallPointChange(aX, aY) {
if (_AutoControl) {
if (_Action == "Normal") {
var _local2 = aY - _PlayerY;
if ((_local2 < 120) && (_local2 > 0)) {
StrikeAnalyze();
}
}
}
}
function StrikeAnalyze() {
if (_Self._ID == _Ball._HitID) {
return(undefined);
}
if (_Model._Action == "Strike") {
return(undefined);
}
if (_Action == "Normal") {
var _local2 = _Ball.GetPoint(_PlayerX, _PlayerY);
if (_local2 != null) {
var _local3 = Math.abs(_PlayerX - _local2._X);
var _local4 = Math.abs(_PlayerY - _local2._Y);
var _local5 = _local3 / _PlayerJumpSpeed;
if ((_local3 > 40) && (Math.abs(_local4) < 200)) {
if (_local5 <= _local2._Step) {
_local2._SaveX = _local2._X;
_local2._SaveY = _local2._Y;
StrikeBall("Save", _local2);
} else {
_local2._SaveX = _PlayerX + ((_local2._Step * _PlayerJumpSpeed) * ((_PlayerX > _local2._X) ? -1 : 1));
_local2._SaveY = _local2._Y;
StrikeBall("Save", _local2);
}
} else if ((_local3 < 20) && (_Ball._BallHeight > 60)) {
StrikeBall("DropShot", _local2);
} else {
StrikeBall("Normal", _local2);
}
}
} else if (_Action == "Serve") {
if (_Model._Model._PlayEndChange) {
StrikeBall("Serve1", _local2);
} else {
StrikeBall("Serve2", _local2);
}
}
}
function StrikeBall(aType, aBallPoint) {
if (aType == "Normal") {
_BallSpeed = _BallShotSpeed;
if (_PlayerX < aBallPoint._X) {
_Model.Model("Strike", ((_ID == 1) ? 0 : 1));
} else {
_Model.Model("Strike", ((_ID == 1) ? 1 : 0));
}
} else if (aType == "Save") {
_BallSpeed = _BallShotSpeed;
var _local2 = false;
if (_PlayerX < aBallPoint._X) {
if (_Model.Model("Strike", 3)) {
_local2 = true;
}
} else if (_Model.Model("Strike", 4)) {
_local2 = true;
}
if (_local2) {
var _local7 = Math.abs(_PlayerX - aBallPoint._SaveX);
_Move._Speed = _PlayerJumpSpeed;
MoveTo(aBallPoint._SaveX, aBallPoint._SaveY, false);
}
} else if (aType == "DropShot") {
_BallSpeed = _BallShotSpeed + 1;
_Model.Model("Strike", 2);
} else if (aType == "Serve1") {
_Model.Model("Serve", 0);
var _local6 = {_PosX:_PlayerX + (24 * ((_ID == 1) ? 1 : -1)), _PosY:_PlayerY, _Speed:_BallThrowSpeed};
_Ball._Enabled = true;
_Ball.Show();
_Ball._X = _local6._PosX;
_Ball._Y = _local6._PosY;
_Ball._Throw = _local6._Speed;
_Ball._HitCount = 0;
} else if (aType == "Serve2") {
_BallSpeed = _BallShotSpeed + 1;
var _local5 = {_Action:"Serve", _Value:1};
var _local6 = {_Message:"MSG_MODELCHANGE", _Value:_local5};
_Model.Message(_local6);
_Action = ("Normal");
}
}
function get _PlayerX() {
return(_Model._X + _Panel._X);
}
function get _PlayerY() {
return(_Model._Y + _Panel._Y);
}
function get _HitMC() {
return(_Model._HitMC);
}
function ServeCancel() {
_Move.Stop();
var _local2 = {_Action:"Move", _Value:0};
_Model.Message({_Message:"MSG_MODELCHANGE", _Value:_local2});
_Ball.Init();
_Ball.Hide();
_Owner.Message({_Message:"MSG_BALLSERVE"});
}
function BallFallBegin() {
if (_AutoControl) {
if (_Action == "Serve") {
StrikeAnalyze();
}
}
}
function BallFallPointFirst(aX, aY) {
_BallFallPointFirstX = aX;
if (_PlayerY > aY) {
_BallFallPointFirstY = (aY + random(40)) + 20;
} else {
_BallFallPointFirstY = (aY - random(40)) - 40;
}
}
function DelKeyListener() {
_Control._BTNDirection._ButtonRecord = [];
_Control._BTNDirection.Analyze();
_Self.Message({_Message:"KEY_DIRECTION", _Value:0});
}
}
Symbol 1291 MovieClip [__Packages.fefa.TTennisPlayerMove] Frame 0
class fefa.TTennisPlayerMove extends fefa.TObject
{
var _SpeedMove, pSpeed, _PosMove, _AutoChangeModel, pX, pY, pMC, _PosX, _PosY, _PosEvent, _Owner, pDirection, _TimerID, _Self;
function TTennisPlayerMove (aOwner, aParent) {
super(aOwner, aParent);
_SpeedMove = new Object();
_SpeedMove._X = 0;
_SpeedMove._Y = 0;
pSpeed = 0;
_PosMove = false;
_AutoChangeModel = true;
pX = 0;
pY = 0;
_Direction = (0);
}
function set _MC(aMC) {
pMC = aMC;
pX = pMC._x;
pY = pMC._y;
//return(_MC);
}
function get _MC() {
return(pMC);
}
function set _MCX(Value) {
pX = Value;
_MC._x = pX;
//return(_MCX);
}
function get _MCX() {
return(pX);
}
function set _MCY(Value) {
pY = Value;
_MC._y = pY;
//return(_MCY);
}
function get _MCY() {
return(pY);
}
function Timer(aObject) {
if (_global._PAUSE) {
return(undefined);
}
MoveFeel(aObject);
}
function MoveFeel(aObj) {
if (_Direction != 0) {
Move();
}
}
function MoveTo(aX, aY, aAutoChangeModel, aEvent) {
var _local4 = _MCX - aX;
var _local3 = _MCY - aY;
var _local2 = Math.atan2(_local3, _local4);
_Direction = (-1);
_SpeedMove._X = (-_Speed) * Math.cos(_local2);
_SpeedMove._Y = (-_Speed) * Math.sin(_local2);
_PosX = aX;
_PosY = aY;
_AutoChangeModel = aAutoChangeModel;
_PosEvent = aEvent;
_PosMove = true;
var _local5 = {_Angle:_local2, _AutoChangeModel:_AutoChangeModel};
_Owner.Message({_Message:"MSG_MOVEANGLE", _Value:_local5});
}
function Move() {
if (_PosMove) {
var _local4 = Math.abs(int(_MCX - _PosX));
var _local3 = Math.abs(int(_MCY - _PosY));
if (_local4 < Math.abs(_SpeedMove._X)) {
_MCX = (_PosX);
_SpeedMove._X = 0;
}
if (_local3 < Math.abs(_SpeedMove._Y)) {
_MCY = (_PosY);
_SpeedMove._Y = 0;
}
if ((_SpeedMove._X == 0) && (_SpeedMove._Y == 0)) {
_Direction = (0);
_PosMove = false;
var _local7 = {_AutoChangeModel:_AutoChangeModel, _PosEvent:_PosEvent};
_Owner.Message({_Message:"MSG_MOVESTOP", _Value:_local7});
} else if (_Owner._ID == 1) {
var _local6 = _MCX + _SpeedMove._X;
var _local5 = _MCY + _SpeedMove._Y;
if ((_local6 > 100) && (_local6 < 700)) {
_MCX = (_local6);
}
if ((_local5 >= 340) && (_local5 < 600)) {
_MCY = (_local5);
}
} else {
var _local6 = _MCX + _SpeedMove._X;
var _local5 = _MCY + _SpeedMove._Y;
_MCX = (_local6);
_MCY = (_local5);
}
} else if (_Owner._Action == "Serve") {
var _local2 = _MCX + _SpeedMove._X;
if ((_local2 > _Owner._ServeX1) && (_local2 < _Owner._ServeX2)) {
_MCX = (_local2);
}
} else if (_Owner._ID == 1) {
var _local6 = _MCX + _SpeedMove._X;
var _local5 = _MCY + _SpeedMove._Y;
if ((_local6 > 100) && (_local6 < 700)) {
_MCX = (_local6);
}
if ((_local5 >= 340) && (_local5 < 600)) {
_MCY = (_local5);
}
} else {
var _local6 = _MCX + _SpeedMove._X;
var _local5 = _MCY + _SpeedMove._Y;
_MCX = (_local6);
_MCY = (_local5);
}
return(true);
}
function Message(aMessage) {
}
function Stop() {
_Direction = (0);
}
function set _Direction(Value) {
pDirection = Value;
var _local2 = 0.8;
switch (pDirection) {
case 1 :
_SpeedMove._X = 0;
_SpeedMove._Y = (-_Speed) * _local2;
break;
case 2 :
_SpeedMove._X = _Speed * 0.7;
_SpeedMove._Y = ((-_Speed) * 0.7) * _local2;
break;
case 3 :
_SpeedMove._X = _Speed;
_SpeedMove._Y = 0;
break;
case 4 :
_SpeedMove._X = _Speed * 0.7;
_SpeedMove._Y = (_Speed * 0.7) * _local2;
break;
case 5 :
_SpeedMove._X = 0;
_SpeedMove._Y = _Speed * _local2;
break;
case 6 :
_SpeedMove._X = (-_Speed) * 0.7;
_SpeedMove._Y = (_Speed * 0.7) * _local2;
break;
case 7 :
_SpeedMove._X = -_Speed;
_SpeedMove._Y = 0;
break;
case 8 :
_SpeedMove._X = (-_Speed) * 0.7;
_SpeedMove._Y = ((-_Speed) * 0.7) * _local2;
}
//return(_Direction);
}
function get _Direction() {
return(pDirection);
}
function set _Speed(aSpeed) {
pSpeed = aSpeed;
if (pSpeed != 0) {
clearInterval(_TimerID);
_TimerID = setInterval(_Self, "Timer", 10, _Self);
}
//return(_Speed);
}
function get _Speed() {
return(pSpeed);
}
}
Symbol 1292 MovieClip [__Packages.fefa.TModel] Frame 0
class fefa.TModel extends fefa.TPanelObject
{
var _PlayMode, _ModelInfo, _Change, _Scale, _TimeTag, _TimerID, _Self, _MC, _Panel, pFramesOfSecond, pFrameTime;
function TModel (aOwner, aParent) {
super(aOwner, aParent);
_PlayMode = "Next";
_ModelInfo = new Object();
_Change = true;
_Scale = 100;
}
function TimerCreate() {
TimeDestroy();
_TimeTag = 0;
_TimerID = setInterval(_Self, "Timer", 10, _Self);
}
function TimeDestroy() {
if (_TimerID > 0) {
clearInterval(_TimerID);
}
}
function set _Model(aModelInfo) {
_ModelInfo = aModelInfo;
if (_ModelInfo != null) {
LoadMC(_ModelInfo._LinkName);
_MC._xscale = _ModelInfo._LR * _Scale;
_MC._yscale = _Scale;
_ModelInfo._PlayEnd = false;
TimerCreate();
}
//return(_Model);
}
function get _Model() {
return(_ModelInfo);
}
function LoadMC(aLinkName) {
removeMovieClip(_MC);
_MC = _Panel.attachMovie(aLinkName, "mcModel", 1);
_MC.stop();
}
function PlayEnd() {
TimeDestroy();
}
function Timer(aObj) {
if (_global._PAUSE) {
return(undefined);
}
aObj._TimeTag++;
if ((aObj._TimeTag / aObj._FrameTime) >= 1) {
if (_PlayMode == "Next") {
if (aObj._MC._currentframe == aObj._MC._totalframes) {
if (aObj._ModelInfo._Loop) {
aObj._MC.gotoAndStop(1);
} else {
aObj.PlayEnd();
}
} else {
aObj._MC.nextFrame();
}
} else if (aObj._MC._currentframe == 1) {
if (aObj._ModelInfo._Loop) {
aObj._MC.gotoAndStop(aObj._MC._totalframes);
} else {
aObj.PlayEnd();
}
} else {
aObj._MC.prevFrame();
}
aObj._TimeTag = 0;
}
}
function set _FramesOfSecond(Value) {
pFramesOfSecond = Value;
pFrameTime = 100 / pFramesOfSecond;
//return(_FramesOfSecond);
}
function get _FramesOfSecond() {
return(pFramesOfSecond);
}
function get _FrameTime() {
return(pFrameTime);
}
}
Symbol 1293 MovieClip [__Packages.fefa.TTennisPlayerModel] Frame 0
class fefa.TTennisPlayerModel extends fefa.TModel
{
var _ModelList, _MoveValueNow, pID, _Scale, __set___Model, _ModelInfo, __get___Model, _Owner, _Direction, _Action, _MC;
function TTennisPlayerModel (aOwner, aParent) {
super(aOwner, aParent);
_ModelList = new Array();
_MoveValueNow = 0;
}
function set _ID(Value) {
pID = Value;
if (_ID > 1) {
_Scale = 60;
} else {
_Scale = 80;
}
_ModelList = null;
_ModelList = new Array();
ModelAdd("Move", 0, "Stand" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 1, "MoveUpDown" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 2, "MoveRight" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 3, "MoveRight" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 4, "MoveRight" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 5, "MoveUpDown" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 6, "MoveLeft" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 7, "MoveLeft" + _ID, 1, 1, true, true, true);
ModelAdd("Move", 8, "MoveLeft" + _ID, 1, 1, true, true, true);
ModelAdd("Serve", 0, "ServeThrow" + _ID, 1, 1, false, false, false);
ModelAdd("Serve", 1, "ServeShot" + _ID, 1, 1, false, false, true);
ModelAdd("Strike", 0, "ForehandSmash" + _ID, 1, 1, false, false, true);
ModelAdd("Strike", 1, "BackhandSmash" + _ID, 1, 1, false, false, true);
ModelAdd("Strike", 2, "DropShot" + _ID, 1, 1, false, false, true);
ModelAdd("Strike", 3, "Save" + _ID, 1, 1, false, false, true);
ModelAdd("Strike", 4, "Save" + _ID, 1, -1, false, false, true);
__set___Model(_ModelList[0]);
//return(_ID);
}
function get _ID() {
return(pID);
}
function ModelAdd(aAction, aValue, aLinkName, aUD, aLR, aLoop, aBreak, aPlayEndChange) {
var _local2 = {_Action:aAction, _Value:aValue, _LinkName:aLinkName, _UD:aUD, _LR:aLR, _Loop:aLoop, _Break:aBreak, _PlayEndChange:aPlayEndChange};
_ModelList.push(_local2);
}
function GetModel(aAction, aValue) {
var _local3 = null;
var _local2 = 0;
while (_local2 < _ModelList.length) {
if ((_ModelList[_local2]._Action == aAction) && (_ModelList[_local2]._Value == aValue)) {
_local3 = _ModelList[_local2];
break;
}
_local2++;
}
return(_local3);
}
function PlayEnd() {
super.PlayEnd();
_ModelInfo._PlayEnd = true;
if (__get___Model()._PlayEndChange) {
_Owner.Message({_Message:"MSG_MODELPLAYEREND"});
}
}
function Message(aMessage) {
if (aMessage._Message == "MSG_MODELCHANGE") {
var _local4 = aMessage._Value._Action;
var _local2 = aMessage._Value._Value;
var _local3 = null;
_local3 = GetModel(_local4, _local2);
if (_local3 != null) {
__set___Model(_local3);
}
if (_local2 != 0) {
_Direction = _local2;
}
_Action = _local4;
}
}
function Model(aAction, aValue) {
var _local2 = "Nothing";
if (aAction == "Move") {
_MoveValueNow = aValue;
}
if (__get___Model()._Break || (__get___Model()._PlayEnd && (__get___Model()._PlayEndChange))) {
var _local4 = {_Action:aAction, _Value:aValue};
var _local5 = {_Message:"MSG_MODELCHANGE", _Value:_local4};
_Owner.Message(_local5);
_local2 = aAction;
}
return(_local2);
}
function get _HitMC() {
return(_MC);
}
function Timer(aObj) {
super.Timer(aObj);
if (typeof(aObj._MC.mcHit) == "movieclip") {
var _local4 = {_HitMC:aObj._MC.mcHit};
_Owner.Message({_Message:"MSG_HITEXIST", _Value:_local4});
}
}
}
Symbol 1294 MovieClip [__Packages.fefa.TTennisPlayerControl] Frame 0
class fefa.TTennisPlayerControl extends fefa.TObject
{
var _BTNAction, _Self, _BTNDirection, _Owner;
function TTennisPlayerControl (aOwner) {
super(aOwner);
_BTNAction = new fefa.TTennisButtonAction(_Self);
_BTNDirection = new fefa.TTennisButtonDirection(_Self);
}
function Message(aMessage) {
_Owner.Message(aMessage);
}
}
Symbol 1295 MovieClip [__Packages.fefa.TButton] Frame 0
class fefa.TButton extends fefa.TObject
{
var _ButtonListener, _Self, _ButtonRecord, _ButtonCount;
function TButton (aObject) {
super(aObject);
_ButtonListener = new fefa.TButtonListener(_Self);
_ButtonRecord = new Array();
_ButtonCount = 12;
}
function ButtonAdd(aButton) {
_ButtonListener.Add(aButton);
}
function ButtonAppend(aButtonList) {
_ButtonListener.Append(aButtonList);
}
function Message(aMessage) {
if (aMessage._Message == "BTN_PRESS") {
var _local3 = aMessage._Value._Value;
_ButtonRecord.push(_local3);
if (_ButtonRecord.length > _ButtonCount) {
_ButtonRecord.shift();
}
Analyze("PRESS");
}
if (aMessage._Message == "BTN_RELEASE") {
var _local3 = aMessage._Value._Value;
var _local2 = 0;
while (_local2 < _ButtonRecord.length) {
if (_ButtonRecord[_local2] == _local3) {
_ButtonRecord.splice(_local2, 1);
break;
}
_local2++;
}
Analyze("RELEASE");
}
}
function Analyze(Value) {
}
}
Symbol 1296 MovieClip [__Packages.fefa.TButtonListener] Frame 0
class fefa.TButtonListener extends fefa.TObject
{
var _ButtonList, _ButtonValue, _Listener, _Self, _Owner;
function TButtonListener (aObject) {
super(aObject);
_ButtonList = new Array();
_ButtonValue = 0;
_Listener = new Object();
_Listener._Owner = _Self;
_Listener.onKeyDown = function () {
var _local2 = 0;
while (_local2 < this._Owner._ButtonList.length) {
if (Key.getCode() == this._Owner._ButtonList[_local2]._Code) {
this._Owner.Press(_local2);
}
_local2++;
}
};
_Listener.onKeyUp = function () {
var _local2 = 0;
while (_local2 < this._Owner._ButtonList.length) {
if (Key.getCode() == this._Owner._ButtonList[_local2]._Code) {
this._Owner.Release(_local2);
}
_local2++;
}
};
Key.addListener(_Listener);
var _local4 = new Array();
_local4.push({_Code:87, _Value:1});
_local4.push({_Code:68, _Value:2});
_local4.push({_Code:83, _Value:3});
_local4.push({_Code:65, _Value:4});
Append(_local4);
}
function Add(aButton) {
aButton._ID = 1 << _ButtonList.length;
_ButtonList.push(aButton);
}
function Append(aButtonList) {
_ButtonList = null;
_ButtonList = new Array();
var _local2 = 0;
while (_local2 < aButtonList.length) {
aButtonList[_local2]._ID = 1 << _local2;
_ButtonList.push(aButtonList[_local2]);
_local2++;
}
}
function Press(aIndex) {
var _local4 = _ButtonValue & _ButtonList[aIndex]._ID;
if (_local4 == 0) {
_ButtonValue = _ButtonValue | _ButtonList[aIndex]._ID;
var _local3 = {_Value:_ButtonList[aIndex]._Value};
Message({_Message:"BTN_PRESS", _Value:_local3});
}
}
function Release(aIndex) {
_ButtonValue = _ButtonValue ^ _ButtonList[aIndex]._ID;
var _local2 = {_Value:_ButtonList[aIndex]._Value};
Message({_Message:"BTN_RELEASE", _Value:_local2});
}
function Message(aMessage) {
_Owner.Message(aMessage);
}
}
Symbol 1297 MovieClip [__Packages.fefa.TTennisButtonAction] Frame 0
class fefa.TTennisButtonAction extends fefa.TButton
{
var ButtonAppend, _PressLength, _ButtonRecord, _Owner;
function TTennisButtonAction (aObject) {
super(aObject);
var _local3 = new Array();
_local3.push({_Code:74, _Value:1});
_local3.push({_Code:32, _Value:1});
ButtonAppend(_local3);
_PressLength = 0;
}
function Analyze(Value) {
if (_ButtonRecord.length > _PressLength) {
var _local2 = 0;
if (_ButtonRecord.length > 0) {
_local2 = _ButtonRecord[_ButtonRecord.length - 1];
}
_Owner.Message({_Message:"KEY_BUTTON", _Value:_local2});
}
_PressLength = _ButtonRecord.length;
}
}
Symbol 1298 MovieClip [__Packages.fefa.TTennisButtonDirection] Frame 0
class fefa.TTennisButtonDirection extends fefa.TButton
{
var ButtonAppend, _ButtonRecord, _Owner;
function TTennisButtonDirection (aObject) {
super(aObject);
var _local3 = new Array();
_local3.push({_Code:87, _Value:1});
_local3.push({_Code:68, _Value:3});
_local3.push({_Code:83, _Value:5});
_local3.push({_Code:65, _Value:7});
_local3.push({_Code:38, _Value:1});
_local3.push({_Code:39, _Value:3});
_local3.push({_Code:40, _Value:5});
_local3.push({_Code:37, _Value:7});
ButtonAppend(_local3);
}
function Analyze() {
var _local2 = 0;
if (_ButtonRecord.length > 0) {
_local2 = _ButtonRecord[_ButtonRecord.length - 1];
if (_ButtonRecord.length > 1) {
var _local3 = _ButtonRecord[_ButtonRecord.length - 2];
var _local4 = _local2 + _local3;
if ((_local4 != 6) && (_local4 != 10)) {
if ((_local2 * _local3) == 7) {
_local2 = _local2 + _local3;
} else {
_local2 = (_local2 + _local3) / 2;
}
}
}
}
_Owner.Message({_Message:"KEY_DIRECTION", _Value:_local2});
}
}
Symbol 1299 MovieClip [__Packages.fefa.TBall] Frame 0
class fefa.TBall extends fefa.TPanelObject
{
var _MCShadow, _Panel, _MCBall, _HitLast, _SpeedMove, _HitList, _HitID, _GravitySpeed, _GravitySpeedValue, _TouchGround, _TimerID, _Self, pEnabled, pBallPosX, pBallPosY, _Tag, _Owner, _Jumping, _TempTag, pAngle, pSpeed, _HitCount, _Parent;
function TBall (aOwner, aParent) {
super(aOwner, aParent);
_MCShadow = _Panel.attachMovie("BallShadow", "mcBallShadow", _Panel.getNextHighestDepth());
_MCBall = _Panel.attachMovie("ball3d", "mcBall", _Panel.getNextHighestDepth());
_BallPosX = (_MCBall._x);
_BallPosY = (_MCBall._y);
_HitLast = new Object();
_SpeedMove = new Object();
_SpeedMove._X = 0;
_SpeedMove._Y = 0;
_Angle = (0);
_HitList = new fefa.TList();
_HitID = -1;
_GravitySpeed = 0;
_GravitySpeedValue = 0;
_TouchGround = 0;
_Speed = (0);
_TimerID = setInterval(_Self, "Timer", 10, _Self);
}
function set _Enabled(Value) {
if (Value) {
}
pEnabled = Value;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
function set _BallPosX(Value) {
pBallPosX = Value;
_MCBall._x = pBallPosX;
//return(_BallPosX);
}
function get _BallPosX() {
return(pBallPosX);
}
function set _BallPosY(Value) {
pBallPosY = Value;
_MCBall._y = pBallPosY;
//return(_BallPosY);
}
function get _BallPosY() {
return(pBallPosY);
}
function Timer(aObject) {
if (_global._PAUSE) {
return(undefined);
}
Gravity();
Move();
}
function set _Throw(Value) {
var _local9 = int(_BallPosY);
_GravitySpeed = -Value;
_GravitySpeedValue = 0.1;
var _local2 = Math.abs(int(_GravitySpeed / _GravitySpeedValue)) - 1;
var _local8 = (_local2 * _GravitySpeed) / 2;
var _local10 = _local2 * _SpeedMove._Y;
var _local3 = _local8 + _BallPosY;
var _local4 = int(Math.sqrt(Math.abs(_local3 * 2) / _GravitySpeedValue));
_Tag = _local2 + _local4;
var _local6 = int(_Self._X + (_Self._SpeedMove._X * _Tag));
var _local5 = int(_Self._Y + (_Self._SpeedMove._Y * _Tag));
var _local7 = {_X:_local6, _Y:_local5, _HitID:_HitID};
_Owner.Message({_Message:"MSG_BALLFALLPOINT", _Value:_local7});
_Jumping = true;
//return(_Throw);
}
function get _Throw() {
return(_GravitySpeed);
}
function Gravity() {
if (_Jumping == false) {
return(false);
}
if (_TempTag == 0) {
}
_TempTag++;
if ((_GravitySpeed < 0) && ((_GravitySpeed + _GravitySpeedValue) >= 0)) {
var _local6 = {_HitID:_HitID, _Number:_TouchGround, _PosX:_Self._X, _PosY:_Self._Y};
_Owner.Message({_Message:"MSG_BALLFALLBEGIN", _Value:_local6});
}
_GravitySpeed = _GravitySpeed + _GravitySpeedValue;
var _local5 = _BallPosY + _GravitySpeed;
if (_local5 > _MCShadow._y) {
var _local3 = new Sound();
_local3.attachSound("SND_BALL_HITGROUND");
_local3.start();
var _local4 = _root.attachMovie("BallEffect2", "BallEffect" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = _Self._X;
_local4._y = _Self._Y;
_TouchGround++;
if (_Self._Enabled) {
var _local6 = {_HitID:_HitID, _Number:_TouchGround, _PosX:_Self._X, _PosY:_Self._Y};
_Owner.Message({_Message:"MSG_BALLTOUCHGROUND", _Value:_local6});
}
_GravitySpeed = _GravitySpeed * -0.6;
if (int(Math.abs(_GravitySpeed * 10)) < 5) {
_BallPosY = (_MCShadow._y);
_Jumping = false;
}
}
_BallPosY = (_BallPosY + _GravitySpeed);
}
function Move() {
_Self._X = _Self._X + _Self._SpeedMove._X;
_Self._Y = _Self._Y + _Self._SpeedMove._Y;
if ((_Self._SpeedMove._X != 0) || (_Self._SpeedMove._Y != 0)) {
var _local2 = {_X:_Self._X, _Y:_Self._Y, _HitID:_HitID};
_Owner.Message({_Message:"MSG_BALLPOINTCHANGE", _Value:_local2});
}
}
function set _Angle(Value) {
pAngle = Value;
_SpeedMove._X = _Speed * Math.cos(_Angle * (Math.PI/180));
_SpeedMove._Y = (-_Speed) * Math.sin(_Angle * (Math.PI/180));
_MCBall._rotation = 90 - _Angle;
var _local2 = {_Angle:Value, _X:_Panel._x, _Y:_Panel._y, _HitID:_HitID};
_Owner.Message({_Message:"MSG_BALLANGLECHANGE", _Value:_local2});
//return(_Angle);
}
function get _Angle() {
var _local2 = pAngle;
if (_local2 < 0) {
_local2 = _local2 + 360;
}
return(_local2);
}
function set _Speed(aSpeed) {
pSpeed = aSpeed;
//return(_Speed);
}
function get _Speed() {
return(pSpeed);
}
function get _HitMC() {
return(_MCBall);
}
function InHitB(aSender, aHitID, aSpeed, aX1, aY1, aX2, aY2) {
if (_HitID != aHitID) {
var _local3 = new Sound();
_local3.attachSound("SND_BALL_HITRACKET");
_local3.start();
var _local5 = {_X:aX1, _Y:aY1, _HitID:aHitID};
_Owner.Message({_Message:"MSG_BALLFALLPOINTFIRST", _Value:_local5});
_HitCount++;
_HitLast = aSender;
_HitID = aHitID;
_Speed = (aSpeed);
_Angle = (GetAngle(aX1, aY1, aX2, aY2));
_GravitySpeedValue = 0.1;
var _local8 = Math.abs(aY1 - aY2);
var _local10 = Math.abs(_local8 / _Self._SpeedMove._Y);
var _local6 = Math.sqrt(((-_Speed) * _BallPosY) / _GravitySpeedValue) / 4;
var _local7 = ((_local10 - _local6) * _GravitySpeedValue) / 2;
_Throw = (Math.abs(_local7));
_TouchGround = 0;
var _local4 = _Parent.getNextHighestDepth();
var _local2 = _Parent.attachMovie("BallEffect1", "BallEffect" + _local4, _local4);
_local2._x = _Self._X;
_local2._y = _Self._Y + _BallPosY;
_local2._xscale = 150;
_local2._yscale = 150;
}
}
function Init() {
_BallPosY = (_MCShadow._y);
_Jumping = false;
_HitLast = null;
_HitID = -1;
_TouchGround = 0;
_x = 0;
_y = 0;
_Speed = (0);
_Angle = (0);
_SpeedMove._X = 0;
_SpeedMove._Y = 0;
}
function Show() {
_Self._Panel._visible = true;
}
function Hide() {
_Self._Panel._visible = false;
}
function GetAngle(X1, Y1, X2, Y2) {
var _local3 = X1 - X2;
var _local2 = Y1 - Y2;
var _local1 = Math.atan2(_local2, _local3) * 57.2957795130823;
if (_local1 < 0) {
_local1 = _local1 + 360;
}
_local1 = 360 - int(_local1);
return(_local1);
}
function Temp() {
_Jumping = false;
_HitLast = null;
_TouchGround = 0;
_TempTag = 0;
}
function GetPoint(aX, aY) {
var _local3 = null;
if (_Self._Enabled) {
var _local5 = aY - _Self._Y;
var _local2 = Math.abs(_local5 / _Self._SpeedMove._Y);
var _local6 = _Self._X + (_SpeedMove._X * _local2);
var _local4 = _Self._Y + (_SpeedMove._Y * _local2);
_local3 = {_X:_local6, _Y:_local4, _Step:_local2};
}
return(_local3);
}
function get _BallHeight() {
return(Math.abs(_BallPosY));
}
}
Symbol 1300 MovieClip [__Packages.fefa.TList] Frame 0
class fefa.TList
{
var _List;
function TList () {
_List = new Array();
}
function Append(aArray) {
_List = aArray;
}
function Add(aObject) {
_List.push(aObject);
return(true);
}
function Del(aObject) {
var _local3 = false;
var _local2 = 0;
while (_local2 < _List.length) {
if (_List[_local2] == aObject) {
_List.splice(_local2, 1);
_local3 = true;
}
_local2++;
}
return(_local3);
}
function get _Length() {
return(_List.length);
}
function Item(aIndex) {
return(_List[aIndex]);
}
}
Symbol 1301 MovieClip [__Packages.fefa.TPanelGameInfo] Frame 0
class fefa.TPanelGameInfo extends fefa.TPanelObject
{
var _MC, _Panel, _SNDBTNEnter, _SNDBTNClick, _SNDShowPanel, _Self, _MCScore, _MCSystem, _ServeNumber, _MCStart, pLock, _Owner, __get___Level, __get___Head2, _ServeID, __get___PlayerIndex1, __get___PlayerIndex2;
function TPanelGameInfo (aOwner, aParent) {
super(aOwner, aParent);
_MC = _Panel.attachMovie("Info", "mcInfo", 2);
_MC.mcScoreA1.stop();
_MC.mcScoreA2.stop();
_MC.mcScoreB1.stop();
_MC.mcScoreB2.stop();
_MC.mcNumberA.stop();
_MC.mcPlayer2.stop();
_MC.mcPause.stop();
_MC.mcMusic.stop();
_MC.mcNumberA1.stop();
_MC.mcNumberA2.stop();
_SNDBTNEnter = new Sound();
_SNDBTNEnter.attachSound("SND_BTN_ENTER");
_SNDBTNClick = new Sound();
_SNDBTNClick.attachSound("SND_BTN_CLICK");
_SNDShowPanel = new Sound();
_SNDShowPanel.attachSound("SND_MSG_PANEL");
_MC.mcPause._Owner = _Self;
_MC.mcPause.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.mcPause.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMEPAUSE"});
};
_MC.mcMusic._Owner = _Self;
_MC.mcMusic.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MC.mcMusic.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_MUSICMUTE"});
};
_MC.TempScore1._visible = false;
_MC.TempScore2._visible = false;
SetScoreA(1, 0);
SetScoreA(2, 0);
SetScoreB(1, 0);
SetScoreB(2, 0);
_MCScore = _Panel.attachMovie("PanelScore", "mcScore", 3);
_MCScore._x = (_Panel._width - _MCScore._width) / 2;
_MCScore._y = (_Panel._height - _MCScore._height) / 2;
_MCScore._visible = false;
_MCScore.mcPlayer2.stop();
_MCScore.mcNumber.stop();
_MCScore.mcNumberA1.stop();
_MCScore.mcNumberA2.stop();
_MCScore.BTN_OK._Owner = _Self;
_MCScore.BTN_OK.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCScore.BTN_OK.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._parent._visible = false;
this._Owner.Message({_Message:"MSG_NUMBERASTART"});
};
_MCSystem = _Panel.attachMovie("PanelSystem", "mcSystem", 99);
_MCSystem._x = (_Panel._width - _MCSystem._width) / 2;
_MCSystem._y = (_Panel._height - _MCSystem._height) / 2;
_MCSystem._visible = false;
_MCSystem.BTN_Return._Owner = _Self;
_MCSystem.BTN_Return.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCSystem.BTN_Return.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMERETURN"});
};
_MCSystem.BTN_Exit._Owner = _Self;
_MCSystem.BTN_Exit.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCSystem.BTN_Exit.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._Owner.Message({_Message:"MSG_GAMEEXIT"});
};
_MC.mcHead2.stop();
_ServeNumber = 0;
_MCStart = _Panel.attachMovie("PanelStart", "mcPanelStart", 5);
_MCStart._x = (_Panel._width - _MCStart._width) / 2;
_MCStart._y = (_Panel._height - _MCStart._height) / 2;
_MCStart._visible = false;
_MCStart.BTN_OK._Owner = _Self;
_MCStart.BTN_OK.onRollOver = function () {
this._Owner._SNDBTNEnter.start();
};
_MCStart.BTN_OK.onRelease = function () {
this._Owner._SNDBTNClick.start();
this._parent._visible = false;
this._Owner.Message({_Message:"MSG_NUMBERASTART"});
};
}
function Init() {
_NumberA1 = (0);
_NumberA2 = (0);
SetScoreA(1, 0);
SetScoreA(2, 0);
SetScoreB(1, 0);
SetScoreB(2, 0);
_MC.mcHead2.gotoAndStop(random(5) + 1);
_ServeNumber = 0;
_Lock = (false);
}
function set _Lock(Value) {
pLock = Value;
_Owner.Message({_Message:"MSG_BUTTONLOCK", _Value:_Lock});
//return(_Lock);
}
function get _Lock() {
return(pLock);
}
function set _Level(Value) {
_MCStart.mcLevel.gotoAndStop((4 - Value) + 1);
//return(__get___Level());
}
function ShowPanel(Value) {
_SNDShowPanel.start();
if (Value == "Start") {
_MCStart._visible = true;
_Lock = (true);
}
if (Value == "Winner") {
_MCScore.mcNumber.gotoAndStop(_NumberA - 1);
_MCScore._visible = true;
_Lock = (true);
}
}
function set _Head2(Value) {
_MC.mcHead2.gotoAndStop(Value);
//return(__get___Head2());
}
function SetScoreA(aID, aValue) {
if (aID == 1) {
_MC.mcScoreA1.gotoAndStop(aValue + 1);
} else {
_MC.mcScoreA2.gotoAndStop(aValue + 1);
}
}
function GetScoreA(aID) {
var _local2 = -1;
if (aID == 1) {
_local2 = _MC.mcScoreA1._currentframe - 1;
} else {
_local2 = _MC.mcScoreA2._currentframe - 1;
}
return(_local2);
}
function SetScoreB(aID, aValue) {
if (aID == 1) {
_MC.mcScoreB1.gotoAndStop(aValue + 1);
} else {
_MC.mcScoreB2.gotoAndStop(aValue + 1);
}
}
function GetScoreB(aID) {
var _local2 = -1;
if (aID == 1) {
_local2 = _MC.mcScoreB1._currentframe - 1;
} else {
_local2 = _MC.mcScoreB2._currentframe - 1;
}
return(_local2);
}
function ScoreB(aID) {
var _local4 = true;
var _local5 = GetScoreB(aID);
if (_local5 < 3) {
SetScoreB(aID, GetScoreB(aID) + 1);
var _local7 = {_ID:aID, _Prop:"Score"};
_Owner.Message({_Message:"MSG_PLAYERSCORE", _Value:_local7});
} else {
var _local6 = GetScoreB(((aID == 1) ? 2 : 1));
var _local3 = _local5 - _local6;
if (_local3 == -1) {
SetScoreB(((aID == 1) ? 2 : 1), GetScoreB(((aID == 1) ? 2 : 1)) - 1);
var _local7 = {_ID:aID, _Prop:"Deuce"};
_Owner.Message({_Message:"MSG_PLAYERSCORE", _Value:_local7});
}
if (_local3 == 0) {
SetScoreB(aID, GetScoreB(aID) + 1);
var _local7 = {_ID:aID, _Prop:"Lead"};
_Owner.Message({_Message:"MSG_PLAYERSCORE", _Value:_local7});
}
if (_local3 >= 1) {
if (aID == 1) {
_NumberA1 = (_NumberA1 + 1);
ShowPanel("Winner");
_local4 = false;
} else {
_NumberA2 = (_NumberA2 + 1);
ShowPanel("Winner");
_local4 = false;
}
}
}
_ServeNumber = 0;
return(_local4);
}
function get _ScoreNumber() {
return(GetScoreB(1) + GetScoreB(2));
}
function Message(aMsg) {
var _local3 = aMsg._Message;
var _local6 = aMsg._Value;
if (_local3 == "MSG_GAMEPAUSE") {
_Lock = (true);
_global._PAUSE = true;
_MC.mcPause.gotoAndStop(2);
_MCSystem._visible = true;
new Sound().setVolume(0);
_MC.mcPause.enabled = false;
_MC.mcMusic.enabled = false;
}
if (_local3 == "MSG_MUSICMUTE") {
_global._SOUNDMUTE = !_global._SOUNDMUTE;
_MC.mcMusic.gotoAndStop((_global._SOUNDMUTE ? 2 : 1));
if (_global._SOUNDMUTE) {
var _local5 = new Sound();
_local5.setVolume(0);
} else {
var _local5 = new Sound();
_local5.setVolume(100);
}
}
if (_local3 == "MSG_NUMBERASTART") {
_Lock = (false);
SetScoreB(1, 0);
SetScoreB(2, 0);
_Owner.Message(aMsg);
_MC.mcNumberA.gotoAndStop(_NumberA);
if (Math.max(_NumberA1, _NumberA2) < 3) {
_ServeID = (((_NumberA % 2) == 1) ? 1 : 2);
_ServeNumber = 0;
_Owner.Message({_Message:"MSG_BALLSERVE"});
} else {
_Owner.Message({_Message:"MSG_GAMEFINISH", _Value:((_NumberA1 > _NumberA2) ? 1 : 2)});
}
}
if (_local3 == "MSG_GAMERETURN") {
_Lock = (false);
_global._PAUSE = false;
_MCSystem._visible = false;
if (_global._SOUNDMUTE) {
var _local5 = new Sound();
_local5.setVolume(0);
} else {
var _local5 = new Sound();
_local5.setVolume(100);
}
_MC.mcPause.enabled = true;
_MC.mcMusic.enabled = true;
_MC.mcPause.gotoAndStop(1);
_Owner.Message({_Message:"MSG_PAUSEEND"});
}
if (_local3 == "MSG_GAMEEXIT") {
_Lock = (false);
if (_global._SOUNDMUTE) {
var _local5 = new Sound();
_local5.setVolume(0);
} else {
var _local5 = new Sound();
_local5.setVolume(100);
}
_global._PAUSE = false;
_Owner.Message({_Message:"MSG_GAMEEXIT"});
_MCSystem._visible = false;
_MC.mcPause.enabled = true;
_MC.mcMusic.enabled = true;
_MC.mcPause.gotoAndStop(1);
}
}
function set _PlayerIndex1(Value) {
_MCScore.mcPlayer1.gotoAndStop(Value);
for (var _local2 in _MCScore.mcPlayer1) {
_MCScore.mcPlayer1[_local2].gotoAndStop(2);
}
_MC.mcPlayer1.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayer1) {
_MC.mcPlayer1[_local2].gotoAndStop(2);
}
_MC.mcPlayerB1.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayerB1) {
_MC.mcPlayerB1[_local2].gotoAndStop(2);
}
//return(__get___PlayerIndex1());
}
function set _PlayerIndex2(Value) {
_MCScore.mcPlayer2.gotoAndStop(Value);
for (var _local2 in _MCScore.mcPlayer2) {
_MCScore.mcPlayer2[_local2].gotoAndStop(2);
}
_MC.mcPlayer2.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayer2) {
_MC.mcPlayer2[_local2].gotoAndStop(2);
}
_MC.mcPlayerB2.gotoAndStop(Value);
for (var _local2 in _MC.mcPlayerB2) {
_MC.mcPlayerB2[_local2].gotoAndStop(2);
}
//return(__get___PlayerIndex2());
}
function get _NumberA() {
var _local2 = 1;
_local2 = _local2 + (_MCScore.mcNumberA1._currentframe - 1);
_local2 = _local2 + (_MCScore.mcNumberA2._currentframe - 1);
return(_local2);
}
function set _NumberA1(Value) {
_MCScore.mcNumberA1.gotoAndStop(Value + 1);
_MC.mcNumberA1.gotoAndStop(Value + 1);
//return(_NumberA1);
}
function get _NumberA1() {
var _local2 = _MC.mcNumberA1._currentframe - 1;
return(_local2);
}
function set _NumberA2(Value) {
_MCScore.mcNumberA2.gotoAndStop(Value + 1);
_MC.mcNumberA2.gotoAndStop(Value + 1);
//return(_NumberA2);
}
function get _NumberA2() {
var _local2 = _MC.mcNumberA2._currentframe - 1;
return(_local2);
}
}
Symbol 1302 MovieClip [__Packages.fefa.TPanelBattle] Frame 0
class fefa.TPanelBattle extends fefa.TPanelObject
{
var _NodeList, _NodeOffX, _NodeOffY, _Owner, _MCBG2, _MCBG4, _MCBG5, _Time, _TimerID, _Self, _TimerTag, _MCBG3, pEnabled, _MCBG1, _Panel, __get___BG1, __get___BG2, __get___BG3, __get___BG4, __get___BG5, pLevel;
function TPanelBattle (aOwner, aParent) {
super(aOwner, aParent);
_NodeList = new Array();
_BG1 = ("BG1");
_BG2 = ("BG2");
_BG3 = ("BG3");
_BG4 = ("BG4");
_BG5 = ("BG5");
_NodeOffX = 40;
_NodeOffY = 40;
Init();
}
function Message(Msg) {
var _local5 = Msg._Message;
var _local11 = Msg._Value;
if (_local5 == "MSG_PROCESSBACK") {
_Owner.Message({_Message:"MSG_PANELMAIN"});
Init();
}
if (_local5 == "MSG_PROCESSNEXT") {
var _local6 = 1;
var _local3 = 0;
var _local2 = 0;
while (_local2 < _NodeList.length) {
if (_NodeList[_local2]._Level == _Level) {
if (_Level != 1) {
if (_NodeList[_local2]._PlayerIndex == 1) {
_local3 = _NodeList[_local2]._ParentNode._ChildrenNodeList[((_NodeList[_local2]._Index == 0) ? 1 : 0)]._PlayerIndex;
break;
}
} else if (_NodeList[_local2]._PlayerIndex != 1) {
_local3 = _NodeList[_local2]._PlayerIndex;
break;
}
}
_local2++;
}
var _local7 = {_PlayerIndex1:_local6, _PlayerIndex2:_local3, _Level:_Level};
_Owner.Message({_Message:"MSG_PANELASSIGN", _Value:_local7});
}
if (_local5 == "MSG_RANDOMGROUP") {
_MCBG2.BTN_Back.enabled = false;
_MCBG2.BTN_Back._visible = false;
_MCBG4.BTN_Execute._visible = false;
_MCBG5._visible = true;
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _NodeList.length) {
if (_NodeList[_local2]._Level == 4) {
_NodeList[_local2]._Status = "Flashing";
_local4.push(_NodeList[_local2]);
}
_local2++;
}
_Time = 35;
_TimerID = setInterval(_Self, "Timer", 100, _local4);
}
}
function Timer(aItems) {
aItems[_TimerTag].FlashStamp(false);
if (_Time > 0) {
_TimerTag = random(16);
aItems[_TimerTag].FlashStamp(true);
_Time--;
} else {
clearInterval(_TimerID);
_Level = (4);
_MCBG2.BTN_Back.enabled = true;
_MCBG2.BTN_Back._visible = true;
_MCBG5._visible = false;
}
}
function Init() {
_MCBG3._Canvas.clear();
_MCBG4.BTN_Execute._visible = true;
_MCBG4.MC_Cup._visible = false;
_MCBG2.BTN_OK._visible = false;
var _local2 = 0;
while (_local2 < _NodeList.length) {
_NodeList[_local2]._PlayerIndex = 0;
_NodeList[_local2]._Winner = false;
_MCBG3._Canvas.clear();
_local2++;
}
_MCBG2.BTN_Back.enabled = true;
_MCBG2.BTN_Back._visible = true;
}
function set _Enabled(Value) {
pEnabled = Value;
_MCBG1.enabled = _Enabled;
_MCBG2.enabled = _Enabled;
_MCBG2.BTN_Back.enabled = false;
_MCBG2.BTN_OK.enabled = false;
_MCBG3.enabled = _Enabled;
_MCBG4.enabled = _Enabled;
_MCBG4.MC_Cup.enabled = _Enabled;
_MCBG4.BTN_Execute.enabled = _Enabled;
//return(_Enabled);
}
function get _Enabled() {
return(pEnabled);
}
function set _BG1(Value) {
_MCBG1 = _Panel.attachMovie(Value, "mcBG1", 1);
_MCBG1.stop();
//return(__get___BG1());
}
function set _BG2(Value) {
_MCBG2 = _Panel.attachMovie(Value, "mcBG2", 2);
_MCBG2._x = (800 - _MCBG2._width) / 2;
_MCBG2._y = (600 - _MCBG2._height) / 2;
_MCBG2.BTN_Back._Owner = _Self;
_MCBG2.BTN_Back.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MCBG2.BTN_Back.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_PROCESSBACK"});
};
_MCBG2.BTN_OK._Owner = _Self;
_MCBG2.BTN_OK.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MCBG2.BTN_OK.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_PROCESSNEXT"});
};
//return(__get___BG2());
}
function CreateTree(aParentNode, aLevel) {
var _local4 = aLevel - 1;
if (_local4 >= 0) {
var _local2 = new fefa.TPanelBattlePlayer(aParentNode, aParentNode._Parent);
_local2._ParentNode = aParentNode;
_local2._LR = aParentNode._LR;
_local2._Level = aParentNode._Level + 1;
_local2._PlayerIndex = 0;
_local2._Index = aParentNode.InsertChildrenNode(_local2);
_local2._NodeIndex = (2 * aParentNode._NodeIndex) + _local2._Index;
_NodeList.push(_local2);
CreateTree(_local2, _local4);
_local2 = new fefa.TPanelBattlePlayer(aParentNode, aParentNode._Parent);
_local2._ParentNode = aParentNode;
_local2._LR = aParentNode._LR;
_local2._Level = aParentNode._Level + 1;
_local2._PlayerIndex = 0;
_local2._Index = aParentNode.InsertChildrenNode(_local2);
_local2._NodeIndex = (2 * aParentNode._NodeIndex) + _local2._Index;
_NodeList.push(_local2);
CreateTree(_local2, _local4);
}
}
function set _BG3(Value) {
_MCBG3 = _Panel.attachMovie(Value, "mcBG3", 3);
_MCBG3._Canvas = _MCBG3.createEmptyMovieClip("mcCanvas", 1);
_MCBG3._x = (800 - _MCBG3._width) / 2;
_MCBG3._y = (600 - _MCBG3._height) / 2;
var _local5 = new fefa.TPanelBattlePlayer(_Self, _MCBG3);
_local5._LR = 1;
_local5._Level = 1;
_local5._PlayerIndex = 0;
_local5._Index = 0;
_local5._NodeIndex = 0;
_local5._X = (_MCBG3._width - _local5._Width) / 2;
_local5._Y = (_MCBG3._height / 2) - (_local5._Height / 2);
_NodeList.push(_local5);
CreateTree(_local5, 3);
_local5 = new fefa.TPanelBattlePlayer(_Self, _MCBG3);
_local5._LR = -1;
_local5._Level = 1;
_local5._PlayerIndex = 0;
_local5._Index = 0;
_local5._NodeIndex = 0;
_local5._X = ((_MCBG3._width - _local5._Width) / 2) + 4;
_local5._Y = (_MCBG3._height / 2) - (_local5._Height / 2);
_NodeList.push(_local5);
CreateTree(_local5, 3);
var _local4 = _MCBG3._width;
var _local3 = 80;
var _local2 = 4;
while (_local2 >= 1) {
if (_local2 == 4) {
var _local6 = 0;
while (_local6 < _NodeList.length) {
if (_NodeList[_local6]._Level == _local2) {
if (_NodeList[_local6]._LR == 1) {
_NodeList[_local6]._X = 1.5;
} else {
_NodeList[_local6]._X = (_local4 - _local3) - 1;
}
_NodeList[_local6]._Y = ((_NodeList[_local6]._NodeIndex + 1) * (_MCBG3._height / 9)) - (_NodeList[_local6]._Height / 2);
}
_local6++;
}
} else {
var _local6 = 0;
while (_local6 < _NodeList.length) {
if (_NodeList[_local6]._Level == _local2) {
if (_NodeList[_local6]._LR == 1) {
_NodeList[_local6]._X = _local3 * (4 - _local2);
} else {
_NodeList[_local6]._X = ((((-_local3) * (4 - _local2)) + _local4) - 80) - 1;
}
_NodeList[_local6].YAuto();
}
_local6++;
}
}
_local2--;
}
var _local6 = 0;
while (_local6 < _NodeList.length) {
_NodeList[_local6]._Status = "Nothing";
_local6++;
}
//return(__get___BG3());
}
function set _BG4(Value) {
_MCBG4 = _Panel.attachMovie(Value, "mcBG4", 4);
_MCBG4._x = (800 - _MCBG4._width) / 2;
_MCBG4._y = 160;
_MCBG4.MC_Cup._visible = false;
_MCBG4.BTN_Execute._Owner = _Self;
_MCBG4.BTN_Execute.onRollOver = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_ENTER");
};
_MCBG4.BTN_Execute.onRelease = function () {
var _local2 = new fefa.TPlaySound(this, "SND_BTN_CLICK");
this._Owner.Message({_Message:"MSG_RANDOMGROUP", _Value:4});
};
//return(__get___BG4());
}
function set _BG5(Value) {
_MCBG5 = _Panel.attachMovie(Value, "mcBG5", 5);
_MCBG5._x = (800 - _MCBG5._width) / 2;
_MCBG5._y = 250;
_MCBG5._visible = false;
//return(__get___BG5());
}
function set _Level(Value) {
pLevel = Value;
_MCBG1.gotoAndStop((4 - _Level) + 1);
if (_Level == 4) {
var _local3 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local3[_local2] = _local2 + 1;
_local2++;
}
_local2 = 0;
while (_local2 < _NodeList.length) {
if (_NodeList[_local2]._Level == 4) {
var _local4 = random(_local3.length);
_NodeList[_local2]._PlayerIndex = _local3[_local4];
_local3.splice(_local4, 1);
}
_local2++;
}
_MCBG4.BTN_Execute._visible = false;
_MCBG4.MC_Cup._visible = true;
_MCBG2.BTN_OK._visible = true;
_MCBG2.BTN_Back._visible = true;
} else {
var _local2 = 0;
while (_local2 < _NodeList.length) {
if (_NodeList[_local2]._Level == _Level) {
if (_NodeList[_local2]._ChildrenNodeList[0]._PlayerIndex != 1) {
if (_NodeList[_local2]._ChildrenNodeList[1]._PlayerIndex != 1) {
var _local5 = random(2);
_NodeList[_local2]._ChildrenNodeList[_local5]._Winner = true;
} else {
_NodeList[_local2]._ChildrenNodeList[1]._Winner = true;
}
} else {
_NodeList[_local2]._ChildrenNodeList[0]._Winner = true;
}
}
_local2++;
}
_MCBG2.BTN_Back._visible = false;
}
//return(_Level);
}
function get _Level() {
return(pLevel);
}
}
Symbol 1303 MovieClip [__Packages.fefa.TPanelBattlePlayer] Frame 0
class fefa.TPanelBattlePlayer extends fefa.TPanelObject
{
var _MCPlayerList, _Panel, _MCPlayer, _ParentNode, _ChildrenNodeList, _Self, pLevel, _MC, pLR, pPlayerIndex, _MCMasterMark, pWinner, pStatus, _Parent, _LineX1, _LineY1, _LineX2, _LineY2, _LineX3;
function TPanelBattlePlayer (aOwner, aParent) {
super(aOwner, aParent);
_MCPlayerList = _Panel.attachMovie("PlayerList", "PlayerList", 2);
_MCPlayerList.enabled = false;
_MCPlayerList._y = 7;
_MCPlayerList.stop();
for (var _local3 in _MCPlayerList) {
_MCPlayerList[_local3].stop();
}
_MCPlayerList._visible = false;
_MCPlayer = null;
_ParentNode = null;
_ChildrenNodeList = new Array();
}
function InsertChildrenNode(aObj) {
_ChildrenNodeList.push(aObj);
return(_ChildrenNodeList.length - 1);
}
function YAuto() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < _ChildrenNodeList.length) {
_local3 = _local3 + _ChildrenNodeList[_local2]._Y;
_local2++;
}
_Self._Y = _local3 / _ChildrenNodeList.length;
}
function set _Level(Value) {
pLevel = Value;
if (_Level == 4) {
if (_LR == 1) {
_MC = _Panel.attachMovie("PanelPlayerBG1", "PanelPlayerBG", 1);
} else {
_MC = _Panel.attachMovie("PanelPlayerBG2", "PanelPlayerBG", 1);
}
} else {
_MC = _Panel.attachMovie("PanelPlayerBG3", "PanelPlayerBG", 1);
}
_MC.gotoAndStop(1);
_MC.enabled = false;
//return(_Level);
}
function get _Level() {
return(pLevel);
}
function set _LR(Value) {
pLR = Value;
//return(_LR);
}
function get _LR() {
return(pLR);
}
function set _PlayerIndex(Value) {
pPlayerIndex = Value;
if (_PlayerIndex > 0) {
_MCPlayerList.gotoAndStop(Value);
_MCPlayer = null;
for (var _local2 in _MCPlayerList) {
_MCPlayer = _MCPlayerList[_local2];
}
_MCPlayer.gotoAndStop(1);
_MCPlayerList._x = 2;
_MCPlayerList._visible = false;
_MC.gotoAndStop(1);
_Status = ("Ready");
if (_PlayerIndex == 1) {
FlashStamp(true);
} else {
FlashStamp(false);
}
} else {
_MCPlayerList._visible = false;
_MC.gotoAndStop(1);
removeMovieClip(_MCMasterMark);
}
if (_ChildrenNodeList.length > 0) {
var _local3 = _ChildrenNodeList[0];
var _local4 = _ChildrenNodeList[1];
if (_local3._Winner) {
_local4._Status = "Lose";
_local3._Status = "Winner";
} else {
_local3._Status = "Lose";
_local4._Status = "Winner";
}
}
//return(_PlayerIndex);
}
function get _PlayerIndex() {
return(pPlayerIndex);
}
function set _Winner(Value) {
pWinner = Value;
if (_Winner) {
_ParentNode._PlayerIndex = _Self._PlayerIndex;
}
//return(_Winner);
}
function get _Winner() {
return(pWinner);
}
function set _Status(Value) {
pStatus = Value;
if (pStatus == "Winner") {
_MC.gotoAndStop(2);
_MCPlayer.gotoAndStop(2);
_MCPlayerList._visible = true;
DrawLine("Winner");
FlashStamp(false);
}
if (pStatus == "Lose") {
_MC.gotoAndStop(1);
_MCPlayer.gotoAndStop(1);
_MCPlayerList._visible = true;
_Self._ChildrenNodeList[0]._Status = "Lose";
_Self._ChildrenNodeList[1]._Status = "Lose";
DrawLine("Lose");
FlashStamp(false);
}
if (pStatus == "Wait") {
_MC.gotoAndStop(1);
}
if (pStatus == "Flashing") {
_MC.gotoAndStop(2);
}
if (pStatus == "Nothing") {
_MC.gotoAndStop(1);
FlashStamp(false);
}
if (pStatus == "Ready") {
_MC.gotoAndStop(2);
_MCPlayer.gotoAndStop(2);
_MCPlayerList._visible = true;
_ParentNode._Status = "ChildrenReady";
}
if (pStatus == "ChildrenReady") {
_ChildrenNodeList[0]._LineX1 = _ChildrenNodeList[0]._X + (_ChildrenNodeList[0]._Width / 2);
_ChildrenNodeList[0]._LineY1 = _ChildrenNodeList[0]._Y + _ChildrenNodeList[0]._Height;
_ChildrenNodeList[0]._LineX2 = _ChildrenNodeList[0]._X + (_ChildrenNodeList[0]._Width / 2);
_ChildrenNodeList[0]._LineY2 = _Self._Y + (_Self._Height / 2);
_ChildrenNodeList[0]._LineX3 = _Self._X;
if (_Self._LR == -1) {
_ChildrenNodeList[0]._LineX3 = _ChildrenNodeList[0]._LineX3 + 80;
}
_ChildrenNodeList[0]._LineY3 = _Self._Y + (_Self._Height / 2);
_ChildrenNodeList[0].DrawLine("Ready");
_ChildrenNodeList[1]._LineX1 = _ChildrenNodeList[0]._X + (_ChildrenNodeList[0]._Width / 2);
_ChildrenNodeList[1]._LineY1 = _ChildrenNodeList[1]._Y;
_ChildrenNodeList[1]._LineX2 = _ChildrenNodeList[0]._X + (_ChildrenNodeList[0]._Width / 2);
_ChildrenNodeList[1]._LineY2 = _Self._Y + (_Self._Height / 2);
_ChildrenNodeList[1]._LineX3 = _Self._X;
if (_Self._LR == -1) {
_ChildrenNodeList[1]._LineX3 = _ChildrenNodeList[1]._LineX3 + 80;
}
_ChildrenNodeList[1]._LineY3 = (_ChildrenNodeList[0]._Y + _ChildrenNodeList[1]._Y) / 2;
_ChildrenNodeList[1].DrawLine("Ready");
}
//return(_Status);
}
function DrawLine(Value) {
if (Value == "Ready") {
_Parent._Canvas.lineStyle(2, 16777215, 100);
_Parent._Canvas.moveTo(_LineX1, _LineY1);
_Parent._Canvas.lineTo(_LineX2, _LineY2);
}
if (Value == "Winner") {
_Parent._Canvas.lineStyle(2, 16777215, 100);
_Parent._Canvas.moveTo(_LineX2, _LineY2);
_Parent._Canvas.lineTo(_LineX3, _LineY2);
}
if (Value == "Lose") {
_Parent._Canvas.lineStyle(2, 14483456, 100);
_Parent._Canvas.moveTo(_LineX1, _LineY1);
_Parent._Canvas.lineTo(_LineX2, _LineY2);
_Parent._Canvas.moveTo(_LineX2, _LineY2);
_Parent._Canvas.lineTo(_LineX3, _LineY2);
if (_ChildrenNodeList.length > 0) {
_ChildrenNodeList[0]._Status = "Lose";
_ChildrenNodeList[1]._Status = "Lose";
}
}
}
function get _Status() {
return(pStatus);
}
function ShowLine(Value) {
if (_ChildrenNodeList.length > 0) {
_Parent.lineStyle(10, 16711935, 100, true, "none", "round", "miter", 1);
_Parent.moveTo(_ChildrenNodeList[0]._X + (_ChildrenNodeList[0]._Width / 2), _ChildrenNodeList[0]._Y + _ChildrenNodeList[0]._Height);
_Parent.lineTo(_ChildrenNodeList[1]._X + (_ChildrenNodeList[1]._Width / 2), _ChildrenNodeList[1]._Y);
}
}
function FlashStamp(Value) {
if (Value) {
_MCMasterMark = _Panel.attachMovie("MasterMark", "mcMasterMark", _Panel.getNextHighestDepth());
} else {
removeMovieClip(_MCMasterMark);
}
}
function Message(Msg) {
}
var _OffX = 4;
var _OffY = 4;
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 100
stop();
_parent.gotoAndPlay("shock");
Symbol 78 MovieClip Frame 100
stop();
Instance of Symbol 78 MovieClip in Symbol 85 MovieClip Frame 56
on (release) {
getURL ("http://www.webnewtown.com/", "_blank");
}
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 56
on (release) {
getURL ("http://www.code-heads.co.uk/", "_self");
}
Symbol 85 MovieClip Frame 490
_root.gotoAndStop(4);
Instance of Symbol 25 MovieClip in Symbol 86 MovieClip Frame 1
on (press) {
getURL ("http://gameboltz.com/home.php?gameref=hiphoptennis", "_blank");
}
Symbol 86 MovieClip Frame 184
stop();
botak.play();
Symbol 86 MovieClip Frame 621
stop();
Symbol 88 MovieClip [StrikePoint] Frame 200
removeMovieClip(this);
Symbol 235 MovieClip Frame 1
this._visible = false;
Symbol 292 MovieClip Frame 1
this._visible = false;
Symbol 307 MovieClip Frame 1
this._visible = false;
Symbol 490 MovieClip [PlayerEffect1] Frame 29
this.removeMovieClip();
Instance of Symbol 18 MovieClip "logoBtn" in Symbol 496 MovieClip [PanelWinner] Frame 1
on (release) {
getURL ("http://www.agame.com/", "_blank");
}
Symbol 512 MovieClip [PanelStart] Frame 1
onEnterFrame = function () {
if (this._visible == true) {
_root.tPG._TennisPlayer1._Move._MCX = 400;
_root.tPG._TennisPlayer1._Move._MCY = 340;
}
};
Symbol 545 MovieClip [PanelMask] Frame 1
BTNMASK._alpha = 10;
BTNMASK.useHandCursor = false;
Symbol 548 Button
on (press) {
getURL ("http://www.gameboltz.com", "_blank");
}
Instance of Symbol 18 MovieClip "logoBtn" in Symbol 553 MovieClip [PanelMain] Frame 1
on (release) {
getURL ("http://www.agame.com/", "_blank");
}
Instance of Symbol 18 MovieClip "logoBtn" in Symbol 565 MovieClip [PanelGameOver] Frame 1
on (release) {
getURL ("http://www.agame.com/", "_blank");
}
Symbol 565 MovieClip [PanelGameOver] Frame 40
stop();
Instance of Symbol 18 MovieClip "logoBtn" in Symbol 1120 MovieClip [CourtPackage] Frame 1
on (release) {
getURL ("http://www.agame.com/", "_blank");
}
Symbol 1147 MovieClip [BallFallPoint] Frame 120
removeMovieClip(this);
Symbol 1160 MovieClip [BallEffect2] Frame 30
removeMovieClip(this);
Symbol 1179 MovieClip [BallEffect1] Frame 11
removeMovieClip(this);