# Radio button - control timeline

**URL:** <https://forum.kirupa.com/t/radio-button-control-timeline/216076>\
**Category:** Uncategorized\
**Created:** [February 13, 2007, 4:17pm UTC](https://forum.kirupa.com/t/radio-button-control-timeline/216076 "2007-02-13T16:17:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yabai](https://avatars.discourse-cdn.com/v4/letter/y/958977/32.png) [@yabai](https://forum.kirupa.com/u/yabai)\
**Post date:** [February 13, 2007, 4:17pm UTC](https://forum.kirupa.com/t/radio-button-control-timeline/216076/1 "2007-02-13T16:17:01Z")

</div>

hi, this is driving me nuts.

i want two radio buttons on the 1st frame. if you select rbA and hit a button you go to frame label “loading” and if you select rbB and hit the button you go to frame label “sorry”.

i found this code below that says it does what I need but i just can’t get it to work. i have attached a fla to how how i am failing but if anyone can work it out or has a different idea i would love to know. thanks.

stop();

rbA.setLabel(“test”);  
rbA.setData(2);

rbB.setLabel(“test2”);  
rbB.setData(3);

rbA.setChangeHandler(“goto”);  
rbB.setChangeHandler(“goto”);

goto = function(comp){  
frame = comp.getData();  
trace(frame);  
a\_btn.onRelease = function(){  
gotoAndStop(frame);  
}  
};
