Is there the way for Zoom in and Zoom out a display obj ?

I have try use : obj:scale(x,y) or obj.height , obj.width. But Problem is when I do  Zoom - in and Zoom - out many time. obj growing up.???

I’m not sure I understand your question. What do you mean “obj growing up”? If you want to zoom in, then surely you want the object to “grow up”.

Here’s how the 2 scaling methods work.

obj:scale() is relative. So if you call 

obj:scale(0.9, 0.9)

 3 times in a row, the first time the object would have a scale of 0.9, then 0.81, then 0.72 and so on.

If you want to set an absolute scale then use:

obj.xScale = 0.9 obj.yScale = 0.9

This fixes the scale to a scale that you specify.

Don’t forget that if you want to zoom in on a whole level, it is much more efficient to scale the display groups rather than the individual objects.

Thanks.your rely that all I need.

I’m not sure I understand your question. What do you mean “obj growing up”? If you want to zoom in, then surely you want the object to “grow up”.

Here’s how the 2 scaling methods work.

obj:scale() is relative. So if you call 

obj:scale(0.9, 0.9)

 3 times in a row, the first time the object would have a scale of 0.9, then 0.81, then 0.72 and so on.

If you want to set an absolute scale then use:

obj.xScale = 0.9 obj.yScale = 0.9

This fixes the scale to a scale that you specify.

Don’t forget that if you want to zoom in on a whole level, it is much more efficient to scale the display groups rather than the individual objects.

Thanks.your rely that all I need.