Can I create a SWC file without using the Flex framework? I just want a bare-bone AS3.
Yes, we are not forced to use flex, in fact Adobe does not even support Flex as its product officially, as it is now an open source Apache project. http://blogs.apache.org/flex/
The flash compiler itself is open source and free to use, so there are many third-party IDEs and development tools that can also create SWC libraries. To create swc, the compiler simply requires a special xml file in the zip file. Therefore, if you want to avoid this manually for specification, it is just a matter of choosing a gui method for this.
One of the most popular open source GUI methods, I suppose, is Flash Develop http://www.flashdevelop.org/ , which has a plugin to do what you want. http://www.flashdevelop.org/community/viewtopic.php?f=4&t=2987 This IDE is highly recommended, but if you need something more cross-platform, I recommend Intellij Idea, which is great as3 and java ide since you know what jar files are.
"have access / knowledge of only those classes that I declared public?
The classes in your swc will not differ from being part of your main project, so if you create swc with an open or open one, it will be public or private. To be honest, although most of the codes shared by blogs and repositories in the community are only raw * .as files, swc is convenient, but it can make it more organized for shared libraries in a team.
source share