How can I get my jigsaws to connect?

So far I know how to drag my jigsaws around, now I want to know if theres any code that can help me connect jigsaws together, is there a way with actionscript 2?

Cheers,