Puzzle actionscript

i made a puzzle in my flash… i want when i click the star button the original frame will disappear and a the jigsaw puzzle are scattered and when i put it in the frame it should make a clear cut and i dont know what script i will write