Often when developing with Flex, you'll use mxml component to better organize your project.
So you often need to reference MXML components in other objects.
You can access this reference inside your Script MXML tag, but in order to pass object reference to another MXML components you have to create a property to represent the Application Object.
In this example i use an accordion and 2 mxml components to act as containers and a simple Textinput control :
<mx:Accordion id="mioAcc" widthFlex="1" heightFlex="1">
<fatw:partecipanti_lso id="secondo" label="Inserisci i dati personali dei partecipanti all'evento" apps="{this}" iscritti="{iscritti}" />
<fatw:IscFatturazione id="primo" label="Inserisci i dati di fatturazione" apps="{this}" iscritti="{iscritti}"/>
</mx:Accordion>
<mx:TextInput id="text1" text="Hello"/>
Now inside my partecipanti_lso xmml file i'll be able to access the text1.text property using this code :
<mx:Script>
<![CDATA[
var app:Object;
]]>
</mx:Script>
<mx:TextInput id="mytext" text="{app.text1.text}"/>
This way we can access to all of the Application object's children !






















Comments