4 Replies Latest reply on Feb 2, 2008 4:55 AM by andris11

    How to break a bitmap into several movie clips

    andris11
      Hello,

      I have a bitmap imported into library and need to break it with ActionScript2.0 into several bitmaps, using a rectangular grid. The smaller bitmaps have to become movie clips so they can be animated further.

      The resulting animation should be: bitmapped picture breaks into tiles which fly away...

      Possible? Thanks for help
        • 1. Re: How to break a bitmap into several movie clips
          patrick_garner
          I'm not sure what you mean... You want to break it apart with actionscript? You do Contol > B and break it apart that way and turn them into MCs. Then add tween classes to each of the pieces to make them move.
          • 2. Re: How to break a bitmap into several movie clips
            andris11 Level 1
            quote:

            Originally posted by: patrick garner
            I'm not sure what you mean... You want to break it apart with actionscript?


            Yes, I want to have an image and break it into tiles at runtime using AS2.0. Each tile should become a MovieClip so that I can add some simple code for random movement for each tile. That way they'll fly away. (later I want to make modifications to make an opposite effect - tiles fly randomly until they make up a picture again, or there's room for a bunch of other effects...)

            quote:

            You do Contol > B and break it apart that way and turn them into MCs. Then add tween classes to each of the pieces to make them move.

            Thanks but that's not it...
            • 3. How to break a bitmap into several movie clips
              andris11 Level 1
              quote:

              Originally posted by: andris11
              quote:

              Originally posted by: patrick garner
              I'm not sure what you mean... You want to break it apart with actionscript?

              Yes, ...

              I mean, no. I don't want to "Break Apart", rather do something like reading rectangular portions of a bitmap, converting them into movie clips...somehow...

              Thanks
              • 4. How to break a bitmap into several movie clips
                andris11 Level 1
                Hello, I've solved that with the following code, using BitmapData. The key point is using copyBitmap() to copy a portion of the original bitmap to smaller bitmaps (the grid tiles), then attach each the tile to a movie clip. The FlyingObjects class provides motion for each tile.