1 Reply Latest reply on Jun 24, 2009 1:25 PM by Flex harUI

    loading external swf, how to deal with errors within the loaded swf?


      I have a Flex app that basically lets you browse a bunch of thumbnails that represent swf files, when you click a thumbnail it opens a window that loads the actual swf into an image control. The problem I have is that these swfs can be uploaded by our clients, so they may have actionscript errors being thrown, etc. We can't really predict what they may do. Is there a way I can load these swf in such a way as to ignore any errors that the loaded swf may generate within itself.


      For example, one such swf reads some text from a text file to display, but when they are viewing it in this manner the file isn't there so a stream error is generated. My parent Flex app doesn't care about this error and I don't want to see it thrown up in an actionscript error box (I have debug verison loaded on my PC obviously) or interfere with the parent app in any way.


      Would application domains help at all? Would it make a difference if I loaded the swf into a separate domain? Or is there some way I can generically trap any error coming from the loaded swf and just ignore them?


      Any help appreciated.