Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Picture Puzzles: Sliding and Jigsaw > Breaking a Bitmap into Pieces

Breaking a Bitmap into Pieces

Loading a single bitmap and displaying it is useful, but we need to dig into the data and extract puzzle pieces from the image to build the games in the rest of this chapter.

The first change we need to make to the simple example from before is to recognize when the bitmap is done loading and start processing it. This can be done with an Event.COMPLETE listener. We add that to the Loader object, and then we can put all of our manipulation code into the loadingDone function that it will call.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint