A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: Faster Text Rendering in flash 8?

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448

    Faster Text Rendering in flash 8?

    Anyone know if they have come up with some crazy new way to render dynamic text in Flash 8 that will make it run faster? As an example I currently have a stale project for Flash 7 that a user can fill out some forms to create a magazine style site complete with zooming, page flipping and other neato animations. The problem with it is with the way Flash currently has to animate dynamic text, once you get any real meat on your pages, adding animation to the text (flipping a page) causes an unacceptable slowdown. The project has been ditched because of this, but I was hoping their might be something in Flash 8 that could bring new life to these type of things.
    ecards - My full flash site.

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    In another thread in this forum they have this example: http://www.betaruce.com/flash_swf/bl...w_txtField.swf

    Might give you a better idea of what Flash 8 can (or can't) do.

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    Thanks. I actually looked at that and that's what got me thinking of this. I'm on my 3ghz machine right now so it's not really enough text to know for sure if there is a speed increase. Also, is that dynamic or pre-rendered text? I did see an option to "treat as bitmap" or something similar in Flash 8 that won't render individual points on some things. It does look rather promising though.
    ecards - My full flash site.

  4. #4
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Yes, you can draw the text into a bitmap and then animate it that way, by scaling/skewing/rotating it etc.... which is alot faster to render than the actual font glyphs.

  5. #5
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    Very exciting news!
    ecards - My full flash site.

  6. #6
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    Erm...if you cache the text as a bitmap, then rotate, aren't you re-caching it on each frame of that animation then? Wouldn't that be worse?
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

  7. #7
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    Well, if this works how I'm thinking not. I know in the previous versions of flash if I had a page that needed animating with a large amount of text on it, instead of using a texfield in flash I would actually just save a bunch of text as a .jpg in photoshop or something and do the animation on that. So perhaps this does the same thing only from within the movie playing?
    ecards - My full flash site.

  8. #8
    Quote Originally Posted by Mctittles
    Well, if this works how I'm thinking not. I know in the previous versions of flash if I had a page that needed animating with a large amount of text on it, instead of using a texfield in flash I would actually just save a bunch of text as a .jpg in photoshop or something and do the animation on that. So perhaps this does the same thing only from within the movie playing?
    Bingo. Exactly the same. When your text changes in flash there will be a moment of non-cached view as it redraws the text then recaches it.

  9. #9
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    There is no moment of none-cached view, the redraw is done before the next stage update.

  10. #10
    Junior Member
    Join Date
    Dec 2001
    Posts
    23
    in my example http://www.betaruce.com/flash_swf/b...ew_txtField.swf

    the text is not dynamic. it is static text and anti-alias for animation

    i've tried to use dynamic text instead and obviously there is some problem e.g. the text will disappear once i skew it.

  11. #11
    Junior Member
    Join Date
    Dec 2001
    Posts
    23
    i try to draw the dynamic text into a bitmap....seems there are some problems...
    i can still do the scrolling (done by scrollRect) and blur, but the effect has some problem....some part of it will disappear sometimes and reappear again when i scroll...

    and it seems it cannot be skewed with matrix as it disappear immediately.

    not sure if that's my code problem or what....maybe soemone can try it.

  12. #12
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    Nooooo. Dynamic text is the only thing I was hoping for a speedup on this....
    ecards - My full flash site.

  13. #13
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    Quote Originally Posted by csdstudio
    Bingo. Exactly the same. When your text changes in flash there will be a moment of non-cached view as it redraws the text then recaches it.
    But it's not just when the text changes, it's any change that would cause a MC to be re-drawn when using cache as bitmap, no? So that would me rotate, skew, etc.

    Is there a complete list of what does and doesn't force a re-draw?
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

  14. #14
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    I haven't tried it myself, but this is what I think is the difference there PALexC. If you draw a series of shapes in flash, say a rectangle, circle, and triangle inside one movie clip. When you animate that movie clip flash currently moves the individual points of your shapes. Four points to move for the square, 12 or 15 for the circle, 3 for the triangle. Now if instead of drawing these within flash, you create a .jpg with the same 4 shapes on it and animate that, it only has the four corners of the .jpg to deal with so the number of points being calculated has been reduced to four. With the new version when you select cache as bitmap it turns all shapes within the movie clip into one big image so there are less points to calculate which increases the speed of the animation. This becomes more of an issue when dealing with more complex shapes, namely the large amount of points that need calculating when dealing with text. As far as I know flash still has to redraw the stage every time no matter what animation you are doing, but it's the calculations required to do so that become reduced thus increasing speed. Correct me if I'm wrong because like I said this is just from what I've read.

    My question still remains I guess. Can this be done with dynamic text as well?
    ecards - My full flash site.

  15. #15
    Quote Originally Posted by FlashGuru
    There is no moment of none-cached view, the redraw is done before the next stage update.
    Exactly, a moment when it's not using the cached bitmap of the mc, this will cause a slight delay between the current frame and the next frame. The time between those two frames will be the same as a flash 7 file, ie. no cache.

  16. #16
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Code:
    Exactly, a moment when it's not using the cached bitmap of the mc, this will cause a slight delay between the current frame and the next frame. The time between those two frames will be the same as a flash 7 file, ie. no cache.
    Again, i say, it is still quicker for the player to blit a bitmap into memory using the vector renderer than it is to re-draw the font-glyphs.

  17. #17
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    So if I'm reading you right: with text, even if it's almost always re-drawing the bitmap for the cache, that's better than tweening actual text?

    I suspect that will all depend on the amount of text, and complexity of the animation, but in general you may be right.

    Sounds like a good question for someone in the MX blogosphere to answer.
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

  18. #18
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    The MX Blogosphere?

    Yes, it will be faster, based upon my interpretation of the engineers various comments on Bitmap Caching, that is correct.

  19. #19
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448
    Dynamic text anyone?
    ecards - My full flash site.

  20. #20
    Quote Originally Posted by FlashGuru
    The MX Blogosphere?

    Yes, it will be faster, based upon my interpretation of the engineers various comments on Bitmap Caching, that is correct.
    Where are these engineers comments? I'd like to read them and see if there are more ways I can improve performance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center