Dynamic bar graph from input text field

Hello!

I am trying to make a bar graph that tweens to the height, or decrease, according to the number defined in the Dynamic text box. I would like to use the tween class from MX for a nice bounce effect. Here is my code:

import mx.transitions.Tween;
import mx.transitions.easing.*;

ICcost._height = Number(ICC1);

new Tween(ICcost, “_yscale”, Elastic.easeOut, 0, ICC1, 2, true);

ICC1 is the dynamic text field that displays a number from a formula through a couple input boxes. ICcost is the name of the MC I want tweened.

As I have it now it doesnt tween, the height just goes to the ICC1 number which is ok for now. Is there a way to set the tween to happen when flash registers a change in the number? I am fairly comfortable with AS2 and I know there is a way I just don’t know exactly what I am looking for. Any help or suggestions would be great!

erm i think numbers in a variable name isn’t good

plus the = Number(ICC1) doesn’t bode well

you aint given much code so I can’t see what is going wrong

Thank you for your input, I changed the names of the variables. The problem is I want to know how to tween the height = to the ICC dynamic field using the tween class or any other way. Here is my updated code:


import mx.transitions.Tween;
import mx.transitions.easing.*;
 
ICcost._height = ICC; //ICC is var name of the dynamic field
 
new Tween(ICcost, "_yscale", Bounce.easeOut, 0, ICC, 2, true); //sample tween code that doesnt work properly yet

I think I need a variable that will tell flash that when theres a change in ICC to tween the height to the new specified number. Maybe an If/then statement?

Again any suggestions are welcome and appreciated!