I'm trying to update my Characters avatar in my game. My character loads all of his assets (clothing, accessories, ect), from a database and is then stored as as a XML:
Code: Select all
private function onReceivedUserInfo(event:LoaderEvent):void
var raw_user_info = LoaderMax.getContent("userInfo");
trace("raw user info: " + raw_user_info)
var userInfo:XML = XML(raw_user_info);
That's all working fine. When he goes to edit his character any changes are collected into the XML data. Once the changes are completed, his object is destroyed, recreated, and has his assets re-attach, and placed in the same location. However this is only seen by the local user. I was wondering how to do this for all players.
I see there is 'onUserVarsUpdate', but would that mean I'd need to put in every data field from everyone's XML and add it as a 'smartfox.setUserVariables'? Would it be more feasible to have the player leave and re-enter the room? Or is there a simpler way?
I promise I will stop asking questions soon lol. I'm just getting to grips with SFS first.