Skip to content

Two Web-Dev Tips

Categories: Uncategorized

Table of Contents

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:
[code]
var loader = new MovieClipLoader();
var listener = {onLoadInit:Delegate.create(this, imageLoaded)};
loader.addListener(listener);
loader.loadClip(“pic.png”, holder);
[/code]
Then tried to apply a filter like so:
[code]
var blur = new flash.filters.BlurFilter(30, 0, 3);
holder.filters = [blur];
[/code]
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.

Keep in Touch

Subscribe to my email list to keep in touch. I’ll send you new blog posts and other thoughts.