// you’re reading...

Flex 2.0

Where do my custom Classes and Components Go in Flex

This is one of those questions that I had been looking for the answer, found it and was not quite ready to use it. I found it again while reading these Flex 2 docs and wanted to put it here for safe keepiing

flex_app_root/WEB-INF/flex/user_classes that- my friends is where you put your classes (org/diamondtearz/appclasses) that you want used in the project- I have not tried it yet but I want it here for later.

Another important note when in the app tag you declare a namespace for example:

XML:
  1. <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns:diamond="*">

the "*" part means the current directory that the mxml files are sitting in that means in theory that you could place a folder in there and have your classpathes from there (e.g. org/diamondtearz/myClasses ) but I think for now I'm just going to put things where they belong until I know enough to -or have a compelling reason not to.

Finally one thing that had caused me confusion earlier dealing with url valuses is that the urls in the code are relative to the location of the swf file. To be more explicit- If you are loading an xml file into your data source from a folder called assets it should be an assets folder sittin in the bin. After i think about this more I'll get some screenshots to clarify.

For now I'm just hashing through some of this to hear myself process it.

Addendum: Upon improving my reading skills I find that the location mentioned above is for enterprise Flex only instead it's:

any directory you specify in the tag in the flex-config.xml file. Okay i knew where thatwas in Flex 1.5 but I can't find it in the new hotness!!!

Discussion

No comments for “Where do my custom Classes and Components Go in Flex”

Post a comment