Flash CS4: released in late 2008, unless otherwise noted information presented here has been gleaned from use of this Integrted Development Environment (IDE).
SWF: ready to use Flash content - foo.swa
FLA: uncompiled primary source file which requires a Flash IDE to convert to ready to use Flash content - foo.fla
AS: human readable ActionScript file. Much like Javascript but requires a Flash IDE and a primary FLA file to convert to ready to use Flash content - foo.as
Project Panel
The Flash 'Project Panel' seems to be a quirky file manager. To open a project manager window requires the esoteric menu item: Window > Other Panels > Project. Menu item: File > New, Flash Project, seems to perform the same thing. Prior to Flash CS4 supposedly you could save project as FLP files but not anymore?
So if you have some flash source files and moved them to another computer with a freshly installed version of flash, there won't be any trace of a project file to open. You would then use the Flash application, menu item: File > New, Flash Project, choose a name and the root file folder of the source files you just moved over - that's it you've just create an ephemeral 'project', only for that version of Flash on that computer.
When a project pane is open, there is a test project button. If you haven't already right clicked on your main FLA file to Make Default Document then do so. Also, open the main FLA, menu item: File > Publish Settings, make sure at least flash has a valid publish path (e.g. ../deploy/Dude.swf) otherwise you'll get the dreaded "Be sure the destination file is not locked or on a locked drive. Also, check that the file name is not too long" message.
Script Settings
While viewing open FLA file in flash, menu item: File > Publish Settings, then click Settings next to Script: ..., this should open Advanced Script settings. View Source path, make sure this is set to correspond to where ActionScript files for the project reside (e.g. ./ ). Note: Flash loads all ActionScript files at this location simultaneously immediately when running. Any ActionScript code that is not in a function in any files specified in this advanced script setting will be executed as soon as the Flash file is opened - think inline Javascript.
Alternatively, while viewing an open FLA file in Flash, menu item: Windows > Properties. Look at Publish section, Class. For a flat file project with foo.fla and foo.as, the class field would just be foo. For a project with ActionScript file in the com/bizco/script folder, the class filed would be some like com.bizco.script.foo
Without binding a script to publish or window settings, then an explcit reference to the action script code must be associate directly with elements within the flash project.