Let's take a look at a common problem in as2. The interaction with flash in IE is abnormal ~! These situations include externalinterface in the question. the call function cannot obtain the return value when calling the JS function, the callback function of externalinterface cannot be normally called by JS, and Flash var cannot be normally transmitted to flash. These situations basically occur in IE. This is actually a bug in IE (I really want to dig his ancestral grave, but I am a civilized person, think about it and I am still patient). The solutions to the above problems are the same:
First, make sure that both the <Object> and <embed> labels exist. Sometimes you forget the <Object> label, so there will be problems in browsers other than IE.
Secondly, it is best to set allowScriptAccess to always in the <Object> and <embed> labels.
The most important thing is that the ID attribute must be set in the <Object> tag, and the name attribute must be set in the <embed> tag. The values of the two attributes must be the same. For example, <Object ID = "f_ckie">... <embed name = "f_ckie">. The <embed> label serves IE, while the <Object> label is prepared for browsers other than IE. (Inserting an embed label does not comply with W3C specifications, and the object is a standard label, f * ck ie ....)
The last thing to note is externalinterface. the return value accepted by call can only be of several types in AS, that is, object, array, string, and number. recursion or reference cannot be returned. Otherwise, only null can be obtained.
In addition, flashvar must be set in the <Object> and <embed> labels. In addition to custom tags, externalinterface. Call can only call several system global functions in Javascript, such as alert and confirm, while functions such as window. Open cannot call. Here is a trick. Eval can actually be called.