Still working on getting the list to see the XML...maybe I'm not 
doing this correctly, I assumed that I would need to parse the xml 
out of my_xml into an array and populate the list like that...but now 
I'm thinking I just need to provide my_XML as a dataprovider to 
list??? I'm so confused...any good referance docs would be wonderful 
or maybe someone has done this before?...it seems my_XML is out of 
scope for the list item...thanks for looking..

XML:
<?xml version="1.0" ?>
<PLAYLIST>
        <FILE>
                <label>test1</label>
        </FILE>
        <FILE>
                <label>test2</label>
        </FILE>
        <FILE> 
                <label>test3</label>
        </FILE>
        <FILE>
                <label>test4</label>
        </FILE>
</PLAYLIST>


CODE: 
//create urlloader and urlRequest 
public function urlloader():void{       
        var xml_loader:URLLoader = new URLLoader;               
        var xml_request:URLRequest = new URLRequest ("playlist.xml");
        xml_loader.load(xml_request);                   
        xml_loader.addEventListener("complete", onComplete);    
}


//Read XML doc and load course contents
public function onComplete(event:Event): void{
        var loader:URLLoader = URLLoader(event.target);         
        my_xml = new XML(loader.data);
        my_xml.ignoreWhite = true                               
};
        
<mx:List id="list" alpha="0.0" borderStyle="none" height="278" 
dataProvider="{my_xml}" selectable="true" width="188" 
allowMultipleSelection="false" textRollOverColor="#0080C0"></mx:List>

ERROR:
Severity        Description     Resource        In Folder
        Location        Creation Time   Id
1       Data binding will not be able to detect assignments 
to "my_xml".    Player.mxml     Player  line 80 July 19, 2006 9:43:26 
AM      599



--- In [email protected], "Jeremy Lu" <[EMAIL PROTECTED]> wrote:
>
> One little addition to Tracy's post, when using attribute for 
labelField,
> don't forget to add an "@" sign, this is the E4X notation for 
accessing
> attribute.
> 
> 
> Jeremy.
> 
> 
> On 7/19/06, Tracy Spratt <[EMAIL PROTECTED]> wrote:
> >
> >    Yes.
> >
> >
> >
> > Assign my_xml to the dataProvider property of the List.
> >
> >
> >
> > Then, depending on the structure of your xml, specify labelField 
or define
> > a labelFunction.
> >
> >
> >
> > You'll need a more specific question for a more specific answer.
> >
> >
> >
> > Tracy
> >
> >
> >  ------------------------------
> >
> > *From:* [email protected] 
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *flexnewbie06
> > *Sent:* Tuesday, July 18, 2006 12:35 PM
> > *To:* [email protected]
> > *Subject:* [flexcoders] importing xml to my flex app
> >
> >
> >
> > Is is possible for me to populate a list in my app with an 
external XML
> > doc.
> >
> > So far, I have the xml doc loaded into XML object in my app using
> > URLLoader and when I trace my_xml.toString(), my xml doc is in 
fact
> > loaded the XML object. I guess my problem from here is how to 
access
> > the attributes in my XML object to populate my list???
> >
> > Does anyone have any experience with this?
> >
> > thanks
> > Jenn
> >
> >  
> >
>









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to