Hello,guys.

 

I have a question about analysis of SWF file's Shape Tag. I read a TAG(defined by DefineShape3)into memory with hex, and according to the configuration which described by SWF file format SDK. I made a analysis for Byte/Bit, but I couldn't complete the above operation.

 

I don't know whether SDK describe this incorrectly, especially for STYLECHANGERECORD configuration.

 

Below is the hex-code Shape TAG,[b] not including the part of RECORDHEADER[/b]:

 

26 00 67 62 2C 05 AD A1 28 01 10 B4 D0 2E 92 B0

C0 64 29 68 8B E0 00 03 00 FF FF FF 00 81 E6 97

20 FF FF FF FF FF 00 00 10 15 8B 01 9B 9E B9 0A

E9 3C E5 FE 7F EA 6F 71 6F CD A0 98 10 00

 

Only 62 bytes. convert it to bin, like this:

 

 

ShapeID------------------Shape Bounds

[b]00100110,00000000,01100111,01100010,00101100,00000101,[/b]

UI16 ShapeID = 38----RECT NumBits=12---12*4+5+fillbit(3bit) = 7bytes

 

--------------------------------------------ShapeWithStyle  FillStyleArray

[b]10101101,10100001,00101000,00000001,00010000,10110100,[/b]

--------------------------------------------fscount 1---fstype 0x10   MATRIX

 

[b]11010000,00101110,10010010,10110000,11000000,01100100,[/b]

 

----------------------------------------------------------Matrix End   Gradient

[b]00101001,01101000,10001011,11100000,00000000,00000011,[/b]

-------------------------------------------------------------fillbits=7--nGrads=3

 

[b]00000000,11111111,11111111,11111111,00000000,10000001,[/b]

-----ratio-----------R-------------G-----------B --------------A --------ratio

 

[b]11100110,10010111,00100000,11111111,11111111,11111111,[/b]

------R-----------G -------------- B--------------A ------- ratio -------- R

--------------------------------------------Linestyle---NF---NL---ShapeRecords

[b]11111111,11111111,00000000,00000000,00010000,00010101,[/b]

-------G--------------B--------------A -----count=0 -----1----0---a StyleChangeRecord

 

[b]10001011,00000001,10011011,10011110,10111001,00001010,[/b]

-------------------------------------------------↑[b][i]Just there! I can't do this job continue,look the below question.[/i][/b]

[b]11101001,00111100,11100101,11111110,01111111,11101010,[/b]

 

[b]01101111,01110001,01101111,11001101,10100000,10011000,[/b]

 

[b]00010000,00000000[/b]

 

 

[b][i]Qustion:[/i][/b]

       The first ShapeRecord in the shaperecords list is a StyleChangeRecord. By the SDK's describe, it's only have 6bits(Flag bit)+5bits(MoveBits value equal 12)+24bits(MoveDeltaX and MoveDeltaY)+1bit(FillStyle1,NF=1) = 36bits. And then I think it must fill 4 zeros ,make it to 40bits(5bytes). But in this file, at the end of the ChangeStyleRecord, the byte's value is "10011110", MoveDeltaY only used the first 3 bits "100", the FillStyle1 used the followed 1 bit "1",  the last 4 bits is not used!

 

 

Thanks.

 

MSN: [EMAIL PROTECTED]

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to