How do I say an MXML component is inside some package? Well, it's in a different folder... I know how to do it ActionScript... But when I do in MXML I don't declare the package explicitly because I don't know how, and when I call it to my application, it states that
The prefix "package" for element "package:Component" is not bound.
Hope this helps. For a component just create it in a new folder and from your base class when your invoking that component just invoke it with a new namespace.
e.g if you create a new component say employee_list.mxml in src/component folder
and if you have your main app file ALL_EMP.mxml in src/ folder then to invoke the component you defined in src/component folder use a namespace as
< mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:Comp="component.*" layout="horizontal" >
then you can invoke the component directly in mxml as (tag specific to your App)...
it is somewhat similar to creating and using Taglibs in JSPs...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With