Applying Filters To a Loaded Image

I haven’t done any Flash work in awhile, and I guess I forgot the amount of quirks it has (although its getting much better).
Applying filters to a loaded image doesn’t work. I loaded a MC using this code:

var loader = new MovieClipLoader();
var listener = {onLoadInit:Delegate.create(this, imageLoaded)};
loader.addListener(listener);
loader.loadClip("pic.png", holder);

Then tried to apply a filter like so:

var blur = new flash.filters.BlurFilter(30, 0, 3);
holder.filters = [blur];

But nothing happened. The filter works fine on a MC containing a image from the library. The solution? Well, after about 30 minutes of banging my head against the wall trying to get it work I figured I’d try wrapping the image in another MC and then applying the filter wrapper MC. Walla, filter is applied. Why Macromedia, why cant you just make a simple note in the

filters

help page noting that filters cannot be applied to loaded images?

Changing PHP Ini Variables of PHP Running as CGI

Changing PHP ini variables using php_value or SetEnv does not work when running PHP as CGI. You need to run PHP apache for those tricks to work.

Average Rating: 4.8 out of 5 based on 268 user reviews.

0 Response to “”


  • No Comments

Leave a Reply