-
Notifications
You must be signed in to change notification settings - Fork 733
AMF editor format
In FFDec you can edit data in AMF (Action Message Format) with Sol cookie editor or in PlaceObject 4 data field. There are two versions of this format, AMF0 and AMF3. FFDec uses JSON format for editing, which contains some special structures for Objects definition.
Same style as in ActionScript:
1, 2.5, 6e7
Same style as in ActionScript:
true, false
Same style as in ActionScript:
"Hello world" with escaping using \ character like "That is \"so\" interesting".
\r for carriage return
\n for new line
\\ for backslash
\t for tab
Same style as in ActionScript:
null
ActionScript: undefined
FFDec editor:
{
"type": "Undefined"
}ActionScript: {"a": 5, "b": true}
FFDec editor:
{
"type": "Object",
"members": {
"a": 5,
"b": true
}
}ActionScript: [57, "hello", 21.5]
FFDec editor:
{
"type": "EcmaArray",
"members": {
"0": 57,
"1": "hello",
"2": 21.5
}
}The array is always associative with string keys.
ActionScript: ???
FFDec editor:
{
"type": "Array",
"values": [63, "hi!", 13.8]
}This type is only for completeness. ActionScript never serializes this kind of type.
ActionScript: new Date(2024,12-1,3,23,16,56,5)
FFDec editor:
{
"type": "Date",
"value": "2024-12-03 23:16:56.005",
"timezone": -60
},ActionScript: new XMLDocument("<ul><li>item</li></ul>")
FFDec editor:
{
"type": "XMLDocument",
"data": "<ul><li>item</li></ul>"
},ActionScript3:
package {
public class MyClass {
public var a:int;
public var b:String;
}
}
//...
import flash.net.registerClassAlias;
registerClassAlias("MyClassAlias", MyClass);
var value = new MyClass();
value.a = 7;
value.b = "okay";FFDec editor:
{
"type": "TypedObject",
"className": "MyClassAlias"
"members": {
"a": 7,
"b": "okay"
}
}If any complex object is serialized twice, the second time it is written as reference.
These types can use references: Object, EcmaArray, Array, Date, XMLDocument, TypedObject.
In FFDec editor, the first usage of the complex object is marked with "id" field,
the reference then uses the same value in "referencedId" field.
ActionScript:
var myobj = {
"a": 5,
"b": "hello"
};
var value = {
"x1": myobj,
"x2": myobj
};{
"type": "Object",
"members": {
"x1": {
"type": "Object",
"id": "obj1",
"members": {
"a": 5,
"b": "hello"
}
},
"x2": {
"type": "Reference",
"referencedId": "obj1"
}
}References can be also circular.
TODO...
JPEXS Free Flash Decompiler Wiki