Показать сообщение отдельно
Старый 01.12.2009, 23:05
Kez вне форума Посмотреть профиль Отправить личное сообщение для Kez Найти все сообщения от Kez
  № 16  
Ответить с цитированием
Kez
 
Аватар для Kez

Регистрация: Nov 2009
Адрес: Воскресенск <-> Москва
Сообщений: 2
http://fun-crew.clan.su/LobbyAS3.rar

Тут исходник лобби комнаты похожей в этой игре для серва SmartFoxServerPRO
(Lobby AS3\Examples\lobby.fla)

Вопрос: почему пример только у меня коннектится, у др. коннекта нет? где переменная "КУДА КОННЕКТИТСЯ" (ip : port)?

Всё суды упирается: (import it.gotoandplay.smartfoxbits.bits.Connector)
Фрейм коннекта:
Код AS3:
import it.gotoandplay.smartfoxserver.*
import it.gotoandplay.smartfoxserver.data.*
 
stop()
 
// Retrieve a reference to the SmartFoxClient instance created by the Connector
var smartFox:SmartFoxClient = connector.connection
 
// Register to onRoomListUpdate event in order to go to the "chat" screen when the list of available rooms is received.
// The RoomList component will take care of joining a room.
smartFox.addEventListener(SFSEvent.onRoomListUpdate, onRoomListUpdate)
 
// Register to onJoinRoom event in order to go to the "game" screen when a game room is joined.
smartFox.addEventListener(SFSEvent.onJoinRoom, onJoinRoom)
 
 
 
function onRoomListUpdate(evt:SFSEvent):void
{
	gotoAndStop("chat")
}
 
function onJoinRoom(evt:SFSEvent):void
{
	var room:Room = evt.params.room
 
	if (room.isGame())
		gotoAndStop("game")
}

--------------------------------------------------------
connector.serverIpAddress = "95.154.177.226"
connector.serverPort = 9339
connector.connect()

Эти 3 строчки спасли ситуацию. Хотя почему без метода connect флешка удалённо Сама коннектилась на 127.0.0.1:9339 - я недоумеваю!


Последний раз редактировалось Kez; 01.12.2009 в 23:48.