Can you clarify what do mean by saving a Composition to Flash? Are you exporting a SWF file? Are you using the new XFL for Flash Professional option? Or are you rendering to a FLV (Flash video) file?
If it's SWF, then there's a handful of options that will go through as vector graphics. This includes solid layers, AI/EPS files, masks and text layers with animation (there's a couple of exceptions). Everything else would have to be rasterized, ie converted to bitmap. Since SWF is not an efficient way of storing bitmaps for the web, AE offers an option to rasterize or ignore unsupported features. If the Ignore... option is selected, then unsupported features (like Layer Styles) will be stripped off.
The AE Help page Render and export a composition as a SWF file has all the information on supported features for vector export.
You can use all features if you export a FLV video file instead. This is a much more efficient way of handling pixels in motion, at web-friendly data rates.
More information on this option, in the AE help page Render and export a composition as an FLV or F4V file.
The XFL option is a great option for more specific workflows. It exports a project that the Flash authoring application can open. But since there's so much AE can do that Flash can't (or would do differently) a layer with styles would be encoded to a FLV file, and that FLV file would appear inside of the Flash project. The XFL project option is great for moving keyframes and animation to Flash (think motion tracking, for instance). It's not the most direct way to put content on the web for the Flash player.
For more information on this, see Export a composition as an XFL file to Flash Professional in AE Help.
Thanks for the reply.
Yes I am exporting as a swf file and in the swf settings box I am ticking the rasterize setting.
The result is I still lose my layer styles.
I must be doing something else wrong.
Are there other settings I should be doing??
The option to rasterize unsupported features on SWF export was introduced in After Effects before the Flash platform had any video capabilities. It really is that old. The kind of frame by frame rasterization it performs is madly inefficient for web animation.
So, nowadays if you have to use the rasterize unsupported features option at all, it's a sign that you want to export Flash video instead. Since content is being rasterized anyway, you better pick an option that does that in a much, much more efficient way.
While we can consider the stripping of layer styles when exporting a rasterized SWF a bug, the underlying method in which that would work
is so bad, that I would consider such a bug pretty low priority.
Is there any reason why you want a SWF with very lossy and heavy JPEG compression rather than an FLV (or even SWF, although not recommended) video file with much higher quality and smaller file sizes?