The default time for executing .as[ Script ] file is 15 sec’s and if the the file takes more that 15 sec’s it throws an Runtime Exception Error #:1502, and the below image shows the error message.
Here if we wanted our Script to execute more than the default time then we need to specify the time limit at the Application [Tag].
The property to use is :
scriptTimeLimit
It takes the value for sec’s specification. And the max value it can have is 60 sec. It means that the Script can be executed for only 60 sec’s.
Code Example:
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”init()” scriptTimeLimit=”40“>
</mx:Application>
The below image shows the Error Message:
Enjoy The code..!


January 23, 2009 at 10:23 am |
Hi,
I’ve set the scriptTimeLimit to 60 secs but I still get the
same error (15 secs). I’m using Flex Builder 3.
Any idea?
Dan
January 23, 2009 at 12:56 pm |
use callLater() method , this will be solved , plz refer the docs for examples and info.I will make a post soon on this.
regards,
kumar.
March 9, 2009 at 1:29 pm |
Hi, I have also tried this scriptTimeLimit=”60“ but still get the same message. Can you explain What you mean by using callLater()?
I am not very familiar with Flex 3. I am trying to port a computationally cumbersome Java code into AS3. (I know its probably not a good idea but i have to.)
March 9, 2009 at 2:51 pm |
OK, apparently this error #1502 is misleading. I have noticed that Flex Builder throws this exact error line at the 60th second when I set scriptTimeLimit=”60“. In other words, it does respond to my options modification but the error message is fixed to 15 secs somehow.
Anyways, in either case the code I am running needs longer than 60 seconds. Is there a way to circumvent this scriptTimeLimit (60 secs) completely and say, run a computation that takes 5 minutes?
thanks.
berkan