Could someone PLEASE point out what I'm doing wrong in the following?
I want to bind a numeric stepper to a certain size and have it changed
live; I'm trying to change the scale of these buttons to the numeric
steppers; here's a test:
-------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%" horizontalScrollPolicy="off"
verticalScrollPolicy="off" >
<mx:Repeater id="rep" dataProvider="{objs}">
<mx:Button x="{Number(rep.currentItem.x)}"
y="{Number(rep.currentItem.y)}"
width="{(Number(rep.currentItem.percent)*defaultSize)}"
height="{(Number(rep.currentItem.percent)*defaultSize)}"
styleName="{String(rep.currentItem.type)}"
label="{String(rep.currentItem.type).toUpperCase()}"
toolTip="{'At the moment '+ String(rep.currentItem.type)+' is
'+rep.currentItem.percent+'% of my life at the moment'}" />
</mx:Repeater >
<mx:NumericStepper id="tmp"
change="{objs.getItemAt(0).percent=tmp.value}"
value="{objs[0].percent}" maximum="100" />
<mx:Script>
<![CDATA[
import mx.controls.Button;
import mx.core.BitmapAsset;
import mx.managers.DragManager;
import mx.core.DragSource;
import mx.events.DragEvent;
import flash.events.MouseEvent;
import mx.effects.easing.*;
import mx.binding.utils.BindingUtils;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.utils.ObjectUtil;
import mx.core.Application;
private var offX:Number;
private var offY:Number;
[Bindable]
public var objs:Array = new Array({x:30, y:22, percent:20,
type:"community"},{x:90, y:22, percent:25, type:"work"},{x:110, y:72,
percent:45, type:"self"},{x:70, y:120, percent:15, type:"faily"});
[Bindable]
private var defaultSize:Number = new Number(6);
]]>
</mx:Script>
</mx:Application>