# Anybody knows how to do this?

**URL:** <https://forum.kirupa.com/t/anybody-knows-how-to-do-this/282162>\
**Category:** Uncategorized\
**Created:** [February 18, 2009, 1:21pm UTC](https://forum.kirupa.com/t/anybody-knows-how-to-do-this/282162 "2009-02-18T13:21:48Z")\
**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, 1:21pm UTC](https://forum.kirupa.com/t/anybody-knows-how-to-do-this/282162/1 "2009-02-18T13:21:48Z")

</div>

I have a function that reads from an array inside flash I wanted to be read from an xml instead.  
Here’s the link to my flash file it’s only 320kb [click here](http://www.narocast.net/quotes.fla)

here’s the function which reads 5 arrays everyday.

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();

//trace(dat.getUTCMonth());

And this is the array section which I wanted it to be an xml file instead

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"

```

}

Any suggestion would be much appreciated.

Here’s the link to my flash file it’s only 320kb [click here](http://www.narocast.net/quotes.fla)
