4 Replies Latest reply on May 24, 2010 5:14 AM by gflowreal

    Skins - Images - Property - Dynamic

    gflowreal

      Maybe someone can help me,

       

      I'd like the images to be dynamic , or I'd like to have a property so the images can be changed.
      I do not wish to have Loads of the same skin file with only the contents of the @Embed('') chnaged to a new image.

      Is this possible, using a skin?

       

      Here is my simple skin below.

       

       


      <?xml version="1.0" encoding="utf-8"?>
      <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
      <fx:Metadata><![CDATA[
              [HostComponent("spark.components.Button")]
          ]]></fx:Metadata>
      <s:states>
        <s:State name="up"/>
        <s:State name="over"/>
        <s:State name="down"/>
        <s:State name="disabled"/>
      </s:states>
      <s:BitmapImage includeIn="up" smooth="true" source="@Embed('assets/page2/Contact.png')" x="0" y="0"/>
      <s:BitmapImage includeIn="over" smooth="true" source="@Embed('assets/page2/Contact.png')" x="0" y="0">
        <s:filters>
         <s:GlowFilter blurX="6.0" blurY="6.0" inner="true" color="0x5380d0" strength="1" alpha="1.0" quality="2" knockout="false"/>
        </s:filters>
      </s:BitmapImage>
      <s:BitmapImage includeIn="down" smooth="true" source="@Embed('assets/page2/Contact.png')" x="0" y="0">
        <s:filters>
         <s:BlurFilter blurX="4.0" blurY="4.0" quality="2"/>
        </s:filters>
      </s:BitmapImage>
      </s:Skin>