(swf file format spec v10)swf文件格式中英文说明书v10,显示列表部分,笔记12

The Display List
Displaying a frame of a SWF file is a three-stage process:
显示列表
展示一个SWF文件的一帧分三阶段:

1. Objects are defined with definition tags such as DefineShape, DefineSprite, and so on.
Each object is given a unique ID called a character, and is stored in a repository called the dictionary.
对象被定义,如DefineShape,DefineSprite等定义型标签。每个对象会分配一个唯一ID被称作角色,并且存储在被称作字典的库里。

2. Selected characters are copied from the dictionary and placed on the display list, which is the list of the characters that will be displayed in the next frame.
选择一个角色从字典里复制并且放到显示列表中,角色列表将被显示在下一帧。

3. Once complete, the contents of the display list are rendered to the screen with ShowFrame
一旦完成,显示列表的内容被显示在屏幕用ShowFrame

A depth value is assigned to each character on the display list. The depth determines the stacking order of the character. Characters with lower depth values are displayed underneath
characters with higher depth values. A character with a depth value of 1 is displayed at the bottom of the stack. A character can appear more than once in the display list, but at different
depths. Only one character can be at any given depth.
在显示列表中,层次值被分配给每个角色。层次决定堆放角色的顺序。低层次值的角色会被显示在高层次值角色下面。角色层次值为1被显示在堆栈的是底部。在显示列表中,每个角色在不同的层次能被显示至少一次。仅有一个角色能给定任意层次。

In SWF 1 and 2, the display list was a flat list of the objects that are present on the screen at any given time. In SWF 3 and later versions, the display list is a hierarchical list where an
element on the display can have a list of child elements. For more information, see
在SWF1和SWF2中,显示列表是平级的一系列对象在屏幕上当前对象会给一些时间显示。在SWF3中或更高版本中,显示列表是一个层次列表,其中一个在屏幕上的元素可以有一系列子元素。有关详细信息,请看:

DefineSprite.
The following six tags are used to control the display list:
下面6个标签用于控制显示列表:

■ PlaceObject Adds a character to the display list.
■ PlaceObject2 & PlaceObject3 Adds a character to the display list, or modifies the character at the specified depth.
■ RemoveObject Removes the specified character from the display list.
■ RemoveObject2 Removes the character at the specified depth.
■ ShowFrame Renders the contents of the display list to the display.

■ PlaceObject添加一个角色到显示列表
■ PlaceObject2 & PlaceObject3 添加一个角色到显示列表 或 修改角色在列表中的指定层次。
■ RemoveObject 从列表中删除指定角色
■ RemoveObject2 在指定的层次中删除角色
■ ShowFrame 渲染显示列表的内容到屏幕

注意:
The older tags, PlaceObject and RemoveObject, are rarely used in SWF 3 and later versions.
(PlaceObject 和 RemoveObject是比较老的标签,很少被使用在SWF3或更高版本中)

The following diagram illustrates the display process. First, three objects are defined: a shape,a text object, and a sprite. These objects are given character IDs and stored in the dictionary.
Character 1 (the shape) is then placed at depth 1, the bottom of the stack, and will be obscured by all other characters when the frame is rendered. Character 2 (the text) is placed
twice; once at depth 2, and once at depth 4, the top of the stack. Character 3 (the sprite) is placed at depth 3.
下图说明了显示过程。首先,三个对象被定义:一个形状,一个文本对象,一个界面容器。这些对象是给定一个角色ID并存在字典。角色1(形状)放在层次1,在堆栈的底部,当此帧被显示时,它将掩盖所有其它角色。角色2(文本)是被放二次;一个放在第二层,一个放在第4层堆栈顶部。角色3(界面容器)是放在第三层。

(swf file format spec v10)swf文件格式中英文说明书v10,显示列表部分,笔记12

你可能感兴趣的:(format)