./mech_wipe.lua

  1. Mech_wipe_doc_handle = -1 
  2. local Color_anim_h = -1 
  3. local Slide_anim_h = -1 
  4. local On_anim_h = -1 
  5. local Off_anim_h = -1 
  6.  
  7.  
  8. function mech_wipe_init() 
  9. 	 
  10. 	Mech_wipe_doc_handle = vint_document_find("mech_wipe") 
  11. 	Color_anim_h 	= vint_object_find("color_anim") 
  12. 	Slide_anim_h 	= vint_object_find("slide_anim") 
  13. 	On_anim_h 	= vint_object_find("on_anim") 
  14. 	Off_anim_h 	= vint_object_find("off_anim") 
  15. 	 
  16. 	--loop color anim 
  17. 	local twn_h 	= vint_object_find("end_event_twn", Color_anim_h) 
  18. 	vint_set_property(twn_h, "end_event", "vint_anim_loop_callback") 
  19. 	 
  20. 	vint_apply_start_values(Color_anim_h) 
  21. 	vint_apply_start_values(Slide_anim_h) 
  22. 	 
  23. 	lua_play_anim(Color_anim_h) 
  24. 	 
  25. end 
  26.  
  27. function mech_wipe_on() 
  28. 	 
  29. 	lua_play_anim(Slide_anim_h) 
  30. 	lua_play_anim(On_anim_h) 
  31. 	 
  32. end 
  33.  
  34. function mech_wipe_off() 
  35. 	 
  36. 	lua_play_anim(Slide_anim_h) 
  37. 	lua_play_anim(Off_anim_h) 
  38. 	 
  39. end 
  40.  
  41. function mech_wipe_cleanup() 
  42. 	if Color_anim_h ~= nil then 
  43. 		vint_object_destroy(Color_anim_h) 
  44. 	end 
  45. 	if Slide_anim_h ~= nil then 
  46. 		vint_object_destroy(Slide_anim_h) 
  47. 	end 
  48. 	if On_anim_h ~= nil then 
  49. 		vint_object_destroy(On_anim_h) 
  50. 	end 
  51. 	if Off_anim_h ~= nil then 
  52. 		vint_object_destroy(Off_anim_h) 
  53. 	end 
  54. end 
  55.  
  56.  
  57.  
  58.  
  59.