Mark sure spiralknights.com and threerings.net are exempt from all web filtering, script protection, privacy protection, and any other service AVG might be using to filter or block java script from your browser. Also make sure the firewall recognizes javaw.exe or Java Runtime Environment as an exception.
I don't use AVG anymore, so I really couldn't tell you where you need to look to make those changes.