4 Replies Latest reply on Nov 3, 2010 5:55 AM by Kevin Goldsmith

    Could Pixel Bender be used for scrolling large bitmaps in Flash?

    PhotonStorm

      Hi,

       

      I need to smoothly scroll a series of very large bitmaps (1500x300) in Flash. There are 10 bitmaps in all. I'm scrolling them at a rate of 4px increments on the X axis (left to right) at 30 fps.

       

      The issue Flash Player has is that it just can't do this smoothly. Although I'm extremely careful about pooling resources and loose events, garbage collection still kicks in periodically and causes massive stuttering. I've tried a number of different methods for scrolling them, from simple Shapes to a stage sized bitmap and copypixel blitting, but the jerking nature remains.

       

      Until I give this up as a bad lot I was wondering if Pixel Bender would fare any better? Essentially taking an input image, scrolling it left and outputting it, until there's nothing more left to scroll, and then moving onto the next image. While I believe (maybe incorrectly) this should be a relatively simple kernel to create, I'm not sure about the performance trade-off between PB and Flash, and will I hit similar issues anyway? I.e. where is the bottleneck? If possible could all 10 large images be loaded into PB at once? Or are there memory issues here?

       

      Any suggestions warmly received!

       

      Cheers,

       

      Rich