Good morning,
I've spent hours trying to send a repeated message from my input text field and have finally noticed that it works if I use set variables rather than passing the contents of my input text.
In my sending side I have:
Code:
modPanel_mc.awayMsg_btn.onRelease = function():Void
{
if (_parent.smartfox.amIModerator)
{
_parent.sendAwayMsg();
// This way the message is sent but it is only sent once
//_parent.intervalId = setInterval(_parent.smartfox.sendPublicMessage(modPanel_mc.modPanelMsg_txt.text), 3000);
// This way it works
_parent.intervalId = setInterval(_parent.sendAwayMsg, 60000);
}
};
in the receiving side:
// The message I'd like to substitute with my own from the input text field in the sending side
Code:
var awayMsg:String = "BRB Ara torno Enseguida vuelvo";
function sendAwayMsg()
{
smartfox.sendPublicMessage(awayMsg);
}
I tried solving it using local connection to send the variables from my text filed apart before calling the sendAwayMsg function and I was able to send and retrieve them but not to run it continuously.