actionscript-3flashflash-cs5swfobjectfla

Adobe Flash Professional CS5 edit


I am new to Flash and I need to edit some files that are used in a flash project. The files I need to edit are in actionscript. What is the relation to the file types .as(actionscript), .fla (flash?), and .swf Also, do I need to recompile after any changes I make to an actionscript file.


Solution

  • Most likely, the .fla file is the main project file (what ties everything together). The .swf files are likely the final output from said project file. The .as files are code files that are likely attached to various items in the .fla file.

    Here is an example:

    You create a project in FlashPro/AdobeAnimate, you import some graphics, animate them on a timeline, and then want to add some code to those graphics to make them do something dynamic, so you create a class file (.as) and write some code, then link that class file to a timeline or object in FlashPro. When you are all done, you publish your application. This creates a .swf file which is then used on the web (legacy) or loaded by another application (Adobe Air, Visual Studio etc.).

    Now, .swf files can also be used by other .swf files when a program runs. So some assets like graphics (.png, gif, jpeg, .swf) could be used by the application at run-time. The .fla & the .as file(s) though are only used for authoring and are not needed for running the published application.

    You DO need to re-publish your .fla after any changes to an Actionscript (.as) file - this will generate a new .swf file.