1 Reply Latest reply on Dec 2, 2010 6:41 AM by Darrell Loverin

    Loading swf in flex app

    kostis alexandris

      Dear all,

      While loading an swf in my flex application i observe the following:

      1. If the swf is stored in the src folder of my flex app then it is always loaded and unloaded properly
      2. If the swf is stored in the local file system (and loaded by loader.load("file:///C:/files....")) or in my local apache (and loaded by loader.load("")) then although it is loaded properly is not always unloaded making instances of the swf that are never beiing garbage collected!

      I suppose that this is an issue of security sandbox but i do not know how to overcome this (no security sandbox violation messages for this swf appear while debugging)

      Any ideas?

        • 1. Re: Loading swf in flex app
          Darrell Loverin Level 4

          Make sure the main application and the SWF are loaded from the same domain otherwise you'll need to use the MarshallPlan. The same domain means the domain are the same using a string compare. IP addresses and the server domain (abc.com) may resolve to the same server but it is considered a different domain to the Flash Player. If you really want to load SWFs from a different domain, then you will need to use the MarshallPlan. To use the Marshall Plan compile your application with "-incudes mx.managers.systemClasses.MarshallingSupport".