dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] Listener Objects and CheckBoxes

Hybrid View

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    10

    [F8] Listener Objects and CheckBoxes

    I'm writing a script that will create a series of checkboxes at runtime, and I'm trying to figure out the best way to handle the click events. Given that there might be quite a few checkboxes (maybe 20), should I create a separate Listener Object for each checkbox, or just one for all of them?

  2. #2
    Flash Filosopher
    Join Date
    Apr 2006
    Location
    Washington
    Posts
    68
    Generally from a programming perspective, I'd say handle as much 'repetitive code' as you can in one place. Do you know of any actions for sure that all checkboxes need to do? If so, you can probably put that logic in one specific function.

    Are there other, checkbox-specific behaviors that need to be done as well? Maybe have the common code function call these specific functions by passing a variable into the common function. It really all comes down to how much individual, checkbox-specific code there will be.

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