Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-04-2012, 11:36 PM   #1
aktell
FLEX Jokey
 
aktell's Avatar
 
Join Date: Jun 2007
Location: New Zealand
Posts: 154
Default Delaying script execution inside a function ...

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 aktell

Code:
click="saveRunSetMsgOne(event)"
Code:
<mx:Script> 
<![CDATA[
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);  
     localFileStream.close();
}
]]>
 </mx:Script>
aktell is offline   Reply With Quote
Old 08-05-2012, 10:41 PM   #2
aktell
FLEX Jokey
 
aktell's Avatar
 
Join Date: Jun 2007
Location: New Zealand
Posts: 154
Default

If you can think of it easy as !
Code:
setTimeout(function,3000);
aktell is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.