# XML-Based Birthday Board

**URL:** <https://forum.kirupa.com/t/xml-based-birthday-board/256463>\
**Category:** flash\
**Created:** [April 3, 2008, 9:14am UTC](https://forum.kirupa.com/t/xml-based-birthday-board/256463 "2008-04-03T09:14:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![everlastingfuel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/everlastingfuel/32/3337_2.png) [@everlastingfuel](https://forum.kirupa.com/u/everlastingfuel)\
**Post date:** [April 3, 2008, 9:14am UTC](https://forum.kirupa.com/t/xml-based-birthday-board/256463/1 "2008-04-03T09:14:12Z")

</div>

## Hi guys, I really need help with this because I am really an idiot at actionscripting. Have tried for ages but to no avail. Description of brief: Creating a Birthday Board which will show all the names of the Birthday boys and girls in a certain Month. ie. (the numbers in square brackets refers to the actual day of birthday)

## Birthday Board \<- March -\> [08] Bday Person1 [13] Bday Person2 [25] Bday Person3

Users are able to click the arrowheads to navigate the months. Months and Names are controlled  
by xml in the following format:

\<?xml version = “1.0”?\>  
\<document\>  
\<level src=""\>a  
\<level\>March  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_sims.jpg”\>[08] Bday Person1  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[18] Bday Person2  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_eoffice.jpg”\>[25] Bday Person3  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_gpms.jpg”\>[28] Bday Person4  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_gpms.jpg”\>[29] Bday Person5  
\</level\>  
\</level\>  
\</level\>  
\<level src=""\>b  
\<level\>April  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_sims.jpg”\>[08] Bday Person1  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[13] Bday Person2  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_eoffice.jpg”\>[15] Bday Person3  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_gpms.jpg”\>[18]Bday Person4  
\</level\>  
\</level\>  
\</level\>  
\<level src=""\>c  
\<level\>May  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_sims.jpg”\>[20] Bday Person1  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[21] Bday Person2  
\</level\>

\</level\>  
\</level\>  
\<level src=""\>d  
\<level\>June  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_sims.jpg”\>[03] Bday Person1  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[13] Bday Person2  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[30] Bday Person3  
\</level\>

\</level\>  
\</level\>  
\<level src=""\>e  
\<level\>July  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_sims.jpg”\>[05] Bday Person1  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[17] Bday Person2  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[25] Bday Person3  
\</level\>  
\<level src=“[http://www.kirupa.com](http://www.kirupa.com)” image=“quicklink\_images/icon\_prism.jpg”\>[31] Bday Person4  
\</level\>  
\</level\>  
\</level\>  
\</document\>

Current status: I managed to get the basic functions like making the months and names appear from modifying an existing script. And I am able to navigate between the months. As you can see from the xml above, I am showing Birthdays of people from the month of March - July.  
Requirement: I am planning on inserting the birthday dates of people for the whole year, which means from January to December, that is easy to add on but I require my Birthday board to show the current month ie.April upon loading. I have written a function to retrieve the current month from the system but I do not know how to apply that to my exisiting script. The function i have written is as below:

```auto
function loadmonth() {
 var myDate:Date = new Date();
 var currentMonth:Number = myDate.getMonth()+1;
 trace("currentMonth = "+currentMonth);
 if (currentMonth == 1) {
  bdayMonth = "January";
 } else if (currentMonth == 2) {
  bdayMonth = "February";
 } else if (currentMonth == 3) {
  bdayMonth = "March";
 } else if (currentMonth == 4) {
  bdayMonth = "April";
 } else if (currentMonth == 5) {
  bdayMonth = "May";
 } else if (currentMonth == 6) {
  bdayMonth = "June";
 } else if (currentMonth == 7) {
  bdayMonth = "July";
 } else if (currentMonth == 8) {
  bdayMonth = "August";
 } else if (currentMonth == 9) {
  bdayMonth = "September";
 } else if (currentMonth == 10) {
  bdayMonth = "October";
 } else if (currentMonth == 11) {
  bdayMonth = "November";
 } else if (currentMonth == 12) {
  bdayMonth = "December";
 }
 trace("bdayMonth = "+bdayMonth);
}

```

Can someone help me please? I think this is quite easy for expert developers to know where to insert the relevant script but for me, I even have problems understanding my present actionscript. Please find attachment and place both the .fla and .xml in the same folder.  
Thanks in advance!!
