reusing transparent PNG in mx:image and the 4th version NOT transparent

0 views
Skip to first unread message

Andy

unread,
Jun 22, 2009, 6:02:41 PM6/22/09
to yourminis Developer Network
Here's my code for embedding a PNG in a item renderer:


<mx:List id="theList2"
width="213" height="360" paddingLeft="0" paddingRight="0"
paddingTop="0" paddingBottom="0"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
dataProvider="{rssData1.channel.item}"
wordWrap="true"

rollOverColor="#FFFFFF"
selectable="false" borderThickness="0">

<mx:itemRenderer >
<mx:Component>

<mx:VBox
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
verticalGap="0"
paddingLeft="6" paddingRight="4" paddingTop="4"
paddingBottom="4"
minHeight="85"
width="210"
height="91"
useHandCursor="true"
buttonMode="true"
mouseChildren="false"
backgroundImage="@Embed('../assets/WH_Widget_box.jpg')"
backgroundAlpha="100" backgroundAttachment="fixed"
>

<mx:HBox id="tcIconBox"
paddingTop="0"
visible="true"
includeInLayout="true"
useHandCursor="true"
buttonMode="true"
paddingRight="0"
mouseChildren="true" width="100%"
verticalScrollPolicy="off">

<mx:Box paddingTop="0" paddingLeft="0" width="44"
height="32">
<mx:Image id="tcIcon" source="http://www.domain.com/
icon.png" width="44" height="32" />
</mx:Box>

<mx:Text id="tcTitle2"
visible="true"
width="100%"
paddingLeft="0" paddingRight="0" paddingBottom="0"
textAlign="left" fontSize="11" textDecoration="none"
leading="0" mouseChildren="false" fontWeight="normal"
height="24"
paddingTop="6"
color="#ffffff">
<mx:htmlText>{mx.core.Application.application.truncate(data.title,
30)}</mx:htmlText>
</mx:Text>
</mx:HBox>
</mx:itemRenderer >
</mx:Component>
</mx:List>


They all look fine and transparent over the background
underneath...but on the 4th version of it, they look not transparent
and have a yellow hue to the images.

Any ideas?

Thanks,
Andy

Gavan Woolery

unread,
Jun 23, 2009, 5:05:24 AM6/23/09
to your...@googlegroups.com
You mention there are 4 versions, I am a bit confused -- are you testing this under 4 different circumstances, or does this code produce 4 versions of the PNG?  Do you have a link to a compiled example of this code?

Andy

unread,
Jun 23, 2009, 1:53:54 PM6/23/09
to yourminis Developer Network
I'm using an MX:list with 4 data items

Here's a screenshot:
http://forums.adobe.com/servlet/JiveServlet/download/2058381-11678/Picture
1.png
> > icon.png <http://www.domain.com/%0Aicon.png>" width="44" height="32" />

Gavan Woolery

unread,
Jun 23, 2009, 7:43:40 PM6/23/09
to your...@googlegroups.com
Hmm that is odd, I am not sure what could be causing that.  Could it have something to do with bitmap caching?  Have you tried editing the malfunctioning PNG and saving it as something else (in case the data is somehow corrupted/improperly interpreted)?
Reply all
Reply to author
Forward
0 new messages