AI Coding:SWF代码分析二开
1. 当前项目是XXX的 SWF源码,他是actionscript编写的,你需要先编写一个python脚本,扫描到所有as文件,然后建设一个markdown表格,表头是文件全路径限定名,是有已分析。
2. 按照表格逐个分析代码,如果其实业务逻辑,需要转化为meraid图,如果是配置项,需要转化为json,注意其中json是需要标准的,具备可视化读取的能力。
3. 绘制一个全链路流程图,将整个串起来,目标是了解这个游戏,最终给我的产出是一个可预览的页面。
注意:你需要每个文件都分析
注意:你需要每个文件都分析
注意:你需要每个文件都分析
你需要将分析的结果按目录结构,按文件分别存储,形成工程化的项目1. For the Juncheng Record SWF source code project written in ActionScript, develop a Python script that:
a. Recursively scans and identifies all .as (ActionScript) files in the project directory
b. Generates a Markdown table with the following columns:
- "File Full Path": Complete path and filename of each .as file
- "Analysis Status": Tracking field indicating whether the file has been analyzed (values: "Pending", "In Progress", "Completed")
2. Conduct a comprehensive analysis of each .as file according to the generated table:
a. For files containing business logic:
- Extract and document the core logic flow
- Convert the business logic into a Mermaid diagram following standard syntax
- Ensure diagrams accurately represent control flow, conditional branches, and key operations
b. For files containing configuration items:
- Extract all configuration parameters and values
- Convert configurations into valid, well-formatted JSON files
- Ensure JSON output is properly indented, contains descriptive keys, and maintains data types for optimal readability and visual parsing
3. Develop a comprehensive full-link flow diagram that:
a. Integrates all analyzed components and their relationships
b. Illustrates the complete game execution flow and module interactions
c. Presents a clear visual representation of the game's architecture and data flow
d.最终生成一个可直接在浏览器中预览的交互式页面,包含所有分析结果和可视化图表
4. Implement an organized file storage structure for all analysis outputs:
a. Create a directory structure mirroring the original project's organization
b. Store analysis results as separate files corresponding to each original .as file
c. Implement a consistent naming convention for all output files (e.g., [original_filename].analysis.md for text analysis, [original_filename].logic.mmd for Mermaid diagrams, [original_filename].config.json for configuration files)
d. Ensure all outputs are properly versioned and organized for easy navigation and reference
重要注意事项:必须对项目中的每个.as文件执行完整分析,不得遗漏任何文件。
License:
晋ICP备16009994号-1