Question

First of all, I have to say that I've just a couple hours experience with Flash and AS3 so, if it is a bit easy question,sorry about that.

I wonder the differences between .fla and .as files. I've already read that .fla file can contain bouth graphics and codes although .as can only contains codes.However It doesnt give me anything actually.

I've started to look at as3 to be able to create some small basic flash games, to do that AS3 does not enough ?

Was it helpful?

Solution

.FLA files are the flash development environment file types. You can think of it as the "design" file in that saves any assets you create or import into the Flash IDE, and can also export your assets in various formats.

It is true you can write ActionScript code in the Flash IDE. There a couple ways of doing this, one of which is to code in the timeline of objects. That is on any given frame, either in the Main timeline or an asset, you can open the Actions panel and begin to write code. Code entered in this manner will only run once you have reached the frame you entered it in. That means for instance if you have entered ActionScript code on your Main timeline on the second frame, then that code will not be executed until your Main timeline reaches frame 2. It is partially for this reason that experienced engineers and developers frown upon coding in the timeline as it invites undesired or unexpected results, does not allow for debugging, and it is grievously hard to update and maintain (alongside a myriad of other issues if you want to develop for mobile devices).

.AS files are the ActionScript class file extension. This is purely for code written in ActionScript. You can write class files similarly to other OOP languages. Also you can link assets from your Flash IDE to a specific class file, adobe has plenty of articles explaining it, here's one: Combining Animation and ActionScript

As @Sly Raskal stated in the below comments, both the .fla and .as files when compiled are in the executable format .SWF

To answer your last question, coding in ActionScript does not require you to use or implement any part of the Flash IDE to create your application. If you program in a coding development environment, say Flash Builder or Flash Develop, you can compile using a specified compiler or using Flash IDE. Most developers create assets using the Flash IDE and then handle them in some format in ActionScript, it makes for a streamlined process in creating and updating assets, and decouples your application from the Flash IDE.

Here's a basic outline explaining the process of using the Flash IDE alongside a DE like Flash Builder or FlashDevelop: Building applications with ActionScript

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top