dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Rasterizing MovieClips ?

  1. #1
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    709

    Rasterizing MovieClips ?

    This class ( http://www.bytearray.org/?p=117 ) would be very useful for game dev, wouldn't it?

    Does some of you already implemented that sort of thing ?

    I would use the bitmap animated class ( http://drawlogic.com/2007/09/22/as3-...-bitmap-class/ ) and would make a static method liek

    AnimatedBitmap.createFromMovieClip(mc:MovieClip)

    What do you think ?

  2. #2
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    is that faster than cacheAsBitmap?

  3. #3
    Senior Member AzraelKans's Avatar
    Join Date
    May 2002
    Location
    Hell... with frequent access to heaven ;)
    Posts
    409
    Wow! that is really amazing, Ive been thinking on ways to do something like that in realtime, or as a prior step (converting the file to pngs before) , but precalculating it on the fly looks a lot faster and easier than I expected

  4. #4
    The Cheeze to Your Macaroni ColbyCheeze's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    244
    I have been working on something that does all of that as a part of my game framework. I actually have it near enough completion that I can release it tomorrow. I'm going to do a few things to it and then make some documentation and a demo for it then I'll release it. Hopefully you guys will find a good use for it.

  5. #5
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    709
    Ray, I think that is you activate the cacheAsBitmap on an animated MC, this will not work. On each frame, the core will redraw the new frame and write it also into the cache. It's better not to activate cacheAsBitmap on animated MC.

    Wow Colby, this is very good news! Waiting for your link

  6. #6
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    yes, cacheAsBitmap on the container animation MC will just turn it off when it plays, but what about activating it on every frame inside?

  7. #7

  8. #8
    ....he's amazing!!! lesli_felix's Avatar
    Join Date
    Nov 2000
    Location
    London UK
    Posts
    1,507
    Re-initialising cacheasbitmap every frame is slower than having it turned off.

    I think if you turn it on and animate the mc, it keeps re-initialising it automatically. It certainly does if you rotate it.

  9. #9
    The Cheeze to Your Macaroni ColbyCheeze's Avatar
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    244
    I finished up my bitmap clip class, you can check it out here. Press "enter" to cycle through the little demos. This makes it very simple to turn movieclips, sprites, and tilesheets into an animated array of bitmapdata.

    http://www.cheezeworld.com/techdemoalpha.html

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