I am trying to animate a jack lead plugging into a socket and have drawn both elemements in Illustrator and Photoshop as flat images. The problem I have is getting the effect of the jack lead entering the socket rather than the jack lead layer being completely on top of the socket image. So in short, the jack needs to be partially on top of the socket and partially behind it...if this makes sense! I'm not too familiar with masks but i'm guessing they are the answer.
Yes you need to use masking!
just add a mask layer on the socket-layer simply by drawing a closed path by "pen tool (G)" (1st select the socket layer then choose pen tool or press G on keyboard and then draw path indicates the area that you don't want to be appeared in your scene remember the path will be a yellow path by default which you can also change the color of it in cases that the scene is too bright already and the path is not obvious), then change the values to get the nice result from it! for example you can make key frames for the shape of the path so that you can animate the limited masked area of the object, or make key frames for the mask Opacity if you want it to be appeared in a certain frame and disappeared in another time later! you can also change the edge of the mask by changing the feather value or expand it by expansion value!
it is easy and fun when you use mask tools in AE!