AS3 animation w/ 2 control points (IK?)

I am working on a AS3 animation that is of a piston. This piston is connected to a up and down y motion and at the bottom does a circular motion around a cog like stucture. So the sprite essentially needs to animate on the y axis and I can do that fine. The base of the sprite needs to rotate around an axis, which I can do as well. But I can’t do both. It becomes almost an invers kinimatics setup. Any resources for that. You can see an example of the animation I have found as a reference here: http://en.wikipedia.org/wiki/Four-stroke_cycle there is a gif animation on the page. Any resources or anyone that wants to help me concept this out?

Thanks