Flash Lite のファイルフォーマット tagの話(2008/06/24)
ファイルフォーマットを少し理解しないといけないようなので、勉強。Adobeが提供するpdfの仕様書以外だと↓が参考になるかな。
SWF
http://www.half-serious.com/swf/format/index.html
「タグ」という概念を理解しなければならない。タグと言っているぐらいだから、何らかのブロックになっていて、xmlのタグ<hoge></hoge>みたいのはありえないから、タグの先頭でタグの中身の長さを指定して云々という風になっているに違いないと想像してみる。
Each tag begins with a tag type and a length. There are both a short and long tags. Short tags are used for blocks with 62 bytes of data or less and large tags can be used for any size block.
とのことなので、とりあえずそんな感じのようだ。「タグの先頭でタグの種類と長さを明示する。」
次の疑問、
タグの種類でデータ構造を指定したり、制御を指定したりするのだろうか?
There are two categories of tag in Macromedia Flash (SWF):
-
Definition Tags are used to define the content of the
Macromedia Flash (SWF) movie – the shapes, text, bitmaps and sounds
that are used in the movie. Each definition tag assigns a unique ID
called a
character to the content it defines. The player then stores the
character is a repository called the
dictionary.
-
Control Tags are used to manipulate characters in the
dictionary, and control the flow of the movie. For example, control tags
can be used to place characters on the screen, start sounds, and to tell
the player to go to another frame in the movie.
Control tags can be divided into three categories: display list, control, and action.
とのことなので、まさにそのとおりらしい。swf内の文字を入れかえるには、該当する「Definition Tag」を探してその中身を書き換えれば良さそうだと想像。
と、作業していたら、Adobeのアップデートが走り、「Firefoxを終了しろ」という指示が来たのでとりあえずここまで。
コメント