Tutorials

April 15, 2009

Easily Use Frameworks in Multiple Projects By Setting a Global Class Path

More articles by »
Written by: Par
Tags: , , , ,
quicktipimage

Share on TwitterShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

This is a super valuable tip that has saved me a lot of time and headaches when starting a new project. Do you often find yourself copying frameworks like Tweener, Papervision, Box2D, as3CoreLib, and all the many others into the directory of your latest project? It get’s annoying eh? Well there is a quick and very easy way to solve this problem so you don’t have to always copy them every time you start a new project.

Okay so here’s the deal, you are going to want to create a folder somewhere on your hard drive that you will put all your most used frameworks. Once it’s created put the frameworks in there and you are ready to go.

All you have to do now is inside Flash go to Edit > Preferences (CTRL+U) and click on ActionScript. You’ll get this little window:

Actionscript Preferences Window

Now if you’re class is Actionscript 3.0 then under language select the ActionScript 3.0 Settings… button. If your class is ActionScript 2.0 then select that button instead.

Now you get this screen:

List of Class Paths that can be accessed from any Flash Project.

List of Class Paths that can be accessed from any Flash Project.

Alright. So you can see that I make use of this little feature extensively. I’ve added practically every AS3 Project that I use here.  Why? Because I hate copying  Tweener to every project that I write, this universal classpath idea is awesome.

So here’s how you use it, if you can’t tell already, press the little + sign and paste the url to your class here.  You can also click the crosshair symbol and use a GUI to get to the directory you want to add.  Notice that most of my directories end in an src file. This is because the majority of Projects that you will download will start the base directory of the current version with src… particularly if they use subversion.

If you use Flash Develop you can do the exact same thing with it under Project > Properties > Classpaths > Edit Global Classpaths.

Anyway, you’re all set! Happy coding.

Similar Posts:


Share on TwitterShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit


About the Author

Par
Hey! Don't be surprised, I'm a flash developer. While Flash is definitely one of my favorite languages to develop in, most of all I just like making games. If you want to see the games I've developed so far head over to my website, DigitallyBold, in the link below. If you want to know more about what I'm working on now and in the future be sure to follow me on twitter.




2 Comments


  1. I would like to than the owners of this site.it has lots of good information and i hope that i can contribute to it on a daily basis.thanks and keep it up


  2. Eugene

    Thank you, very useful tip !!!



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">


Advertisement