So I'm really confused on how to create, and use, a SWC file. I understand that a SWC file can be created to hold multiple assets. Basically, my code setup is the following:
c_Test.as - all testing of classes/fla files is done here
c_Test.fla - contains a few visual objects used/tested in c_Test.as
Class.as - class referenced multiple times in c_Test.as
Class1.fla - contains an important bitmap that is loaded into c_Test.as
So what I need to do is create a SWC file to be used in other projects; this is going to be the base of a multitude of other large projects, and I don't want to have to continuously copy and paste code into different folders. I am using Flash Builder 4.
So far, I went to publish settings in Flash CS6 in my c_Test.fla file and checked off Export SWF and Export SWC. What does this do? Has this created my SWC file?
I need to be able to access, from any random project, both Class.as, and Class1.fla.
Edit
So to clarify, cw_Test.fla is just a testing copy of the actual main fla file. I don't need this included in my swc. I just Exported my Class1.fla to SWf and SWC, and set a library path to the folder containing Class.as. Is this all I need to do to access both of these files from any project? (Besides importing them into any file I need them in).
Related
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.
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.
I have a folder of flash source code and what I would like to do is modify a action script file and recompile the swf again.
Unfortuneatly , I found that the source code do not have as3proj file . What I have is like this
FlashProject:
org/as2lib
project.fla
as files
And I tried to create a new project and what I saw is rsc, bin and lib folder, Then I tried to put the file like this:
lib/org/as2lib
rsc/as files
project.fla
What it generate is a white swf without any content, what should i do to compile it ? I am using flashDevelop ,Thanks
You have to create a new project, dismantle your FLA in Adobe Flash (trial will do) via exporting an SWF, then you grab resources out of that SWF within FlashDevelop, and use them accordingly. Migrating from Adobe Flash into FD is no simple task.
That FLA you have is an Adobe Flash project file, which FlashDevelop cannot read. So you have to start a new project, and embed your existing assets in FlashDevelop's way.
I want to link external ActionScript file with my current fla project file so I can get the advantage of using classes in Adobe Flash professional CS6 in ActionScript 3.0.
But I am wondering if I can delete the AS file once the fla file has been published into swf?
Or even better would be if somebody could suggest me how to create classes in Flash CS6 without creating external files.
Thanks
When you publish a SWF file - all the source code (.as class files, library objects) are embedded into the SWF. (With the exceptions of Runtime Shared Libraries or any other assets you load at runtime).
This means that your SWF is not dependent on those .as files to run.
However, if you want to be able to re-publish or edit your project, you'll definitely need those .as files for that.
In regards to FlashPro, you cannot create class files that embedded in the .fla, they have to be separate .as files. You can however edit the .as class files in FlashPro.
I have a lot of library assets linked to external as3 classes. I would like to change the structure of the packages containing the linked classes, but if I do so, all links will get broken.
Is there any way to automatically or at least easily tell the FLA file where to get the new class files from? Could a FLA file be configured to read this sort of information from a configuration file?
You can add a folder to the source paths in ActionScript Settings. So if you had linked all your classes relative to the 'myClasses' folder, and then you moved everything to a different folder, you'd just have to update that one source path and it would find all the classes again.
Also, maybe this obvious, but I didn't realize it for a long time:
You can edit the class linkage right in the Library panel (without having to open the Properties for each symbol). Just double-click the linkage path.
i have a question and i'm hoping to find an answer here,
i created a flashbuilder project that contains some classes with functions that i use often,
i have around 6 classes, would it be possible to compile these classes to a swc file so i just have to add the swc in a new project to access them?
Or isnt it possible to create swc's with flashbuilder?
Maybe i could do it in flash but dont have any idea how to compile multiple classes into 1 swc. file.
Sorry if this is a stupid question but ive never used it before and couldnt find much about is.
Inside FlashBuilder create a new "Flex Library Project".
It will take you through a new project wizard that is similar to an Actionscript Project. Once it is created, you can add your .AS classes to the source folder. As long as Project->Build Automatically is checked, it will automatically create (and update) a SWC file in your designated output folder, usually (/bin).
If you want to pick and choose particular classes or include external libraries, SWFs, or other SWCs, select Project->Properties->Flex Library Build Path there is a tab called "Classes" where you can select which classes you want exported into the SWC.
You can just create a library project for this.
Move all of your code into this project and build the project.
The output will be a .swc file in the bin directory.
You can also do this from the command line using the compc (short for component compiler) and incorporate it into an ANT task or a Maven build.
Cheers