Mech_wipe_doc_handle = -1
local Color_anim_h = -1
local Slide_anim_h = -1
local On_anim_h = -1
local Off_anim_h = -1
function mech_wipe_init()
Mech_wipe_doc_handle = vint_document_find("mech_wipe")
Color_anim_h = vint_object_find("color_anim")
Slide_anim_h = vint_object_find("slide_anim")
On_anim_h = vint_object_find("on_anim")
Off_anim_h = vint_object_find("off_anim")
--loop color anim
local twn_h = vint_object_find("end_event_twn", Color_anim_h)
vint_set_property(twn_h, "end_event", "vint_anim_loop_callback")
vint_apply_start_values(Color_anim_h)
vint_apply_start_values(Slide_anim_h)
lua_play_anim(Color_anim_h)
end
function mech_wipe_on()
lua_play_anim(Slide_anim_h)
lua_play_anim(On_anim_h)
end
function mech_wipe_off()
lua_play_anim(Slide_anim_h)
lua_play_anim(Off_anim_h)
end
function mech_wipe_cleanup()
if Color_anim_h ~= nil then
vint_object_destroy(Color_anim_h)
end
if Slide_anim_h ~= nil then
vint_object_destroy(Slide_anim_h)
end
if On_anim_h ~= nil then
vint_object_destroy(On_anim_h)
end
if Off_anim_h ~= nil then
vint_object_destroy(Off_anim_h)
end
end