After getData you need a scene, which is running until you received the data.
If you have your serverscript waiting, you make it just worst.
Aktualy the Flash has to wait until it is served by the server.
This can take a view milliseconds or several seconds. Because you can never be shure how long the answer takes, you got to make a waiting loop.
Say, you have a scene biginning in frame 10 with a Textfield saying:"Hold on, I'm busy."
which fades out until frame 15.
After your getVariablesNum -Statement you write: gotoAndPlay(10)
In frame 15 you have a script saying:
if (s_id eq 0)
gotoAndPlay(20); (if 20 is the frame where your actual movie starts)