These docs are *very* out of date.
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
object.yScale
Description:
Retrieve or change the scale of the object in the y-direction.
The scaling occurs around the object's reference point. The default reference point for most Display Objects is center.
Syntax:
local var = object.yScale object.yScale = value
Example:

display.setStatusBar( display.HiddenStatusBar ) local rect1 = display.newRect(25, 75, 50, 50) rect1:setFillColor(170, 170, 170) local rect2 = display.newRect(125, 75, 50, 50) rect2:setFillColor(255, 255, 255) rect2.yScale = 2 -- change the Y scale 200%
Returns:
number: The Y scale value for the object.
Remarks:
Value examples: 1.0 is 100%. 0.5 is 50%.
The X scale and Y scale value can also be set by object:scale() API.
Note: When a Display Object is converted into a physics object, scaling the Display Object will change the physical size but NOT affect the physics view of he object. This could result in unpredictable results when interacting with other physics bodies.
Supported on operating systems and platforms for build numbers shown:
- Mac OS X:Corona SDK 1.0
- Windows:Corona SDK 2.0
- iOS:Corona SDK 1.0
- Android:Corona SDK 2.0