A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: radiobutton function/array in as3

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    2

    radiobutton function/array in as3

    I'm new to this forum and hopefully posting in the right place. I am new to flash, new to actionscript and have no clue how to get this to work. I need to create a list of radio buttons, which I have, they are all labeled and named. I want to be able to select a radio button and display a set of text. Each radio button has a list of classes (school classes) that needs to display. Can someone help me with this? I believe I have to create an array of some sorts but that's where I'm stuck. Here is what I have so far:

    import fl.controls.RadioButtonGroup;
    import flash.events.MouseEvent;

    //my first group for selection
    var group1:RadioButtonGroup = new RadioButtonGroup ("Group1");

    //add to my var group1
    gaming_1.group = group1;
    reproduction_1.group = group1;
    informatics_1.group = group1;
    mass_1.group = group1;
    modeling_1.group = group1;
    graphic_1.group = group1;
    physical_1.group = group1;
    industrial_1.group = group1;
    multimedia_1.group = group1;
    web_1.group = group1;
    film_1.group = group1;
    applied_1.group = group1;

    //labels for my group1
    gaming_1.label = "Gaming";
    reproduction_1.label = "Reproduction Technology";
    informatics_1.label = "Infomatics";
    mass_1.label = "Mass Communication";
    modeling_1.label = "Modeling and Animation";
    graphic_1.label = "Graphic Design";
    physical_1.label = "Physical Geography";
    industrial_1.label = "Industrial Design";
    multimedia_1.label = "Multimedia Writing and Technical Communication";
    web_1.label = "Web Development";
    film_1.label = "Film and Media Studies";
    applied_1.label = "Applied Physchology";

    //mouse click event listener for the radio buttons
    submit.addEventListener(MouseEvent.CLICK, showResult);


    I know it's not much, but that's all I know. It's for a class that I really have found to be way out of my reach soooo, any help is much appreciated. Please note, there will be two groups, this is just group one but both groups will be doing the same actions so if I can get one going, I'm sure I can get the second part going. Thanks!

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    I'm trying to understand exactly what you are trying to achieve. I understand you have a list of classes and I think you want an radio button for each, but that is where my understanding ends. Can you explain a little clearer?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center