Can´t load avatar to new room....
Posted: 21 May 2010, 23:05
Im fairly new to this´
Im trying to create in the ISO world a control panel above the openspace window with a button(instance name:nayeli) that can
take my avatar toi a new map/room.
This is the code that I have applied:
nayeli.addEventListener(MouseEvent.CLICK, changeRoomie);
function changeRoomie(roomId:String, px:int = -1, py:int = -1, dir:int = -1):void
{
nextMap = {}
nextMap.px = px
nextMap.py = py
nextMap.dir = dir
{
nextMap.sfsRoomName = "Ranch (inside)"
nextMap.filename = "patioOutside.xml"
}
smartFox.joinRoom(nextMap.sfsRoomName)
}
....when I click it does change the map and room but without the avatar.
Its nowhere to be found.
Did I have to load it previously? Give it new coordinates in the new map?
Can someone explain what I´m doing wrong?
How would I proceed to write the code to correct this?
Any help is appreciated.
F.Enders
Im trying to create in the ISO world a control panel above the openspace window with a button(instance name:nayeli) that can
take my avatar toi a new map/room.
This is the code that I have applied:
nayeli.addEventListener(MouseEvent.CLICK, changeRoomie);
function changeRoomie(roomId:String, px:int = -1, py:int = -1, dir:int = -1):void
{
nextMap = {}
nextMap.px = px
nextMap.py = py
nextMap.dir = dir
{
nextMap.sfsRoomName = "Ranch (inside)"
nextMap.filename = "patioOutside.xml"
}
smartFox.joinRoom(nextMap.sfsRoomName)
}
....when I click it does change the map and room but without the avatar.
Its nowhere to be found.
Did I have to load it previously? Give it new coordinates in the new map?
Can someone explain what I´m doing wrong?
How would I proceed to write the code to correct this?
Any help is appreciated.
F.Enders