开发者

How much faster is blitting than using vector Sprite objects in Flash?

开发者 https://www.devze.com 2023-02-11 03:35 出处:网络
I k开发者_如何学Cnow there are different situations where one would be better than the other, but I\'m comortable with a generalized statistic of...

I k开发者_如何学Cnow there are different situations where one would be better than the other, but I'm comortable with a generalized statistic of...

How much faster is blitting than using vector Sprite objects in Flash?


There is no hard-and-fast answer to this question, as it depends on a variety of factors including

  1. The complexity of the vector shapes in question
  2. The types of transformations you intend to apply to the images (rotation and scale are worse for bitmaps, for example)
  3. The target platform (I've seen evidence that the AIR runtime for Android does not have differences of the same magnitude, so if that is your target anything based on web-browser research goes out the window)
  4. It may not even be faster at all based on a combination of the above. I've gotten results just as good if not better from a combination of using scrollRect and cacheAsBitmap (on desktop in the web browser, that is!)

The only true answer to the question is to run the tests yourself on your target platforms and make your decision from there. A couple of tips for choosing platforms:

  1. Always test in the browser, if the browser is your target. The test publish is not good enough.
  2. Always test in a Release version of the player (one that will never alert the user to runtime errors). This is what your target audience is most likely to have, and in fact has better runtime performance than any debug player.


using complex vectors that dont animate is fine when you cache the movie clip as a bitmap.

i.e. mc.cacheAsBitmap = true;

Animating the movieclip on a timeline will make this slower, so use it carefully. vectors will make the swf smaller, but im not sure its worth the extra work.

0

精彩评论

暂无评论...
验证码 换一张
取 消