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:
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”, “_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.