[?] Avoid problems with code execution of a button?

I want to execute the function moverIntXx within the button and nothing happen. If I execute the function outside the button, the function runs fine. What is that I don’ t understand? Thanks.

SetAttributes[moverIntXx,HoldFirst];
moverIntXx[var_,n_]:=Module[{t},
t=Flatten[Table[{1,2,3},{i,1,n}]];
Map[(Pause[0.05];FinishDynamic[];var=#)&,t];
];
Dynamic[var]
Button[
	Style[Tooltip["Clic"], Red,FontFamily->"Palatino",18],
	moverIntXx[var,6],Appearance->"Frameless"]

Adding option Method → “Queued” to the button helps.

For such small amount of code, please also include the code in the post in the future, as we did for you now. This imporves post readability. How to proper format code is explained in the rules: http://wolfr.am/READ-1ST

Thank you Gustavo, it works.