3 Replies Latest reply on Jul 25, 2007 9:14 AM by Greg Dove

    Applying filter to images loaded with movieClipLoader


      I am building a product gallery and have a number of rather large bitmap images that I am loading with movieClipLoader. I need to apply drop shadow filters to them when they are loaded. I have tried several methods of going about this without success. One method was putting the loaded images into a movie clip with createEmptyMovieClip, and then applying the filter dynamically, but I couldn't seem to get it to work- the filter never appeared. I then tried applying the filter to the bitmap itself with bitMapData, but because I was not loading the bitmaps using bitMapData itself (I think) I wasn't able to get that method to work either.

      Does anyone have a suggestion or a recommendation for me? Thanks very much for any advice.
        • 1. Re: Applying filter to images loaded with movieClipLoader
          Level 7
          You can apply the filter to the clip that you are loading the new clip
          into. If, for instance, you have an empty movie clip on the stage that
          you are loading this new clip into, then just select the empty clip and
          apply the filter directly, or, apply the filter using actionscript
          before you load the new clip.


          Rob Dillon
          Adobe Community Expert
          • 2. Re: Applying filter to images loaded with movieClipLoader
            Simulacrum_ Level 1
            You know, I really thought that would work but it just isn't. What I'm trying to find now is some kind of a work-around because applying the filter directly to the empty movie clip isn't doing it. Thanks very much for posting though, Rob.
            • 3. Re: Applying filter to images loaded with movieClipLoader
              Greg Dove Level 4
              Were you doing it after the onLoadInit event in the MovieClipLoader's listener?

              Try doing it that way if you haven't. One option I use for dynamic image loading is to create and empty holder clip - use that for placement and create another empty clip inside that one that I use as the loading target... I think this should work if you set the filter at the level of the first 'empty' clip. I had to use this approach a number of times because I was using a tweening engine based on movieclip prototype extensions (old hat I know) and loading new images kicked out the extended functionality from the clip the images are loaded into. That doesn't happen to the clip's parent... hence I think it might work also for what you want to do.

              Another thing to watch for is that you can't do bitmapData copies of images from a different domain unless you have crossdomain policy support - you can set it up so this works. I'm not sure if this affects filters though.