src/it/ht/rcs/console/utils/TagImage.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
public function set value(num:int):void
{
switch (num) {
case 0:
currentState = "zero";
break;
case 1:
currentState = "one";
break;
case 2:
currentState = "two";
break;
case 3:
currentState = "three";
break;
case 4:
currentState = "four";
break;
}
}
]]>
</fx:Script>
<s:states>
<s:State name="zero"/>
<s:State name="one"/>
<s:State name="two"/>
<s:State name="three"/>
<s:State name="four"/>
</s:states>
<s:SkinnableContainer width="100%" height="100%">
<s:Image left="3" right="3" top="3" bottom="3" source="@Embed('img/bars/bars0.png')" includeIn="zero"/>
<s:Image left="3" right="3" top="3" bottom="3" source="@Embed('img/bars/bars1.png')" includeIn="one"/>
<s:Image left="3" right="3" top="3" bottom="3" source="@Embed('img/bars/bars2.png')" includeIn="two"/>
<s:Image left="3" right="3" top="3" bottom="3" source="@Embed('img/bars/bars3.png')" includeIn="three"/>
<s:Image left="3" right="3" top="3" bottom="3" source="@Embed('img/bars/bars4.png')" includeIn="four"/>
</s:SkinnableContainer>
</s:Group>