that won't work. getNDTServer will be asynchronous.

You need to set it like the java applet - run the javascript to get the server, then insert the object programmatically with the hostname parameter set. Or at least insert the object so it can call a synchronous version of getNDTServer after the XHR has returned.

 Either way, you can't run the swf without having the server name ready.