local createCompositionbg = nil
---------------------------------------------------------------------------------------
local PREFIX_PATH = "data/Texture/Scenes/09_doctor/main/anim/doors/"
---------------------------------------------------------------------------------------
function Loader_09_Doors_Animations(parent)
	return CreateAnimationLoadingRoutine(parent, PREFIX_PATH,
		{
            CreateCompositionLoader(createCompositionbg,		                'doors',		        0,0, 0, 512,384, false),
		},
		{
			function (element, textureName)
			end,
		});
end
---------------------------------------------------------------------------------------
createCompositionbg = function()
	local compositionbg = CreateCompositionSequence()
	local compositionDuration = 1.375
	compositionbg:SetDuration(compositionDuration)
 
	local element
	local effector
 
	-- Layer Layer_1
	element = CreateCompositionElement(PREFIX_PATH.."layer_elephant.png")
	element:SetName("Layer_1")
	compositionbg:AddElement(element)
	element:SetHotSpot(9, 6.5)
	compositionbg:RegisterParentInfo("Layer_1", "Layer_3")
	element:SetXY(46.75, 55.5)
 
 
	effector = element:GetEffector()
	effector:SetLifeTime(0, 1.375)
	effector:Play()
 
 
	-- Layer Layer_2
	element = CreateCompositionElement(PREFIX_PATH.."layer_note.png")
	element:SetName("Layer_2")
	compositionbg:AddElement(element)
	element:SetHotSpot(25.5, 19.5)
	compositionbg:RegisterParentInfo("Layer_2", "Layer_4")
	element:SetXY(14.5, 11.5)
 
 
	effector = element:GetEffector()
	effector:SetLifeTime(0, 1.375)
	effector:Play()
 
 
	-- Layer Layer_3
	element = CreateCompositionElement(PREFIX_PATH.."layer_door_right.png")
	element:SetName("Layer_3")
	compositionbg:AddElement(element)
	element:SetHotSpot(72, 47.5)
	element:SetParentElement(compositionbg)
	element:SetXY(648, 541.5)
 
 
	effector = element:GetEffector()
	effector:SetLifeTime(0, 1.375)
	effector:SetKey(_TRACK_SX, 0, 1)
	effector:SetKey(_TRACK_SY, 0, 1)
	effector:SetKey(_TRACK_SX, 0.08333333333333, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.08333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.16666666666667, 1)
	effector:SetKey(_TRACK_SY, 0.16666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.25, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.25, 1)
	effector:SetKey(_TRACK_SX, 0.33333333333333, 1)
	effector:SetKey(_TRACK_SY, 0.33333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.41666666666667, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.41666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.5, 1)
	effector:SetKey(_TRACK_SY, 0.5, 1)
	effector:SetKey(_TRACK_SX, 0.58333333333333, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.58333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.66666666666667, 1)
	effector:SetKey(_TRACK_SY, 0.66666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.75, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.75, 1)
	effector:SetKey(_TRACK_SX, 0.83333333333333, 1)
	effector:SetKey(_TRACK_SY, 0.83333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.91666666666667, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 0.91666666666667, 1)
	effector:SetKey(_TRACK_SX, 1, 1)
	effector:SetKey(_TRACK_SY, 1, 1)
	effector:SetKey(_TRACK_SX, 1.08333333333333, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 1.08333333333333, 1)
	effector:SetKey(_TRACK_SX, 1.16666666666667, 1)
	effector:SetKey(_TRACK_SY, 1.16666666666667, 1)
	effector:SetKey(_TRACK_SX, 1.25, 0.97222222222222)
	effector:SetKey(_TRACK_SY, 1.25, 1)
	effector:SetKey(_TRACK_SX, 1.33333333333333, 1)
	effector:SetKey(_TRACK_SY, 1.33333333333333, 1)
	effector:Play()
 
 
	-- Layer Layer_4
	element = CreateCompositionElement(PREFIX_PATH.."layer_door_left.png")
	element:SetName("Layer_4")
	compositionbg:AddElement(element)
	element:SetHotSpot(3.5, 37)
	element:SetParentElement(compositionbg)
	element:SetXY(554.5, 525)
 
 
	effector = element:GetEffector()
	effector:SetLifeTime(0, 1.375)
	effector:SetKey(_TRACK_SX, 0, 1)
	effector:SetKey(_TRACK_SY, 0, 1)
	effector:SetKey(_TRACK_SX, 0.08333333333333, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.08333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.16666666666667, 1)
	effector:SetKey(_TRACK_SY, 0.16666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.25, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.25, 1)
	effector:SetKey(_TRACK_SX, 0.33333333333333, 1)
	effector:SetKey(_TRACK_SY, 0.33333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.41666666666667, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.41666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.5, 1)
	effector:SetKey(_TRACK_SY, 0.5, 1)
	effector:SetKey(_TRACK_SX, 0.58333333333333, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.58333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.66666666666667, 1)
	effector:SetKey(_TRACK_SY, 0.66666666666667, 1)
	effector:SetKey(_TRACK_SX, 0.75, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.75, 1)
	effector:SetKey(_TRACK_SX, 0.83333333333333, 1)
	effector:SetKey(_TRACK_SY, 0.83333333333333, 1)
	effector:SetKey(_TRACK_SX, 0.91666666666667, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 0.91666666666667, 1)
	effector:SetKey(_TRACK_SX, 1, 1)
	effector:SetKey(_TRACK_SY, 1, 1)
	effector:SetKey(_TRACK_SX, 1.08333333333333, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 1.08333333333333, 1)
	effector:SetKey(_TRACK_SX, 1.16666666666667, 1)
	effector:SetKey(_TRACK_SY, 1.16666666666667, 1)
	effector:SetKey(_TRACK_SX, 1.25, 0.91764705882353)
	effector:SetKey(_TRACK_SY, 1.25, 1)
	effector:SetKey(_TRACK_SX, 1.33333333333333, 1)
	effector:SetKey(_TRACK_SY, 1.33333333333333, 1)
	effector:Play()
 
	compositionbg:Play()
 
	return compositionbg
end
 
