0 Replies Latest reply on Jan 18, 2007 8:11 AM by BaileyBurger

    NumericStepper and Repeater

    BaileyBurger Level 1

      I'm working on an app that allows users to rate an item listed via a repeater on a scale from 1 to 5. I'm having a hard time getting the value from the numericstepper, and first hope that someone can correct the code below which is not returning a value.

      While the numericstepper will be functional, its not an ideal interface. I'm not comfortable with capturing the click event as this would fire on every iteration of the steppers values, and I do not want a submit button. I'd like to have a graphical interface that would display 5 stars, and the user would simply click on one of the stars to submit their rating. If they click on the 3rd star, stars one thru three would "light up", indicating their selection. I'm not sure how I would go about doing that, so any ideas would be greatly appreciated.

      private function RecordRanking(RANKING:String):void {

      <mx:Repeater id="ItemRpt" dataProvider="{xmlItems.lastResult.ITEM}">
      <mx:NumericStepper id="RatingNS" minimum="0" maximum="5" stepSize="1" data="{ItemRpt.currentItem}" click="RecordRanking(event.currentTarget.getRepeaterItem().RatingNS);" value="{ItemRpt.currentItem.RANKING}"/>