5 Replies Latest reply on Oct 12, 2011 1:51 PM by artguate

    Flex addEventListener - how to refresh the screen during called event?

    Neal Hudson

      I can't seem to find the answer to what I would have thought was a common problem.


      What I want to do this is:

      1. Show the Open File Dialog

      2. Process the file selected

      3. During processing the file, report progress to the User


      I have a file defined, and am using the browseForOpen and AddEventListener:


          public var fileInput:File = new File();

          fileInput.browseForOpen("Open file",[filter]);

          fileInput.addEventListener(Event.SELECT, onFileSelect);


          // Step 2 - function gets called to process the file

          private function onFileSelect(e:Event):void


              // Step 3 - do some processing, and at intervals report progress to the screen



      My issue is - any changes to the screen within the event listener do not get done until the function is complete.


      Any help would be appreciated,