1 Reply Latest reply on Aug 5, 2012 3:40 PM by aktell2007

    Delaying script execution inside a function ...

    aktell2007 Level 1

      Hi there,


      I'm in need of delaying the execution of the code in a function (or function call) writing to a .txt file by about 1 to 2 seconds as the code 'As Is' is reading and writing not the very last value on a click of a button from a text Input box, but always the second to last value.


      Any ideas would be appriciated! thanks in advance aktell2007




      protected function saveRunSetMsgOne(event:Event):void {  
           var localFile:File = File.desktopDirectory.resolvePath('.... /.... .txt'); 
           var localFileStream:FileStream = new FileStream();  
           localFileStream.open(localFile, FileMode.APPEND);
           localFileStream.writeMultiByte("Running: " + runSet1txt.text + " at " + runSet1dT.text, "utf-8");