Importing an image with a transparent background...

  • civ
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 12, 2004
  • Posts: 5
  • Loc: minas morgul
  • Status: Offline

Post August 12th, 2004, 2:17 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 12th, 2004, 2:17 am

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post August 12th, 2004, 3:10 am

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:
Strong with this one, the sudo is.
  • plumbum01
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 11, 2004
  • Posts: 12
  • Status: Offline

Post August 12th, 2004, 5:33 am

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
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post August 12th, 2004, 6:01 am

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. ;)
- dM
  • plumbum01
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 11, 2004
  • Posts: 12
  • Status: Offline

Post August 12th, 2004, 6:14 am

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
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post August 12th, 2004, 6:30 am

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:
Strong with this one, the sudo is.
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post August 12th, 2004, 6:31 am

Agreed! :)

PNG is a great format because of it's ability to do variable alpha. I really wish it was more widely supported.
- dM
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post August 12th, 2004, 6:32 am

*smacks forehead* I forgot about "keep all paths editable" :oops:
Strong with this one, the sudo is.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post August 12th, 2004, 9:38 am

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
  • No Avatar
  • Joined: Aug 12, 2004
  • Posts: 5
  • Loc: minas morgul
  • Status: Offline

Post August 12th, 2004, 11:09 am

Thanks all, I'll try out the suggestions right now.
  • civ
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 12, 2004
  • Posts: 5
  • Loc: minas morgul
  • Status: Offline

Post August 12th, 2004, 11:24 am

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
  • No Avatar
  • Joined: Aug 12, 2004
  • Posts: 5
  • Loc: minas morgul
  • Status: Offline

Post August 12th, 2004, 11:29 am

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
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post August 12th, 2004, 12:20 pm

So is it working now?
- dM
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post August 12th, 2004, 2:09 pm

Did you make sure you checked the 'Preserve Transparency' checkbox is the 'save as...' settings?
  • civ
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Aug 12, 2004
  • Posts: 5
  • Loc: minas morgul
  • Status: Offline

Post August 12th, 2004, 9:37 pm

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??
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 12th, 2004, 9:37 pm

Post Information

  • Total Posts in this topic: 15 posts
  • Users browsing this forum: No registered users and 32 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.