Embedded assets export, DefineFont4 export, new Compound scripts handling and brand new ABC Explorer tool. And more in 19.0.x version of FFDec.
19.0.0 – 2023-10-01
forceWriteAsLong tag property
Each tag has property called forceWriteAsLong which describes whether the tag content size is written in the header as long or short. The sufficiently long tags are always written as long, but for short tags you can decide whether to write them as long or short. If you want to write short tag as long, this is the field for you. The field is also exported during XML export which ensures the tags are written in the same way.
Editable frame count in SWF header
You can now edit number of frames in the swf file which is stored in the header. This number does not necessarily needs to be the same as number of ShowFrame tags. If you edit this in the header, it is not anyway reproduced on the ShowFrame tags. If you want to correctly add new frames, you need to use context menu on SWF -> Add new Frames.
Font class in the title of font in the tree
Previously, font items in the tag tree were labeled only by the font name, now they have assigned ActionScript linkage class visible too.
Show multiple classes per item
A SWF character can have multiple assigned classes. Previously, only one class was displayed. Now we support multiple classes and all are presented in tree item title. Multiple classes can be assigned to single object for example in cases when using Embed tag on the same file.
ByteArrayRange export in raw edit
When you raw edit a tag and it contains field that is of type ByteArrayRange, you can now use new button to export it to a file. Previously only Replace button was present.
Export DefineFont4
DefineFont4 tag contains font stored in CFF format (Compact Font Format). We cannot properly transcode it to TTF for you, but you can now at least export it to file.
Show Embed tag and export embedded assets
Classes that have assigned characters now have Embed metadata. The embed metadata source always points to “/_assets/” directory. When you export scripts, you can decide whether you want to export Embedded assets too. These are placed to “/_assets/” directory near scripts so Embed metadata tag can access it. On command line, there is new argument -exportembed
for asset exporting.
Note: You cannot edit the Embed metadata in FFDec and select for example different file. It is useful only for export.
Note 2: The Embed metadata is displayed only on the class itself, not on the attributes.
Support for API versioned ABC in SWFs
ActionScript3 can be specially compiled to use metadata like [API("660")]
for storing info about which Flash version the trait supports. It is mainly used for compiling custom playerglobal.swf or similar files. These ABCs use namespace names (and namespace sets) with special suffix character containing the used API version.
Compound scripts as special nodes
Scripts which contain multiple externally visible definitions are called compound scripts. These scripts are usually generated by using by a nonstandard compiler, are specially crafted, etc. For example C cross bridge produces such files.
Classic scripts contains one visible definition per script.
In this version of FFDec, compound scripts are displayed as separate trees.
Each tree has a header with title “script_xxx” where xxx is the script index.
When you select the header, you can see the script containing includes for the containing script traits (classes, …). The script also has script initializer.
You can expand the script and see associated traits in the subtree.
WARNING: Due to problems with script initializer, compound scripts cannot be directly edited (However you can use P-code editation)
ABC Explorer tool
You can now explore ABC format internals with new ABC explorer tool.
This tool is accessible on Tools menu panel or as a small icon over ActionScript panel,
or from context menu of AS3 scripts. You can select ABC tag from current SWF and then explore different ABC parts like the constant pool, methods, metadata, instances, classes, scripts.
We cannot hide that we took some inspiration from ASV (ActionScript Viewer), but it is not exact 1:1 copy. I hope they won’t mind.
You can use right click context menu to copy title, value or whole row to clipboard.
Also “Show in main window” action is available for various items.
Natural sorting scripts in tag tree
Scripts in AS3 packages in the tree are now sorted in the natural way. This means for example that 10 is not near 1, but after 9, etc.
Changed: Import panel on separate tab
Panel with Import actions was moved to separate tab in the ribbon.
Leave a Reply