use regular vanilla for hard candy! you must use an oil based flavoring.
because the temperature of the candy is way above the boiling point of water (and even more above the boiling point of alcohol) adding water or vanilla essence will result in searingly hot sugar syrup violently boiling over or splattering around.
if you're experienced and know what you're doing, you can get away with it by ... well... i'm not going to tell you, because it's too dangerous for a novice. just remember that you can get severely burned by hot sugar. make sure you're wearing long sleeves, and don't go poking your nose near it to see how it smells. don't do anything in haste, and whatever you add, do it drop by drop. if for any reason you need to lower the temp. use boiling water (not room temp. or cold), again very little by very little.
don't let this put you off from making candy. it's actually easy and safe if you use some common sense. i just want to give you a heads up on this, 'cause a lot of "common sense" is learned in hindsight after making mistakes. in this case, a mistake could result in a bad burn if you're not careful. good luck!