first looks at the flash 9 header byte order
i’m looking into writing a little utility that changes all my old swf movies exported via after effects (they’re flash 8 swfs) into flash 9 format. Even without any actionscript, all old movies still turn into the dreaded AV1Movie class … which you can’t use at all. I couldn’t find any documents regarding the flash 8 byte order. It looks like the header is the same for the most part … except for a few small differences …. here are just my preliminary findings after 15 minutes … These bytes are exported from flash 8/9 — a totally blank movie. I was really only interested in what was different, so I can change just those values. Any help would be greatly appreciated.
Bytes 1-3: The string “FWS”
Byte 4: The version of the flash player
Byte 5: Looks like the length of the flash header
Bytes 6-18: Not sure — both versions they’re exactly the same: 0,0,0,120,0,5,95,0,0,15,160,0,0
Byte 19: The frame rate of the movie
Byte 20-29: Same in both versions: 1, 0, 68, 17, 8, 0, 0, 0, 67, 2
Byte 30-32: Background color (same in both versions)
Byte 33: This is where the version 8 file ends, with bytes 64, 0, 0, 0
Byte 33-34: The version 9 header has 2 bytes that I’m not sure what do yet — but 2 bytes read: 191,21.
Byte 35-38: Looks like a 4 byte integer of the character length the Scene Name which follows this.
Byte 39-40: Byte value of 1 then 0 – not sure what this does, looks like it’s starting a string
41 – (the number in bytes 35-39): Scene 1 or whatever name the scene is called.
ends with bytes: 0, 0 (i think ending a string), then the end of file: 64, 0, 0, 0
I’m no super engineer .. so I only have a slight understanding of this stuff. Any help would be appreciated. Byte orders are below:
Col A: flash 8 blank swf header
Col B: flash 9 blank swf, default options
Col C: flash 9 blank swf, scene name changed to “none”
Col D-F: The text values of the bytes
| A | B | C | D | E | F | |
| 1 | 70 | 70 | 70 | F | F | F |
| 2 | 87 | 87 | 87 | W | W | W |
| 3 | 83 | 83 | 83 | S | S | S |
| 4 | 8 | 9 | 9 | version number | ||
| 5 | 36 | 53 | 50 | length of header | ||
| 6 | 0 | 0 | 0 | |||
| 7 | 0 | 0 | 0 | |||
| 8 | 0 | 0 | 0 | |||
| 9 | 120 | 120 | 120 | x | x | x |
| 10 | 0 | 0 | 0 | |||
| 11 | 5 | 5 | 5 | |||
| 12 | 95 | 95 | 95 | |||
| 13 | 0 | 0 | 0 | |||
| 14 | 0 | 0 | 0 | |||
| 15 | 15 | 15 | 15 | |||
| 16 | 160 | 160 | 160 | |||
| 17 | 0 | 0 | 0 | |||
| 18 | 0 | 0 | 0 | |||
| 19 | 12 | 12 | 24 | frame rate | ||
| 20 | 1 | 1 | 1 | |||
| 21 | 0 | 0 | 0 | |||
| 22 | 68 | 68 | 68 | |||
| 23 | 17 | 17 | 17 | |||
| 24 | 8 | 8 | 8 | |||
| 25 | 0 | 0 | 0 | |||
| 26 | 0 | 0 | 0 | |||
| 27 | 0 | 0 | 0 | |||
| 28 | 67 | 67 | 67 | |||
| 29 | 2 | 2 | 2 | |||
| 30 | 255 | 255 | 255 | 3 byte background color | ||
| 31 | 255 | 255 | 0 | |||
| 32 | 255 | 255 | 0 | |||
| 33 | 64 | 191 | 191 | eof | ||
| 34 | 0 | 21 | 21 | |||
| 35 | 0 | 11 | 8 | scene length | ||
| 36 | 0 | 0 | 0 | |||
| 37 | 0 | 0 | ||||
| 38 | 0 | 0 | ||||
| 39 | 1 | 1 | scene name | |||
| 40 | 0 | 0 | ||||
| 41 | 83 | 110 | S | n | ||
| 42 | 99 | 111 | c | o | ||
| 43 | 101 | 110 | e | n | ||
| 44 | 110 | 101 | n | e | ||
| 45 | 101 | 0 | e | |||
| 46 | 32 | 0 | ||||
| 47 | 49 | 64 | 1 | eof | ||
| 48 | 0 | 0 | ||||
| 49 | 0 | 0 | ||||
| 50 | 64 | eof | ||||
| 51 | 0 | |||||
| 52 | 0 | |||||
| 53 | 0 | |||||

