以下、気まぐれに意訳。 (三日坊主に終わるかも)

Instoduction

  • SWF ファイルフォーマットはインターネット上でベクター画像/ビデオ/音声を運ぶもの。
  • 運ぶものであって、画像エディターで画像をやり取りするものではない。
  • 以下の目標をもってデザインされている
  • On-screen display
    • The format is primarily intended for on-screen display and supports anti-aliasing, fast rendering to a bitmap of any color format, animation, and interactive buttons.
  • Extensibility (拡張性)
    • The format is a tagged format, so it can be evolved with new features while maintaining backward compatibility with earlier versions of Flash Player.
  • Network delivery (ネットワーク伝達)
    • このフォーマットは、限られた帯域で帯域予約もないネットワークを介して伝送できる。
    • このファイルは圧縮で小さくでき、かつ、ストリーミングを通してインクリメンタル(訳注: 先頭から読まれた順番に)にレンダリングできる。
    • SWF ファイルフォーマットはバイナリフォーマットであり、HTML のような人が読めるもの(human readable)ではない。
    • SWF ファイルフォーマットは、bit-packing や optional fields といった技術を用いて、ファイルサイズを最小化している
  • Simplicity (簡易性)
    • フォーマットがシンプルな為、Flash Player は小さく移植も易しい。
    • その上、Flash Player が依存する OS の機能は限られたものとなる。
  • File independence
    • The files display with minimal dependence on external resources such as fonts.
  • Scalability
    • The files work well on limited hardware, and can take advantage of better hardware when it is available.
    • This ability is important because computers have different monitor resolutions and bit depths.
  • Speed
    • The graphics described by SWF files render quickly.
  • Scriptability
    • The format includes tags that provide sequences of byte codes to be interpreted by a stack machine.
    • The byte codes support the ActionScriptR language.
    • Flash Player provides a runtime ActionScript object model that allows interaction with drawing primitives, servers, and features of Flash Player.
  • SWF ファイルは .swf の拡張子と、application/x-shockwave-flash の MIME type を持つ。
  • SWF フォーマットは幾つものバージョンを通して発展している。
  • Through SWF 5, substantial additions were made to the SWF tag set.
  • Starting with SWF 6 and later, the SWF format changes less, as more new features are implemented partly or entirely at the ActionScript level.
  • Starting with SWF 9, the ActionScript 3.0 language, which employs the new ActionScript Virtual Machine 2 (AVM2) can be used.
  • Anyone planning to generate SWF file content that uses newer features should become familiar with the ActionScript object model that Flash Player exposes.
  • Some references for this information are Programming ActionScript 3.0 (see www.adobe.com/go/learn_fl_cs4_programmingAS3_en), ActionScript 3.0 Language Reference (see www.adobe.com/go/learn_flashcs4_langref_en), and the Adobe ActionScript Virtual Machine 2 Overview (PDF file) at www.adobe.com/go/avm2overview.
  • Adobe seriously considers all feedback to the SWF file format specification.
  • E-mail any unclear or potentially erroneous information within the specification to Adobe at flashformat@adobe.com.
  • All such email submissions shall be subject to the Submitted Materials guidelines in the Terms of Use at www.adobe.com/misc/copyright.html.

What’s new in SWF 10

Basic Data Types

Coordinates and twips

  • SWF ファイルフォーマットは x-y 座標を(通常、twip と呼ばれる)整数で保存する。
  • SWF ファイルフォーマットの twip は論理 pixel の 1/20 である。
  • 論理 pixel はスクリーン上で(拡大縮小せずに)100% スケールで再生したときの pixel である。例えば、800 twips x 400 twips の長方形は、40 x 20 の論理 pixel にレンダリングされる。
  • 少数点以下の pixel サイズはアンチエイリアシングで近似される。790x390 twips ( 39.5 x 19.5 pixels) は少しぼやけたエッジで表される。
  • twips はサイズと精度の良い折衷案である。これによって、極小な座標を処理している間も、ズーミングやオブジェクトの正確な配置に際して、sub-pixel(訳注: 1 pixel 以下)に対する正確さがもたらされる。
  • SWF ファイルフォーマットの座標は、伝統的なグラフィックの座標軸を持つ。
    • x は水平方向に、左の最小値から右の最大値まで続く。
    • y は垂直方向で、上の最小値から下の最大値に続く。

Integer types and byte order

  • SWF ファイルフォーマットは 8-bit, 16-bit, 32bit, 64-bite, signed, unsigned の整数型を使う
  • 全ての整数値は SWF ファイルに little-endian の byte order で格納される。
    • 最小位 bit (LSB)が初めに格納され、最上位 bit (MSB)が最後に格納される。この方式は Intel x86 アーキテクチャと同じ。
  • SWF ファイルフォーマットのバイト中の bit order は big-endian である。
    • 最上位 bit (MSB)が初めに格納され、最小位 bit (LSB)が最後に格納される。
  • 例)
    • 32-bit 値 0x456e7120 は 20 71 6e 45 として格納される。
    • 16 bit 値 0xe712 は 12 e7 として格納される。
  • 全ての整数型は byte-aligned (訳注: bit-packing 等で byte 境界を跨がないように、byte の頭に揃えて保存する事) されなければならない。
    • すなわち、整数値の最初の bit は、SWF ファイルの byte の最初の bit に保存しなければならない。
  • 符号あり整数(Signed integers) は伝統的な 2 の補数の bit パターンで表現される。
  • いまどきのプラットフォームで表現される符号あり整数、そのものである。
  • 2の補数のシステムでは、負の数は最初の bit が 1 であり、0 や正の数は最初の bit が 0 である。
  • 負の値 -n は正の値 n-1 のビットを反転したものとして表現される。

Reload   Diff   Front page List of pages Search Recent changes Backup Referer   Help   RSS of recent changes