`
gouxychina
  • 浏览: 33148 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

(swf file format spec v10)swf文件格式中英文说明书v10,字典部分,笔记10

阅读更多
The dictionary
The dictionary is a repository of characters that are defined, and are available for control tags
to use. The process of building and using the dictionary is as follows:
1. The definition tag defines some content, such as a shape, font, bitmap, or sound.
2. The definition tag assigns a unique CharacterId to the content.
3. The content is saved in the dictionary under the CharacterId.
4. A control tag uses the CharacterId to retrieve the content from the dictionary, and performs
some action on the content, such as displaying a shape, or playing a sound.
字典
字典是一个被定义的角色库,并为控制型标签所用。建立和使用字典的过程如下:
1. 定义型标签定义了一些内容,如形状,字体,位图,或声音。
2. 定义型标签分配了一个唯一角色ID给内容。
3. 内容被保存在字典里的角色ID下。
4. 控制型标签使用角色ID从字典里检索内容,并在内容上执行一些动作,如显示形状,或者播放声音。

Every definition tag must specify a unique ID. Duplicate IDs are not allowed. Typically, the
first CharacterId is 1, the second CharacterId is 2, and so on. The number zero (0) is special
and is considered a null character.
每一个定义型标签必须指定一个唯一ID。重复的ID是不允许的。通常情况下,第一个角色ID是1,第二个角色ID是2,依此类推。数字0是特殊的并且被认为是空字符。

Control tags are not the only tags that reference the dictionary. Definition tags can use characters from the dictionary to define more complex characters. For example, the DefineButton and DefineSprite tags refer to other characters to define their contents. The DefineText tag can refer to font characters to select different fonts for the text.
不仅控制型标签可引用字典。定义型标签能从字典里使用角色去定义更复杂的角色。例如,DefineButton 和 DefineSprite标签引用其它角色去定义其内容。DefineText标签可通过字体角色为其文本选择不同的字体。

The following diagram illustrates a typical interaction between definition tags, control tags,and the dictionary:
下图说明了在定义型标签,控制型标签和字典之间一种交互控制。




Processing a SWF file
Flash Player processes all of the tags in a SWF file until a ShowFrame tag is encountered. At this point, the display list is copied to the screen and Flash Player is idle until it is time to
process the next frame. The contents of the first frame are the cumulative effect of performing all of the control tag operations before the first ShowFrame tag. The contents of the second frame are the cumulative effect of performing all of the control tag operations from the beginning of the file to the second ShowFrame tag, and so on.
处理SWF文件
Flash Player在SWF文件中处理所有的标签,直到遇到一个ShowFrame标签。在这一点上,显示列表被显示在屏幕并且Flash Player处于空闲状态,直到此时处理下一帧。第一帧的内容累积了第一个ShowFrame标签之前,所有控制型标签操作执行结果。第二帧内容是累积从文件开始到第二个ShowFrame标签的所有控制型标签的执行结果,等等。
  • 大小: 20 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics