I am a Java developer and have no experience in Flash, so sorry in advance if some of my questions will look stupid :)
I got some source code in this hierarchy and structure:
-sources flash builder
-com
-greensock
-deng
-fzip
-utils
-org
-flintparticles
ALAccessibility.as
ALEvent.as
ALImage.as
ALVideo.as
ALVideoOld.as
Project.as
Project-app.xml
Folders are marked with - sign. I didn't write in details what is inside of every folder (they have a lot of .as files)
How to open these files and folders as a Flash (I don't know exactly as an Action Script or Flex or something else) project? I also have project.swf file.
I have the Adobe Flash Builder 4.7.
I think you might be doing the import one folder too "high".
Usually the file structures you posted here are within a /src directory which is inside a project directory. There should be an Eclipse project file (.project) in the folder you're targeting for the import.
I don't think it works any differently from importing a Java project into Eclipse.
If that's not available, you'll have to create a new project and copy everything you have into that project structure - it's possible you've lost some project config (build path, compiler settings, etc) if the raw source is all you have...
In Flash Builder. File -> Import Flash Builder Project. Select "Project Folder" and Browse to the folder. Follow any instructions that may appear afterward.
Related
I've create an app using flash cc for android. It works great but now my goal is to publish it in windows. I know I can use air for windows. I've tried it and it works. But the problem with that is, you can see all the swf files on installed folder. That makes my files vulnerable for theft. So I want to know if there's any methods or converter to convert my whole air application in exe so that it doesn't expose all the included swf files. I think game like machinarium was created using flash. But when I got the setup file it include exe files and non of flash files or any other files were exposed. Is it possible to achieve with flash as3? Any help would be much appreciated.
If you're using Adobe Flash you can go to your publish settings and a small menu will pop up and there will be tabs at the top. Go to the tab that has a list of the various file formats you can export to and .exe will be one of them. Check the box and then set the file location, then hit 'Publish' and you should have an .exe file.
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).
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
I'm building an AIR app where some functionality depends on renaming the app executable in the filesystem, and detecting whatever name the executable has when it's launched. I don't need to detect changes while the app is running, if that makes any difference, and I don't need the path or extension — just the name.
If the executable was the only item in its folder, I could get the Application Directory from the File class and go from there. But it would be ideal to have a solution where there may be more than one copy of this AIR executable in a folder, each renamed to something unique.
I've looked at the NativeApplication class, the System class, the File class, and any other class that seems related to this issue, to no avail. The closest I've come is getting the Filename from the Application Descriptor XML, but that only reflects the default name the application is given when published.
So, how I can get the exact current filename of an AIR app at launch?
EDIT: To be more specific, on a Mac this executable would be the .app file, and on Windows this would be the .exe file.
EDIT2: loaderInfo.url won't work — it gives the name of the SWF file running within the AIR app, not the name of the containing AIR app/exe. If you're on a Mac, you can see this SWF file by opening the package contents of the AIR app, and looking in the Resources folder.
Use the following process:
Use the class XSLTProcessor, with HTMLLoader if necessary
Create an XSLT stylesheet which applied to the <filename> element
Apply it to the application descriptor file
In the Gaia Flash Framework, a file called 'Scaffold.as' is used to make each page a scaffold page. This is accessed by the code,
new Scaffold(this);
But the class itself does not appear to be imported. Am I missing something about the way flash handles external classes? Or is there something else pulling it in?
Any help appreciated.
This all depends on how you are compiling. I'll assume you are using Flash IDE to compile. Flash has a source path lookup mechanism. This can be accesed through the fla (under File->Publish Settings->Flash (tab)->ActionScript). If the file Scaffold lives at the root level of a class path then there is no need to import it. The default class path includes the directory the Flash file resides in and some Adobe directories. There is a mechanism for managing class packages ... I think it was the old Macromedia Extension Manager. It would copy classes into the default class paths when the package was installed - so that could be the case. I have no familiarity with Gaia itself.
So there are 3 options. First the file Scaffold.as is in the same directory as your fla. Second the file Scaffold.as is in a default Adobe include directory. Finally the file is in a directory referenced in the fla's class path.