0

I'm new to Actionscript.

Someone gave me a .FLA file. I opened it up in Adobe Flash Builder, then pressed Debug>Debug from the menu bar and the project starts running in a flash player as expected.

Then I shut down the flash player and then I wanted to start editing the project.

I go to the canvas area and see nothing but a purple background. I go to the timeline and see one empty layer.

I see in the library a lot of pictures and movie clips. But none of them seem to have action scripts associated with them.

Where do I go to look for all the actionscript that powers this app? I'm pretty sure there is some actionscript involved...but have no idea where to look at this point.

I typically click on a layer/frame then right click and choose actionscript to open up the actionscript dialogue window. But it's always empty.

---- EDIT

I noticed there's a folder src/com/gsk/proj1/myawesomeproject/ . In that are the folders controllers, controls, models, views and a few more. How does the flash project know to read action script from somewhere in this folder? And which as file is fired first?

John
  • 32,403
  • 80
  • 251
  • 422
  • Could be in .as side car files. Could be in a .swc. Show a screenshot of the directory where the .fla is and what other files there are. I didn't know flash builder could open .fla's – BadFeelingAboutThis May 01 '15 at 22:20
  • AS projects also have a document class specified, I recommend starting there. – zzzzBov May 01 '15 at 22:23
  • thanks guys, i stated some folders i noticed at the bottom of my question – John May 01 '15 at 22:26
  • looks like an mvc design pattern, controllers, models and views... in controls i guess there are some components,...i think something like cairngorm or pure mvc – Jileni Bouguima May 01 '15 at 22:36
  • this question will help about your question of opening fla file http://stackoverflow.com/questions/5562295/extracting-actionscript-from-fla-file-without-adobe-flash – Jileni Bouguima May 01 '15 at 22:37
  • 1
    The document class is what is run first. Flash assumes the file structure matches the package names. So if in the document class you have an import of `import com.gsk.proj1.MyClass`, it will look for a `MyClass.as` file in the `com/gsk/proj1` directory relative to the .fla (or what ever folder is specified as the source folder in the .fla's settings) – BadFeelingAboutThis May 01 '15 at 22:45

1 Answers1

1

Look in the following places for code associated with an FLA:

  1. Open the Window > Actions panel and look on the left side drawer (expand it if not showing). This will show the location of all "timeline scripts" embedded in the FLA.

  2. Look at the Properties panel for the main timeline (click on an empty area if necessary to de-select any objects) and look at the "Class" field. This is the root "document class", and if not empty, this class will be instantiated along with the SWF when it is constructed by the player. Of course, that class could be using all sorts of other classes, but it would be the entry point for the SWF.

  3. In the Library panel, look for symbols who have a Linkage value. This indicates the symbol is linked to a class by that name. Open the symbol properties (right click > Properties) for more details. Note that Flash can "auto generate" classes that don't have actual class files (useful for instantiating display objects strictly for visual purposes).

Aaron Beall
  • 49,769
  • 26
  • 85
  • 103