# Checkbox component help

**URL:** <https://forum.kirupa.com/t/checkbox-component-help/204598>\
**Category:** Uncategorized\
**Created:** [October 21, 2006, 9:05am UTC](https://forum.kirupa.com/t/checkbox-component-help/204598 "2006-10-21T09:05:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)\
**Post date:** [October 21, 2006, 9:05am UTC](https://forum.kirupa.com/t/checkbox-component-help/204598/1 "2006-10-21T09:05:57Z")

</div>

hey all,

when i click on my checkbox component it selects but i am unable to deselect when clicked again for some reason??  
this is the code i have relating to it it may have something to do with it? here is the code:

```auto
var agreement:Object = new Object();
agreement.click = function(oEvent:Object):Void {
    if(oEvent.target.selected = true) {
        trace("user agrees to the capture of their information");
    } else if(oEvent.target.selected = false){
        trace("user disagrees with the capture of their information");
    }
};

agreement_terms.addEventListener("click", agreement);

```

cheers in advance peeps 🙂
