Hey well i dont know if this is the topic, but i would like to know
if you could tell me where to look at to acomplish this:
I have my smartfox and I want to have a Loader, when an action like changeroom is received an extension should be called
The extension should set all new vars and make the laoder load the new swf of the room and grab all users online in the room
with its vars, as clothes, etc.
I havent found a method with the Documentation.
Could you help me?
Loader for Content
Re: Loader for Content
Hi.
The most practical way of accomplishing that is by storing the relative path to the room's graphic swf inside a RoomVariable.
Then, on the client, when you join a new room, you retrieve that variable's value, and load the swf.
You don't need a server-side extension for that, that's why I'm going to move this topic to the SFS Pro General Discussion forum.
The most practical way of accomplishing that is by storing the relative path to the room's graphic swf inside a RoomVariable.
Then, on the client, when you join a new room, you retrieve that variable's value, and load the swf.
You don't need a server-side extension for that, that's why I'm going to move this topic to the SFS Pro General Discussion forum.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Loader for Content
Could you write how to retrvie that var because is not working like this:
Could you tell me how to look for that var, I have already set the flag to true in RoomListVars in config file, look:
how can i get the var "path" in my flash so i load the room externally?
Code: Select all
smartfox.onRoomListUpdate = function(roomList:Object)
{
roomList_lb.removeAll()
for (var i:String in roomList){
var room:Room = roomList[i]
var roomVars:Object = room.getVariables();
trace("roomVars: "+roomVars)
}
// Join the default room
this.autoJoin()
trace("atuojoin true");
}
// Handle roomListUpdate events that occurred before the playhead was moved to this frame
if (evtQueue.length > 0)
{
smartfox.onRoomListUpdate(evtQueue[0])
delete evtQueue
}
smartFox.onRoomVariablesUpdate = onRoomVariablesUpdateHandler
function onRoomVariablesUpdateHandler(room:Room, changedVars:Array):Void
{
// Iterate on the 'changedVars' array to check which variables were updated
for (var v:String in changedVars)
trace(v + " room variable was updated; new value is: " + room.getVariable(v))
}
Code: Select all
<Zone name="simpleChat" customLogin="true" buddyList="20" uCountUpdate="true" maxUsers="10000" roomListVars="true">
<AutoReloadExtensions>true</AutoReloadExtensions>
<Rooms>
<Room name="Room2" maxUsers="12" isPrivate="false" isTemp="false">
<Vars>
<Var name="path" type="s" private="true">room/water.swf</Var>
</Vars>
</Room>
<Room name="Room1" maxUsers="12" isPrivate="false" autoJoin="true" isTemp="false">
<Vars>
<Var name="path" type="s" private="true">room/lagoon.swf</Var>
</Vars>
</Room>
</Rooms>Re: Loader for Content
I've answered to this in your other topic. Please do not mix topics
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.