TITLE:Chapter 4: Control Tags
#contents
* Control Tags [#Control_Tags]
- Control tags manage some overall aspects of files, frames, and playback in SWF files.
** SetBackgroundColor [#SetBackgroundColor]
** FrameLabel [#FrameLabe]
** Protect [#Protect]
** End [#End]
** ExportAssets [#ExportAssets]
** ImportAssets [#ImportAssets]
** EnableDebugger [#EnableDebugger]
** EnableDebugger2 [#EnableDebugger2]
** ScriptLimits [#ScriptLimits]
** SetTabIndex [#SetTabIndex]
** FileAttributes [#FileAttributes]
- FileAttributes タグは SWF ファイルの特徴(characteristics)を定義する。
- このタグは SWF 8 以降を要求し、SWF ファイルの初めのタグになければならない。
- 加えて、FileAttributes タグは、どの SWF ファイルバージョンに於いても、それを含めるかどうか選択できる。
- HasMetadata flag は SWF ファイルが Metadata tag を含んでいるかどうかを示す。
- Flash Player はこのビットフィールドや関連するタグに気をかけない(does not care abount)が、サーチエンジンに有用である。
- %% UseNetwork flag は SWF ファイルが手元にロードされている場合に、ローカル、又はネットワークの、どちらの SWF ファイルへのアクセスを認めるかを示す。%% (意味が通らないので訳し直し)
- The UseNetwork flag signifies whether Flash Player should grant the SWF file local or network file access if the SWF file is loaded locally.
- %%デフォルトの振る舞いとしては、ローカルの SWF ファイルにのみ、ローカルファイルとのやり取りを認める。ネットワークのは認めない。%% (意味が通らないので訳し直し)
- The default behavior is to allow local SWF files to interact with local files only, and not with the network.
- However, by setting the UseNetwork flag, the local SWF can forfeit its local file system access in exchange for access to the network.
- Any version of SWF can use the UseNetwork flag to set the file access for locally loaded SWF files that are running in Flash Player 8 or later.
- ファイルフォーマットの最小バージョンは SWF 8。
- FileAttributes
| Field | Type | Comment |h
| Header | RECORDHEADER | Tag type = 69 |
| Reserved | UB[1] | Must be 0 |
| UseDirectBlit &br; (see note following table) | UB[1]| If 1, the SWF file uses hardware acceleration to blit graphics to the screen, where such acceleration is available. &br; If 0, the SWF file will not use hardware accelerated graphics facilities. &br; Minimum file version is 10. |
| UseGPU &br; (see note following table) | UB[1] | If 1, the SWF file uses GPU compositing features when drawing graphics, where such acceleration is available. &br; If 0, the SWF file will not use hardware accelerated graphics facilities. &br; Minimum file version is 10. |
| HasMetadata | UB[1] | If 1, the SWF file contains the Metadata tag. &br; If 0, the SWF file does not contain the Metadata tag. |
| ActionScript3 | UB[1] | If 1, this SWF uses ActionScript 3.0. &br; If 0, this SWF uses ActionScript 1.0 or 2.0. &br; Minimum file format version is 9. |
| Reserved | UB[2] | Must be 0 |
| UseNetwork | UB[1] | If 1, this SWF file is given network file access when loaded locally. &br; If 0, this SWF file is given local file access when loaded locally. |
| Reserved | UB[24] | Must be 0 |
- NOTE
-- The UseDirectBlit and UseGPU flags are relevant only when a SWF file is playing in the standalone Flash Player.
-- When a SWF file plays in a web browser plug-in, UseDirectBlit is equivalent to specifying a wmode of “direct” in the tags that embed the SWF inside the HTML page, while UseGPU is equivalent to a wmode of “gpu”.
** ImportAssets2 [#ImportAssets2]
** SymbolClass [#SymbolClass]
** Metadata [#Metadata]
- Metadata tag は外部プロセスに SWF ファイルを説明するオプショナルな tag である。
- このタグは SWF ファイルに XML metadata を組み込む。例えば、サーチエンジンがこのタグを特定して SWF のタイトルにアクセスし、サーチの結果にタイトルを表示できるようにする。
- Flash Player はこの Metadata tag を常に無視する。
- SWF ファイルにこの Metadata tag が含まれる場合、FileAttributes tag もまた、SWFファイルの中で HasMetadata flag をセットしなければならない。
- その逆に、FileAttributes tag で HasMetadata flag がセットされているならば、SWF ファイルに Metadata tag が含まれなければならない。この Metadata tag は SWF ファイルに1つのみ存在できる。
- Metadata のフォーマットは RDF で Adobe の Extensible Metadata Platform (XMP™) 仕様に準拠する。RDF と XML のより詳しい情報は以下のソースを見るように。
-- The RDF Primer: www.w3.org/TR/rdf-primer
-- The RDF Specification: www.w3.org/TR/1999/REC-rdf-syntax-19990222
-- The XMP home page: www.adobe.com/products/xmp
- The following examples show two of many acceptable ways to represent the Metadata string in the SWF file.
- 一つ目の例は、SWF ファイルの基本的な情報、title と description を提供する。
<rdf:RDF xmlns:rdf=’http://www.w3.org/1999/02/22-rdf-syntax-ns#’>
<rdf:Description rdf:about=’’ xmlns:dc=’http://purl.org/dc/1.1’>
<dc:title>Simple Title</dc:title>
<dc:description>Simple Description</dc:description>
</rdf:Description>
</rdf:RDF>
- 二つ目の例では、title が複数の言語で記述されている。
<rdf:RDF xmlns:rdf=’http://www.w3.org/1999/02/22-rdf-syntax-ns#’>
<rdf:Description rdf:about=’’ xmlns:dc=’http://purl.org/dc/1.1’>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang=’x-default’>Default Title</rdf:li>
<rdf:li xml:lang=’en-us’>US English Title</rdf:li>
<rdf:li xml:lang=’fr-fr’>Titre Français</rdf:li>
<rdf:li xml:lang=’it-it’>Titolo Italiano</rdf:li>
</rdf:Alt>
</dc:title>
<dc:description>Simple Description</dc:description>
</rdf:Description>
</rdf:RDF>
- Metadata の文字列は全ての不要な空白を削除して SWF ファイルに格納される。
- ファイルフォーマットの最小バージョンは SWF 1。
- Metadata
| フィールド | 型 | コメント |
| Header | RECORDHEADER | Tag type = 77 |
| Metadata | STRING | XML Metadata |
** DefineScalingGrid [#DefineScalingGrid]
** DefineSceneAndFrameLabelData [#DefineSceneAndFrameLabelData]