An .AS file is a text file containing ActionScript code, the programming language used to build interactive content in Adobe Flash
The .AS file extension stands for ActionScript, a scripting language that developers used to create animations, games, and interactive applications — mostly for web browsers through Adobe Flash. If you find a .AS file on your computer, it contains source code written in ActionScript, not a finished video or animation you can watch directly.
ActionScript comes in two main versions: ActionScript 2 and ActionScript 3. Most .AS files you encounter today are ActionScript 3, which was the standard from 2006 onward. The language itself is no longer widely used because Adobe discontinued Flash in 2020, but .AS files still exist in older projects, archived code repositories, and educational materials.
Key Takeaways
- .AS files contain ActionScript source code, which is plain text you can read in any text editor, not a compiled program or video file.
- ActionScript was the programming language for Adobe Flash, which is no longer supported by web browsers or Adobe as of 2021.
- You can open and read .AS files with any text editor like Notepad, VS Code, or Sublime Text without needing special software.
- If you need to run or compile ActionScript code, you would need the Adobe Animate application or an open-source ActionScript compiler like Apache Royale.
How to open a .AS file
Because .AS files are plain text, you can open them with any text editor on your computer. On Windows, right-click the file, select "Open with", and choose Notepad, WordPad, or any text editor you have installed. On Mac, double-click the file and select a text editor from the "Open With" menu — TextEdit works, though a code editor is more useful.
If you want syntax highlighting (colored text that makes code easier to read), use a code editor like Visual Studio Code, Sublime Text, or Atom. These programs recognize ActionScript and color different parts of the code — keywords in one color, strings in another — so the structure becomes clearer. Download any of these editors for free, then drag your .AS file into the editor window to open it.
What's inside a .AS file
A .AS file contains ActionScript source code — the human-readable instructions a developer wrote to control how a Flash application behaves. This might include code that responds to mouse clicks, plays sounds, moves objects around the screen, or loads data from the internet. The file is just text, so you can read it, but you cannot run it directly by opening the file itself.
The code inside follows ActionScript syntax, which looks similar to JavaScript if you have seen programming code before. You will see variable declarations, function definitions, and event listeners — the instructions that tell Flash what to do when something happens. If you are not a programmer, the code will look like gibberish, but a developer can read it and understand exactly what the original Flash application was supposed to do.
When you might encounter .AS files
You are most likely to find .AS files if you are working with archived Flash projects, learning ActionScript from old tutorials, or maintaining legacy code that was built before Flash was discontinued. Some developers still keep .AS files in version control systems like GitHub as a record of what they built, even though the Flash player no longer exists to run the compiled result.
Educational institutions sometimes distribute .AS files as part of computer science courses or programming tutorials. If you downloaded course materials or example code from a class about Flash or ActionScript, the .AS files are the actual lesson content — the code you are meant to study or modify.
The difference between .AS files and compiled Flash files
A .AS file is source code — the original text a programmer wrote. A compiled Flash file, usually named with a .SWF extension, is the finished product that Flash would turn the ActionScript into. Think of it like the difference between a recipe written on paper (.AS) and the actual meal you cook from it (.SWF). You can read the recipe, but you cannot eat it.
When a developer finished writing ActionScript code in a .AS file, they would use Adobe Animate or the Flash Professional IDE to compile it into a .SWF file. That .SWF file is what would actually run in a web browser or Flash player. Today, neither .SWF files nor the Flash player work in modern browsers, so even if you compiled a .AS file, you would have no way to run the result.
Can you still use ActionScript code?
If you have ActionScript code you want to preserve or repurpose, a few options exist. Apache Royale is an open-source project that can compile ActionScript 3 code into JavaScript and HTML5, which modern browsers can run. This is not a perfect conversion — some Flash-specific features do not translate — but it can save parts of old projects.
Another option is to study the .AS file to understand what the original application did, then rewrite that logic in a modern language like JavaScript, Python, or Java. This takes more work but gives you full control over how the code behaves in a current environment. Many developers have done this for projects they wanted to keep alive after Flash was discontinued.
Frequently Asked Questions
Can I run a .AS file directly on my computer?
No. A .AS file is source code, not a compiled program. You need to compile it first using Adobe Animate or Apache Royale, and even then, the result would be a .SWF file that Flash no longer supports. You can only read and edit the text inside a .AS file with a text editor.
Do I need Adobe software to open a .AS file?
No. Any text editor can open a .AS file because it is plain text. Adobe Animate is only needed if you want to compile the code into a Flash file, which is no longer useful since Flash is discontinued. A free code editor like VS Code is all you need to read and study the code.
Is ActionScript the same as JavaScript?
ActionScript and JavaScript are similar in structure and syntax, but they are different languages. ActionScript was designed specifically for Flash, while JavaScript runs in web browsers. Some ActionScript code can be converted to JavaScript, but not all features translate directly, especially those tied to Flash-specific functions.
What should I do with old .AS files I found?
If the files are part of a project you want to preserve, open them in a text editor to understand what they do, then consider converting the code to a modern language or using Apache Royale to compile them to JavaScript. If they are just old course materials or examples, you can keep them as reference material or delete them if you no longer need them.