A small example about using Library Path in flash IDE - actionscript-3

I know how to use Source Path ( which is just an another source folder). But could never figure out how to make use of library path.
Any small written code example over using and understanding this concept would be appreciated.
I know using SWCs too.. but how can i use a bunch of classes which are not in SWC form, in my library path ?
( Additionally , why Flex SDK not included in Source path.. rathar than in library path ?)
Thanks
V.

The library path is for pointing to compiled code sources like SWC files.

Related

How does Cocos2d-x keep code (C++ file) safe from decompilation?

I just decompiled APK using dex2jar and JD-GUI to access the source code, but I could not find any .h or .cpp files in classes.dex folder. I want to know how does Cocos2d-x take care of that issue and where are all these files stored?
the c++ files are compiled into a dynamic library, in lib/armeabi/, like libxxx.so

ndk build with Visual studio files

I am building an android app using the native classes. The problem is that there are some cpp files calling OpenCV and the opencv header files calling VC includes that are not provided in jni. So what should I do? create a new opencv folder and change every opencv files there to right paths? or any other ways to config it? because I don't want to change the original opencv folder. that's for VC programming.
<algorithm> is one of the STL headers. You should enable STL support in NDK, as described in docs/CPLUSPLUS-SUPPORT.html document.
pointed out the thing. I need to put those to Application.mk. Thought this file is optional.

Compiling as3 project to swc file in flashbuilder

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

Difference between libs and src folder

What's the difference between libs and src folders?
The source folder is for ActionScript and Flex source files, mostly with .mxml or .as extensions. Anything you code you put in the src folder, though if you create your own library of reusable code, you might keep it in a second source folder (with another name, of course).
The libs folder is a special folder in Flash Builder, that you can put .swc files in. These SWCs (pronounce 'swicks') contain compiled code already. 3rdparty frameworks (or libraries) are easy to use by downloading their SWCs, and you can also create SWCs with assets from the Flash IDE, for easy access to your asset library. Hence, I guess, the naming of the folder 'libs'. The SWCs in the libs folder are automatically added to the classpath of your project, so you can access the classes therein.
Cheers,
EP.
P.S. Worth noting is that in other development IDE's like FDT or FlashDevelop, SWCs in the 'libs' folder are not neccessarily added to the classpath automatically and might need a little manual configuration.
src should contain your source code. lib contains the librairies that you reference and use in your code (.jar files for example).
EDIT : For Flex projects, you put in lib the .swc files that you load from your source code.

How does the Gaia Flash Framework access the scaffold.as 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.