Breaking images with AS

Hi people!
Do you know how can I break images using actionscript???
I mean, take a picture and divide it into rectangles of the same size, for make a gallery transition or something…
Thanks for any help:)
::::goto():::::