iv been working on generating a swf tag generator for a project. However i am having trouble understanding how certain values are generated.
The shape i have defined in flash is 200 pixels wide and 200 pixels in height and placed at X, 20 and Y 20.
The problem is this, the output from the program gives negative values according to a decompiler i used :

Xmin = -4129, Xmax = -1509
Ymin = -1656, Ymax = 150 (only non negative)

The structure of the binary data according to the specification should be :

Nbits = 5 bits to denote the length of each value (xmin, ymin etc)
Xmin [Nbits]
Xmax [Nbits]
Ymin [Nbits]
Ymax [Nbits]

The problem i am having is i cant seem to figure out even with the specification and binary how the values i got from decompiling the file are even valid.

Or in hex : 75 FB FD 0D F3 1C 04 B0

Can anyone tell me how the binary above is possible outputting the negative values that i retrieved from decompiling an swf generated by flash? The output is correct, i just do not understand how the binary values above represent -4129 etc.

it is so simple as u have eight bit repersentation msb is used as symbol for positive or negative and so is the reason we have negative no moer than the positive number eg -128to127

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.