![]() SWF Decompiler for Macromedia Flash 4, 5 , MX and MX 2004 SWF files
|
What is ASV?
Download Demo
Documentation
ASV Tools
Reviews
News
FAQ
Order Online
History
Links
About Manitu Group
![]() |
Flash Bug with Long Scripts in Blocks Sometimes ASV will issue a ActScript.ActAtPos: Exact match not found warning. This cryptic message means that an action was not found at the address that was stated by an action as the address to jump to. Still cryptic? Hopefuly you'll see what this means by the end of this article. This warning might come up for a corrupt SWF, or a SWF which was modified by a 3rd party application, or for a SWF produced by Flash without any errors/warnings displayed. The first two cases are not officially supported. The last case is discussed here. Consider an IF statement, if the condition is false, the execution continues after the IF block, the block itself should not be executed. In a SWF, IF statement has a 16 bit integer parameter that holds the number of bytes to skip if the condition is false.
16 bit integer parameters can hold positive and negative values. Also the numbers they can represent are limited. The range is -32768 to 32767. If the actions in an IF block compiles to more than 32767 bytes, Flash doesn't warn you and write the value there. If the code in the block is just over the limit, the parameter is interpreted as a negative value. If the code is too big, it might wrap to a positive value but never the value intended. Because according to SWF specification an IF block is not capable of having that much size. Actions are not on byte boundaries so most of the time the address the IF action refers to won't be a start of an action. And when cases like this, jumping into middle of an action or jumping to an address where the code hasn't started yet, ASV issues the warning and adjusts the jump address to the nearest action boundary. With an IF statement you would always jump forward. When the jump is interpreted as a backward jump by ASV (for example a negative offset into the constant definitions), the jump is corrected as a jump to the start of the code, also the IF statement becomes another statement: a DO WHILE statement... This is a Flash bug and ASV cannot do anything about it. Flash should have warned you and never compiled the SWF. The SWF shouldn't work as expected and this might give you a clue. On the other hand, this is a rare issue. Following is a link to a ZIP file that contains two FLAs that exhibit this behavior. (Note: Although only the IF statement is mentioned here, other statements like WHILE, FOR are prone to this error but we haven't tested those statements. We also only tested latest version of Flash, MX). Note: Decompiling the SWFs generated by Flash using these 2 FLAs will take really long, be prepared to wait and don't conclude that ASV has crashed before you really wait a long time. Upcoming version 3.05 of ASV (at the time of this writing) will handle long scripts more quickly but it will still take long. |
|
revision 1.0 October 18, 2002
Copyright © 2000-2002 Manitu Group, Istanbul, Turkey. All rights reserved. All trademarks acknowledged. Privacy Policy |