I was making a component that was using the native flash BlurFilter. It was essentially a tabbed pane, but would have a blur animation between panes that would move sideways. It was a simple effect, but looked pretty good in the end. However, I noticed a problem when I was using straight up MovieClips to create the blur than to use a BitmapData object to blur the pixels instead.
Since the component would load up content from linked MovieClips, everything in the pane was using the ‘attachMovie’ function. I noticed that after the initial content load (the panes themselves) were loaded, everything work smoothly, but the second I added more dynamic content within the panes after that, the blur would then stop working.
Apparently, this is a common theme for anything to do with AS2; do not use native components, classes, nothing. I guess the developers(or should I say, designers) were eating some bad granola at the time. Good thing there are still workarounds for these problems, even though they take a lot of time and even though the problem shouldn’t exist in the first place.
This particular solution was to create a BitmapData object containing the pixel data of all of panes before doing an animation and apply the blur to that and not the actual movies. This also increased processing speeds. Another solution would be to use an animation library like TweenLite or TweenMax.
I am actually very surprised at this library. Its easy to use and incredibly fast. Mad props goes to Jack Doyle for creating this software which is just a pleasure to read through. It’s well designed, developed and documentated; I couldn’t do a better job myself.
Copyright © Thinking in Code. All Rights Reserved. Powered by Wordpress