09
Dec
03

Undocumented Flash Player 7 Features: Recursion limit and script timeout

I couldn’t sleep for some reason Sunday night so I decided to look through the File Format Specifications that Macromedia published recently. To my surprise there are a few things in there that I found interesting.

The cool chapter to check out is the “What’s New in Macromedia Flash (SWF) File Format 7”. In this chapter, there is mention of “ScriptLimits” which is a tag that sets the Maximum recursion depth and the script timeout seconds of a swf. Usually the MaxRecursionDepth is set to 256 as anyone who’s had the player loop a few too many times, and the ScriptTimeoutSeconds is responsible for that dialogue that pops up after 15 seconds.

It turns out that in the new player you have the ability to control those settings, wherein before you had to always make sure your movie behaved within those restrictions. I don’t recommend people modify these settings, but if it is ever needed it’s good to know it is there. Also there is mention of the default value of ScriptTimeoutSettings which apparently varies by platform (between 15 to 20 seconds). I’m not sure if this is for Mac/Windows or actually for low-performance devices like pda’s but I didn’t know about this variation before.

There are some other interesting things in there. If you have never looked at the file format specs, I definitely recommend it if you can’t sleep and feel like getting deep into the byte code of your precious swf’s.


9 Responses to “Undocumented Flash Player 7 Features: Recursion limit and script timeout”


  1. 1 Burak KALAYCI Dec 9th, 2003 at 3:29 pm

    With ASV 4.02 you can easily add a ScriptLimits tag to any SWF. The tag is ignored by Player version 6 (and below), does not do any harm, and it takes only a few bytes.

  2. 2 Ian Chia Dec 9th, 2003 at 3:43 pm

    The ScriptTimeoutSettings might’ve been implemented partly due to the release of the Flash Player 6 on PocketPC, since that’s has a different script timeout setting due to the slow speed of the CPUs on that platform. That was around 6r79.

    - Ian

  3. 3 Chafic Kazoun Dec 9th, 2003 at 4:17 pm

    Thanks for the info! I should have known about that feature in ASV. You always seem to be 2 steps ahead of the game Burak!

    Ian, do you know if there is a difference between Win/Mac, or only with the PocketPC?

  4. 4 Ian Chia Dec 10th, 2003 at 7:52 pm

    I think it was first implemented on the PocketPC (partly because we kicked up such a fuss about it), and probably used on various other device players now. I haven’t heard about different script timeouts between Mac and Win, and with the optimizations in the Player 7 for Mac, it’s probably not as big a deal as it was for v6.

  5. 5 Luc Chevalier Jan 6th, 2004 at 5:46 pm

    I built applications that run on 99% of the machines out there but there are still clients with P2 processors out there and they get timeout messages often enough. Could you give me an example of how to increase the Timeout in a flash movie?

  6. 6 Chafic Kazoun Jan 7th, 2004 at 11:17 am

    Burak mentioned that ASV will allow you to adjust this setting. You might want to look into that option or look into tracking down the code causing the issue and optimizing it or having it execute over several frames.

  7. 7 weight loss propolene non prescription Oct 29th, 2004 at 12:39 pm

    Hello there,

    Iwas browsing the web and found this blog. Some interesting quotes. Keep them coming!

    Alice
    weight loss propolene non prescription

  8. 8 home loans Nov 2nd, 2004 at 5:53 pm

    Hello there,

    Iwas browsing the web and found this blog. Some interesting quotes. Keep them coming!

    Alice
    home loans

  9. 9 Call Center Product Dec 3rd, 2004 at 8:47 pm

    Hi Guys

    Thanks for taking the time posting. MSN have finally launch blogs, what was with the delay?
    Call Center Product

    Cya
    Bruce

Comments are currently closed.