1 Reply Latest reply on Jul 26, 2006 11:55 AM by peterent

    which is better for loading?

      In our applications, in most of the places we are loding some animated swfs in our mxmls. So, in this place we are using 1.<mx:Loader source="...../xxx.swf" />
      is this will be better or
      2.<mx:Image sorce="@Embed(...)" >
      3. <mx:Image contentPath="..../xx.swf" />
      Which opetion will be more performance for our case. anyone Please, give me soggession on this.

        • 1. Re: which is better for loading?
          peterent Level 2
          The Embed directive will include your SWF (or image) into the final application SWF, making it that much larger. This has the benefit that once the application SWF has been loaded into the Flash Player, the embedded SWF is immediately available. The downside is that the main SWF will take a bit longer to fully download.

          A dynamic load will not increase the size of the main SWF, making it faster to load. Once the main SWF has loaded it will request any SWFs or images specified by the Image and SWFLoader tags. If you have a lot of content to load, the end-user will have to wait since only a handful of requests can be processed at once (usually a browser limitation). The benefit is that your application is usable and the content loads in the background.

          Embed: larger SWF, longer start-up, but imagery immediately available.
          Dynamic: smaller SWF, faster start-up, but you have to wait for images to be loaded

          You have to decide which is best. If you have large content, dynamically loading it is usually preferred so that the Flex app starts right away and the user perceives the application as being responsive. If you have lots of small content, embedding them might be a better way to go as the user won't see a lot of blank space and then your content popping in.