# Var:Number got two values at the same time

**URL:** <https://forum.kirupa.com/t/var-number-got-two-values-at-the-same-time/305719>\
**Category:** Uncategorized\
**Created:** [March 2, 2010, 4:36pm UTC](https://forum.kirupa.com/t/var-number-got-two-values-at-the-same-time/305719 "2010-03-02T16:36:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalseide](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dalseide](https://forum.kirupa.com/u/dalseide)\
**Post date:** [March 2, 2010, 4:36pm UTC](https://forum.kirupa.com/t/var-number-got-two-values-at-the-same-time/305719/1 "2010-03-02T16:36:21Z")

</div>

I got a slideshow class, and in here I have a Number variable named “currentImage”. This is changing(with the method currentImage += 1;) when you click to the next image.

The problem is that when I trace currentImage (Event.ENTER\_FRAME), it gives different values on odd and even frame numbers. On frame number 1 trace is 0, on frame number 2 trace is 1 and so on, on frame number 3 it is back to 0 and so on.

How is this even possible?

The slideshow works, but I got a function that resets the slideshow and this function is also using currentImage, this function doesn’t work because of the changeing number.
