Now this one’s a little wooly - so to speak - but let me start from the beginning.
In our games we’re using swf assets, more precisely vector art. These are proportionally
scaled at runtime to fit the browser window. Well, we noticed that using those directly e.g.
var sprite:Sprite=Assets.getMovieClip(“assets:ID”); greatly reduces the framerate - depending on
the quantity and size of the objects as well as the size of the browser window. The obvious solution was drawing the stuff on individual bitmaps and use those instead of the vectors. (bmpData.draw(sprite)) So now we’re drawing all the vector assets to bitmaps at runtime. This works pretty damn good on Chrome. Unfortunately just Chrome! If we test the game on Firefox, the browser freezes during the vector->bitmap ‘conversion’, followed by an ‘A script on this page may be busy - CANCEL - Continue’ dialog. On chrome the
conversion phase takes maybe 3 seconds.
Obviously FireFox ain’t as fast as Chrome with this Bitmap drawing.
Did anyone else run into this problem?
The only workaround I can think of at the moment is adding a timeout of some milliseconds between
calls to bitmapData.draw().