View Full Version : importing custom library classes
01-24-2010, 04:06 PM
Hello, I'm using Flex SDK and I'd like to be able to have a directory anywhere on my hard drive that contains a library of reusable classes that I made. And I'm just wandering how I can import those classes into my game i'm trying to make without copying and pasting them directly into my game folder? I tried symbolic links with no luck.
01-24-2010, 04:12 PM
Build a SWC and import that into your project. Having folders spread out on N partitions / drives is just not cool. If a project uses certain libraries, then those libraries should be inside the project folder.
01-24-2010, 04:51 PM
Well the plan wasn't to get too crazy with the location of the Library. I just wanted it separate but accessible from the different games I will be making. Maybe a structure like this:
So your saying something like that would be bad? Sorry about all the newb questions, but i've always just put everything in the game folder and I'm just now wandering if theres a better way.
01-24-2010, 05:08 PM
Create a Flex Library project that will in essence contain your library and compile a SWC file. Whenever you want to use the library, you just impot the SWC and that's it ( or link the library project to the actual game project... I'd personally go with the SWC ).
01-24-2010, 05:48 PM
01-24-2010, 06:08 PM
Just add the desired directory tree as an additional source file.
That would be better.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.