This content has been marked as final. Show 7 replies
if you're using flash 8 or better use the externalinterface class. otherwise, you'll have to settle for getURL().
getURL doesn't return a value from any js calls.
With ExternalInterface you can call a js function and receive a return value, so your js function could simply return the desired value. Doing it via getURL doesn't return a value. So I presume you need to call a js function that in turn sets a flash variable with the value inside your movie... that's what I wasn't sure about.
using as getURL() and the js SetVariable() function, you used to be able to communicate from js to as. i'm not sure if that's broken now.
ok... thanks. I was on the right track then at least conceptually.
So far using ExternalInterface has been ok for me... even if (for me at least) sometimes it seems a little buggy with the way it encodes/decodes objects between as and js. But its good to have a fallback if its ever needed.
always use the externalinterface class if you're using flash 8 or better. it's much more reliable.