February 25, 2005: SWFSLI 1.0 released!
What is SWF ScriptLimits Injector?
SWF ScriptLimits Injector (SWFSLI) is a Win32 console (command line) application that can modify/remove/add 'ScriptLimits' tag to a SWF file. Flash MX 2004 (Flash 7) will not add this tag to exported SWF files. In Flex, you can specify the values like <mx:Application scriptTimeLimit="nnnnn" />. Default values in Flex are 60 seconds and 1000 recursions.
ScriptLimits Tag is recognized by Flash Players 7 and above. The Tag contains 2 values:
  • Maximum Recursion Depth (0..65535)
  • Script Timeout Seconds (0..65535)
Here's the explanation from the official SWF 7 specs:
The ScriptLimits tag includes two fields which can be used to override the default settings for maximum recursion depth and ActionScript time-out: MaxRecursionDepth and ScriptTimeoutSeconds.
The MaxRecursionDepth field sets the ActionScript maximum recursion limit. The default setting is 256 at the time of this writing. This default can be changed to any value greater than 0. The ScriptTimeoutSeconds field sets the maximum number of seconds the player should process ActionScript before displaying a dialog box asking if the script should be stopped.
The default value for ScriptTimeoutSeconds varies by platform and is between 15 to 20 seconds. This default value is subject to change.
The minimum file format version is SWF 7.
Adding a script limits tag is useful if your script, with the default values of the Flash Player, displays warnings/errors to the user.
SWFSLI is free to use, but you cannot distribute it or link directly to the download. SWFSLI is not freeware, but only free to use and at your own risk that is. All rights other than granted here belong to Manitu Group.
Linking to this page is welcome. [http://www.buraks.com/swfsli].
November 2, 2005: Following was posted to a public list, in reply to a post, by Matt Chotin of Macromedia:
" OK, bad news. I went searching through the bugbase and found one for our docs team to add to the migration guide that the timeout can no longer be greater than 60 seconds. I'm assuming that this was actually put into Player 8, not just 8.5 since you're running into it. "
SWFSLI supports version 8 SWF files.
More Info
Current Status
Version 1.0. There are no known bugs.
SWFSLI Takes parameters from the commandline. Usage is:
swfsli inputFile /rRecursionDepth /tTimeoutSeconds /b /d /v
  • inputFile is the source SWF file. Use quotes if the file name or path includes spaces, like "my file.swf". Use full file path when necessary.
  • /r: Maximum Recursion Depth value. Must be between 0 and 65535. Specify the value without any space after the switch, like /r500.
  • /t: Script Timeout Seconds value. Must be between 0 and 65535. Specify the value without any space after the switch, like /t300.
  • /b: Backup original file. The file will be copied with '.bak' extension appended. For example my.swf will be saved as my.swf.bak.
  • /d: Delete mode. The ScriptLimits tags in the SWF will be removed. (Note that SWFSLI will not check tags inside MovieClips).
  • /v: Verbose mode. SWFSLI will display more information about errors/warnings.
You must supply either /r or /t value, if you are not deleting with /d. SWFSLI will remove all ScriptLimits tags but the first one, as the first tag. If you supplied only one of the values other one will remain unchanged, if there was a ScriptLinits tag in the SWF. Otherwise, default values of /r256 and /t16 will be used.
The result of the operation will be written to the console. Also, SWFSLI will return an exit code.
Displayed StringExit Code
usage: swfsli inputFilename /rMaxRecursionDepth /tScriptTimeoutSeconds /b /d /v1
MaxRecursionDepth or ScriptTimeoutSeconds must be specified.2
MaxRecursionDepth value invalid.3
ScriptTimeoutSeconds value invalid.4
File not found.5
Could not backup file.6
Error loading file.11
Error modifying file.12
Error saving file.13

SWFSLI 1.0 (swfsli10.zip 220KB)

We'd like to thank to Philippe for requesting SWFSLI and sponsoring it to be free to use (SWFSLI is free to use but distribution is not free and SWFSLI is copyrighted, NOT freeware).
SWFSLI is not an officially supported product. But you'll most likely receive a response when you write to swfsli@buraks.com. Please let us know your experience and about bugs, suggestions are always welcome.

Copyright © 2005 Manitu Group, Istanbul, Turkey. All rights reserved. All trademarks acknowledged.
General Privacy Policy of Manitu Group