Home
HomeFlexible, Lightweight and Truly Skinnable Flash ComponentsPHPObject and other Flash ExtensionsForumsBlog JournalLinks
Buy Flash Components
  GhostWire Components - Flash Components for RIAs

redhand GhostWire RadioButton - Actionscript API




GWRadioButton
Example
// The following will dynamically attach a RadioButton
// onto the stage during run time

_root.attachMovie("GWRadioButton","myRadioButton",1,{
groupName:"radioGroup",
data:"I have read the instructions",
selected:true,
width:100
});


// Note that the width (and height) properties set the hitArea dimensions.


GWRadioButton.getSize()
Parameters
none

Returns
An object containing the width and height properties of the hitArea of the RadioButton, in pixels.

Description
Method; gets the width and height of the hitArea of the RadioButton, in pixels.



GWRadioButton.setSize(width, height)
Parameters
width An integer specifying the width of the hitArea of the RadioButton, in pixels.
height An integer specifying the height of the hitArea of the RadioButton, in pixels.

Returns
Nothing.

Description
Method; sets the width and height of the hitArea of the RadioButton at runtime. Calling this method overrides any sizing applied during authoring.


GWRadioButton.getData()
Parameters
none

Returns
A string specifying the data represented by the radiobutton.

Description
Method; gets the data of the radiobutton. If you want to get the data of the radiogroup (of the radiobutton selected), you should use the getValue() method of the radio group instead - GWRadioGroup.getData().


GWRadioButton.setData(data)
Parameters
data A string specifying the data to assign to the radiobutton.

Returns
Nothing.

Description
Method; sets the data of the radiobutton.


GWRadioButton.getGroupName()
Parameters
none

Returns
A string specifying the name of the group the radiobutton belongs to.

Description
Method; gets the group name of the radiobutton.


GWRadioButton.setGroupName(name)
Parameters
name A string specifying the name of the group to assign the radiobutton to.

Returns
Nothing.

Description
Method; sets the group of the radiobutton. This will effectively adds the radiobutton to an existing instance of the RadioButtonGroup, or if not existing, will instantiate a new RadioButtonGroup.


GWRadioButton.getState()
Parameters
none

Returns
A boolean value specifying the selected/unselected (true/false) state of the radiobutton.

Description
Method; gets the selected/unselected state (true/false) of the radiobutton.


GWRadioButton.setState(flag)
Parameters
flag A boolean value specifying the selected/unselected (true/false) state of the radiobutton.

Returns
Nothing.

Description
Method; sets the selected/unselected state (true/false) of the radiobutton.


GWRadioButton.getEnabled()
Parameters
none

Returns
A boolean value specifying whether the RadioButton is on/off.

Description
Method; gets the current status (enabled/disabled) of the radiobutton.


GWRadioButton.setEnabled(flag)
Parameters
flagA boolean value specifying whether to switch the radiobutton on/off.

Returns
Nothing.

Description
Method; specify whether the radiobutton can respond to mouse/key actions. If off, the look of the radiobutton will change to reflect this disabled state.


GWRadioButton.onSelected = function(data)
Parameters
data A string specifying the data represented by the radiobutton.

Description
Event; triggered when the radiobutton is selected. You will need to specifying a handler function for the event. The data of the radiobutton will be passed as a parameter to the function.


GWRadioButton.onUnselected = function()
Description
Event; triggered when the radiobutton is unselected. You will need to specifying a handler function for the event.


GWRadioButtonGroup.setSize(width,height)
Parameters
width An integer value specifying the width of the hitArea of each radiobutton, in pixels.
height An integer value specifying the height of the hitArea of each radiobutton, in pixels.

Returns
Nothing.

Description
Method; sets the width and height of the hitArea of every radiobutton in the group.


GWRadioButtonGroup.getValue()
Parameters
none

Returns
A string specifying the data represented by the radiobutton selected in the group.

Description
Method; gets the data of the radiobutton currently selected in the group.


GWRadioButtonGroup.setValue(data)
Parameters
data A string specifying the data to assign to the group.

Returns
Nothing.

Description
Method; sets the data of the group. The data must match one of that of the radiobuttons in the group. Effectively, this method selects the radiobutton in the group where the data matches that in the parameter passed.


GWRadioButtonGroup.setEnabled(flag)
Parameters
flag A boolean value specifying to whether to switch the whole group on/off.

Returns
Nothing.

Description
Method; switches all the radiobuttons within the group on/off.


GWRadioButtonGroup.onChanged = function(data)
Parameters
data A string specifying the data represented by the radiobutton selected.

Description
Event; triggered when the radiobutton selected in the group has changed. You will need to specifying a handler function for the event.

Flash Components
Button :: CheckBox :: CollapsibleMenu :: CollapsiblePane :: ColorPicker :: ComboBox :: ContextMenu :: DialogBox :: InputField :: ListBox :: Loader :: Menu :: SlideMenu :: NumericBox :: Panel :: ProgressBar :: RadioButton :: ScrollBar :: ScrollPane :: SlidePane :: Slider :: TabView :: TextArea :: TreeView :: Window

See also
Documentation :: FAQs :: Testimonials
 
Contact UsSite Map
Copyright © 2003-2006 GhostWire Studios