When you import a bitmap graphic into Flash, it will by default be exported at Flash's default compression (jpgs, bmps) or without any compression (gifs, pngs). If you want to change the compression for all jpgs and bmps that have been imported, you can do so by choosing File, Publish Settings and looking in the Flash tab. You'll see a slider bar for Jpeg Quality, which is set by default to 80. Move the slider to change the compression of all jpg/bmp images in the file. Republish to see how movie size and image quality have been affected.
To change the compression for a particular jpg or bmp graphic, you can right-click on it in the library, choose Properties

Try importing background.jpg from the class folder, publishing and looking at the file size of the published swf. Then go back into the fla, change the bitmap's compression to something lower (eg, 50), publish with a different output name and look at the new file size (and the picture quality) for comparison.
Obviously, you should always start with the best quality image you can obtain for the particular dimensions you need to get the best final picture. You can always increase the compression to make the file size of the swf smaller, but you can never reduce the compression beyond that of the imported picture to make it better.
The compression of sound files which are imported into Flash and set to Stream (as opposed to Event) sounds is set in the Audio Stream setting in the Flash tab of the Publish Settings screen. Normally, you will only have one Stream file playing at a time, so that is what will be affected when you change the Audio Stream setting. The higher the bitrate, the better the sound and the bigger the filesize. You can't raise the bitrate above what it was imported at though -- for this reason, it is best to import an uncompressed sound file (wav or aiff) if you have one, rather than an mp3 file, which has always had some compression applied.
Try changing the Audio Stream setting from the default 16k to 64k and republishing the project_example file to see how the filesize changes.
Compression for event sounds will be applied at the universal value in the Publish Settings screen, or may be overridden individually by right-clicking the sound in the library, choosing Properties, and changing the bitrate or other values.