Want Actionscript 3 Code for "rotating" menus

I’m keen to find code that will do subtly rotating menus such as at

Where there is a slight 3D effect on rollover/out. Or like at

I’m not looking for a plugin – but to understand how to do it. I know it has something to do with trigonometry, etc. But does one also need to use any kind of DisplacementMapFilter?

If you can help, that’d be great. AS 3 code is what I need, as that’s what I work in – although if it’s only a few lines of code, it doesn’t matter.

And in general – is there any place to look for this kind of cool nuts-and-bolts code – advanced visual f/x, menu stuff. I can find basic stuff aplenty, and lots of libraries for sale, but not a lot of tutorials/info/tips on how to achieve neat bells/whistles on advanced sites.

Thanks!