# \[FCS3\] Javascript Array displayed in Text Box

**URL:** https://forum.kirupa.com/t/fcs3-javascript-array-displayed-in-text-box/277355
**Category:** flash
**Created:** [December 11, 2008, 3:05am UTC](https://forum.kirupa.com/t/fcs3-javascript-array-displayed-in-text-box/277355 "2008-12-11T03:05:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flash\_inferno](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@flash\_inferno](https://forum.kirupa.com/u/flash_inferno)
#### Post date: [December 11, 2008, 3:05am UTC](https://forum.kirupa.com/t/fcs3-javascript-array-displayed-in-text-box/277355/1 "2008-12-11T03:05:58Z")

</div>

Hello,

I have a nice little Javascript that displays the date and line of text beneath it.  
It works great in a regular html page but now I am upgrading my page to flash but still  
would like and still would like to use this script (since I pretty much the whole year  
filled in, one line of text for each day). I tried to load it in a dynamic text box by  
geturl but I think I had the wrong actionscript.

Here is an example of my javascript:

\<SCRIPT LANGUAGE=“JavaScript”\>

dayName = new Array (“Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”)  
monName = new Array (“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”)  
now = new Date

Jan = new Array  
Jan[1] = “Place Quote Here”  
Jan[2] = “Place Quote Here”  
Jan[3] = “Place Quote Here”  
Jan[4] = “Place Quote Here”  
Jan[5] = “Place Quote Here”  
Jan[6] = “Place Quote Here”  
Jan[7] = “Place Quote Here”

Etc…through all 12 months, then

document.write("\<Font color=#660000\>")  
document.write("\<center\>\<B\>" + monName[now.getMonth()] + " " + now.getDate() + “, " + now.getFullYear() + “\</B\>\</center\>” )  
document.write(”\<Font size=1\>")  
if (now.getMonth() == 0) document.write("\<center\>" + Jan[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 1) document.write("\<center\>" + Feb[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 2) document.write("\<center\>" + Mar[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 3) document.write("\<center\>" + Apr[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 4) document.write("\<center\>" + May[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 5) document.write("\<center\>" + Jun[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 6) document.write("\<center\>" + Jul[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 7) document.write("\<center\>" + Aug[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 8) document.write("\<center\>" + Sep[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 9) document.write("\<center\>" + Oct[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 10) document.write("\<center\>" + Nov[now.getDate()] + “\</center\>”)  
if (now.getMonth() == 11) document.write("\<center\>" + Dec[now.getDate()] + “\</center\>”)

\</script\>

Thank you so much for your help!

f-i
