# REMINDER application

**URL:** <https://forum.kirupa.com/t/reminder-application/57886>\
**Category:** flash\
**Created:** [July 17, 2004, 6:08am UTC](https://forum.kirupa.com/t/reminder-application/57886 "2004-07-17T06:08:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dexa\_007](https://avatars.discourse-cdn.com/v4/letter/d/f17d59/32.png) [@dexa\_007](https://forum.kirupa.com/u/dexa_007)\
**Post date:** [July 17, 2004, 6:08am UTC](https://forum.kirupa.com/t/reminder-application/57886/1 "2004-07-17T06:08:40Z")

</div>

Dudes and gals,

I’d like to design a “reminder” application with Flash.

For example, I have some important dates I’d like Flash to remind me of … say, in a horizontal-scroll across the bottom of my screen. Only 1 reminder per day, each being the most up-to-date in a list.

Maybe the list looks something like this:

July 17: Change guitar strings  
July 20: Meeting with Helga  
July 24: Pay Rent

On July 18, for instance, the scroller would present the most timely “reminder” item (June 20: Meeting with Helga) … and continue flowing through the list as the pertinent days pass by. Only 1 reminder per day, scrolling throughout the duration of screen time throughout the day.

Any leads or tips on this one?

Thanks!

---

<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:** [July 17, 2004, 7:29pm UTC](https://forum.kirupa.com/t/reminder-application/57886/2 "2004-07-17T19:29:44Z")

</div>

nice idea,

obviously you will need to use the date property for this one…  
okeydoke lets have a crack shall we? 😉

```auto
Today = new Date()
Tdate = Today.getDate()
Tmonth = Today.getMonth()

```

this gathers the current date…  
now we want to use either a simple if statements to set a variable to a string ie. **if(Tdate \>= 14 && Tmonth \<20 && Tmonth == 6){reminder = “your reminder”}** or you can use an array representing each day of each month… this will be a lot easier to add reminders at a later date… but is a bit more complex…

ok, basically we will have 12 arrays named in a fashion such as this _month0_ (is january), _month1_ (is feb etc etc)… with the lengths specified:

```auto
jan = new Array(31)
feb = new Array(29)
mar = new Array(31)
apr = new Array(30)
may = new Array(31)
june = new Array(30)
july = new Array(31)
aug = new Array(31)
sept = new Array(30)
oct = new Array(31)
nov = new Array(30)
dec = new Array(31)

```

note that i think this could be done with a multi-dimensional array in a lot fewer lines but im stickin to what i know for now… 😉

then you specify what reminder you want on which date in the following fashion:

```auto
july[17] = "fish"

```

then set the initial values for 2 variables to be used in loops…

```auto
if(Rdate == undefined){
	Rmonth = Tmonth
	Rdate = Tdate
}

```

now a whole load of code but its not that complex… basically it is a function called _getRem_ which searches for the next reminder in each month:

```auto
function getRem(){
	if(Rmonth == 0){
		while(jan[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = jan[Rdate]
	}
	if(Rmonth == 1){
		while(feb[Rdate]==undefined){
			Rdate++
			if(Rdate>29){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = feb[Rdate]
	}
	if(Rmonth == 2){
		while(mar[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = mar[Rdate]
	}
	if(Rmonth == 3){
		while(apr[Rdate]==undefined){
			Rdate++
			if(Rdate>30){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = apr[Rdate]
	}
	if(Rmonth == 4){
		while(may[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = may[Rdate]
	}
	if(Rmonth == 5){
		while(jun[Rdate]==undefined){
			Rdate++
			if(Rdate>30){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = jun[Rdate]
	}
	if(Rmonth == 6){
		while(july[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = july[Rdate]
	}
	if(Rmonth == 7){
		while(aug[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = aug[Rdate]
	}
	if(Rmonth == 8){
		while(sept[Rdate]==undefined){
			Rdate++
			if(Rdate>30){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = sept[Rdate]
	}
	if(Rmonth == 9){
		while(oct[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = oct[Rdate]
	}
	if(Rmonth == 10){
		while(nov[Rdate]==undefined){
			Rdate++
			if(Rdate>30){
				Rmonth ++
				Rdate = 1
				break
			}
		}
	reminder = nov[Rdate]
	}
	if(Rmonth == 11){
		while(dec[Rdate]==undefined){
			Rdate++
			if(Rdate>31){
				Rmonth = 0
				Rdate = 1
				
				break
			}
		}
	reminder = dec[Rdate]
	}
	if(reminder == undefined){//just in case there are no reminders for the rest of this year
		getRem()
	}
}
if(reminder == undefined){
	getRem()
}

```

if you want to have it display as you stated above you need to associate the names of the month with the number Flash uses…

```auto
if(Rmonth == 0){
	FRmonth = "January"
}
if(Rmonth == 1){
	FRmonth = "February"
}
if(Rmonth == 2){
	FRmonth = "March"
}
if(Rmonth == 3){
	FRmonth = "April"
}
if(Rmonth == 4){
	FRmonth = "May"
}
if(Rmonth == 5){
	FRmonth = "June"
}
if(Rmonth == 6){
	FRmonth = "July"
}
if(Rmonth == 7){
	FRmonth = "August"
}
if(Rmonth == 8){
	FRmonth = "September"
}
if(Rmonth == 9){
	FRmonth = "October"
}
if(Rmonth == 10){
	FRmonth = "November"
}
if(Rmonth == 11){
	FRmonth = "December"
}

```

and now to set the full reminder (including date of reminder):

```auto
Freminder = FRmonth + " " + Rdate + ": " + reminder
trace(Freminder)

```

ok?

that was pretty long… but kinda fun to do 😉 lol  
if you have any questions/bugs please post!

Prophet.

NB i put all that script on the first frame of a brand new fla with nothing else in and used the trace function to check it…

---

<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:** [July 18, 2004, 3:41pm UTC](https://forum.kirupa.com/t/reminder-application/57886/3 "2004-07-18T15:41:47Z")

</div>

THANKS man! I’ll give it a try.

---

<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:** [July 19, 2004, 5:59pm UTC](https://forum.kirupa.com/t/reminder-application/57886/4 "2004-07-19T17:59:24Z")

</div>

no prob… good idea 😉

Prophet.
