tags:

views:

53

answers:

1

Hey Guys,

i have the following Problem - first of all i'm totally new to Flex. I was search through about 20 Websites but haven't found a Solution:

I have xml file like that:

<xml>
   <settings>
      <mainurl>http://localhost/website/&lt;/mainurl&gt;
      <adminurl>http://localhost/website/admin&lt;/adminurl&gt;
   </settings>
</xml>

Now i have

<mx:Model id="xmlfile" source="conf/config.xml">

That works fine for my DataGrid, but in the

<mx:Script></mx:Script>

section i have a function:

private function loadConf():void
{
   var admURL:String = xmlfile.setting.mainurl;
}

But it does not work?!?!

How to get it working? As i told before, i have read a lot of Tutorials and Adobe Examples but always found a way working with it on DataGrids and Stuff like that - that ways all work for me, but i can't get the above working.

Hope you can help.

Thx so much, Sascha

+1  A: 
xmlfile.setting.mainurl

should be

xmlfile.settings.mainurl
Tegeril
that was not the problem!!! it was just a mistake of mine!if i do an Alert.show(admURL,'Info') - nothing is shown. Checked the URL and everything!I have tested to show the URL in my DataGrid to see if i have any mitstakes - nothing! In the DataGrid it is shown correctly!Anyone has another idea? May i create an ArrayCollection? Isn't it possible to directly access?
codeworxx
okay, sorry for that - had a spelling mistake somewhere else.
codeworxx
Happens to everyone - I'm glad you got it working.
Tegeril