# This damn thing is doing my nut! Help please, "if" not working

**URL:** <https://forum.kirupa.com/t/this-damn-thing-is-doing-my-nut-help-please-if-not-working/180542>\
**Category:** Uncategorized\
**Created:** [March 1, 2006, 12:38pm UTC](https://forum.kirupa.com/t/this-damn-thing-is-doing-my-nut-help-please-if-not-working/180542 "2006-03-01T12:38:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul\_ferrie](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@paul\_ferrie](https://forum.kirupa.com/u/paul_ferrie)\
**Post date:** [March 1, 2006, 12:38pm UTC](https://forum.kirupa.com/t/this-damn-thing-is-doing-my-nut-help-please-if-not-working/180542/1 "2006-03-01T12:38:29Z")

</div>

Hi guys,  
I am totally stumped. In stead of explaining everytrhing i will get straight to the point  
frame 1:  
load image count server  
returns 12. So we have our first var imgCount = result\_lv.imgCount  
Frame 2 setup all other needed vars:

```auto

var imgCount:Number = result_lv.imageCount;
var nextX:Number = 0;
var nextY:Number = 0;
var curCol:Number = 0;
var counter:Number = 1;

```

Frame 3 run setup to display images. This is were the intial problem starts  
The if dosnt run, dosnt do anything.

```auto

if (counter < imgCount) {
 holder.attachMovie ("imgHolder", "mod" + counter, counter);
 //
 holder["mod" + counter]._y = nextY;
 holder["mod" + counter]._x = nextX;
 //
 holder["mod" + counter].imgUrl = "media/models/" + _parent.new_edit_id + "/model_pics/" + counter + "_thumb.jpg";
 gotoAndPlay (4);
}

```

if i change imgCount from the returned result from the server to a static number then it runs and all is well.  
WTF gives???  
This is really really doing my head in and i have already wasted one day trying to figure it out.  
Please someone put me out of my missery. please…  
Paul
