Dirk and Tracy! Though this is overdue since about a week!
Sascha
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Dirk Eismann
> Sent: Monday, 24. April, 2006 22:44
> To: [email protected]
> Subject: RE: [flexcoders] New to Flex, couple of questions
> Importance: High
>
> Hi - and welcome to Flex :)
>
> MXML files get turned into AS prior compilation and you can do pretty
> anything either in MXML or AS. A typical usecase is to setup a
> Controller inside your main Application file. This can be done either in
> a Script block or by tag syntax as Tracy suggested. Below are two
> examples - email code, but you should get the idea :)
>
> 1) Script style
> <mx:Application creationComplete="initApp()">
> <mx:Script>
>
> import foo.bar.Controller;
> private var controller:Controller;
>
> private function initApp():void
> {
> controller = new Controller();
> controller.init(this);
> }
> </mx:Script>
> </mx:Application>
>
> 2) Tag style
> <mx:Application creationComplete="controller.init(this)">
> <Controller id="controller" xmlns="foo.bar.*" />
> </mx:Application>
>
> // Controller.as
> package foo.bar
> {
> import mx.core.Application;
>
> public class Controller
> {
> public function init(application:Application)
> {
> // whatever...
> }
> }
> }
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

