0 Replies Latest reply on Sep 4, 2007 12:00 AM by Sterol

    Dissolving text on top of image


      I'm currently working on a small Flex-application that rotates ads on a web page. The concept is simple: an image is dissolved, followed by dissolving text on top of the image.

      I have no problem with the image but when I try to dissolve the text, the underlying image is also dissolved.

      Anyone know what I'm doing wrong or how I should go about making the ad-rotator work as intended?

      I'm a newbie on this, but I send along some of the MXML-code I have:

      <mx:State name="ImageState">
      <mx:AddChild position="lastChild" creationPolicy="all">
      <mx:Image x="0" y="0" width="140" height="240" id="campaignImage"/>
      <mx:State name="ImageQuestionState" basedOn="ImageState">
      <mx:AddChild position="lastChild" creationPolicy="all">
      <mx:Text x="0" y="0" width="120" height="220" id="txt"/>

      <mx:Transition fromState="" toState="ImageState">
      <mx:Sequence target="{campaignImage}">
      <mx:Fade alphaFrom="0.0" alphaTo="1.0" duration="{IMAGE_DISSOLVE_DURATION}"/>
      <mx:Pause duration="2000" effectEnd="{currentState='ImageQuestionState'}"/>
      <mx:Transition fromState="ImageState" toState="ImageQuestionState">
      <mx:Sequence target="{txt}">
      <mx:Dissolve alphaFrom="0.0" alphaTo="1.0" duration="4000"/>