mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
715 lines
22 KiB
ActionScript
715 lines
22 KiB
ActionScript
package gui
|
|
{
|
|
import com.sbi.debug.DebugUtility;
|
|
import flash.display.DisplayObject;
|
|
import flash.display.DisplayObjectContainer;
|
|
import flash.display.MovieClip;
|
|
import flash.display.Sprite;
|
|
import flash.events.MouseEvent;
|
|
import flash.utils.getDefinitionByName;
|
|
import localization.LocalizationManager;
|
|
|
|
public class SafeChatManager
|
|
{
|
|
|
|
public static const TREE_SAFECHAT:int = 0;
|
|
|
|
public static const TREE_ECARDTEXT:int = 1;
|
|
|
|
public static const TREE_REPORTREASON:int = 2;
|
|
|
|
public static const TREE_PHOTOBOOTH:int = 3;
|
|
|
|
public static const TREE_ADVENTURE:int = 4;
|
|
|
|
public static const TREE_PLAYERWALL:int = 5;
|
|
|
|
public static var sctNodes:Array;
|
|
|
|
public static var ctNodes:Array;
|
|
|
|
public static var photoBoothNodes:Array;
|
|
|
|
public static var adventureNodes:Array;
|
|
|
|
public static var playerWallNodes:Array;
|
|
|
|
private static const SCT_DIM_ALPHA:Number = 0.5;
|
|
|
|
private static const SCT_BRIGHT_ALPHA:Number = 1;
|
|
|
|
private static const JAG_LOCALIZATION_ID:int = 66;
|
|
|
|
private static const BC_LOCALIZATION_ID:int = 47;
|
|
|
|
private static const PHOTOBOOTH_LOCALIZATION_ID:int = 158;
|
|
|
|
private static const ADVENTURE_LOCALIZATION_ID:int = 170;
|
|
|
|
private static const PLAYERWALL_LOCALIZATION_ID:int = 333;
|
|
|
|
private static var SafeChatTreeNode:Class;
|
|
|
|
private static var _safeChatCallback:Function;
|
|
|
|
private static var _safeChatCallbackFromOtherSystem:Function;
|
|
|
|
private static var _safeChatBtn:MovieClip;
|
|
|
|
private static var _safeChatTree:MovieClip;
|
|
|
|
private static var _actionBtn:MovieClip;
|
|
|
|
private static var _actionWindow:Sprite;
|
|
|
|
private static var _emoteBtn:MovieClip;
|
|
|
|
private static var _emoteWindow:Sprite;
|
|
|
|
private static var _treeArray:Array;
|
|
|
|
private static var _nodeYLocation:Number;
|
|
|
|
private static var _lowestNodeYLocation:Number;
|
|
|
|
private static var _safeTreeNodeHeight:Number;
|
|
|
|
private static var _safeChatTreeNodes:MovieClip;
|
|
|
|
public function SafeChatManager()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public static function init(param1:Function, param2:MovieClip, param3:MovieClip, param4:MovieClip, param5:Sprite, param6:MovieClip, param7:Sprite) : void
|
|
{
|
|
if(_safeChatCallback != null)
|
|
{
|
|
throw new Error("ERROR: Singleton SafeChatManager did not expect to be created twice!");
|
|
}
|
|
_safeChatCallback = param1;
|
|
_safeChatBtn = param2;
|
|
_safeChatTree = param3;
|
|
if(sctNodes)
|
|
{
|
|
buildSafeChatTree(_safeChatTree);
|
|
}
|
|
_safeChatTree.visible = false;
|
|
_actionBtn = param4;
|
|
_actionWindow = param5;
|
|
_emoteBtn = param6;
|
|
_emoteWindow = param7;
|
|
}
|
|
|
|
public static function reload(param1:Boolean, param2:MovieClip, param3:MovieClip, param4:MovieClip, param5:Sprite, param6:MovieClip, param7:Sprite) : void
|
|
{
|
|
_safeChatTree = param3;
|
|
_safeChatBtn = param2;
|
|
_safeChatTree.visible = false;
|
|
_actionBtn = param4;
|
|
_actionWindow = param5;
|
|
_emoteBtn = param6;
|
|
_emoteWindow = param7;
|
|
if(param1)
|
|
{
|
|
while(_safeChatTree.numChildren > 1)
|
|
{
|
|
_safeChatTree.removeChildAt(_safeChatTree.numChildren - 1);
|
|
}
|
|
ctNodes = sctNodes = photoBoothNodes = adventureNodes = playerWallNodes = null;
|
|
requestSafeChatLists();
|
|
}
|
|
else if(_safeChatTree.numChildren < 2)
|
|
{
|
|
_safeChatTree.addChild(_safeChatTreeNodes);
|
|
}
|
|
_safeChatBtn.downToUpState();
|
|
}
|
|
|
|
public static function buildSafeChatTree(param1:MovieClip, param2:String = null, param3:int = 0, param4:Function = null, param5:Array = null) : void
|
|
{
|
|
var _loc6_:MovieClip = null;
|
|
var _loc7_:int = 0;
|
|
var _loc8_:* = 0;
|
|
var _loc9_:MovieClip = null;
|
|
_safeChatCallbackFromOtherSystem = param4;
|
|
if(param2 == null)
|
|
{
|
|
param2 = "SafeChatTreeNode";
|
|
}
|
|
SafeChatTreeNode = getDefinitionByName(param2) as Class;
|
|
if(param5 != null)
|
|
{
|
|
_treeArray = param5;
|
|
}
|
|
else if(param3 == 1)
|
|
{
|
|
_treeArray = ctNodes;
|
|
}
|
|
else if(param3 == 3)
|
|
{
|
|
_treeArray = photoBoothNodes;
|
|
}
|
|
else if(param3 == 4)
|
|
{
|
|
_treeArray = adventureNodes;
|
|
}
|
|
else if(param3 == 5)
|
|
{
|
|
_treeArray = playerWallNodes;
|
|
}
|
|
else
|
|
{
|
|
_treeArray = sctNodes;
|
|
}
|
|
if(_treeArray)
|
|
{
|
|
_loc6_ = new SafeChatTreeNode();
|
|
_loc7_ = param1.height - (_treeArray.length * _loc6_.height - 1);
|
|
_safeChatTreeNodes = new MovieClip();
|
|
_loc8_ = 0;
|
|
while(_loc8_ < _treeArray.length)
|
|
{
|
|
_loc9_ = new SafeChatTreeNode();
|
|
_loc9_.x = 0;
|
|
_loc9_.y = _loc7_ + _loc8_ * (_loc9_.height - 1);
|
|
_safeChatTreeNodes.addChild(_loc9_);
|
|
_loc9_["menuNums"] = [_loc8_];
|
|
_loc9_.addEventListener("mouseDown",sctNodeMouseHandler,false,0,true);
|
|
if(_treeArray[_loc8_] is String)
|
|
{
|
|
LocalizationManager.updateToFit(_loc9_.sctNodeTxt,_treeArray[_loc8_]);
|
|
_loc9_.sctNodeBG.gotoAndStop(1);
|
|
}
|
|
else
|
|
{
|
|
if(!(_treeArray[_loc8_] is Array))
|
|
{
|
|
throw new Error("invalid type in sctNodes...");
|
|
}
|
|
_safeTreeNodeHeight = _loc9_.height;
|
|
_lowestNodeYLocation = _loc7_ + (_treeArray.length - 1) * (_safeTreeNodeHeight - 1);
|
|
_nodeYLocation = _loc9_.y;
|
|
LocalizationManager.updateToFit(_loc9_.sctNodeTxt,_treeArray[_loc8_][0]);
|
|
_loc9_.sctNodeBG.gotoAndStop(3);
|
|
buildChatTreeSubMenu(_treeArray[_loc8_],DisplayObjectContainer(_loc9_),0);
|
|
}
|
|
_loc8_++;
|
|
}
|
|
param1.addChild(_safeChatTreeNodes);
|
|
}
|
|
}
|
|
|
|
public static function requestSafeChatLists() : void
|
|
{
|
|
GenericListXtCommManager.requestGenericList(47,onListLoaded);
|
|
GenericListXtCommManager.requestGenericList(66,onListLoaded);
|
|
GenericListXtCommManager.requestGenericList(158,onListLoaded);
|
|
GenericListXtCommManager.requestGenericList(170,onListLoaded);
|
|
GenericListXtCommManager.requestGenericList(333,onListLoaded);
|
|
}
|
|
|
|
public static function containsInTreeArray(param1:String, param2:int = 0) : Boolean
|
|
{
|
|
var _loc5_:Object = null;
|
|
var _loc3_:Boolean = false;
|
|
var _loc7_:Array = null;
|
|
var _loc4_:int = 0;
|
|
var _loc6_:int = 0;
|
|
if(param2 == 1)
|
|
{
|
|
_loc7_ = ctNodes;
|
|
}
|
|
else if(param2 == 3)
|
|
{
|
|
_loc7_ = photoBoothNodes;
|
|
}
|
|
else if(param2 == 4)
|
|
{
|
|
_loc7_ = adventureNodes;
|
|
}
|
|
else if(param2 == 5)
|
|
{
|
|
_loc7_ = playerWallNodes;
|
|
}
|
|
else
|
|
{
|
|
_loc7_ = sctNodes;
|
|
}
|
|
_loc4_ = 0;
|
|
while(_loc4_ < _loc7_.length)
|
|
{
|
|
_loc5_ = _loc7_[_loc4_];
|
|
if(_loc5_ is Array)
|
|
{
|
|
_loc6_ = 0;
|
|
while(_loc6_ < _loc5_.length)
|
|
{
|
|
if(_loc5_[_loc6_] == param1)
|
|
{
|
|
return true;
|
|
}
|
|
_loc6_++;
|
|
}
|
|
}
|
|
else if(_loc5_ == param1)
|
|
{
|
|
return true;
|
|
}
|
|
_loc4_++;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private static function onListLoaded(param1:int, param2:Array) : void
|
|
{
|
|
var _loc3_:Array = null;
|
|
var _loc4_:int = 0;
|
|
var _loc6_:RegExp = /\r\n|\n|\r/g;
|
|
var _loc5_:Array = [];
|
|
_loc4_ = 0;
|
|
while(_loc4_ < param2.length)
|
|
{
|
|
_loc3_ = LocalizationManager.translateIdOnly(param2[_loc4_]).split(_loc6_);
|
|
if(_loc3_.length == 1)
|
|
{
|
|
_loc5_.push(_loc3_[0]);
|
|
}
|
|
else
|
|
{
|
|
_loc5_.push(_loc3_);
|
|
}
|
|
_loc4_++;
|
|
}
|
|
if(param1 == 47)
|
|
{
|
|
sctNodes = _loc5_;
|
|
}
|
|
else if(param1 == 66)
|
|
{
|
|
ctNodes = _loc5_;
|
|
}
|
|
else if(param1 == 158)
|
|
{
|
|
photoBoothNodes = _loc5_;
|
|
}
|
|
else if(param1 == 170)
|
|
{
|
|
adventureNodes = _loc5_;
|
|
}
|
|
else if(param1 == 333)
|
|
{
|
|
playerWallNodes = _loc5_;
|
|
}
|
|
else
|
|
{
|
|
DebugUtility.debugTrace("Loaded safe chat list that doesn\'t match!");
|
|
}
|
|
if(ctNodes && sctNodes && photoBoothNodes && adventureNodes && playerWallNodes)
|
|
{
|
|
buildSafeChatTree(_safeChatTree);
|
|
}
|
|
}
|
|
|
|
private static function buildChatTreeSubMenu(param1:Array, param2:DisplayObjectContainer, param3:uint) : void
|
|
{
|
|
var _loc4_:* = 0;
|
|
var _loc8_:MovieClip = null;
|
|
var _loc5_:* = 0;
|
|
var _loc7_:DisplayObjectContainer = null;
|
|
param3++;
|
|
var _loc6_:Number = _nodeYLocation + (param1.length - 2) * (_safeTreeNodeHeight - 1);
|
|
if(_loc6_ > _lowestNodeYLocation)
|
|
{
|
|
_nodeYLocation -= _loc6_ - _lowestNodeYLocation;
|
|
}
|
|
_loc4_ = 1;
|
|
while(_loc4_ < param1.length)
|
|
{
|
|
_loc8_ = new SafeChatTreeNode();
|
|
_loc8_.x = param3 * _loc8_.width - param2.x;
|
|
_loc8_.y = _nodeYLocation + (_loc4_ - 1) * (_loc8_.height - 1);
|
|
_loc5_ = param3;
|
|
_loc7_ = param2;
|
|
while(_loc5_ > 0)
|
|
{
|
|
_loc8_.y -= _loc7_.y;
|
|
_loc7_ = _loc7_.parent;
|
|
_loc5_--;
|
|
}
|
|
param2.addChild(_loc8_);
|
|
_loc8_.visible = false;
|
|
if(_loc8_.parent["menuNums"])
|
|
{
|
|
_loc8_["menuNums"] = _loc8_.parent["menuNums"].slice();
|
|
_loc8_["menuNums"].push(_loc4_);
|
|
}
|
|
else
|
|
{
|
|
_loc8_["menuNums"] = [_loc4_];
|
|
}
|
|
_loc8_.addEventListener("mouseDown",sctNodeMouseHandler,false,0,true);
|
|
if(param1[_loc4_] is String)
|
|
{
|
|
LocalizationManager.updateToFit(_loc8_.sctNodeTxt,param1[_loc4_]);
|
|
_loc8_.sctNodeBG.gotoAndStop(1);
|
|
}
|
|
else
|
|
{
|
|
if(!(param1[_loc4_] is Array))
|
|
{
|
|
throw new Error("invalid type in scSubTree...");
|
|
}
|
|
LocalizationManager.updateToFit(_loc8_.sctNodeTxt,param1[_loc4_][0]);
|
|
_loc8_.sctNodeBG.gotoAndStop(3);
|
|
buildChatTreeSubMenu(param1[_loc4_],DisplayObjectContainer(_loc8_),param3);
|
|
}
|
|
_loc4_++;
|
|
}
|
|
}
|
|
|
|
public static function destroy(param1:MovieClip = null) : void
|
|
{
|
|
if(param1 != null)
|
|
{
|
|
while(param1.numChildren > 1)
|
|
{
|
|
param1.getChildAt(param1.numChildren - 1).removeEventListener("mouseDown",sctNodeMouseHandler);
|
|
param1.removeChildAt(param1.numChildren - 1);
|
|
}
|
|
_safeChatCallbackFromOtherSystem = null;
|
|
param1.visible = false;
|
|
param1 = null;
|
|
}
|
|
else
|
|
{
|
|
while(_safeChatTree.numChildren > 0)
|
|
{
|
|
_safeChatTree.getChildAt(0).removeEventListener("mouseDown",sctNodeMouseHandler);
|
|
_safeChatTree.removeChildAt(0);
|
|
}
|
|
_safeChatBtn = null;
|
|
_safeChatTree.visible = false;
|
|
_safeChatTree = null;
|
|
_actionBtn = null;
|
|
_actionWindow = null;
|
|
_emoteBtn = null;
|
|
_emoteWindow = null;
|
|
}
|
|
}
|
|
|
|
public static function traceDisplayList(param1:DisplayObjectContainer, param2:String = "") : void
|
|
{
|
|
var _loc4_:DisplayObject = null;
|
|
var _loc3_:* = 0;
|
|
_loc3_ = 0;
|
|
while(_loc3_ < param1.numChildren)
|
|
{
|
|
_loc4_ = param1.getChildAt(_loc3_);
|
|
if(_loc4_ == null)
|
|
{
|
|
DebugUtility.debugTrace(param2 + "NULL?!");
|
|
}
|
|
else
|
|
{
|
|
DebugUtility.debugTrace(param2 + " " + _loc4_ + " " + _loc4_.name);
|
|
}
|
|
if(_loc4_ is DisplayObjectContainer)
|
|
{
|
|
traceDisplayList(DisplayObjectContainer(_loc4_),param2 + " ");
|
|
}
|
|
_loc3_++;
|
|
}
|
|
}
|
|
|
|
public static function resetSafeChatTree(param1:Boolean, param2:MovieClip = null) : void
|
|
{
|
|
var _loc5_:* = 0;
|
|
var _loc7_:DisplayObject = null;
|
|
var _loc6_:DisplayObjectContainer = null;
|
|
var _loc3_:* = 0;
|
|
var _loc8_:DisplayObject = null;
|
|
if(param1)
|
|
{
|
|
SafeChatTreeNode = getDefinitionByName("SafeChatTreeNode") as Class;
|
|
}
|
|
var _loc4_:MovieClip = MovieClip(_safeChatTree.getChildAt(1));
|
|
if(param2)
|
|
{
|
|
_loc4_ = param2;
|
|
}
|
|
_loc5_ = 0;
|
|
while(_loc5_ < _loc4_.numChildren)
|
|
{
|
|
_loc7_ = _loc4_.getChildAt(_loc5_);
|
|
if(_loc7_ && _loc7_ is DisplayObjectContainer)
|
|
{
|
|
if(_loc7_ is SafeChatTreeNode)
|
|
{
|
|
if(SafeChatTreeNode(_loc7_).sctNodeBG.currentFrame == 4)
|
|
{
|
|
SafeChatTreeNode(_loc7_).sctNodeBG.gotoAndStop(3);
|
|
}
|
|
if(SafeChatTreeNode(_loc7_).sctNodeBG.currentFrame == 2)
|
|
{
|
|
SafeChatTreeNode(_loc7_).sctNodeBG.gotoAndStop(1);
|
|
}
|
|
}
|
|
_loc6_ = DisplayObjectContainer(_loc7_);
|
|
_loc3_ = 0;
|
|
while(_loc3_ < _loc6_.numChildren)
|
|
{
|
|
_loc8_ = _loc6_.getChildAt(_loc3_);
|
|
if(_loc8_ && _loc8_ is SafeChatTreeNode)
|
|
{
|
|
_loc8_.visible = false;
|
|
SafeChatTreeNode(_loc8_).sctNodeBG.gotoAndStop(1);
|
|
}
|
|
_loc3_++;
|
|
}
|
|
}
|
|
_loc5_++;
|
|
}
|
|
}
|
|
|
|
public static function showSafeChatInput(param1:Boolean) : void
|
|
{
|
|
_safeChatBtn.visible = param1;
|
|
_safeChatTree.visible = param1;
|
|
}
|
|
|
|
public static function safeChatCodeForString(param1:String, param2:int = -1) : String
|
|
{
|
|
var _loc3_:Array = null;
|
|
var _loc4_:String = null;
|
|
var _loc5_:int = 0;
|
|
var _loc6_:int = 0;
|
|
if(param2 != -1 || _treeArray == null)
|
|
{
|
|
if(param2 == 1)
|
|
{
|
|
_loc3_ = ctNodes;
|
|
}
|
|
else if(param2 == 3)
|
|
{
|
|
_loc3_ = photoBoothNodes;
|
|
}
|
|
else if(param2 == 4)
|
|
{
|
|
_loc3_ = adventureNodes;
|
|
}
|
|
else if(param2 == 5)
|
|
{
|
|
_loc3_ = playerWallNodes;
|
|
}
|
|
else
|
|
{
|
|
_loc3_ = sctNodes;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_loc3_ = _treeArray;
|
|
}
|
|
_loc5_ = 0;
|
|
while(_loc5_ < _loc3_.length)
|
|
{
|
|
if(_loc3_[_loc5_] is String)
|
|
{
|
|
if(_loc3_[_loc5_] == param1)
|
|
{
|
|
return _loc5_ + "0";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_loc4_ = _loc3_[_loc5_][0];
|
|
if(param1 == _loc4_)
|
|
{
|
|
return String(_loc5_);
|
|
}
|
|
_loc6_ = 1;
|
|
while(_loc6_ < _loc3_[_loc5_].length)
|
|
{
|
|
if(_loc4_.indexOf("...") > -1)
|
|
{
|
|
if(param1 == _loc4_.substr(0,_loc4_.length - 3) + " " + _loc3_[_loc5_][_loc6_])
|
|
{
|
|
return _loc5_ + "," + _loc6_;
|
|
}
|
|
}
|
|
else if(_loc3_[_loc5_][_loc6_] == param1)
|
|
{
|
|
return _loc5_ + "," + _loc6_;
|
|
}
|
|
_loc6_++;
|
|
}
|
|
}
|
|
_loc5_++;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static function safeChatStringForCode(param1:String, param2:int = -1) : String
|
|
{
|
|
var _loc4_:String = null;
|
|
var _loc6_:* = 0;
|
|
var _loc5_:Array = param1.split(",");
|
|
if(param2 != -1 || _treeArray == null)
|
|
{
|
|
if(param2 == 1)
|
|
{
|
|
_treeArray = ctNodes;
|
|
}
|
|
else if(param2 == 3)
|
|
{
|
|
_treeArray = photoBoothNodes;
|
|
}
|
|
else if(param2 == 4)
|
|
{
|
|
_treeArray = adventureNodes;
|
|
}
|
|
else if(param2 == 5)
|
|
{
|
|
_treeArray = playerWallNodes;
|
|
}
|
|
else
|
|
{
|
|
_treeArray = sctNodes;
|
|
}
|
|
}
|
|
else if(gMainFrame.clientInfo.roomType == 7)
|
|
{
|
|
_treeArray = adventureNodes;
|
|
}
|
|
else
|
|
{
|
|
_treeArray = sctNodes;
|
|
}
|
|
var _loc3_:Array = _treeArray;
|
|
_loc6_ = 0;
|
|
while(_loc6_ < _loc5_.length)
|
|
{
|
|
if(_loc6_ >= _loc5_.length - 1)
|
|
{
|
|
if(_loc3_[_loc5_[_loc6_]] is String)
|
|
{
|
|
if(_loc4_ && _loc4_.indexOf("...") > 0 && _loc4_.indexOf("...") == _loc4_.length - 3)
|
|
{
|
|
return _loc4_.substr(0,_loc4_.length - 3) + " " + _loc3_[_loc5_[_loc6_]];
|
|
}
|
|
return _loc3_[_loc5_[_loc6_]];
|
|
}
|
|
if(_loc3_[_loc5_[_loc6_]] is Array)
|
|
{
|
|
return _loc3_[_loc5_[_loc6_]][0];
|
|
}
|
|
return null;
|
|
}
|
|
if(_loc3_[_loc5_[_loc6_]] is String)
|
|
{
|
|
return null;
|
|
}
|
|
if(!(_loc3_[_loc5_[_loc6_]] is Array))
|
|
{
|
|
return null;
|
|
}
|
|
_loc4_ = _loc3_[_loc5_[_loc6_]][0];
|
|
_loc3_ = _loc3_[_loc5_[_loc6_]];
|
|
_loc6_++;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static function openSafeChat(param1:Boolean, param2:MovieClip = null) : void
|
|
{
|
|
if(param2 && !param2.visible)
|
|
{
|
|
param2.visible = true;
|
|
resetSafeChatTree(param1,MovieClip(param2.getChildAt(1)));
|
|
}
|
|
else if(!_safeChatTree.visible)
|
|
{
|
|
_safeChatTree.visible = true;
|
|
resetSafeChatTree(param1);
|
|
brightenSafeChat();
|
|
}
|
|
}
|
|
|
|
public static function dimSafeChat() : void
|
|
{
|
|
if(_safeChatTree.visible && _safeChatTree.alpha != 0.5)
|
|
{
|
|
_safeChatTree.alpha = 0.5;
|
|
}
|
|
}
|
|
|
|
public static function brightenSafeChat() : void
|
|
{
|
|
if(_safeChatTree.alpha != 1)
|
|
{
|
|
_safeChatTree.alpha = 1;
|
|
}
|
|
}
|
|
|
|
public static function closeSafeChat(param1:MovieClip = null) : void
|
|
{
|
|
if(param1 && param1.visible)
|
|
{
|
|
param1.visible = false;
|
|
}
|
|
if(_safeChatTree)
|
|
{
|
|
if(_safeChatTree.visible)
|
|
{
|
|
_safeChatTree.visible = false;
|
|
}
|
|
_safeChatBtn.downToUpState();
|
|
}
|
|
}
|
|
|
|
public static function showHide() : void
|
|
{
|
|
_safeChatTree.visible = !_safeChatTree.visible;
|
|
}
|
|
|
|
public static function sctNodeMouseHandler(param1:MouseEvent) : void
|
|
{
|
|
var _loc3_:String = null;
|
|
param1.stopPropagation();
|
|
brightenSafeChat();
|
|
if(!param1.currentTarget is SafeChatTreeNode)
|
|
{
|
|
DebugUtility.debugTrace("ERROR: illegal event type in sctNodeMouseHandler!");
|
|
return;
|
|
}
|
|
if(!Utility.canChat())
|
|
{
|
|
return;
|
|
}
|
|
var _loc2_:String = param1.currentTarget.sctNodeTxt.text;
|
|
if(_loc2_.indexOf("...") >= 0)
|
|
{
|
|
return;
|
|
}
|
|
if(param1.currentTarget.parent.sctNodeTxt)
|
|
{
|
|
_loc3_ = param1.currentTarget.parent.sctNodeTxt.text;
|
|
if(_loc3_.indexOf("...") > 0)
|
|
{
|
|
_loc2_ = _loc3_.slice(0,_loc3_.indexOf("...")) + " " + _loc2_;
|
|
}
|
|
}
|
|
if(_safeChatCallbackFromOtherSystem != null)
|
|
{
|
|
_safeChatCallbackFromOtherSystem(_loc2_,param1.currentTarget.menuNums.toString());
|
|
}
|
|
else
|
|
{
|
|
_safeChatCallback(_loc2_,param1.currentTarget.menuNums.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|