Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
rottmanja #1
Organizing Flex Custom components
This may sound dumb, but for me unorganized projects is one of my biggest pet
peves.
I have a project that I am working on that uses alot of custom components.
Normally I would use just <componentname />
Now the question I have is, if I want to brek these down into sections
(folders) and have only my index.mxml file in the top webroot folder. How would
I use my custom componets.
IE.
webroot
Index.mxml
status (this is a folder)
addSale.mxml
Ok so I have the index.mxml and the folder status under my webroot directory
for the project. How would I use my custom compoent under the status folder.
Would it be something like <status/addSale.mxml />. Or is there something else
I need to do.
rottmanja Guest
-
Problems running custom components with Flex
Hi, I'm trying to follow the tutorial in this PDF document (Chapter 2:Creating Basic Components in Flash MX 2004): ... -
How to load Flex 2.0 components on Flex 1.5 application
Hello, I am currently working on an Flex 1.5 application and my client wants to import 2.0 components into it. Can we achieve that? if so how is... -
Flex 2B2 UI COmponents
Hi All... I am trying to get an application prototyped fairly quickly. Initially, I started using a Java Applet but there is a good bit of high... -
can custom-made flash components use flex drag-and-drop?
hello, I am making a visual component in the flash IDE that I want to then incorporate into a flex application. If possible, I would like to have... -
Custom Components
I've built some flash MX components for use by my team. I'd like to know how to make the component update on the stage at design-time when the... -
ntsiii #2
Re: Organizing Flex Custom components
Look in the docs for "namespace".
Basically, in your application tag you declare a namespace like this:
xmlns:myns="status/*"
Then you can do:
<myns:addSale ..../>
That's just from memory, you will want to look it up.
Tracy
ntsiii Guest
-
rottmanja #3
Re: Organizing Flex Custom components
If component files are in the same directory as the application file or in the
ActionScript classpath directory (not a subdirectory), you can refer to them as
the following example shows. In this example, the component's namespace (*) is
mapped to the prefix MyComp.
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns:MyComp="*">
<MyComp:MyButton/>
...
<mx:Application>
#
If the same file exists in the ActionScript classpath directory and the
application directory, Flex uses the file in the application file directory.
# If the component is in a subdirectory of the directory that contains the
MXML application file, you use a namespace that specifies the subdirectory. The
following code declares a component that is in the custom/components
subdirectory of the directory that contains the MXML file in which it is used:
<m1:MyComponent xmlns:m1="custom.components.*"/>
If the same file exists in the ActionScript classpath directory and the
application directory, Flex uses the file in the application file directory.
rottmanja Guest



Reply With Quote

