Aren't web service calls asynchronous, or am I missing something? I mean, you typically have to set up a result function to handle the web service response. Calling the service should not hold the function.
In any case, I'd expect you'd have to handle this like follows: //javascript function call(){ swfObject.call(); } //flash function call(){ } function callBack(){ getURL("javascript:callBack();") } //javascript function callBack(){ //this would be called when the service response is recieved. } On 6/20/07, Steven Sacks <[EMAIL PROTECTED]> wrote:
setInterval is a handy way to break scope. Have the AS method called by JS set an interval for let's say 10ms, and then have the method assigned to the interval take care of business. Javascript will be free and Flash will keep on going. -Steven Seth Green wrote: > I'm not calling a JS function from flash until the end of this process. > It is the beginning of this process that I want to be made asynchronous. > In the beginning I am calling a flash function from JS. That is the > piece I am trying to get to be asynchronous. > > jtgxbass wrote: >> You could make use of ExternalInterface.addCallback. Therefore the JS >> function you call with ExternalInterface.call starts some process off >> then >> returns straight away. When your process is done it calls your registered >> flash callback. Therefore you end up with asynchronous. >> >> All said and done, why not call the webservice straight from flash? >> >> On 6/19/07, Seth Green <[EMAIL PROTECTED]> wrote: >>> >>> I have a web app that uses a flash movie as a proxy to a web service. >>> Therefore, I have javascript calling flash methods that in turn make >>> requests to a web service and then route the response back to >>> javascript. >>> >>> I don't need my javascript functions to wait on this calls, but >>> ExternalInterface is inherently synchronous. And to my surprise I have >>> found that a flash method which does nothing but make a web service >>> request can take 100ms or more. This is unacceptably slow, but >>> especially so since my javascript code has to hang while the flash >>> method does its business. >>> >>> Does anyone have any experience with this issue, or can provide a >>> workaround or hint as to how I might make these calls asynchronous? >>> >>> thanks in advance. >>> _______________________________________________ >>> Flashcoders@chattyfig.figleaf.com >>> To change your subscription options or search the archive: >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> Brought to you by Fig Leaf Software >>> Premier Authorized Adobe Consulting and Training >>> http://www.figleaf.com >>> http://training.figleaf.com >>> >> _______________________________________________ >> Flashcoders@chattyfig.figleaf.com >> To change your subscription options or search the archive: >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Brought to you by Fig Leaf Software >> Premier Authorized Adobe Consulting and Training >> http://www.figleaf.com >> http://training.figleaf.com >> > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com