[英]Can I Set Spark Image source in CSS?
I want to set image source from stylesheet in flex 4.6. 我想从Flex 4.6的样式表中设置图像源。
for Example, 例如,
<s:Image styleName="imgDelete" />
Source will be given in CSS... 源将在CSS中给出...
How can I do this ??? 我怎样才能做到这一点 ???
taken from: How to set an image's source in a Flex stylesheet (not Embed) 摘自: 如何在Flex样式表(未嵌入)中设置图像的来源
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
minWidth="636" minHeight="389" width="636" height="389"
>
<fx:Style>
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace s "library://ns.adobe.com/flex/spark";
s|Application {
image-source: Embed(source="done.png");
}
</fx:Style>
<mx:Image source="{getStyle('imageSource')}" >
</mx:Image>
</s:Application>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.