step 0: get an AdobeID if you don't have one already.
step 1: obtain a Cirrus (codename) developer key: go to http://labs.adobe.com/technologies/cirrus/ and select "Sign up for a Cirrus beta developer key at rtmfp.net". you will need your AdobeID.
step 2: in your ActionScript application, create a new NetConnection and connect it to rtmfp://p2p.rtmfp.net, and use the developer key from step 1 as the second parameter to connect():
var nc:NetConnection = new NetConnection();
step 3: use the P2P APIs on NetStream and NetGroup.
the above-linked page on labs.adobe.com has a pointer to an example application.