I know Flex or Actionscript doesnt support multithreading.. but one of my project requires multithreading.. is there a way to mimic multithreading in Actionscript..
I know Flex or Actionscript doesnt support multithreading.. but one of my project requires
Share
I’m guessing you have a large amount of processing to do but would like the UI to refresh during this process? I had the same problem trying to parse a massive chunk of XML – it would take about a minute and lock the browser, before eventually throwing a timeout exception.
There’s a great example here on a pseudo-multi-threaded solution for editing a bitmap image. It’s for Flex 4, but the static UIUtilities class is what you’re interested in, and it works fine in Flex 3. Simply break your task up into chunks and call pausingFor() and fiddle with the arguments. Very simple and effective once you’ve got it going.
HTH!