# \[F8\] count variable scope (?)

**URL:** <https://forum.kirupa.com/t/f8-count-variable-scope/217500>\
**Category:** flash\
**Created:** [February 27, 2007, 3:25pm UTC](https://forum.kirupa.com/t/f8-count-variable-scope/217500 "2007-02-27T15:25:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [February 27, 2007, 3:25pm UTC](https://forum.kirupa.com/t/f8-count-variable-scope/217500/1 "2007-02-27T15:25:34Z")

</div>

Hi

I have a count variable so when I press a button “count” increments (it works)

**But what I don’t get** is how it works here…

```auto
var titlename:String = photos[count].getTitle();

```

**but not here…**

```auto
if (_root.userass[count] == _root.answers[count]) {
   container.resultsDisplay["indicator"+count].gotoAndStop("correct");
   
  } else {
   container.resultsDisplay["indicator"+count].gotoAndStop("fail");
  }

```

any ideas?

thanks
