SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: transparant png

  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    transparant png

    Hi, I opened an existing flash file which has an image of some text. the text has a drop shadow on but its on a transparent background. (This is not a shadow filter done within flash). Whenever Ive done a transparent png, the edges turn out bitty. I was wandering how this text has a nice shadow around it without going all dodgy around the edges. Ive tried it and you can see the original background colour behind the shadow. Does that make sense?

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    It makes sense. I am not a flash expert, so I can't help, but I had the same problem with animated gifs when done in flash. So annoying.

  3. #3
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,559
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Export the png as a 24 bit with alpha channel as opposed to a 8 bit png with tranparency and matte

  4. #4
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    The thing is that if you save them as 24 bits you are going to have problems with IE 6which doesn't display them. Although there are scripts to solve the problem, you may as well be careful and study your visitors' browser characteristics, just in case.

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi EastCoast,
    I havnt worked with alpha channels before. ive opened my channels pallette, clicked on 'new' which has added an alpha channel. I then tried to save it as a PNG24 with the transparency box ticked. Ive imported to flash and theres no transparency. what am I doing wrong?
    thanks

  6. #6
    SitePoint Enthusiast benno23's Avatar
    Join Date
    May 2008
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do transparent PNG's rendered via the flash player itself still cause the IE6 grey background problem? I would have thought the Flash player would take care of that?

    Have you tried turning on the 'smoothing' option for your picture in Flash?

  7. #7
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I havnt tried the smoothing feature - would that make a differnce. I was kinda expectingto see the transparent bit in photoshop when i click 'save for web' and pick the png24 option.

    i dont think i need to be worried about it not being displayed in IE6. It would be true if i was to embed the image in the html.

  8. #8
    SitePoint Enthusiast benno23's Avatar
    Join Date
    May 2008
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's worth a try. If your PNG is a library item just right click on it in the library panel, choose properties and then check 'allow smoothing'. You can also toggle this setting with Actionscript if you have to.
    Last edited by benno23; Oct 20, 2008 at 03:19. Reason: typo, expect more

  9. #9
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,559
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Can you confirm the workflow here -
    Are you starting a graphic in photoshop, exporting as png then importing to flash, or the other way round?

  10. #10
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, Im creating some type and applying a drop shadow to it in Photoshop. Saving as PNG. And then impotring into Flash.

  11. #11
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,559
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Photoshop:

    - Make sure there isn't a background layer (you can see the chequered transparency indication in the background of the image)
    - Save for web
    - Choose png-24, tick transparency, and save.

    Flash:
    - import file to library
    - right click it in the library->properties
    - in compression it should have 'lossless (png/gif)' selected (though you can actually 'double compress' by selecting jpeg and it should still retain it's alpha channel)

    You should have perfect transparency.

  12. #12
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fantastic, cheers eastcoast. i wont have time til later to try it, but it certainly makes sense.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •