Absolutely. If you keep looking you'll find lots of examples of MXML components. If you're using FlexBuilder, you can say New MXML Component. You can add properties and override methods in an <mx:Script> block in the MXML component. One thing you'll have to learn is that to instantiate your custom components in a containing document, you put a namespace declaration in the root tag of the containing document. For example, if you create your component file in a directory hierarchy:
src->com->mycompany->view you'll add this to the <mx:Application> tag (or other root tag): xmlns:view="com.mycompany.view.*" And instantiate your component as <view:MyComponent greeting="Hello"/> This assumes MyComponent has a property called greeting. I haven't actually done the following, amazingly enough, but you can also turn on a compiler option called something like -keep-generated-ActionScript to see what the MXML compiler produces, should you find yourself really fascinated by how MXML and AS relate. On Sat, Jun 28, 2008 at 2:50 PM, pbrendanc <[EMAIL PROTECTED]> wrote: > Hi > Just getting into flex in my spare time and trying to learn as quickly > as possible - so excuse me if some of my postings/questions seem > somewhat redundant - however these groups are a valuable resource for > future Flex noobies so hopefully others will benefit from the Q&A. > (Later on I may compile a list of (HowDoI qns )that I've had to deal > with in learning Flex and post ??where??). > > I know I can create custom classes defined in .as files and reuse these. > Is is possible to create a custom component (say a composite if > several multiple UI components (e.g. a logon form definition) in an > .mxml file ant then reuse these? > > The examples in the docs all use .as files so I'm wondering if it's > possible to do the same thing with mxml files. > > TIA, > Patrick > >