Possible Duplicate:
How to execute a function each time the slider is dragged?
This is my code:
v = {{1, 2, 4, 3, 6}, {9, 10, 40, 30, 20}, {20, 60, 17, 10, 18}, {50,
60, 20, 29, 10}, {100, 20, 10, 50, 54}};
q = {0.9, 1.0, 1.1, 1.2, 1.3, 1.2, 1};
f[{{xmin_, xmax_}, {ymin_, ymax_}}, ___] :=
Rectangle[{xmin, ymin}, {q[[e]] xmax, ymax}];
function[]= Dynamic[
Animator[Dynamic[e], {1, 7, 1}, 10, AppearanceElements -> False,
AnimationRepetitions -> r]]
Column[{Slider[Dynamic[y], {1, 5, 1}],
Dynamic@BarChart[v[[y]], BarOrigin -> Left,
ChartElementFunction -> f,
PlotRange -> {{0, Max[v[[y]]]*1.3}, {0, Length[v[[y]]] + 0.5}},
Axes -> False]}]
function is being called at random times and transitional effect occurs. but i want function to be called everytime slider is dragged.