I apologize if the title of the question isn't terribly clear, I'm struggling with finding terminology that is adequate.
Essentially, what I am trying to do is create a rectangle that looks like a piece of old paper that has torn edges at the top and the bottom, as though it was torn off a roll. Here's how I've tried to accomplish this:
What ends up happening, I think, is that the image mask is deleted and I'm left with a jagged line and an image. How can I get the effect I'm going for?
(In case it's important, I need the final object to be one object so I that I can duplicated it and create a drop shadow.)
You can simply draw a line and use
Effect > Distort & Transform > Roughen to create a jagged line.
Then copy the line, select both the "rough" lines and choose
Object > Expand Appearance. Then select the end points and join them via
Object > Path > Join. It's important to draw a separate line and apply the effect to just a line if you don't want all 4 sides of a rectangle to be "roughened". This method is specifically set up to provide 2 straight sides and 2 rough sides.
If you really want to use a raster image you need to use an Opacity Mask and things need to be stacked correctly first - a rectangle or shape object, on top of that place the raster image. Select the raster and the object below it and on the Transparency Panel click the Make Mask button. You may need to then tick the "Clip" and/or "Invert" options on the Transparency panel.
Pathfinder does not function with raster images. Realize that even as a mask, a raster image is still bound by all standard raster constraints. Simply because you are using Illustrator, it does not make raster images impervious to broken pixels or other resolution issues when the raster images (or masks) are scaled.
A clipping mask..... If you just want to mask a raster image with a vector shape. Place the vector shape above the raster image, select the raster and the shape, then choose
Object > Clipping Mask > Make from the menu. This will essentially give you the raster image inside the vector shape.