You have to account for months starting in the middle of the week, where e.g. the 1st is a Thursday.
Get the week day number of the months 1st day minus one. Add that to your current date, divide by 7, floor it, add one to the result: That's the months week (zero-based) of that day.
// be carful to provide month zero-based like AS need it to be
private function monthWeekOfDay(year:int, month:int, day:int, weekStartsOnMonday:Boolean = false):int
{
var firstDay:int = new Date(year, month, 1).getDay();
if (weekStartsOnMonday)
firstDay = (firstDay + 6) % 7;
firstDay--;
return Math.floor((new Date(year, month, day).getDate() + firstDay) / 7);
}