I want to set image source from stylesheet in flex 4.6.
for Example,
<s:Image styleName="imgDelete" />
Source will be given in CSS...
How can I do this ???
taken from: How to set an image's source in a Flex stylesheet (not Embed)
<?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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.