Importing an image with a transparent background...

  • civ
  • Newbie
  • Newbie
  • civ
  • Posts: 5
  • Loc: minas morgul

Post 3+ Months Ago

I'm a complete beginner at flash and i was wondering how i could bring an image into the program without a white background behind it. That is to say have the image itself there with a transparent background.

My initial plan was to take the image in adobe, use magic wand on it, reverse my selection so it's outlined, and then copy and paste. This worked except for the transparent background... help? Pretty please?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Cut it out in photoshop & save as GIF with transparant background, then import to library in flash.
Leave 1px of padding around the edges in photoshop or part of the image will get cut off when it is imported. (flash is weird sometimes)

I'm pretty sure Ozzus search will yeild some more results on this subject :wink:
  • plumbum01
  • Newbie
  • Newbie
  • plumbum01
  • Posts: 12

Post 3+ Months Ago

or you can save your image as png file. This variant is better when your image has a shadow...
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

I be careful using PNG plumbum01. It's not universally supported...yet. I am pretty sure PNG is not a variant, but it's very own format. ;)
  • plumbum01
  • Newbie
  • Newbie
  • plumbum01
  • Posts: 12

Post 3+ Months Ago

mhm...digitalMedia..I had a couple of mismathes with png, but when I wanted to do a shadow, this format was better than gif. So I use png when I need to do a shadow only. Otherwise gif rulz :)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

If You have the PNG then you should be able to leave out the shadow when exporting to GIF, then create the shadow(s) in Flash. :)

Leaves the shadows open for special FX :wink:
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

Agreed! :)

PNG is a great format because of it's ability to do variable alpha. I really wish it was more widely supported.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

*smacks forehead* I forgot about "keep all paths editable" :oops:
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

When looking for solid transparency, I always choose GIF. The file size is smaller, and it is less processor intensive to use in Flash.

However, there are cases where you require the alpha channels supported in the PNG file type. As mentioned, these are things like drop shadows and just partially transparent areas. If you have these, PNG is definitely the way to go. But as mentioned, since the alpha channels must be translated in Flash, this makes the PNG file more processor intensive to display/animate in Flash. Not to mention the compression isn't as good as a GIF.

Also to add to what joebert said.... when importing images into a Flash movie, try to leave at least a 1px transparent border (I typically do 2px just in case). Flash has a tendancy to smash the far right and bottom pixel in, causing slight distortion in those areas.
  • civ
  • Newbie
  • Newbie
  • civ
  • Posts: 5
  • Loc: minas morgul

Post 3+ Months Ago

Thanks all, I'll try out the suggestions right now.
  • civ
  • Newbie
  • Newbie
  • civ
  • Posts: 5
  • Loc: minas morgul

Post 3+ Months Ago

Well, it's still doing the same thing; here's what i did:

Opened up the picture of a guy standing there in photoshop. The guy was one layer with a white background, and there was the background layer.

First, I magic wanded the guy layer, thus selecting everything around the guy. I then cut the selected background. Then I deleted the background layer, so that only the guy was left, with the small gray and white blocks behind him in photoshop (representing transparency).

Then I took this image and saved it as a gif. Then I opened up flash, went to import to library, and clicked the gif. file. Then I opened up my library, selected what I imported (gif. pic), and drug it to the screen. However, when I made a second layer in flash underneath the guy to test his transparency and drew a scribble behind him, he still is surrounded by a big white box; instead of being cut out. Help!
  • civ
  • Newbie
  • Newbie
  • civ
  • Posts: 5
  • Loc: minas morgul

Post 3+ Months Ago

Now this is odd. I was trying it again, and did everything identical to the last time, except for saving it. When I was prompted upon saving it as a gif. file, i don't completely remember what i pressed, but i know it had something to do with the palette i saved it on... i think...
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

So is it working now?
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Did you make sure you checked the 'Preserve Transparency' checkbox is the 'save as...' settings?
  • civ
  • Newbie
  • Newbie
  • civ
  • Posts: 5
  • Loc: minas morgul

Post 3+ Months Ago

Yes its working now, thanks everyone. I know I checked something, but it works now so oh well. Hey, does this forum support any way to post flash movies on the net? And if not, can anyone reccomend a site that does??

Post Information

  • Total Posts in this topic: 15 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.