Posted by testuser in SWF Studio V3 on Oct 23 2008, 01:18 pm

Hi,

i am trying to execute an external application. During the execution the flash projector should not be blocked. But when the executed application exits i would like to get the exit code to decide would should happen afterwards. I guess this is possible but i couldn't figure out how.

When setting the waitForExit parameter to true the execute-call is fully blocking - from my understanding i though that the call should be async when also passing the callback arguments. But when setting the waitForExit parameter to false i could not find a way to get my hands on a result object which gives me the exit code.

Any help is highly appreciated.

Thank you,
Thomas


Posted by northcode in SWF Studio V3 on Oct 23 2008, 01:27 pm

var r = ssCore.Shell.execute({...}) is a synchronous call (if ssDefaults.synchronousCommands is set to true).

ssCore.Shell.execute({...},{callback:callbackHandler}) is ALWAYS an asynchronous call because you have specified that you want a callback. In that case, the results of the Shell.execute call are sent to the callbackHandler function.

If you make an asynchronous call it won't block your application but it WILL stop frame based animation. The reason for this is that async calls are made via fscommands. All fscommands in a frame have to complete before Flash will move on to the next frame. So if you have an async call that takes a long time to complete, your frame based animation will appear hung until the call completes.


Posted by testuser in SWF Studio V3 on Oct 23 2008, 01:50 pm

Thank you for the very fast response.

Okay - so it was not a good idea to test sync vs. async execution with a timeline-based animation :-)

But i guess tween engines like TweenLite would be affected by the wait-until-finish-before-next-frame fact, since no ENTER_FRAME events will occur until the executed application is finished.

Do you know of any way to work around this? Else my application would somehow be blocked even when using async execution.