This content has been marked as final. Show 7 replies
What I meant was not the handler the whoIsSelected parameter.
I dont know how a value is passed to that.
any help would be appreciated
When you click on a button which has the behavior attached to it, this command is executed:
call(#GroupSelect, myGroupList, me)
In plain English, the on GroupSelect() handler is triggered on each of the sprites in the given radio button group, and a pointer (me) to the behavior which sent the #GroupSelect event is passed as a parameter.
It looks as if you might want to set the selected radio button using Lingo rather than by having the user click on the button. If slightly modified your code so that the selected sprite is identified by its spriteNum rather than by a pointer to a behavior. With this revised code, you can use...
sendAllSprites(#GroupSelect, <integer spriteNum>, <symbol groupID>)
... to select the radio button with the given spriteNum that is part of the group with the given groupID.
thanx for the help.
the script doesnt give any errors but it does not work either.
I can click all three radio butons and all of them are highlighted.
I must be doing something wrong.
Are all three behavior instances set to use the same groupID? If you provide each with a different groupID in the Behavior Parameters dialog, each will act as a group of its own.
Are you using "classic" radio buttons or the "default" (Flash component) radio buttons?
Are you using a separate classic radio button member for each sprite?
its the flash button from the tool bar (MX)
I have tried using separate members and instances of one member
I have same groupID.
It just wouldnt unchek the rest of the buttons.
thanx again for your help
The behavior that you were using, and that I modified, is designed for "classic" radio buttons. It will not work with Flash Component buttons. You have three possible solutions:
1) Find out how to use the Flash Component buttons (something that I can't help you with)
2) Use classic radio buttons and the behavior I modified
3) Use your own custom bitmap members and the Radio Buttons behavior that you can find on my site.
Your behaviour should work with Flash radio button components - but you might need to check the eventpassmode property of the Flash component (hilight the member or sprite, click on the 'Flash component tab" in the property inspector, and down the bottom check that 'eventpassmode' is set to 'passAlways')