A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [AS3] how to scroll 20000x20000px bitmap?

  1. #1
    Join Date
    Jun 2008

    Question [AS3] how to scroll 20000x20000px bitmap?

    It will be huge waste of memory if that big bmp was in memory at one. So I'l make a lot of 2880x2880 and load one file, scroll it at the stage, discard it, load another, scroll it, etc.

    What's the best way to connect those two 2880 bmp's to make scrolling fast and smooth?

    For copyPixels I need to use a small rectangle from first bmp and small from second and glue those rectangles at showstageRect.

    if yellow and green smiley represent 2 big bmp's half of the copyPixels rect will be at yellow and a another half will be at the green smiley.

    For scrollRect I need to make overlapping bmp's.

    If stageRect is at a corners of 4 big bmps, calculation gets even worse.

    And that's where my ideas end
    Is there any better way?

  2. #2
    lemon juice hurts your eyes florianvanthuyn's Avatar
    Join Date
    Jul 2005
    Merelbeke, Belgium
    It wouldn't really be a waste, since Flash saves the images in the cache anyway, so even if you only use smaller parts, the memory will contain the entire image sooner or later (or so I've heard).

    Maybe you can split it up and then load them in one at a time, beeing sure that the first one loaded will occupy the entire stage (meaning, that when the user scrolls, the other parts will have been preloaded as well).

    And if I'm wrong, then please excuse me for believing the one who told me that
    Florian Vanthuyne

    mark yours as Resolved under Thread Tools!

  3. #3
    Multitouch Aficionado
    Join Date
    Mar 2006
    I believe Keith Peters's BigAssCanvas might be worth looking into. . .

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