画像を表示するカスタムアイテムレンダラーがあります。
<mx:DataGrid dataProvider="{friends.friend}" id="friendsGrid" width="240"
rowCount="3" variableRowHeight="true" headerHeight="0"
horizontalCenter="true" backgroundAlpha="0" borderThickness="0"
useRollOver="false" selectable="false">
<mx:columns>
<mx:DataGridColumn width="80" paddingLeft="20">
<mx:itemRenderer>
<mx:Component>
<mx:HBox height="50" horizontalAlign="center"
verticalAlign="middle" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Image source="{outerDocument.getProfilePic(data)}"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
そして関数getProfilePic:
public function getProfilePic(data:Object):String{
if(String( data.image_path.text() ) == ""){
return "../assets/no_profile_pic.png";
}else{
return data.image_path;
}
}
The issue is that when I assign the "no profile pic" image, it does not show up. I get that funny looking "image cannot be found" icon in place. If I place an image in ../assets on my server, the image shows up. Embedding is more ideal. So the question is...how do I embed an image in this case?