tags:

views:

23

answers:

1

In actionscript, when I click a button I would like the label to replace from "add to list" to "added" without override with super method.

Is this even possible to change label in repeater?

A: 

You shouldn't have to override with a super method, though this is a decent way to do it. I would have the logic work something like this:

  • write a custom component that contains the button.
  • put the button in the repeater
  • on button click, tell the array to add an item to it, and listen for "itemAdded" on the arrayCollection class.
  • when you hear "itemAdded" inside the button container class, check to see if it is the item you added. If so, change your button's label to "Added" through button.label = "Added".

I think this should work just fine - best of luck.

RJ Owen