Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
PNG transparency failing in @Embed?   Message List  
Reply | Forward Message #58221 of 150926 |
I've run into a situation where the exact same PNG file will show up as transparent only when it's not embedded.  Here is the mxml:

<mx:Image source="@Embed('assets/user-big.png')"/>
<mx:Image source="assets/user- big.png"/>

Including both images on the page, the first is missing the transparent background.  The second is fine.  I have manually checked the images, both in the dev directory and bin directory.  In fact, I have manually copied the dev ones over the top of the bin ones to make sure.  If I drag the images to Firefox, both appear with no background.  The background color is teal, so I would definitely notice.

Near as I can tell, the embed is causing the background transparency to not be processed.  I can't find anything in the docs saying this is expected behavior.

--
Jason

Wed Dec 6, 2006 10:32 pm

chimpathetic@...
Send Email Send Email

Forward
Message #58221 of 150926 |
Expand Messages Author Sort by Date

I've run into a situation where the exact same PNG file will show up as transparent only when it's not embedded. Here is the mxml: <mx:Image...
Pan Troglodytes
chimpathetic@...
Send Email
Dec 6, 2006
10:36 pm

This is still a problem. I couldn't remember if I entered it in the Adobe bug page, so I just went ahead and did it. This is a bit of a pain as transparent...
Pan Troglodytes
chimpathetic@...
Send Email
Jan 31, 2007
4:54 pm

According to the docs, the correct syntax is: <mx:Image source="@Embed(source='assets/user-big.png')"/> Does that work? HTH, Ben ... Adobe ... limited ... up...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Jan 31, 2007
6:21 pm

Sadly, no. It also doesn't work if you declare a variable like [Embed(source="/assets/user-big.png")] private var userIcon:Class; FYI, from the docs: About...
Pan Troglodytes
chimpathetic@...
Send Email
Jan 31, 2007
6:40 pm

<mx:Image source="@Embed(source='plusSymbol.png')"/> orks for me... Not sure what else to recommend. ... metadata tag; ... pain as...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Jan 31, 2007
8:14 pm

Could you clarify what you mean by "works for me"? Do you mean you are getting transparency on the PNG? I uploaded my full code for an example: ...
Pan Troglodytes
chimpathetic@...
Send Email
Jan 31, 2007
8:38 pm

Yes, I get transparency with that syntax... but not with your PNG. Opening your PNG in Photoshop also doesn't yield any transparency. So I am confused on how...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Jan 31, 2007
9:21 pm

Pan, I see the background in one and no background in the other. I think I am having the same problem and I have had no idea what is causing it. Take a look at...
dorkie dork from dork...
ultrafinetrip
Offline Send Email
Jan 31, 2007
9:21 pm

You're definitely right, that's a clear bug in how SWFLoader works. I have a solution that involves duplicating the code for SWFLoader and modifying it a...
Doug McCune
dougmccune
Offline Send Email
Jan 31, 2007
9:30 pm

Doug, Very cool that you tracked it down in SWFLoader. Right now I can get by with using GIF, but it's great to know if I absolutely have to have more than...
Pan Troglodytes
chimpathetic@...
Send Email
Jan 31, 2007
11:15 pm

Just to follow up, here's my post that explains the issue and my workaround: ...
Doug McCune
dougmccune
Offline Send Email
Feb 1, 2007
2:28 am

Please file a bug too if you haven't already. Matt ________________________________ From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On ...
Matt Chotin
m_chotin
Online Now Send Email
Feb 1, 2007
5:04 am

It seems to me like there is something funky going on with the PNG itself. Like I said, Photoshop doesn't even recognize the transparency, and that makes me...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Feb 1, 2007
5:28 am

Open it in Fireworks, he's the master of PNG's. If yall don't have it, fire it my way. jesse.warden@... On Feb 1, 2007, at 12:28 AM, ben.clinkinbeard...
JesterXL
jesterxl@...
Send Email
Feb 1, 2007
5:45 am

http://three.fsphost.com/flex2/png/assets/user.png...
ben.clinkinbeard
ben.clinkinb...
Offline Send Email
Feb 1, 2007
6:01 am

heres my image: http://judahfrangipane.com/blog/wp-content/themes/default/bin/images/kubrickheader_mask.png i'm loading it in externally though. it works at...
dorkie dork from dork...
ultrafinetrip
Offline Send Email
Feb 1, 2007
7:31 am

heres the psd http://judahfrangipane.com/blog/wp-content/themes/default/bin/images/kubrickheader_mask.psd On 2/1/07, dorkie dork from dorktown...
dorkie dork from dork...
ultrafinetrip
Offline Send Email
Feb 1, 2007
5:53 pm

FYI, I got a response from my bug report. Since I couldn't include the PNG on the bug report page, the Adobe person wasn't able to reproduce the problem. So...
Pan Troglodytes
chimpathetic@...
Send Email
Feb 3, 2007
2:54 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help