gre.animation add step

gre.animation_add_step(id, data)

Add a step to a created animation. The id must be from a call to gre.animation_create. The data parameter defines the animation step values.

Parameters: id The animation id data A table of animation step values which can include: key: The data key for the animation step to act upon rate: The animation rate string: [linear | easein | easeout | easeinout | bounce] duration: The length of the step (msec) offset: The offset from animation start where this step begins (msec) from: The value to start the animation at, if not specified the value is the current value of "key" to: The end point for the animation delta: The delta for the end of the animation from the start point. If both "to" and "delta" are given then the "to" value is used. Example:

function create_animation(mapargs)
    local data = {}

    -- slide the x position 400 pixels over 2000 msec and auto-destroy
    -- it on completion
    id  = gre.animation_create(60, 1)
    data["rate"] = "linear"
    data["duration"] = 2000
    data["offset"] = 0
    data["delta"] = 400
    data["key"] = "mylayer.mycontrol.grd_x"
    gre.animation_add_step(id, data)
Was this article helpful?
0 out of 0 found this helpful