6 Replies to “Getting Complex Designs Into Flex Slides”

  1. Hi Jesse,

    Thanks for sharing these slides, loads of good information! An app I am working on requires users to be able to modify graphics at runtime so using vectors seems the best (only?) option. Do you have any further info on the Flash Graphics Packager examples? I’m currently using LoaderMax to load MovieClips from a swf and I then pass a style object, which is held in a singleton, into the first frame of the clips to style them. This seems dirty and I would prefer not to have code floating around in FLA’s

    Any info would be appreciated.

    1. Can you elaborate on how they can edit the graphics? There are usually a few was I’ve seen user customization done:

      – User can change placeholder graphics with their own in a CMS, like their logo
      – User can use the CMS itself to create/edit graphics
      – User can load pre-made themes at runtime (like WinAMP or Sonique)
      – User can load pre-made styles at runtime (like browser CSS stylesheets or Flex’ runtime styles, similar to above)

      1. Hi Jesse,

        Thanks for taking the time to reply.

        I should probably point out that the project is pure AS3 with no Flex dependencies, the customization is basically at two levels:

        1. Users can swap themes which are pre made libraries of graphics held in a swf (I’m using LoaderMax to do this at runtime).

        2. Users can modify the colours of their current theme (I’m using tweenlite in the first frame of the clips to colour them).

        This current system works but I’m worried about the graphics which are loaded in from the external swf’s being tied to the application domain and not getting garbage collected. Also there is duplicate code within every graphic which just doesn’t seem right. Any tips or advice is appreciated (In some ways I wish I could use Flex for this project)

        1. Ah, thanks for the clarity. Got it, sounds like a good solution.

          As long as you don’t have any hard references and remove all listeners from the children/loaded SWF’s, you should be fine. Use the Profiler to determine if it’s still around.

          1. open your project in Flash Builder
          2. run it in the profiler
          3. take a memory snapshot
          4. load your skin
          5. take a memory snapshot
          6. load another skin
          7. click the garbage collector button 2 times (you could 1 one, but…. #paranoia)
          8. take a memory snapshot

          Compare the snapshot from #5 and #8 and look for loitering objects.

          1. Keep in mind the profiler doesn’t show graphics related stuff, but you should should be able to see your SWF/loader etc. associated with it. Create a timer or named class object for testing if need be.

  2. Thanks for the profiler tips i’ll give this a try and see if anything is persisting when swapping themes. Cheers again for the feedback

Comments are closed.