This list works best when people ask specific questions. Can you be more
explicit about what you don't understand?
 
Getting the external XML file into your app? Use <mx:XML source="...">.
Looping over the <button> elements? Look at some E4X examples.
Extracting the <label> and <text> for a particular <button>? Look at
some E4X examples.
Creating components dynamically? b = new Button()
Setting the label of a Button dynamically? b.label = ...
Setting the click handler of a Button dynamically?
b.addEventListener(MouseEvent.CLICK, ...)
 
- Gordon

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dur-E-Wahab Khan
Sent: Thursday, April 26, 2007 2:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XML and Button



Hi,
 
How are all of you. Well I am new to Flex. But I have started building
simple applications. One of the top most problem I am facing is working
with XML and Button. Can  you please assist me in this. I am explaining
my problem:
 
I have an external XML file like this:
<Menu>
    <button>
       <idnt>0</idnt>
       <label>General Health</label>
       <text>General Health pages is currently under construction</text>
    </button>
    <button>
       <idnt>1</idnt>
       <label>Mental Health</label>
       <text>Mental Health pages is currently under construction</text>
    </button>
</Menu>
 
Now I want to generate Buttons Dynamically from this XML. And the second
thing which is the most problematic is that how I code it so that when I
press the Button labled "General Health", it will show the same text as
in the XML tag coresponding to tag "<label>General Health</label>" ?
I badly need this. I am realy confused on this. Kindly help me.
 
Regards
..::DeX

________________________________

Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;
_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM
->  

 

Reply via email to