ugh, my bad, It should be
Here is how I understand this:
There are 5 groups of buttons, for each of them I'd need a separate function like group1 group2 (...), and then make a Tweening with graph.bar1 { _height:group1value1+group2value1+group3value1} ?
import com.greensock.*;
function group1(graph, value1, value2, value3)
{
TweenLite.to(graph.bar1, .5, {_height:value1});
TweenLite.to(graph.bar2, .5, {_height:value2});
TweenLite.to(graph.bar3, .5, {_height:value3});
}
function group2(graph, value1, value2, value3)
{
TweenLite.to(graph.bar1, .5, {_height:value1});
TweenLite.to(graph.bar2, .5, {_height:value2});
TweenLite.to(graph.bar3, .5, {_height:value3});
}
button1.onRelease = function(){
group1(calciumDeposits, 80, 90, 30);
}
button1b.onRelease = function(){
group1(calciumDeposits, 45, 20, 5);
}
button2.onRelease = function(){
group2(calciumDeposits, 10, 20, 30);
}
button2b.onRelease = function(){
group2(calciumDeposits, 10, 80, 20);
}
It's just that, I need all the buttons to react to the same graph. It's like having a group of processors, group of graphic cards, a group of memory cards etc., and then a graph that would ilustrate how the Performance, Power Consumption etc. changes upon changing any of the components.
in this case button1 could be intel's i7, button 1b - intel's i5, values are put manually using, group1(calciumDeposits, 80, 90, 30);, clicking on one of them changes only the group1value1, respecting the group2value1
thank you for your time
edit: another solution could be a dynamic variable probably?
var Bar1TotalWidth:Number = group1.value1+group2.value1;
and put the Bar1TotalWidth instead of value1
TweenLite.to(graph.bar1, .5, {_height:Bar1TotalWidth});