SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ActionScript 3.0 Newbie

    Hello All, I have only recently started learning as3. I need a little help! I am creating a form in Flash cs6. In the form im using the UI checkbox component. The component label says yes and no. I want users to tick either the yes or no box thats all!!

    I know a little bit of the code but not all. After the function boxHandler i assume you use either the "if" or "else" statement for the two possible actions. But when i tried to execute the code i got a bunch of errors.
    I be gratefull if someone can give me a example how to write the code for the checkbox. I have looked for tutorials but none of them were relevant for what i am trying to do.

    My code below:

    import fl.controls.CheckBox;

    var checkbox = new CheckBox();

    cb_box1.addEventListener(MouseEvent.CLICK, boxHandler);
    cb_box2.addEventListener(MouseEvent.CLICK, boxHandler);

    function boxHandler(event:MouseEvent):void{

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,547
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Either a yes or no tick? What you need is a the RadioButton not the CheckBox


Bookmarks

Posting Permissions

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