What and how are you wiring what up to the analog input pin? Perhaps if it's a simple switch you have a floating input pin condition? Draw us the electrical hook-up your using for that pin.
Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, pulseIn() waits for the pin to go HIGH, starts timing, then waits for the pin to go LOW and stops timing. Returns the length of the pulse in microseconds.
It makes no sense to try to no this with an analog input.