# Need help with If Else Statement

**URL:** <https://forum.kirupa.com/t/need-help-with-if-else-statement/302807>\
**Category:** flash\
**Created:** [January 7, 2010, 7:05pm UTC](https://forum.kirupa.com/t/need-help-with-if-else-statement/302807 "2010-01-07T19:05:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![feeco](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/feeco/32/2925_2.png) [@feeco](https://forum.kirupa.com/u/feeco)\
**Post date:** [January 7, 2010, 7:05pm UTC](https://forum.kirupa.com/t/need-help-with-if-else-statement/302807/1 "2010-01-07T19:05:28Z")

</div>

Hi, I need some help finishing up my flash project. I have been trying for the last 2 days to write and if else statement that will do the following:

- if they click on the \_root.m\<\>1 it will go to [adobe.com](http://adobe.com) if they click on \_root.m\<\>2 they will go to [yahoo.com](http://yahoo.com).

-I have 6 \_root.m 's

```auto
on (release) {
 if (_root.m<>1) {
getURL("http://www.adobe.com","_self");
 }
 else if (_root.m<>2) {
  getURL("http://www.google.com","_self");
}
}

```

When I test it the url and it opens 2 windows no matter what one is clicked!?!  
Can you please help.
