» See also: JavaScript to ActionScript (Flash to HTML) communication
While working on a method for JavaScript to ActionScript communication I discovered a problem where Mozilla/Gecko would sometimes throw the error:
document[element].SetVariable is not a function
I have all of the full releases of gecko installed (1.0 through 1.7) and most of them were working (all loaded the Flash object just fine, and reinstalling Flash did not resolve the problem) so I dug around to find a solution...
After a brief look around I found references to SetVariable in the binary files (in the Mozilla install directory):
components/flashplayer.xpt plugins/NPSWF32.dll
I tried copying just flashplayer.xpt, and then only NPSWF32.dll. The error remained "SetVariable is not a function". So I copied both flashplayer.xpt and NPSWF32.dll into the respective components and plugins folders for the browser that was not working and it fixed the problem.
If you need these files please download my tarball. [Untar content for Windows, or instructions for Mac OSX OS 8/9]
Run regxpcom.exe in your Mozilla Folder or delete xpti.dat in your components folder.Not sure that's needed, but nonetheless we have a connection to more experience with the problem.
22 June 2004 Jim Montgomery
7 flash object limit on mac os? http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=7+objects+on+mac+flash&btnG=Search
If you are developing an application I've found I can catch the error this way:
function example(){
...
self.onerror = function() {
var errMsg = arguments[0];
if(errMsg.search(/SetVariable is not a function/i) != -1) {
...doSomething...; return true;
} }
...
}
To test just move the files mentioned above for the target gecko install.