Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use radio buttons 1

Status
Not open for further replies.

anyideas

Programmer
May 2, 2002
127
GB
Hello,

I have a list of 3 dates, each of which shoud be associated to a radio button, therefore only one radio button should ever be clicked.

How do you do this in director 8.5?

I've tried using the following code to determine if a checkbox was clicked and it returned "sprite 119" - the sprite number.

on mouseUp me
val = sprite(me.spritenum).value
alert string(val)
end

Thanks in advance for the help!!
 
Let's assume you have 3 radio buttons (Director built-in radio buttons for the sake of ease) placed in Sprite 119, 120 and 121.

Attach following script to each buttons to get basic radio button behavior working.
Code:
--
on beginSprite me
  repeat with i = 119 to 121
    sprite(i).member.hilite = 0
  end repeat
end beginSprite

on mouseUp me
  repeat with i = 119 to 121
    if i <> me.spriteNum then
      sprite(i).member.hilite = 0
    end if
  end repeat
  sprite(me.spriteNum).member.hilite = 1
end mouseUp
--
 
Hey kennethkawamoto

thanks very much... work perfect.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top