I have a large background Bitmap
image that I blur with a tween, and it doesn't go very smoothly on lower end computers. I've read that you can apply filters to the BitmapData
instead. Would that have any effect on performance?
Asked
Active
Viewed 125 times
0

BladePoint
- 632
- 5
- 16
-
I doubt it since the bitmapdata is the content of the bitmap itself. Is this a scrolling background? Maybe only draw the visible part & blur that smaller segment. Look on google how to draw a segment of a larger bitmap. By offsetting where you draw each time it gives illusion of scrolling. – VC.One May 11 '16 at 17:18
-
You should create a blurred version of the image outside of the application and use that. If it has to be created by the application during runtime, create a the blurred version in a regular movieclip, draw the clip to bitmap, and delete the movieclip. I can give you the code to convert movieclip to bitmap if you want. – moot May 12 '16 at 00:45
-
Are you talking about the built-in filters in de Flash IDE? (blur, glow, drop-shadow, etc). Because those are very performance-heavy, to the point of being unusable. It might help to have a blurred image in the library and tick the 'cache as bitmap' option. You can indeed also use bitmapdata and filter that with an AS3 script, that should work better. See: http://stackoverflow.com/questions/6003706/applying-blur-filter-to-bitmapdata – Kokodoko May 13 '16 at 11:41