PDA

View Full Version : PDA, Actionscript and Internet hmmm...


dojacobson
11-17-2005, 04:02 PM
Hey Folks,

I'm new here, and always thought I could find my anwsers on google..
now I have to correct that vision. I've got a problem, and I don't know how to fix it, maybe some of you guys can help me out with it.

For a project I'm making an app for PDA which connects to a server and from there on I can control lights, curtains, or whatever electronically.. (Domotica is the shit, I tell you!) On my pc the whole thing is running fine,
but when I compile it for use on the PDA the trouble starts.

My app starts as it should, perfectly connects to the server, but then...
after pushing the on/off-button, I created, twice or thrice, the whole darn thing just stops sending signals to the server (or at least that is what I think).
The button keeps working, but the light won't turn off.

I also know where the problem might be, but the still I don't have a clue how to fix it.
The server is connected through VPN and automatically closes the connection after 120 seconds if nothing happens. So I wrote a little function which counts to 60 and then reconnects to the server. Like I said, on the PC it works fine (thank god for trace(); ) , but on the PDA it just won't work...

Help me out, please!

--------
here's the sample code for the function:
//zet interval op 60 seconden
timer = setInterval(holdConnection, 60000);

//functie wordt elke 60 seconden aangeroepen om verbinding in stand te houden
function holdConnection() {
loadVariablesNum("http://xx.xx.xx.xx:port/config.pl", "", "POST");
trace("verbinding gehouden");
}

------