Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
using Gtween with anchor points. — Gideros Forum

using Gtween with anchor points.

unclekinguncleking Member
edited March 2014 in Bugs and issues
Hi, I am trying to tween a anchor point along with rotation using gtween. I am using the GiderosCodingEasy Library

here is my code.
-- start code
local angle = 15;

local star = Bitmap.new(Texture.new("star.png"))
star:setPosition(500, 280)
star:setAnchorPoint(0.5, 0.5) -- start with center of the image.
star:setRotation(angle)
stage:addChild(star)


local animate = {};
animate.rotation = 360 + angle

local properties = {};
properties.delay = 1;
properties.dispatchEvents = false

-- tried this doesn't work
-- animate._anchorX = 2.0
-- animate._anchorY = 2.0

animate.anchorX = 2.0
animate.anchorY = 2.0


local properties = {};
properties.delay = 0;
properties.dispatchEvents = false


local gtweener = GTween.new(star, 5, animate, properties)
-- end code.


The error i am getting is
GiderosCodingEasy/GiderosCodingEasy.lua:347: Parameter 'param' must be one of the accepted values.
stack traceback:
GiderosCodingEasy/GiderosCodingEasy.lua:347: in function 'get'
GiderosCodingEasy/gtween.lua:385: in function 'init2'
GiderosCodingEasy/gtween.lua:212: in function 'setPosition'
GiderosCodingEasy/gtween.lua:81: in function

Any ideas what i am doing wrong ?

-Uncleking

Comments

Sign In or Register to comment.