- code to attach buttons:
Expand|Select|Wrap|Line Numbers
- for (var i:Number = 0; i<colourNames.length; i++) {
- this.attachMovie("RadioButton", "lineColour"+i, this.getNextHighestDepth());
- this["lineColour"+i].setLabel(colourNames[i]);
- this["lineColour"+i].setData(colourValues[i]);
- this["lineColour"+i].setGroupName("lineColour");
- this["lineColour"+i]._visible = true;
- }
Expand|Select|Wrap|Line Numbers
- second_FormBut.onRelease = function() {
- if (lineColour.getValue() == undefined || fillColour.getValue() == undefined) {
- trace("You need to select both a fill and a line colour");
- } else {
- for (var i:Number = 0; i<colourNames.length; i++) {
- this["lineColour"+i].visible = false;
- }
- }
- };
- }
Any help much appreciated, many thanks. Michael