I think I got it.
My Button MovieClip was linking to a class in the the same src folder as the rest of my actionscript code in the Flex actionscript project. (The as3 classpath was set to "../", from the assets folder where the .fla file lives, one level up to src )
When Flash compiled, the class was found and I got in the .swc file. That is why I got the symbol traced from flash.
When Flex compiled, the class was found in the src directory, so a new version of the same class was compiled, although it already existed in the swc file. Since flex found the .as file, but wouldn't know I had it linked to a symbol in the Flash IDE ( I don't think it can do that ), Flex created its version of the class, but since no symbol was linked to that class, the child of Button I was tracing was null.
I guess using packages and keeping the fla linked classes separate so Flex wouldn't compile the same class twice.
The weird thing is I didn't get any warning or error, so I assumed everything was fine.
A quick and not so dirty workaround was to delete the physical Button class from the filesystem, so that Flash could generate it's version on compile time and have references to the children of the Button symbol. Then in Flex I cread a class that extends Button and added the code I needed. Since the generated class got compiled in the .swc file, Flex could see that and I had no problem extending.
That was it! Bob's you're uncle!
I assumes that what happens, I am not 100% sure. It's something my intuition takes for granted through observation, so I might be technically wrong.
If anyone has any correction they're welcome.
As you said SWC is the way to go.
I think I ran into a pretty similar situation, and I recommend you check this question out.Here is a dummy project on that approach.
Also, if it might speed up development time, I've made this tiny extension that declares the stage instances, initializes them and puts them in your clipboard so you can add that to your linked class. All you need to do initially is setup a naming scheme in the flash panel, then all you'll need afterwords is the Generate Button.
I hope you designer has SVN setup. Designers hate SVN! You can trick them with something that looks cute on a mac like Versions or Cornerstone.
Goodluck!
Best Answer
There are two ways to look at this. The first way (that I use fairly often) is to include the FLAs in my lib folder of my Flex project. Then, in the FLA I set the path to ../src/ (Publish Settings - > Flash Tab -> ActionScript 3 Button) so that Flash can reach the same packages as the rest of my Flex application. This means the SWC is just a compiled version of the classes I already have in Flex (hence I don't even have to add the SWC to the Flex project technically)
They other way of doing something like this is to create the assets inside of Flash and just assign the various assets dummy classes - Flash will create the classes for these assets for you automatically. Then you import that SWC into your Flex project. The assets, by themselves, will obviously just be dumb MovieClips - but you can write your own classes that instantiate the assets and control them.