mxmlc will actually convert your MXML file to eqivalant .AS file before making binary files ( .swf or .swc ).
There is some attribute in the Flex Project setup ( i remember its name is keep-generated-as, Just google for it. Once you set this attribute, You can see the generated action script equivalants for your MXML component. Happy Coding -Sathish On Mon, Sep 29, 2008 at 1:35 AM, Rahul Sood <[EMAIL PROTECTED]> wrote: > Thanks guys, > > U mean i can still use CreationComplete Handler in the MXML of the > Component to initialise some values. > I will try this out. Sounds good for setting some Default Values. > > Is it easy to convert MXML component into AS ? I am asking this because the > MXML component has some events and properties defined on it. > > Thanks, > Rahul. > > On Sun, Sep 28, 2008 at 10:28 PM, Sathish Kumar < > [EMAIL PROTECTED]> wrote: > >> Hi Rahul, >> Since Mxml is Tag structure, It has some limitations. But as you >> know,At the end everything is going to be converted as an Action Script >> Class. So my personal opinion is that, You create Custom Components using >> Action Script. >> >> To Answer You Question, If you want to assign initial values to >> your mxml component, Then add a 'creationComplete' listener. It will act as >> a Constructor for MXML component. >> >> Regards, >> Sathish Kumar T. >> >> >> On Sun, Sep 28, 2008 at 10:02 PM, Rahul Sood <[EMAIL PROTECTED]>wrote: >> >>> Hi All, >>> >>> I have created an MXML Custom Component which is essentially a layout >>> Component >>> >>> - It has a MetaData tag for Events >>> - It also has a set of Public Properties. >>> >>> Now the requirement is such that, I need to create an object/instance of >>> this Custom Component at runtime using a Constructor. >>> In the constructor, I should be able to specify my initial values and >>> eventhandlers. >>> e.g. >>> var obj:MyLayout = new MyLayout( property1, property2, eventHandler1, >>> eventHandler2); >>> this.addChile(obj) >>> >>> *Que 1:* Is this POSSIBLE in Flex ? >>> *Que 2:* If NOT, is this possible, if my Custom Component was based on >>> a .AS Class File rather than an MXML Tag File >>> >>> Appreciate any ideas on this, >>> Thanks >>> Rahul. >>> -- >>> *"Learning is not necessary, neither is survival"* >>> >>> >>> >> >> >> -- >> Warm Regards, >> Sathish Kumar T >> >> >> -- Warm Regards, Sathish Kumar T --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

