Can't open an Actionscript project with Flashdevelop - actionscript-3

I'm working on creating flash games using actionscript 3, i'm trying to open a Flixel project with FlashDevelop but i can't find a way to do it, i cerated a new project and put the files inside but nothing it seems to work, this is the link for the project on Github :
https://github.com/monday8am/BigHeadFootball_FLA

Although 'nothing seems to work' is a bit of a vague description, you might want to consider the following:
1. When you have put all the files in the FlashDevelop project folder (so that means merging the existing src folder with the one from the project etc.) have you set the Document class correctly?
2. If you've followed step 1 and try to run it, what kind of errors come up? If it can't find certain classes or assets you might have to move these.
Basically, it should be possible to open the project with FD once you've set the correct Document class and merged the two projects correctly.

Related

FDT - Create a Project with existing source files, assets, folders etc

I am using FDT 5 and would like to create a new project with already existing source files and assets. When I start up the Project Wizard (New->FDT Project) I browse to the folder I want to make as the project but I cannot proceed as FDT gives me the error:
*"PROJECT_NAME overlaps the location of another project: PROJECT_NAME"*
I have downloaded a flash project (developed in FDT) and would just simply like to make it a project in my FDT environment.
I mean this shouldn't be so complicated right? I don't want to create an entirely new project (its own folder) I want to use the same folder I downloaded and view that project. I am using git so I have to work in the same path, sort of speak.
Any ideas?
EDIT:
Apparently this is an issue with FDT, a small bug. I managed to solve the problem following this:
FDT / Eclipse Error : ‘overlaps the location of another project’
And on the eclipse forum:
Eclipse Forum

How to save flash and actionscript

I have a flash app (chat) with the sources, which is .fla and 7 .as files.
Project is saved in CS6.
I can edit what I want, but I have problem saving it. I have poor knowledge about flash and Action Script, so I need some help saving the project.
Thank you!
Check the "compiler error" panel. If there's anything in there, Flash will refuse to execute any command and will just play the frames sequentially. If there's nothing there, the .fla file is probably not linked to the code in the first place. Look for the "class" attribute under "Properties" -> "Publish" and set to the name of the main .as file.
I assume you did not write the app on the first place. If you are trying to take some code & trying to learn from it (or get it to run), go step by step.
First find the entry point of the app. See any code in the timeline?? Anything on the frames?
If yes, starting following it.
If not, there would be a document class specified in the stage properties...start from there.
Beyond this, Share more details, for a better answer....

How do you collaborate on Flash Builder projects?

Flash builder project files can't be opened on another computer even if the files were copied, for e.g. through version control like git or svn.
Importing and Exporting fxp projects is not possible as we do not want to overwrite files for git or svn unnecessarily.
How do people collaborate on Flash Builder projects without creating new project in Flash Builder and having to set up all the settings for the project again and again for multiple collaborators?
If you import the project using its folder location as per #Sean Fujiwara answer then:
One useful way to collaborate in Flash Builder projects is to utilise environment variables. You can access these using - Window > Preferences > General > Workspace > Linked Resources:
From here you can add a new variable or edit an existing one, from the example above you can see that we use a FRAMEWORK_SOURCE variable which points to the source for our shared framework code, we use a swc but this is handy for debugging errors.
We also have another variable called OUTPUT_FOLDER which in our case points to a folder where we run our project over localhost see example below, to use this in a project, you go to right click project name > Properties > ActionScript Build Path, here you enter the folder name you want creating inside the folder that OUTPUT_FOLDER points to:
When you do a Project > Clean from the menu, all resources from your html-template folder will be copied across to this folder and it should open in a browser.
Now we have been able to check in to SVN our .project and .actionScriptProperities files with few issues. When someone new to the project checks them out, they will get an Error in the Problems panel telling them they don't have for example - OUTPUT_FOLDER\MyProjectName, therefore the project leader should have a document listing all the required variables to be setup in your environment.
Other things you can share are paths to raw font files etc.
The only problem I've had with this approach is sometimes it asks for the path to the SDK if it is different from your location, not had chance to figure this one out yet.
Flash builder project files can't be opened on another computer even
if the files were copied, for e.g. through version control like git or
svn.
Flash builder projects can be imported into the workspace just like other Eclipse projects.
Once you copy them to another computer:
Right click in package explorer and go to Import....
Select General/Existing Projects into Workspace.
Select the folder containing the .project directory.
If you make sure Copy projects into workspaces is deselected, you can commit the files directly from wherever you checked the code out.
This is now solved in Flash Builder 4.7 where you can actually import the project folder as is.

FlashBuilder Flex project, nested .swcs cause 'multiply defined' conflicts

I have some flex/AS3 code (from a 3rd party) which I must alter to fit my needs. I am constrained to use FlashDevelop due to my budget - which means the 3rd party are unwilling to offer much support (they used FlashBuilder)
The solution is made of approximately 10 "sub" projects, most of which use the spark.swc and spark_rb.swc in their library
These 10 projects are compiled into .swc using the Export SWC plugin. Each "sub" project compiles succesfully.
I then in use those .swc files in a main project.
I have tried every combination of adding the spark.swc and the spark_rb.swc to the "sub" projects library ("include referenced classes", "include completely", "not included") and similarly every combination of adding the "sub" .swcs to the main - and still I get compile errors, when building the main project similar to:
Error: Symbol 'en_US$components_properties' is multiply defined in
C:\flex_sdk_4.1.0.16076A\frameworks\locale\en_US\spark_rb.swc$locale/en_US/components.properties
and C:\Path\To\Folder\SubProject1.swc(en_US$components_properties)
I have not included either spark.swc or spark_rb.swc in the library of the main project.
How should I be using .swc files that share .swc code? Or - am I asking the wrong question, and should be doing something different?
That setup is okay, what you need to do is avoid compiling into your library the classes that are already included in other libraries while exporting them.
I don't know how to do this in Export SWC thing for FlashDevelop, but in Ant it is pretty easy (or even command line if you prefer):
Generate a link-report (-link-report=report.xml) while compiling
your app: It will contain info on what is compiled in you main SFW.
Compile all sub projects with -load-externs=report.xml: this way
the classes already included in the main SFW will not be compiled in
sub export file.
You can read more about it here:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d1f.html#WS2db454920e96a9e51e63e3d11c0bf64277-7ffa
Hope that helps.

Maintain 1 codebase for SWF that is sometimes standalone, sometimes module

I have an app that has been a standalone app 'til now; however, in another app it's going to be a wee little module.
Is it possible to somehow maintain 1 codebase when the standalone has a source tag of:
<mx:Application>
and the module has a source tag of:
<myModuleBase>
Or is it better to keep a separate branch and just merge them together when the standalone has new changes that I want to propagate to the other?
The standalone app will eventually be taken down as part of phase 2 of this new project but that is several months off and features may be added in the interim.
Can I do this with a separate application file?
Thanks for any helpful tips!
This shouldn't be too difficult to implement. (Disclaimer: I have not messed with modules in Flex)
You have two top-level files, appNameStandalone.mxml and appNameModular.mxml
Those only include the main mx:Application and MyModuleBase tags, and contain inside them an MXML component that represents the actual application.
//appNameStandalone.mxml
<mx:Application ...properties>
<myComponents:UIAndFunctionalityComponent/>
</mx:Application>
//appNameModular.mxml
<MyModuleBase ...properties>
<myComponents:UIAndFunctionalityComponent/>
</mx:MyModuleBase>
If you're not certain how to do this in practice (say, in Flash Builder), you can work under one project directory with two Flex Applications (Project -> Properties -> Flex Applications) or have two separate projects containing only the top-level MXML file with the source folders containing the remainder of the application in the build path (Project -> Properties -> Flex Build Path -> Source Path).
If I've got some misunderstanding as to how the modular version works, please let me know and I'll attempt to correct my answer.