Why Is He Flirting and Then Ignoring Me? In Serious Need of Guys Advice?

ok so here's the sitch. i started my career in late June early July and right off the bat i thought a very higher positioned co worker was attractive but i shrugged it off because it was unprofesional and also i had a boyfriend at the time that id been with for the last two years,
(the deal with him well we got engaged his family didn't aprove so he called off the wedding we'd been having issues ever since and are no longer together as of this date)
i have asked questions before to get the full idea of this guys damn behavior here are the links

girlsaskguys. com/guys-behavior/q1230163-my-crush-blocked-me-on-facebook-for-no-reason.

girlsaskguys. com/guys-behavior/q1254885-what-does-it-mean-when-a-man-hold-your-gaze

he's always finding new ways of making me blush like crazy and he smiles and shakes his head. so i said well im blocked might as well turn the other cheak and start fresh and i let myself treat him as goofy as i do everyone else and he laughs at me stares at me and encourages my goofyness.
this past week i felt like there was somethings that needed to be said in person so i asked if i could sit in his office during lunch and he let me i stayed in ther all lunch and during that conversation i had managed to ask if he hated me and he said no that he didn;t hate anyone that he disliked a lot of people so i asked if he disliked me and he laughed and said no i dont dislike you at all. then for the rest of the day he was almost always by my side and even a co worker noticed he was flirting. and during this convo he tore down my boyfriend as well as another worker and oh so nonchalantly convinced me to break up with him my girl coworker said he treated me horibly and i needed to get rid of him and the guy said yeah sometimes enough is enough.
then the next day acted like i didn't exist. so my question is and sorry for the long story... why on earth is he flirting and then ignoring me. he is driving me up the damn wall.
Why Is He Flirting and Then Ignoring Me? In Serious Need of Guys Advice?
Post Opinion