What i do is extending the mxml class with an AS class. Then instead of using the mxml i use the AS subclass. If the class is empty, things just work like they did before. But inside the AS class u have the usual callBacks (createChildren, init, etc) and a constructor.
 
Via code u can add listeners to the UI components and manage everything from within the AS class.
 
Greetz Erik
 
 


From: Robert Brueckmann [mailto:[EMAIL PROTECTED]
Sent: donderdag 3 maart 2005 15:14
To: [email protected]
Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

Can I ask how you manage an MXML without any ActionScript at all?  How in a file that has components with click or change listeners would you not have any supporting ActionScript code…I mean just about every single one of my MXML fileshas initialize or creationComplete listeners in the parent container tag with dozens of other components that are dependent on dataproviders changing and user interactions like clicking or dragging and dropping and I can’t beginto imagine how I could extract every bit of ActionScript from my MXML files into individual ActionScript classes…maybe I’m not grasping the Cairgorm designarchitecture fully…I thought I had a pretty good grasp on it but to hear that you’re writing MXML files with no ActionScript in them whatsoever kind of baffles me…can you give me an example?

Thanks for bearing with me!  ;)

Reply via email to