flash - How can the actionscript version of a swf file be determined in C#? -


What libraries or methods would be required to achieve this?

Read the first 4 bytes of the SWF file. The first 3 bytes are signatures that read (CWS or FWS) and the next byte is SWF file version. So you do not need any libraries, just come ordinary file will be enough. For the ActionScript version you need to look at the FileEventWhat tag. So it's a fake code to do this (SWF file data is in Little Aidian, so read your writeIntend or read accordingly accordingly).

  Signature = 3 UTF bytes read as string; Version = Read a byte; Size = read unsigned int; (Int 32 bit) if (sign == "CWS") means that the SWF is compressed then unpress the rest of the bytes; // swf uses zlib compression, the first 7 bytes are compressed by rect_byte = read signed signed bytes; Rect_bits = rect_byte >> 3; // First 5 bits say that how many bits are needed for a dimensoin of swf; total_bit = rect_bits * 4; Rect_bytes = Math CEL ((total_bits - 3) / 8); // Until here we read the rect_bytes number of information bytes about the SFF dimension; Read unsigned less as frame rate; Reading unsigned less as frame count; While true {read less unsigned less in swf_tag_code_len; Tagcode = swf_tag_code_len >> 6; // First 6 bits tag code tagline = swf_tag_code_len & amp; 0x3F; // The last 10 bits set the length of the tag (if the length is less than 63) if (tag allan> = 63) {// if the tag is larger than 63 bytes, then tell the next four bytes length tagline = ungraded int reading; } If (tagcode == 69) {// We go here, we are looking for this tag (file content); read {b = unsigned byte; If (B & B (1  


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -