How do I import an image that has transparent background to flash and give it class and use
addChild to show it on the screen? Transparent background should stay transparent.
closed as off topic by Tim Holt, Byte56♦, Jari Komppa, Sam Hocevar, jhocking Jan 17 '13 at 14:04
Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
This is answered on the main StackOverflow: http://stackoverflow.com/questions/8005068/better-way-to-include-images-in-as3-than-embed
In summation, you can either include your images in the swf and then call them from the code, or you can load external images. If you have the Flash authoring tool then one approach would be to import the image in the authoring tool, and then in the Library go into the Properties and set the ActionScript linkage for that image. If you don't have the Flash authoring tool then the equivalent approach is to use [Embed] tags at the top of your code.
If you can't or don't want to include the images in the swf (eg. loading user images) then use Loader