relative position of a target within a group
mdswindell at cruzio.com
Fri Feb 19 20:24:20 CST 2010
Jaqueline, Scott, and Craig,
As always humbled and appreciative of the quick and everclever help Both this and Scott's method work perfectly out of the chute. Craig, your method returns the same result as just using "the target" does. You're putting the number of the target (relative to the card, let's say "3") and comparing it to a number in the "number of buttons in group yourGroup." When the iteration finds it's match (3) it answers "you picked button 3." With some tweaking and finding the difference the number of the target and the number of button 1 of me (the group) and then factoring that into the equation it should work, as well.
On Feb 19, 2010, at 3:22 PM, J. Landman Gay wrote:
> Mark Swindell wrote:
>> How does one get the relative position of a button within a group of buttons?
>> I want to put the (relative to group myGroup) number of the target into vMyVar One can say select button 3 of group myGroup
>> without problem. But how would one best do this using the target function?
> A little cheat:
> on mouseUp
> set the hilite of the target to true
> get the hilitedbutton of me
> set the hilite of the target to false
> end mouseUp
> Put it into the group script. If your buttons are radio buttons (i.e., they don't change hilite) then all you need to do is get the hilitedbutton.
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode