Flex Library Projects - the equivalent of the Flash IDE’s Global Classes

March 6th, 2008 . by polyGeek

In the Flash authoring tool ( IDE ) there’s a preference called your Global Class Path. You can set that path(s) as a preference in the application so that every single FLA that you create will have access to those classes.

I’ve been trying to figure out how to do the same thing in FlexBuilder for ages. If you came to FlexBuilder as a Java developer then this should be old news to you. But for someone new to FlexBuilder it’s a pain trying to figure out even the basics of Eclipse. The books on Flex mostly gloss over the inner workings of FlexBuilder.

In this video tutorial I’ll cover how to build a Flex Library Project - the equivalent of your Global Class Path in the Flash IDE. You can then add your Actionscript and MXML classes to that project and have access to them throughout your workspace without doing an import and duplicating your files.

[ Download Flex Builder 3 | [ Download FLV | Download _comPolygeek.swc ]

Here’s the Adobe documentation on Creating Flex component library files.

Ryan, Sim, I miss you guys! :-)

Addendum: Ted Patrick pointed out that you can drop a SWC into the “libs” folder of your Flex3 projects.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Digg
  • Facebook

4 Responses to “Flex Library Projects - the equivalent of the Flash IDE’s Global Classes”

  1. comment number 1 by: Sim

    Nice Video. Good Content and you speak the truth.

    Cuz who doesn’t love sim? LOL

  2. comment number 2 by: polyGeek

    We all love the Sim. No doubt about it!

  3. comment number 3 by: Jason

    I am just wondering on why you put your component under com.polygeek.utils would it not be easier just to have it under root so I could just import say, or is there some logic behind this? What does com stand for?

  4. comment number 4 by: polygeek

    @Jason, It’s convention to place any class, especially those that you share with the public, in a unique package. Using a domain is guaranteed to be unique because no one else can own polygeek.com but me. So all my classes go in: com.polygeek.?folderName?

    Likewise for someone like Adobe, their classes are in: com.adobe.?folderName?

    If I just placed my class in the root, as you say, then someone else could come along with the same class name and ours would conflict with each other. Now I can have a class for, say, ArrayUtils, and Adobe can have a class for ArrayUtils. We each use our domain names for the path so there’s no conflict.

Leave a Reply

Name

Mail (never published)

Website

- Why ask? This confirms you are a human user!

   




© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites