How do I make a Flex Component Private?
Over on FlexCoders, Nate asked how he makes a Flex MXML Component private. I'll quote the important part of his question:
His topic makes things a bit confusing. You make variables or methods private so they can't be used outside of a class. A private class would be one that you can't create an instance of? There would be no purpose in that.
Nate really wants to look into making an internal class. Internal classes can be used only within the package (AKA Directory), but not from outside.
Of course, don't go thinking that internal is not the same as private. People can extend your classes within the same package and use that internal class. I believe that the internal class can even be extended if need be.
If you are distributing a Binary SWC and want to hide the fact that you have a class in there, you can use the ExcludeClass metadata tag. This is used more than you'd think in the Flex Framework code.
Of course none of that will help you if people decompile your SWF.



