当前位置: 首页 > 图文教程 > Flash动画 > ActionScript > Flex教程:ScriptLimits标签

ActionScript
将FlashVars写在JS函数中,实现变量更新与后台同步
Flash与Flex3结合学习心得体会
Flash AS简单制作画线条动画
Flash教程:如何把库中的元件加载到场景中
Flash AS3运行错误参考文档
Flash AS3制作自由落体运动代码解析
多层级加载相对路径遇到的问题解决方法
加载PNG后其透明区域不响应事件
AS3教程:按顺序播放多个FLV视频
Flash AS与JS的互动
Flash AS实例:智力过河小游戏源代码
Flash as教程:图片模糊运动
Flash AS3实例教程:物体运动速度向量(velocity)
Flash AS3.0教程:学习帧循环的运用
Flash AS3动态改变影片剪辑元件颜色
Flash AS 制作创意的鼠标经过的网页导航
Flash AS实例教程 会眨眼的美女
Flash AS2实例 跳动的小球动画效果
Flash AS3实例:制作好看的七彩小球动画
AS2.0高级滤镜效果如何用在JPG图片上

ActionScript 中的 Flex教程:ScriptLimits标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-30   浏览: 153 ::
收藏到网摘: n/a

今天读SWF file format spec,注意到一个tag——ScriptLimits 很有意思。很久很久以前,as2的时候,flash的递归被限制为256级。实际上,这个限制正是通过这个tag描述的。该标签包含两部分:MaxRecursionDepth和ScriptTimeoutSeconds,分别表示最大递归深度和脚本超时,类型均为UI16,表示可取值范围为0 ~ (2^16)-1之间,即,最大递归深度可以被设置为65535级(递归应当被避免),脚本超时也可以如此之长(千万别这么写,谋杀浏览器)。

官方文档:
  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 zero (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.
  Flex中,Application和WindowedApplication都有两个对应的属性:scriptRecursionLimit(default 1000)和scriptTimeLimit(default 60)。