0 Replies Latest reply on Apr 10, 2012 12:18 PM by Chipleh

    SparkSkin - swf blinks during button states...

    Chipleh Level 3

      Hi,

       

      I am wondering if anyone has ever experienced this and what they did to correct this issue. I am using swfs as the various skin states of Spark Buttons. When I roll over or click a button, the skins update per the code below. However, there is a consistent blink between the states, almost like Flex is taking some time to render the swf. (i.e. - initial state shows up fine, when rolling over the swf button, the swf disappears for 1/2 second then the swf associated with new state appears). I would think it was my computer if this problem wasn't occurring for all the Flex developers I work with, but it is, as well as on Flash Builder installed on my super speedy laptop at home. And it's not just my application swfs as skins, but everyone's applications using swfs as skins. So, with that being said, I've been tasked with researching why this is occurring.

       

      So, with all that being said, has anyone else ever run into this problem? if so, why is this happening? Did you correct the problem?

       

      So annoying! Thanks so much for reading and much appreciation for any help.

      ~Chipleh

       

       

      <?xml version="1.0" encoding="utf-8"?>

       

      <!--

       

      ADOBE SYSTEMS INCORPORATED

      <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"

                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009" xmlns:mx="library://ns.adobe.com/flex/mx">

         

          <!-- host component -->

          <fx:Metadata>

              <![CDATA[

              /**

              * @copy spark.skins.spark.ApplicationSkin#hostComponent

              */

              [HostComponent("spark.components.Button")]

              ]]>

          </fx:Metadata>

         

          <!-- states -->

          <!-- states -->

          <s:states>

              <s:State name="disabledAndSelected"/>

              <s:State name="downAndSelected" />

              <s:State name="overAndSelected" />

              <s:State name="upAndSelected" />

              <s:State name="disabled" />

              <s:State name="down" />

              <s:State name="over" />

              <s:State name="up" />

              <s:State name="normal" />

          </s:states>

         

          <!-- SkinParts

          name=labelDisplay, type=spark.components.supportClasses.TextBase, required=false

          -->

          <mx:Image scaleContent="true" maintainAspectRatio="false"

                    source="@Embed('/resources/swf/BtnUp.swf')"

                    source.over="@Embed('/resources/swf/BtnOver.swf')"

                    source.down="@Embed('/resources/swfBtnOver.swf')"

                    source.disabled="@Embed('/resources/swf/BtnUp.swf')"

                    source.upAndSelected="@Embed('/resources/swf/BtnOver.swf')"

                    source.overAndSelected="@Embed('/resources/swf/BtnOver.swf')"

                    source.downAndSelected="@Embed('/resources/swf/BtnOver.swf')"

                    source.disabledAndSelected="@Embed('/resources/swf/BtnUp.swf')"                

                    />          

      </s:SparkSkin>