# Complete Newbie here come to blow your mind

**URL:** <https://forum.kirupa.com/t/complete-newbie-here-come-to-blow-your-mind/286459>\
**Category:** flash\
**Created:** [April 15, 2009, 7:35pm UTC](https://forum.kirupa.com/t/complete-newbie-here-come-to-blow-your-mind/286459 "2009-04-15T19:35:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![repticon](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@repticon](https://forum.kirupa.com/u/repticon)\
**Post date:** [April 15, 2009, 7:35pm UTC](https://forum.kirupa.com/t/complete-newbie-here-come-to-blow-your-mind/286459/1 "2009-04-15T19:35:01Z")

</div>

Hey all.

I am trying to use _if_ and _else_ statements and failing. I am either completely missing their purpose, or just not writing the correct code. Scenario: I have designed a gallery that consists of animation in movie clips that are placed on the time line. With the \*if/else \*statements I need Flash to know what movie clip the user is on, so that the users next action loads the correct movie clip.

If someone is willing to take a look over the code I have written it would be highly appreciated. Again I am sorry if this question and scenario comes across as dum, this is all very new and confusing to me.

\_global.imageNumber=0;

massButt.onRelease=function(){

```
if (_global.imageNumber=1){
    imageHolder.gotoAndStop(imageNumber); 
    
} else if (_global.imageNumber) {        
    imageHolder.gotoAndStop(); 

```

}

\_global.imageNumber=1;  
trace(imageNumber);

}

gearsButt.onRelease=function(){

```
if (_global.imageNumber=2){
    imageHolder.gotoAndStop(imageNumber); 
    
} else if (_global.imageNumber) {        
    imageHolder.gotoAndStop();

```

}

\_global.imageNumber=2;  
trace(imageNumber);

}

tombButt.onRelease=function(){

```
if (_global.imageNumber=3){
    imageHolder.gotoAndStop(imageNumber); 
    
} else if (_global.imageNumber) {        
    imageHolder.gotoAndStop();

```

}

\_global.imageNumber=3;  
trace(imageNumber);

}
