-
1. Re: How can I use the "EvalScript()" function? I am trying to send text to a Director app from the web browser, but the console in the browser just responds "Uncaught ReferenceError: evalScript is not defined ".
SeanWilson Jun 16, 2014 6:34 PM (in response to GalileoMX)EvalScript is known to be flaky and should be avoided.
Can you not poll your other machine using getNetText or similar? If you really need to have the browser communicate with an embedded Shockwave movie (and it sounds like there might be a better option), take a look at this demo by Valentin Schmidt (which doesn't seem to be working for me with the current version of SW in Firefox/Windows)
He also has a SOAP example, socket example and http server push example available.
-
2. Re: How can I use the "EvalScript()" function? I am trying to send text to a Director app from the web browser, but the console in the browser just responds "Uncaught ReferenceError: evalScript is not defined ".
GalileoMX Jun 17, 2014 9:03 AM (in response to SeanWilson)Thanks Sean.
I tried your suggestion first, using getNetText to poll the server and read a text file. The drawbak is that I had to poll the server constantly, since I could not know in advance when the text file was going to change (and it's not practical to stump the server and connection).
I've kept trying the EvalScript, asigning the Shockwave object to a variable first, then calling the EvalScript() in the object, but it doesn't work, either. I think I will simply use JavaScript and forget about shockwave altogether, since everything is working fine up to that point (although it would be nice to be able to use Lingo for the rest of the app).
-
3. Re: How can I use the "EvalScript()" function? I am trying to send text to a Director app from the web browser, but the console in the browser just responds "Uncaught ReferenceError: evalScript is not defined ".
GalileoMX Jun 18, 2014 10:59 AM (in response to GalileoMX)I've got it working now. I used the console in Chrome to check the shockwave object and its methods; the script is exactly the same as above with one difference: the call to EvalScript was made using the name (ID) of the shockwave object, and the function name is "EvalScript()" (not "evalScript()").
document.EE02.EvalScript(data.message);
(EE02 is the ID of the shockwave object).

