Analog input giving strange values when a simple wire is plugged

Because I need to read buttons input from an old videogame. (https://docs.google.com/open?id=0BxpXApcdNdskNWhaeXg5ZGlNem8)

When the buttons are not pressed, I get an open circuit and the pin is connected to nothing, resulting a floating input

So, I ended using the answer you posted here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261680395

  pinMode(buttonAPin, INPUT);
  digitalWrite(buttonAPin, HIGH);

and I connected the other side of the button to the ground, and that works fine, with no noise at all

Value is one when I do not press the button and turn into zero when pressed