I've look through the code, and it looks like Mike/Christian are writing a div element to the DOM each time the call function is invoked. Perhaps there is an issue with writing to the DOM to quickly?

That's pretty much what's happening, but the interesting part is that what's 
written into the div is actually an object/embed tag, instructing the browser 
to load a swf. The object/embed tag contains as parameters to the swf the 
values that are to be set, which are then transmitted to the main swf using a 
LocalConnection. An indepth description of the technique can be found at
http://www.mustardlab.com/developer/flash/jscommunication/

I may have to force the flashProxy calls to be synchronous, and have ActionScript notify the DOM that "yes, I got the method call, and I'm ready for another..."

I guess that would be your best bet, as the process described above requires 
for the browser to
- load the swf, either from the net or from cache
- create a new instance of the flash player
- initialize the swf
- transfer the parameters
and then the flash player needs to initialize and run the code in that swf, 
which in turn opens the LocalConnection and transmits the data to the main swf.
This whole process takes some time, so you'd better have some mechanism to 
schedule that in.

Maybe it'd be best to change the Flash JavaScript Integration Kit so as to 
integrate a mechanism along the following lines:
- When a JS->AS call is being made, save it and start a delay of, say, 200ms
- When, during the 200ms, another call is made, save that as well and restart 
the delay
- Repeat that until
a) No more calls are being made during the delay
        or
b) a maximum waiting time, e.g. 800ms, has been reached
- transmit them all together by chaining them as Ralf suggested

Also, save all calls that are being made while the proxy swf is being 
initialized, so as not to loose any of them.

This way, in a situation like yours, all calls would be guaranteed to come 
through - and way faster than transmitting them one by one.

cheers,
till

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to