Flash CS compilation, control-> Delete ASO and video to solve the problem of code not being executed

Source: Internet
Author: User
Tags export class

[Flash Development Notes] favorites of ASO files in Flash
Http://www.cnblogs.com/yao/archive/2007/09/19/898043.html

This strange thing happened today:

For some reason, I changed the system date one month earlier, and then compiled a flash Program (there are many as2.0 classes in the Flash program ).

Later, I changed the system time back to the normal time, and modified some code in my class. When I released the Flash program, some strange things appeared. The code I modified didn't work, how can I modify, compile, and restart flash? The old code before the modification is executed.

Then I performed tracking and debugging, but found that the newly modified code was inexplicably skipped and not executed, which made me even doubt whether there was a problem with the flash compiler...

In about a thousand seconds, this seems to drive me crazy. I thought something was cached, So I restarted the computer, but the result is still the same.

Then I thought: this may also be related to changing the system time, But what time-related things does flash generate?

...

After a few minutes of silence, I suddenly saw a bright eye. I remember that there was a "delete Aso file" in the control menu. Is it related to this?
Run this command and compile it again.
This menu command is not commonly used. I didn't want to use it today. So what is the Aso file? It seems necessary to have a good understanding of it. for help, the description of the Aso file is as follows:
(From Flash help: Class> compile and export class> Use Aso files)
During compilation, flash sometimes creates files with the. Aso extension under the/ASO subdirectory under the default global class path directory.
(The Aso is cached in the following directory: C: \ Documents ents and Settings \ Yao \ Local Settings \ Application Data \ Macromedia \ Flash 8 \ zh_cn \ Configuration \ Classes \ Aso \)
The. Aso extension represents the ActionScript object (ASO ). Flash will generate an Aso file for every ActionScript 2.0 file that is implicitly or explicitly imported and successfully compiled. This file contains the bytecode generated from the relevant ActionScript (AS) file. Therefore, these files contain the compilation form (bytecode) of class files ).

Flash must regenerate the Aso file only in the following situations:

The corresponding as file has been modified.
The ActionScript files that contain the definitions imported or used by the corresponding ActionScript files have been modified.
The ActionScript file contained in the corresponding ActionScript file has been modified.
The compiler creates an Aso file for caching. You may notice that the first compilation process is longer than the subsequent compilation process. This is because only modified as files are recompiled into Aso files. For unmodified as files, the compiler directly reads the compiled bytecode from the Aso file instead of re-compiling the as file.

The Aso file format is an intermediate format developed for internal use only. It is not a document file format and will not be re-distributed.

If you encounter an issue of compiling an earlier version of an edited file in flash, delete the Aso file and re-compile it.

According to the last sentence, it is clear that flash has compiled the early Aso files. That is to say, my as class has been modified, but the Aso file has not been updated. How is the "early version" maintained here? Why does the Aso not be updated? Or, how can we determine that it is an earlier version?

The answer is clearly that this early version depends on the generation time of the Aso file. If the Aso time is earlier than the current time, you can modify the as class, it will not be re-compiled, But I have modified the system time and compiled it once. After the system time is changed back, no matter how it is compiled, this Aso is the latest version in terms of time, this is why the problem described in my document appears.

Speaking of "early versions", I really hope Flash can have a real version signature function. For example, I published a program (SWF ), some other subprograms (SWF) are dynamically loaded in the program, but a new version of the program or subprogram is released after a certain period of time. In this case, the browser will cache the old version, to view the new version, you must manually clear the cached old file to view the new file. If the version signature function is available, flash will automatically detect and reload new files. How good is this.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wu_qing_man/archive/2008/03/26/2221135.aspx

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wu_qing_man/archive/2008/03/26/2221135.aspx

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wu_qing_man/archive/2008/03/26/2221135.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.