Ok, more detail:
Create an mxml application, named, say "Base.mxml":
<mx:Application ...>
<mx:Script >
[vars, functions, getter/setter, any as functionality, for example:]
[Bindable]public var sMyString:String = "somestring";
....
</mx:Application>
Then create the UI mxml file:
<Base>
<mx:Label text="{sMyString}" />
</Base>
The lable will display "somestring".
Tracy
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of André
Rodrigues Pena
Sent: Friday, March 16, 2007 2:07 PM
To: [email protected]
Subject: Re: [flexcoders] Simple design question
Thanks for the answer Spratt
I'd like to create a service layer wrapping more than onde HTTPService
components into a single MXML file.
Can you explain this phrase another way:
"I use an Application tag to implement my functionality, then use that
component as the root tag of the application. Some folks call this
the "code behind" technique."
I didn't got it
On 3/16/07, Tracy Spratt <[EMAIL PROTECTED] <mailto:tspratt%40lariatinc.com> >
wrote:
>
>
>
>
>
>
>
>
>
> I wish we had a "faceless" mxml component specifically for this kind of use.
>
>
>
> I use an Application tag to implement my functionality, then use that
> component as the root tag of the application. Some folks call this the "code
> behind" technique.
>
>
>
> You could also use a canvas, which is the lightest container I know, and set
> height and width to 0 and visibility=false.
>
>
>
> Also, there are a few faceless mxml components. Would it make sense in your
> case to extend one of them?
>
>
>
> Tracy
>
>
>
> ________________________________
>
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On
> Behalf Of André Rodrigues Pena
> Sent: Friday, March 16, 2007 1:32 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Simple design question
>
>
>
>
>
>
>
> Hi all,
>
> I know how to create visual components as MXML files. My question is,
> can I create a non-visual component using MXML files? Let's put an
> example: I want to create a non-visual component to wrap my
> web-services and handlers. I know I could do it with AS3. But can I do
> it with MXML?
>
> thanks
>
> --
> André Rodrigues Pena
>
> LOCUS
> www.locus.com.br
>
> Blog
> www.techbreak.org
>
>
>
>
--
André Rodrigues Pena
LOCUS
www.locus.com.br
Blog
www.techbreak.org