AS3 ComponentShim help

I’m trying to create my first component (FLA based), and am having trouble with the ComponentShim.

My component works as expected if I include the path to my AudioPlayer class, but I’d like to be able to distribute the component as a single FLA file, so the class needs to be compiled and included in the FLA. Apparently, that’s where the ComponentShim comes in.

I’ve read several different methods for creating the component shim, and am not sure what seems vague about the requirements in each of them. There are steps some of the guides have outlined, like creating avatar and asset frames, but that’s not been necessary.

It seems like the only thing I need from the ComponentShim is my compiled AudioPlayer class, and that’s where I’m having trouble.

I’ve tried copying my mc_audioplayer into my AudioPlayerShim.fla file, set its export class to my AudioPlayer class, then converted that to a compiled clip.

I’ve also tried creating the “AudioPlayer” and “AudioPlayerShim source” empty clips with export classes, then converted to a compiled clip.

In both of the above attempts, I copied the “AudioPlayerShim source” to my component FLA, then renamed it to AudioPlayerShim.

I have a test.fla file where I’m trying to use the component. I’ve removed the existing library items and reinserted the components each time I updated the FLA or code.

If someone can help me understand exactly what’s required for the component shim, I’d really appreciate it. I don’t see why i’ve been guided through so many steps that weren’t neccessary for the other parts of the component, and I imagine that making a compiled class available to your FLA can’t be that tough.

Thanks in advance!

Are there any details I can provide that will make answering/troubleshooting this easier?