I'm having a problem with mathematica dynamic function.

I am trying to do this:

Dynamic[Refresh[randint = RandomInteger[x, {y, y}], UpdateInterval -> 0.1]]

This generates random integers in a matrix and I'm using the results to plot this matrix on a matrixplot or arrayplot, the problem happens when I try to supress it's output with ";".

The arrayplot/matrixplot simply stop working for unknown reasons. The matrix/array is ploted, but it's static.

When it's output is supressed and I callrandint, I get a static output instead of a dynamic output.

__

I tried to invert therandintthis way:

randint = Dynamic[Refresh[RandomInteger[x, {y, y}], UpdateInterval -> 0.1]]

And with this, I get other error:

"ArrayPlot::mat: "Argument {{2,1},{2,0}} at position 1 is not a list of lists."

This way seems to work. When it's output is supressed with ";" and I call randint, its output continue being evaluated, but the matrixplot/arrayplot does not accept it's output, why?