How read button or image position into a numeric variable with scripting?

I can figur out why this doesn’t work.

_global.oldpos = 0.0; // Declares global variable

onEnterFrame ()
var newpos:Number;
trace (“Running…”);
//newpos = 101;
// newpos = Map._y; <— NaN dosn’t work why
newpos = oldpos + 1;
Map._y = newpos;
oldpos = newpos;
trace (newpos);

Map is the Layer containing the bit map or button that I need to read position from
What should I do to let this map move on my script commands?