0 Replies Latest reply on Feb 6, 2010 6:26 AM by el_kolo

    Progressbar with TimerEvent


      I am selecting (with rollOver) items from from TileList (buttons arrayCollection) and sending their labels to Rich Text Editor with some time delay.

      How can I implement progressbar which will show me progress of this delay... Or maybe I can set Timer on progressbar and release my SelectItem function after progressbar complete?  My code below:


      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
               import mx.events.CollectionEvent;
               import mx.events.ListEvent;
              import mx.controls.Button;
              import mx.collections.ArrayCollection;
              import mx.controls.RichTextEditor;
              import mx.controls.TileList;
              import mx.events.ListEvent;
              import flash.events.*
            public var listArray:Array=[
                {label: "item0", data: 0},{label: "item1", data: 1},
                {label: "item2", data: 2},{label: "item3", data: 3},
                {label: "item4", data: 4},{label: "item5", data: 5},
                {label: "item6", data: 6},{label: "item7", data: 7},
                {label: "item8", data: 8}];

           public var TileListdp:ArrayCollection = new ArrayCollection(listArray);
           public var timer3:Timer= new Timer(2000,1);                 
           private var currentValue:String;                           
           private function SelectItem(e:TimerEvent):void{               
          private function TileListSend(e:ListEvent):void{
                   currentValue = e.itemRenderer.data.label;
                 timer3.addEventListener(TimerEvent.TIMER, SelectItem);
         private function TileListSendBreak(e:ListEvent):void{
           currentValue = e.itemRenderer.data.label;

          <mx:TileList dataProvider="{TileListdp}" itemRenderer="mx.controls.Button"
             itemRollOut="TileListSendBreak(event)" width="249" columnWidth="100" x="34" y="30">

          <mx:RichTextEditor title="Title" id="rte1" x="455.5" y="188">