Hi,
I'm trying to make a button grow out and in a bit. I see how to use the enterFrame event to do it, but the alignment is taken from the top left of the button object.
Is there a way to set an objects reference point to say the center so it will scale in and out correctly?
Thanks
-- onEnterFrame
local scale = 1;
local function onEnterFrame ()
-- Make play button grow
scale = scale + .05;
playButton:setScaleY(scale);
playButton:setScaleX(scale);
end
stage:addEventListener(Event.ENTER_FRAME, onEnterFrame);
Comments
For info - setAnchorPoint(0,0) is top left and setAnchorPoint(1,1) is bottom right