1FLASM(1) FLASM(1)
2
3
4
6 flasm - A swf bytecode assembler/disassembler
7
9 flasm [-daubzx] filename
10
12 -d Disassemble the given SWF file to the console
13
14 -a Assemble the given flasm project
15
16 -u Update SWF, replace flasm macros
17
18 -b generate __bytecode__ instruction or byte sequence
19
20 -z ompress SWF with Zlib
21
22 -x Decompress SWF
23
25 flasm -d foo.swf
26
27 Disassemble foo.swf to the console. To see action offsets in disassem‐
28 bly set showoffset and hexoffset options in flasm.ini.
29
30 flasm -d foo.swf > foo.flm
31
32 Disassemble foo.swf, redirect the output to foo.flm. Alternatively you
33 can simply call flasm without command: flasm foo.swf creates foo.flm in
34 the same directory.
35
36 flasm -a foo.flm
37
38 Assemble foo.flm and update the SWF defined inside. The backup of
39 original SWF is created with .$wf extension.
40
41 flasm -u foo.swf
42
43 Disassemble foo.swf to the temporary file. Execute flasm macros embed‐
44 ded in SWF. Make trivial optimizations automatically: remove double
45 nots, replace 0.0 with 0, rebuild constant pools, clear register argu‐
46 ments. Create .$wf backup, update the original SWF.
47
48 It's a good idea to update the final version of SWF with flasm -u.
49 Don't expect the SWF to be noticeably faster, it will just make it a
50 bit smaller.
51
52 flasm -b foo.txt
53
54 produce __bytecode__ instruction or byte sequence, depending on boutput
55 setting in flasm.ini. Takes as input a simple action list without any
56 movie or frame declarations. Output is sent to console. Redirect it
57 to file if you wish: flasm -b foo.txt > foo.as When boutput is set to
58 1, Flasm produces binary output
59
60 flasm -x foo.swf
61
62 Decompress foo.swf, create .$wf backup.
63
64 flasm -z foo.swf
65
66 Compress foo.swf, create .$wf backup. Source SWF doesn't have to be
67 Flash MX/MX 2004 file. However, only Flash MX/MX 2004 player will be
68 able to play the resulting compressed file.
69
70 flasm settings are read from flasm.ini. There aren't many of them, and
71 they are commented. You may, for example, switch bytecode offsets on
72 and off there.
73
75 flasm disassembles your entire SWF including all the timelines and
76 events. Looking at disassembly, you learn how the Flash compiler
77 works, which improves your ActionScript skills. You can also do some
78 optimizations on the disassembled code by hand or adjust the code as
79 you wish. flasm then applies your changes to the original SWF, replac‐
80 ing original actions.
81
82 It's also possible to embed flasm actions in your ActionScript, making
83 optimizing of large projects more comfortable. flasm is not a decom‐
84 piler. What you get is the human readable representation of SWF byte‐
85 codes, not ActionScript source. If you're looking for a decompiler,
86 Flare may suit your needs. However, Flare can't alter the SWF.
87
89 http://www.nowrap.de/flasm.html
90
92 Copyright (c) 2001 Opaque Industries
93 (c) 2002-2004 Igor Kogan
94
95 All rights reserved. See LICENSE.TXT for terms of use.
96
97
98
99 2004-12-10 FLASM(1)