1 Reply Latest reply on Dec 11, 2009 10:42 PM by David_F57

    Timer & Fade effect


      One more question then I'm done for the day.


      I'm using a timer to change the index on my combobox (I'm sure there's a better way but its working) which is pulling slide data from an XML file.  I would like to crossfade between slides.  Is see there is a spark fade, but I'm unsure how to apply it to each element to work with the timer.


      Timer code:

      private var timer:Timer;
      private function init():void 
          timer = new Timer(5000);
          timer.addEventListener(TimerEvent.TIMER, onTimer);
      private function onTimer(evt:TimerEvent):void 
          var idx:uint = dropDownList.selectedIndex;
          var max:uint = dropDownList.dataProvider.length;
          var newIdx:uint = ++idx % max;
          dropDownList.selectedIndex = newIdx;


      The comboBox (yes, it used to be a drop down list)

      <mx:ComboBox editable="true"
          x="10" y="10" 
          visible="false" />


      The items that need to have the fade effect are mx:Text, s:TextArea, mx:Image, & s:VideoPlayer.  Each has a unique ID.