Currently working on avatarChat when I ran into a problem because I’m extremely ignorant with all this coding stuff:
var doInterval;
function DoSomething(){
//Sending to server
var PancakeX:Number = int(myAvatar.disc._x)
var PancakeY:Number = int(myAvatar.disc._y)
smartfox.setUserVariables({PancakeX:PancakeX, PancakeY:PancakeY, init:true})
}
doInterval = setInterval(DoSomething, 24);
// I want the function to run every frame
I notice that the game will increasingly start to lag
When I look at the Output panel, it shows that the function is running every .0024 seconds as:
[Sending]: <msg t='sys'><body action='setUvars' r='7'><vars><var n=‘BobX' t='n'><![CDATA[1]]></var><var n='init' t='b'><![CDATA[1]]></var></vars></body></msg>
[Sending]: <msg t='sys'><body action='setUvars' r='7'><vars><var n=‘BobY' t='n'><![CDATA[1]]></var><var n='init' t='b'><![CDATA[1]]></var></vars></body></msg>
I assume the reason for the lag is the constant sending of the User variables to the smartfox server and was wondering if there is a way to clear the output panel in As2 or a php script I can write that’ll clear Flash’s Output Panel, if the Output panel is the problem?
:c