views:

23

answers:

0

I been suffering with a problem where I can't get one flash swf to work in unison using one javascript.

For example

1.swf does ExternalInterface call to js function test

var test = function (var) {
   $("#2ndFlash").get(0).passTest(var);
}

As you see what I'm trying to do is when 1.swf calls test with some variable pass it to another swf (2ndFlash)'s function called passTest (not javascript) the same variable that 1.swf returned..

But it turns out you can't do this without leaving the previous function.

my cheap solution which isn't scalable is to add a delay with a javascript function such as alert('bla');

for example

var test = function (var) {
   alert('bla');
   $("#2ndFlash").get(0).passTest(var);
}

the above example after clicking to close the 'bla' dialog it actually passes the variable.