# Use AS to tell a dynamic textbox to display text based on the date

**URL:** <https://forum.kirupa.com/t/use-as-to-tell-a-dynamic-textbox-to-display-text-based-on-the-date/96724>\
**Category:** Uncategorized\
**Created:** [December 12, 2003, 7:02pm UTC](https://forum.kirupa.com/t/use-as-to-tell-a-dynamic-textbox-to-display-text-based-on-the-date/96724 "2003-12-12T19:02:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webshaun](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@webshaun](https://forum.kirupa.com/u/webshaun)\
**Post date:** [December 12, 2003, 7:02pm UTC](https://forum.kirupa.com/t/use-as-to-tell-a-dynamic-textbox-to-display-text-based-on-the-date/96724/1 "2003-12-12T19:02:19Z")

</div>

Ok, so here’s what I’d like to do. I’d like to create an action that, when it’s a specific day, a dynamic textbox displays a specific text.

In other words, if today is th 24th of December then I’d like the dynamic textbox to say “merry christmas” or something like that…HOWEVER I need to set this actionscript up so that it reads 8 different days and the dynamic textbox holds 8 different values.

How do I do this? I’m having a LOT of trouble with this…and I’m on a deadline, so if anyone has advice PLEASE let me know!

Thanks a billion!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 12, 2003, 8:12pm UTC](https://forum.kirupa.com/t/use-as-to-tell-a-dynamic-textbox-to-display-text-based-on-the-date/96724/2 "2003-12-12T20:12:21Z")

</div>

Just use getDate() and a few switch/case statements and you should be golden. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 13, 2003, 3:09am UTC](https://forum.kirupa.com/t/use-as-to-tell-a-dynamic-textbox-to-display-text-based-on-the-date/96724/3 "2003-12-13T03:09:07Z")

</div>

Hey I tried an if/else statement instead and it works perfectly!

Thanks for the advice though 🙂
