Link to home
Start Free TrialLog in
Avatar of PoRL
PoRL

asked on

Importing objects with transparant backgrounds

This one's driving me crazy..

How do I import an object (e.g. Picture) with a transparant background??

I've tried "cut and paste" from Photoshop, saving it as a GIF, everything I can think of!!!

Anybody??

PoRL
Avatar of SuperMario
SuperMario

If you import a transparent gif, it will take on the background color you're using. Import it, copy it, change the bg color of the movie, and paste it again - you'll see what I mean.

So a good way to eliminate this problem is if you trace the bitmap as a vector (if it's a vector-looking image) and delete the parts of color you don't wish to keep.

Or, in Photoshop, try using the Magic Wand tool to select the background, then use Select Inverse and copy, and all that stuff - I suppose maybe you've tried that already. For each frame you may need to *re-import* the gif - I know it's a pain, but for some reason Flash does not handle transparent bitmaps.


I hope this helps,
Dan
Avatar of PoRL

ASKER

The problem is that it's a photo I'm trying to incorporate, so it's somewhat difficult to do as a vector.

I have tried what you suggest with the magic wand, and that didn't help. I know it's *possible* as there's a kiddie "moving" around cinema seats in one of the demo files...


Paul
Which demo is it? Are you sure it isn't a vector?
Another couple of things -

1) Was the bitmap transparent to begin with? Like, did you use GIF98a Export to set the trans levels? Flash is actually supposed to preserve the levels of transparency but apparently it does not in your case...

Let me know.

-D
Yep, again I tested it with an exported GIF with trans levels set and Flash preserved them.

Make sure that it's a transparent GIF.

-D
I would suggest using PNG .png format. It produces much nicer results. I think only Flash 3.0 and higher supports PNG, but it well worth the upgrade if you don’t have it. Also you need a image editor that supports Alpha Channels and can save to PNG format. Photoshop 5.0 can do this, I’m not sure about lower versions.

A little on transparency:

GIF's produce only 256 max colors and can only transperify one selected color. This produces jagged edges. PNG with alpha channel can produce up to 256 levels of transparency, and 16 million colors so you could have in affect a full gradient and full color.
This all means a more appealing look to the art.

I am assuming you know how to create alpha channels, if not ask me.

A note: PNG format produces larger files than GIF. This is a consideration you will need to weigh if you are publishing to the web.

Eric
Avatar of PoRL

ASKER

Just to let you know that I got stuck on another project (don't you just hate that when you're getting into something) however I promise to try the above out as soon as I'm finished on Thursday.


Sorry again for the delay....


Paul
don't save the image and reimport it to the flash !!!
now i assume you've already known how to create transparent image through Photoshop...
now open Flash application... yes you will have Photoshop and Flash running together in your Operating System.
in Photoshop copy the transparent image you want, and paste it in Flash !!! I've done it before and it works !!!
for more information here's a little explanation on how to create a transparent image through photoshop.

1. select the background using magic wand
2. delete the color
3. make sure the layer background is now checkered background (checker - transparent)
4. delete all other layer that will replace the transparent background !!!

if you still have problems, you send me your picture, i'll do it for you and i'll give you the .fla file !!!

Avatar of PoRL

ASKER

Sorry for the delay, but I'm back...!

I created a transparant image in Photoshop (nice checkerboard background and everything), tried "selecting all" and copying, and then pasted it into Flash onto a new layer (using another - larger - photo as a background for this test).

Sadly, it gave a white rectangle around the pasted image where the transparancy was.

I also tried just selecting the bit of the photo alone in photoshop (an irregular shape), and pasted that, but I had the same problem.

I tried editing the pasted image, both with making it a symbol and without, but nothing go rid of that white background!!!

If you want a way to test this, open a photo in photoshop and make a circular selection and select "Copy". Paste this into a new layer in Flash (with an irregular background like a photo), and you'll see it fills in the "transparant" part with white...


HELLLLLPPPPpppppp!!!!!!


Paul
ASKER CERTIFIED SOLUTION
Avatar of ewalbridge
ewalbridge

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PoRL

ASKER

That did it for me!!!

I'll reject techpage's answer (sorry) to open it up for ewalbridge to "resubmit" an answer so I can give the points out...


Thanks for the help!

PoRL
Avatar of PoRL

ASKER

This should have sorted the points out...

PoRL
*smacks forehead*

Damn! I forgot about that one!

Nice shot, ewalbridge.

-D