smoothImageLoader
Back when Flash 8 was released I had to deal with this problem and couldn't find a solution anywhere. In this version, any runtime loaded image gets aliased and there seems to be no option you can set to improve this.
Everything seems fine until you have to rotate or scale an image you've inserted to your movie using loadMovie(). You get rips and jaggs everywhere.
the code
The solution isn't simple. One of the new features on v8 was the bitmapData object. Using this you can capture any movieClip's pixels and handle them. I discovered that one thing you can do with extracted bitmap data was smoothing. So then, all you have to do is load the image as you normally would, extract its bitmap data, smooth it, and apply it to your target mC. Of course this is the basic theory and it's a bit more complicated than that so here's my code:
var i=0
do { i++ } while (eval("_root.smoothImageLoadTemp"+i) != undefined)
tmc = _root.createEmptyMovieClip("smoothImageLoadTemp"+i, _root.getNextHighestDepth())
tmc.createEmptyMovieClip("ti", tmc.getNextHighestDepth())
tmc.tm = targetMovie
with(tmc) {
tmcl = new MovieClipLoader()
tmcl.onLoadComplete = function() {
ti.onEnterFrame = function() {
pixelData = new flash.display.BitmapData(ti._width, ti._height);
pixelData.draw(ti);
tm.attachBitmap(pixelData, 1, true, true);
tm.smoothImageLoadComplete()
removeMovieClip(ti._parent)
}
}
tmcl.loadClip(imgURL, tmc.ti)
}
}
Just take this chunk of code and slap it on your first keyframe. This way it's available to your entire movie. Then to use it:
Also, if you want something to happen just as the image is loaded, you can set a smoothImageLoadComplete function on you target mC. As the loading and polishing ends, my script tries to trigger that function on the target.
trace("yeah baby yeah!!!")
}
the example
the files
Now that I've bored you to death with my geek fetish for explaining things, you can get my example here. It doesn't really add anything to the code I've posted above, but it's what you came for, right?
So there you have it, the solution (I hope) to your problem. Oh and since you're here, come visit my site and drop a line in the contact form. It's good to know if the work of putting this page together was worth anything.
May the main character's powermove on your favorite sci-fi flick be with you.