# Need help with flash xml

**URL:** <https://forum.kirupa.com/t/need-help-with-flash-xml/282157>\
**Category:** meta\
**Created:** [February 18, 2009, 10:47am UTC](https://forum.kirupa.com/t/need-help-with-flash-xml/282157 "2009-02-18T10:47:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmdadou](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hmdadou](https://forum.kirupa.com/u/hmdadou)\
**Post date:** [February 18, 2009, 10:47am UTC](https://forum.kirupa.com/t/need-help-with-flash-xml/282157/1 "2009-02-18T10:47:45Z")

</div>

I hope I am in the right section.  
I have flash file with 5 dynamic textfields which reads everyday from an array 365 (year) inside the file what I want is to read from an xml file instead.  
Any help will be much appreciated.  
Due to the limitation of the file size.  
I will just paste the code here.

the first layer contains this code the arrays:  
function make365()  
{  
arr1[49] = “05:30”  
arr2[49] = “12:35”  
arr3[49] = “13:10”  
arr4[49] = “15:55”  
arr5[49] = “18:20”

```
arr1[50] = "06:21"
arr2[50] = "12:33"
arr3[50] = "14:12"
arr4[50] = "16:23"
arr5[50] = "19:17"

arr1[51] = "04:21"
arr2[51] = "11:30"
arr3[51] = "14:12"
arr4[51] = "16:50"
arr5[51] = "20:30"

arr1[52] = "06:30"
arr2[52] = "12:11"
arr3[52] = "13:18"
arr4[52] = "17:30"
arr5[52] = "19:21"

```

}

-----------------------------------second layer keyframe----------------  
var dat:Date = new Date();  
var compareDat = dat.getDate();  
var compareMont = dat.getMonth() + 1;  
var arr1:Array = new Array();  
var arr2:Array = new Array();  
var arr3:Array = new Array();  
var arr4:Array = new Array();  
var arr5:Array = new Array();  
make365();

//---------------------------------  
var nyeve\_date = new Date((new Date()).getFullYear(), 11, 31);

```
var now_date = new Date((new Date()).getFullYear(),0,1);

```

// convert difference in milliseconds to days  
var TotalDays = Math.floor((nyeve\_date - now\_date)/86400000);  
var now\_date = new Date();  
var currDay = Math.floor((nyeve\_date - now\_date)/86400000);  
var val:Number= TotalDays - currDay;

quote1.text = arr1[val];  
quote2.text = arr2[val];  
quote3.text = arr3[val];  
quote4.text = arr4[val];  
quote5.text = arr5[val];  
//---------------------------------

## toda.text = compareDat + “/” + compareMont + “/” + dat.getFullYear();

the stage contains 5 dynamic textfields each one named respectively quote1 ,quote2 ,quote3, quote4 and quote5.

How can I make the function 365() reads from an xml file instead.?  
Thank you all in advance.
