I needed to convert a couple of .PNGs to .SWFs for a project today. I did a quick search and I wasn't able to find something easy to use for this, and the ones I found usually just embedded the .PNG in the .SWF,
which is exactly what I didn't want.
At the time of publishing a flash project with .PNG images, if you set the images on your library to be compressed to .JPG, if there is any PNG with alpha channel, flash will save the color information with JPEG compression and leave the transparency information with PNG lossless compression.
The end result it's like having a
JPEG with Alpha channel, which, actually, it's something you can only have in Flash (compared to html).
Seems like the easiest way to handle the issue was creating a
.JSFL file to automatise all this. I never had to do a
.JSFL script before, so forgive me if I did something bad on it.
Anyway, in case you ever need it, here you have:
png2swf.jsfl(Flash IDE script, Run it from Commands)
Enjoy!
PS: The files that I had to compress went from 4mb in total to 900kb :)
#permalink
Share:Digg! ~
del.icio.us ~
Stumble ~
Furl ~
Reddit