-
Problem with Tag format
hi, developers, i've written a small program to list all tags in a swf file, then remove some unknown tags by some encryption software. But i have some problems here. RECORDHEADER definition have two types, short one for tags with 62 bytes or less and long one for tags with more bytes. But it seems there are some undocumented rules, e.g. FLASM said,
Code:
if (length >= 63
|| type == TAG_DEFINEBITSLOSSLESS
|| type == TAG_DEFINEBITSLOSSLESS2
|| type == TAG_SOUNDSTREAMBLOCK) {
/*
long length, and also workaround for a really strange bug in flash player:
the above tags must always have long length to work
*/
flputShort((type << 6) + 63);
flputLong(length);
}
else {
/* short length */
flputShort((type << 6) + length);
}
Is it true, or even some more rules here? Thanks very much for kindly helps.
-
Hi,
I dont think you really have to worry about that: if your program keeps a specific tag, it should just use long format if it was long format before
Musicman
-
Yes, you're right. I made a mistake and went the wrong way. I removed the type 253 tags by SWFEncrypt in DefineSprite, but forgot to recalculate the whole length of it. However, you know, action codes in some tags was replaced, and I need to move them back, what makes the length changing.