Are you exporting a picture from Flash or are you using a .swf? If you exported an image it is most likely a jpg. From what I remember, JPEGs don't have transparency ability. I know that GIFs do so you might want to try to find an option to export as a GIF and there is most likely an option to set a transparency color. If you have Fireworks, it is more likely that it will have the option to do transparency if you can't find it in Flash.
Your best bet is to make the background of the image the same color as the background
Also, if you are having Flash generate the HTML, it is probably putting a border around the image. I seem to remember that back when I used it a very long time ago.