Split image in diferent forms/shapes

Hi there. I am trying to split an image in different forms/shapes. For the moment I have something like this and the image splits only vertical but not random forms. I what all to be random like the image in the attach.
Here is my script for what I have for the moment:

//cine is the image movie clip
//dd is an blank movie clip
var bitmapData = new flash.display.BitmapData(cine._width, cine._height);
bitmapData.draw(cine);
var __x = cine._x;
var __y = cine._y;
var pozaSite = site.createEmptyMovieClip(“pozaSite”, 41);
pozaSite.attachBitmap(bitmapData, 1);

cine._alpha = 0;

var pro = Math.round(Stage.height / 100);
var __h = pozaSite._height;
var __w = pozaSite._width;

var pro2 = Math.ceil(__h / pro);
var imL = site.createEmptyMovieClip("imL", 45);

if (n) {
    imL._x = __x;
    imL._y = __y;
}
imL.divX = pro;
imL.id = 0;
var inc = pro + 1;  
var __bitmap;
for (var k = 0; k < pro; ++k) {
    __bitmap = new flash.display.BitmapData(__w, pro2, true, 0);
    var __rectangle = new flash.geom.Rectangle(__w, pro2 * k, __w, pro2);
    var dd = imL.attachMovie("dd", "d_" + k, inc, {_y: pro2 * k, _alpha: 100});

    dd.attachBitmap(__bitmap, 2, "auto", true);
    
    dd.myX = pro2 * k;
    __bitmap.copyPixels(bitmapData, new flash.geom.Rectangle(0, pro2 * k, __w, pro2), new flash.geom.Point(0, 0));
    
    --inc;
    trace(dd._width + " : " + dd._height);
}

pozaSite.removeMovieClip();

Thank you.
And hope to find the answer.