ActionScript Execution TimeLimit !

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:

Error Message For Script TimeOut .!

Enjoy The code..!

Advertisements

5 Responses to ActionScript Execution TimeLimit !

  1. Dan says:

    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

  2. Berkan says:

    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.)

  3. Berkan says:

    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

  4. […] ActionScript Execution TimeLimit ! […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: