 <p>The error above occurs when you return certain objects (XML, Socket) from a function call, but the return values does not get assigned anywhere.</p> <pre><code>function test() { var xml = new XML('&lt;test /&gt;'); return xml; } test(); </code></pre> <p>The above will cause an error. To get around it you have to assign the return value somewhere.</p> <pre><code>var result = test(); </code></pre> <hr> <p>Try to put all collect all function calls result. I am not sure which one causes the error.</p> <pre><code>var reply = ""; var conn = new Socket; // access Adobe’s home page if (conn.open ("www.adobe.com:80")) { // send a HTTP GET request var result = conn.write ("GET /index.html HTTP/1.0\n\n"); // and read the server’s reply reply = conn.read(999999); var close = conn.close(); } </code></pre>