dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Problem with Tag format

Hybrid View

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    2

    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.

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    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

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center