94 lines
3.0 KiB
ActionScript
94 lines
3.0 KiB
ActionScript
package com.control.chat
|
|
{
|
|
import com.control.chat.event.ChatMainEvent;
|
|
import com.control.connect.Connect;
|
|
import com.control.data.ReturnBean;
|
|
import com.view.mc.sprite.LoadingMc;
|
|
|
|
public class ChatService extends Connect
|
|
{
|
|
|
|
public function ChatService()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public function userSendMessage(param1:int, param2:String) : void
|
|
{
|
|
var _loc3_:String = "com.huzi.chat.action.ChatAction.userSendMessage";
|
|
super.connect(_loc3_,this.sendMessageResult,param1,param2);
|
|
}
|
|
|
|
private function sendMessageResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendMessage);
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function userSendPrivateMessage(param1:String, param2:String) : void
|
|
{
|
|
var _loc3_:String = "com.huzi.chat.action.ChatAction.userSendPrivateMessage";
|
|
super.connect(_loc3_,this.userSendPrivateMessageResult,param1,param2);
|
|
}
|
|
|
|
private function userSendPrivateMessageResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendPrivateMessage);
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function userSendTitleMessage(param1:String, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.chat.action.ChatAction.userTitleMessage";
|
|
super.connect(_loc3_,this.userSendTitleMessageResult,param1,param2);
|
|
}
|
|
|
|
private function userSendTitleMessageResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendTitleMessage);
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function showItem() : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc1_:String = "com.huzi.chat.action.ChatAction.viewMyEqu";
|
|
super.connect(_loc1_,this.showItemResult);
|
|
}
|
|
|
|
private function showItemResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|