Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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:

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

share|improve this answer
if i import the image background is not trasnparent and i need to import it that's the problem – newplayerhere Jan 15 '13 at 15:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.