Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Ripple Follow Sprite-Alphamania
Removing the stage border
CD Door Close, Open - MCI
All Purpose Status Bar
Move Window [ stage or MIAW ]
Print a file with associated program
Shadow Maker
Select It
Clock Hands Behavior
DirSaver
 

 

 

Behavior Simple Radio Button Group

Added on 6/24/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: MediaMacros (website)

Use to have all other buttons turn off when a radio button is turned on.

--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know.  :-)

property defaultState, spriteNum, myGroup

on getPropertyDescriptionList me
  p_list = [:]
  addProp p_list, #defaultState, [#format : #boolean, #comment : "Default State:", #default : false]
  addProp p_list, #myGroup, [#format : #integer, #comment : "Default Group:", #default : 1]
  return p_list
end

on beginSprite me
  set the hilite of member the member of sprite spriteNum = defaultState

end

on mouseUp me
  set myState =  the hilite of member the member of sprite spriteNum
  if myState = true then
    sendAllSprites(#checkState, spriteNum, myGroup)
  end if
end

on checkState me, whatSprite, whatGroup
  if whatSprite <> spriteNum and whatGroup = myGroup then
    set the hilite of member the member of sprite spriteNum = false
  end if
end

on getBehaviorDescription me
  return "Drop this on your radio buttons and make all the ones in the same set have the same group number."
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail