# \[Flash Pro 8\] Multiple Else Ifs with radio buttons

**URL:** <https://forum.kirupa.com/t/flash-pro-8-multiple-else-ifs-with-radio-buttons/322304>\
**Category:** flash\
**Created:** [May 17, 2011, 3:00pm UTC](https://forum.kirupa.com/t/flash-pro-8-multiple-else-ifs-with-radio-buttons/322304 "2011-05-17T15:00:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyJJ](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@AndyJJ](https://forum.kirupa.com/u/AndyJJ)\
**Post date:** [May 17, 2011, 3:00pm UTC](https://forum.kirupa.com/t/flash-pro-8-multiple-else-ifs-with-radio-buttons/322304/1 "2011-05-17T15:00:41Z")

</div>

**Flash Professional 8 / AS 2.0**

Yeah, I’m new to this. I’ve got a movie clip that’s made up of 4 radio buttons and a regular button that will direct to 1 of 4 URLs on release, depending on which radio button is selected.

This is the code applied to the regular button:

```auto
on (release) {
    if(this.radio1.selected==true) {
        getURL("http://www.mydomain.com/option1.html", "_self");
    }
    else if(this.radio2.selected==true) {
        getURL("http://www.mydomain.com/option2.html", "_self");
    }
    else if(this.radio3.selected==true) {
        getURL("http://www.mydomain.com/option3.htmll", "_self");
    }
    else if(this.radio4.selected==true) {
        getURL("http://www.mydomain.com/option4.html", "_self");
    }
}

```

This is the error message:

> **Error** Symbol=Standard\_mc, layer=Layer 1, frame=1:Line 8: ‘)’ expected  
> else if(this.radio3.selected==true) {

**Error** Symbol=Standard\_mc, layer=Layer 1, frame=1:Line 9: Statement must appear within on handler  
getURL(“[http://www.mydomain.com/option3.html](http://www.mydomain.com/option3.html)”, “\_self”);

**Error** Symbol=Standard\_mc, layer=Layer 1, frame=1:Line 10: Unexpected ‘}’ encountered  
}  
I’m assuming it’s something to do with the fact that radio buttons are Boolean, as when I remove the last 2 ‘else if’ statements, it works for the first 2 radio buttons.

Any help greatly appreciated.
