# Var x:Number; vs. var x;

**URL:** <https://forum.kirupa.com/t/var-x-number-vs-var-x/147835>\
**Category:** Uncategorized\
**Created:** [May 14, 2005, 8:25am UTC](https://forum.kirupa.com/t/var-x-number-vs-var-x/147835 "2005-05-14T08:25:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henxon](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@Henxon](https://forum.kirupa.com/u/Henxon)\
**Post date:** [May 14, 2005, 8:25am UTC](https://forum.kirupa.com/t/var-x-number-vs-var-x/147835/1 "2005-05-14T08:25:50Z")

</div>

Hello

what’s the difference between those 2 declares of variables?

\*x:Number

x;

\*I tried to use _xcenter:Number_ in this code(it’s a infinite image scroller):

```auto
var xcenter;
var speed;
var begX;
var endX;

_root.linkholder.onLoad = function() {
	xcenter = _root.mask._x+_root.mask._width/2;
	speed = 2/10;
	begX = _root.mask._x;
}

```

though it didn’t work, the scroller didn’t move. when I removed\* :Number\*, it worked though… all the variables are numbers! How does this work?  
/regards henxon
