---------------------------------------------------------------------------------------
local PREFIX_PATH = "Data/Textures/Scenes/06_Town/Anim/z_gates/"
---------------------------------------------------------------------------------------
createCompositionfon = nil
createCompositiontake = nil
---------------------------------------------------------------------------------------
createCompositionfon = function()
	local compositionfon = CreateCompositionSequence()
	local compositionDuration = 8
	compositionfon:setDuration(compositionDuration)
	compositionfon:setName("compositionfon" )
	compositionfon:setBoundingBox( Rectanglef(0, 0, 640,480) )
 
	local element
	local effector
 
	-- -- Layer wb12f_[00030-00041].png/1
	-- element = CreateCompositionElement(PREFIX_PATH.."wb12f_[].png")
	-- element:setName("wb12f_[00030-00041].png/1")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(70, 69)
	-- element:setParentElement(compositionfon)
	-- element:setXY(576, 324)
 
	-- element:setScale(1.27142857142857,1.18840579710145)
	-- 				local anim = element
	-- 				anim:setAnimationSize(140,138)
	-- 				anim:setFramesCount(12)
	-- 				anim:setFPS(24)
	-- 				anim:setMode(_ANIM_FWD + _ANIM_LOOP)
	-- 				anim:play()
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer wb12f_[00030-00041].png/2
	-- element = CreateCompositionElement(PREFIX_PATH.."wb12f_[].png")
	-- element:setName("wb12f_[00030-00041].png/2")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(70, 69)
	-- element:setParentElement(compositionfon)
	-- element:setXY(576, 324)
 
	-- element:setScale(1.27142857142857,1.18840579710145)
	-- 				local anim = element
	-- 				anim:setAnimationSize(140,138)
	-- 				anim:setFramesCount(12)
	-- 				anim:setFPS(24)
	-- 				anim:setMode(_ANIM_FWD + _ANIM_LOOP)
	-- 				anim:play()
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer [1-12].png/3
	-- element = CreateCompositionElement(PREFIX_PATH.."[1-12].png")
	-- element:setName("[1-12].png/3")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(57, 50)
	-- element:setParentElement(compositionfon)
	-- element:setXY(112, 326)
 
	-- element:setScale(0.82324711694437,1.49416438607375)
	-- element:setRotationRad(0.1603754437927)
	-- 				local anim = element
	-- 				anim:setAnimationSize(114,100)
	-- 				anim:setFramesCount(12)
	-- 				anim:setFPS(24)
	-- 				anim:setMode(_ANIM_FWD + _ANIM_LOOP)
	-- 				anim:setBlend(_EBlendModeColorAdd)
	-- 				anim:play()
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer cep.png/4
	-- element = CreateCompositionElement(PREFIX_PATH.."cep.png")
	-- element:setName("cep.png/4")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(132, 140)
	-- element:setParentElement(compositionfon)
	-- element:setXY(313, 191)
 
	-- element:setScale(1.01515151515152,1.03571428571429)
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer zamok.png/5
	-- element = CreateCompositionElement(PREFIX_PATH.."zamok.png")
	-- element:setName("zamok.png/5")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(126, 64)
	-- compositionfon:registerParentInfo("zamok.png/5", "vrta7")
	-- element:setXY(332, 324)
 
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer vrta.png/6
	-- element = CreateCompositionElement(PREFIX_PATH.."vrta.png")
	-- element:setName("vrta6")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(163, 240)
	-- element:setParentElement(compositionfon)
	-- element:setXY(481, 240)
 
	-- element:setScale(-1.02453987730061,1.00416666666667)
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- -- Layer vrta.png/7
	-- element = CreateCompositionElement(PREFIX_PATH.."vrta.png")
	-- element:setName("vrta7")
	-- compositionfon:addElement(element)
	-- element:setHotSpot(163, 240)
	-- element:setParentElement(compositionfon)
	-- element:setXY(158, 240)
 
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 8)
	-- effector:play()
 
 
	-- Layer 7.png/8
	element = CreateCompositionElement(PREFIX_PATH.."7.png")
	element:setName("7.png/8")
	compositionfon:addElement(element)
	element:setHotSpot(456, 4)
	element:setParentElement(compositionfon)
	element:setXY(648, -2)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 0)
	effector:setKey(_TRACK_A, 0.28938802083333, 0.00678099230712)
	effector:setKey(_TRACK_A, 1.73636881510417, 0.07459091537836)
	effector:setKey(_TRACK_A, 2.0257568359375, 0.08137190768549)
	effector:setKey(_TRACK_A, 2.31514485677083, 0.07429608962588)
	effector:setKey(_TRACK_A, 3.68977864583333, 0.00707581805961)
	effector:setKey(_TRACK_A, 3.97916666666667, 0)
	effector:setKey(_TRACK_A, 4.2685546875, 0.00678099230712)
	effector:setKey(_TRACK_A, 5.71553548177083, 0.07459091537836)
	effector:setKey(_TRACK_A, 6.00492350260417, 0.08137190768549)
	effector:setKey(_TRACK_A, 6.2943115234375, 0.07429608962588)
	effector:setKey(_TRACK_A, 7.6689453125, 0.00707581805961)
	effector:setKey(_TRACK_A, 7.95833333333333, 0)
	effector:play()
 
 
	-- Layer 8.png/9
	element = CreateCompositionElement(PREFIX_PATH.."8.png")
	element:setName("8.png/9")
	compositionfon:addElement(element)
	element:setHotSpot(9, 9)
	element:setParentElement(compositionfon)
	element:setXY(5, 4)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 8)
	effector:setKey(_TRACK_A, 0, 0.031377271258)
	effector:setKey(_TRACK_A, 0.41886393229167, 0.02471674371812)
	effector:setKey(_TRACK_A, 1.46602376302083, -0.00858589398124)
	effector:setKey(_TRACK_A, 1.8848876953125, -0.01524642152111)
	effector:setKey(_TRACK_A, 2.3037109375, -0.00941845992373)
	effector:setKey(_TRACK_A, 3.560302734375, 0.02554930966061)
	effector:setKey(_TRACK_A, 3.97916666666667, 0.031377271258)
	effector:setKey(_TRACK_A, 4.39803059895833, 0.02471674371812)
	effector:setKey(_TRACK_A, 5.4451904296875, -0.00858589398124)
	effector:setKey(_TRACK_A, 5.86405436197917, -0.01524642152111)
	effector:setKey(_TRACK_A, 6.28287760416667, -0.00941845992373)
	effector:setKey(_TRACK_A, 7.53946940104167, 0.02554930966061)
	effector:setKey(_TRACK_A, 7.95833333333333, 0.031377271258)
	effector:play()
 
	compositionfon:play()
 
	return compositionfon
end
 
createCompositiontake = function()
	local compositiontake = CreateCompositionSequence()
	local compositionDuration = 1.16666666666667
	compositiontake:setDuration(compositionDuration)
	compositiontake:setName("compositiontake" )
	compositiontake:setBoundingBox( Rectanglef(0, 0, 640,480) )
 
	local element
	local effector
 
	-- Layer wb12f_[00030-00041].png/1
	element = CreateCompositionElement(PREFIX_PATH.."wb12f_[].png")
	element:setName("wb12f_[00030-00041].png/1")
	compositiontake:addElement(element)
	element:setHotSpot(70, 69)
	compositiontake:registerParentInfo("wb12f_[00030-00041].png/1", "vrta.png/6")
	element:setXY(70.2754491017965, 323.651452282158)
 
	element:setScale(-1.2409751924722,1.18347465271514)
					local anim = element
					anim:setAnimationSize(140,138)
					anim:setFramesCount(12)
					anim:setFPS(24)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:play()
 
 
	-- Layer wb12f_[00030-00041].png/2
	element = CreateCompositionElement(PREFIX_PATH.."wb12f_[].png")
	element:setName("wb12f_[00030-00041].png/2")
	compositiontake:addElement(element)
	element:setHotSpot(70, 69)
	compositiontake:registerParentInfo("wb12f_[00030-00041].png/2", "vrta.png/6")
	element:setXY(70.2754491017965, 323.651452282158)
 
	element:setScale(-1.2409751924722,1.18347465271514)
					local anim = element
					anim:setAnimationSize(140,138)
					anim:setFramesCount(12)
					anim:setFPS(24)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:play()
 
 
	-- Layer [1-12].png/3
	element = CreateCompositionElement(PREFIX_PATH.."[1-12].png")
	element:setName("[1-12].png/3")
	compositiontake:addElement(element)
	element:setHotSpot(57, 50)
	compositiontake:registerParentInfo("[1-12].png/3", "vrta.png/7")
	element:setXY(118.000647827664, 326)
 
	element:setScale(0.82324711694437,1.49416438607375)
	element:setRotationRad(0.1603754437927)
					local anim = element
					anim:setAnimationSize(114,100)
					anim:setFramesCount(12)
					anim:setFPS(24)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:play()
 
 
	-- Layer cep.png/4
	element = CreateCompositionElement(PREFIX_PATH.."cep.png")
	element:setName("cep.png/4")
	compositiontake:addElement(element)
	element:setHotSpot(132, 140)
	element:setParentElement(compositiontake)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:setKey(_TRACK_X, 0.08333333333333, 313)
	effector:setKey(_TRACK_Y, 0.08333333333333, 191)
	effector:setKey(_TRACK_X, 0.16666666666667, 317)
	effector:setKey(_TRACK_Y, 0.16666666666667, 186)
	effector:setKey(_TRACK_X, 0.20833333333333, 317)
	effector:setKey(_TRACK_Y, 0.20833333333333, 187)
	effector:setKey(_TRACK_X, 0.29166666666667, 317)
	effector:setKey(_TRACK_Y, 0.29166666666667, 184)
	effector:setKey(_TRACK_X, 0.375, 319)
	effector:setKey(_TRACK_Y, 0.375, 187)
	effector:setKey(_TRACK_X, 0.41666666666667, 317)
	effector:setKey(_TRACK_Y, 0.41666666666667, 185)
	effector:setKey(_TRACK_X, 0.45833333333333, 317)
	effector:setKey(_TRACK_Y, 0.45833333333333, 188)
	effector:setKey(_TRACK_X, 0.5, 317)
	effector:setKey(_TRACK_Y, 0.5, 187)
	effector:setKey(_TRACK_X, 0.54166666666667, 317)
	effector:setKey(_TRACK_Y, 0.54166666666667, 188)
	effector:setKey(_TRACK_X, 0.625, 313)
	effector:setKey(_TRACK_Y, 0.625, 191)
	effector:setKey(_TRACK_SX, 0.08333333333333, 1.01515151515152)
	effector:setKey(_TRACK_SY, 0.08333333333333, 1.03571428571429)
	effector:setKey(_TRACK_SX, 0.16666666666667, 1.04545454545455)
	effector:setKey(_TRACK_SY, 0.16666666666667, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.20833333333333, 1.03030303030303)
	effector:setKey(_TRACK_SY, 0.20833333333333, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.29166666666667, 1.0530303030303)
	effector:setKey(_TRACK_SY, 0.29166666666667, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.375, 1.02272727272727)
	effector:setKey(_TRACK_SY, 0.375, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.45833333333333, 1.01515151515152)
	effector:setKey(_TRACK_SY, 0.45833333333333, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.5, 1.03787878787879)
	effector:setKey(_TRACK_SY, 0.5, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.54166666666667, 1.04545454545455)
	effector:setKey(_TRACK_SY, 0.54166666666667, 1.02857142857143)
	effector:setKey(_TRACK_SX, 0.625, 1.01515151515152)
	effector:setKey(_TRACK_SY, 0.625, 1.03571428571429)
	effector:play()
 
	-- Layer zamok.png/5
	element = CreateCompositionElement(PREFIX_PATH.."zamok2.png")
	element:setName("lock2")
	compositiontake:addElement(element)
	element:setHotSpot(126, 64)
	compositiontake:registerParentInfo("lock2", "vrta.png/7")
	element:setXY(312, 314)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:play()
 
	-- Layer zamok.png/5
	element = CreateCompositionElement(PREFIX_PATH.."zamok.png")
	element:setName("lock")
	compositiontake:addElement(element)
	element:setHotSpot(126, 64)
	compositiontake:registerParentInfo("lock", "vrta.png/7")
	element:setXY(332, 324)
 
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:play()

 
 
	-- Layer vrta.png/6
	element = CreateCompositionElement(PREFIX_PATH.."vrta.png")
	element:setName("vrta.png/6")
	compositiontake:addElement(element)
	element:setHotSpot(163, 240)
	element:setParentElement(compositiontake)
	element:setScale(-1.02453987730061,1.00416666666667)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:setKey(_TRACK_X, 0.08333333333333, 481)
	effector:setKey(_TRACK_Y, 0.08333333333333, 240)
	effector:setKey(_TRACK_X, 0.125, 488)
	effector:setKey(_TRACK_Y, 0.125, 240)
	effector:setKey(_TRACK_X, 0.16666666666667, 489)
	effector:setKey(_TRACK_Y, 0.16666666666667, 240)
	effector:setKey(_TRACK_X, 0.20833333333333, 488)
	effector:setKey(_TRACK_Y, 0.20833333333333, 240)
	effector:setKey(_TRACK_X, 0.29166666666667, 490)
	effector:setKey(_TRACK_Y, 0.29166666666667, 240)
	effector:setKey(_TRACK_X, 0.375, 488)
	effector:setKey(_TRACK_Y, 0.375, 240)
	effector:setKey(_TRACK_X, 0.41666666666667, 489)
	effector:setKey(_TRACK_Y, 0.41666666666667, 240)
	effector:setKey(_TRACK_X, 0.45833333333333, 488)
	effector:setKey(_TRACK_Y, 0.45833333333333, 240)
	effector:setKey(_TRACK_X, 0.54166666666667, 490)
	effector:setKey(_TRACK_Y, 0.54166666666667, 240)
	effector:setKey(_TRACK_X, 0.625, 481)
	effector:setKey(_TRACK_Y, 0.625, 240)
	effector:play()
 
 
	-- Layer vrta.png/7
	element = CreateCompositionElement(PREFIX_PATH.."vrta.png")
	element:setName("vrta.png/7")
	compositiontake:addElement(element)
	element:setHotSpot(163, 240)
	element:setParentElement(compositiontake)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:setKey(_TRACK_X, 0.125, 158)
	effector:setKey(_TRACK_Y, 0.125, 240)
	effector:setKey(_TRACK_X, 0.16666666666667, 157)
	effector:setKey(_TRACK_Y, 0.16666666666667, 240)
	effector:setKey(_TRACK_X, 0.20833333333333, 158)
	effector:setKey(_TRACK_Y, 0.20833333333333, 240)
	effector:setKey(_TRACK_X, 0.29166666666667, 156)
	effector:setKey(_TRACK_Y, 0.29166666666667, 240)
	effector:setKey(_TRACK_X, 0.375, 158)
	effector:setKey(_TRACK_Y, 0.375, 240)
	effector:setKey(_TRACK_X, 0.41666666666667, 157)
	effector:setKey(_TRACK_Y, 0.41666666666667, 240)
	effector:setKey(_TRACK_X, 0.45833333333333, 158)
	effector:setKey(_TRACK_Y, 0.45833333333333, 240)
	effector:setKey(_TRACK_X, 0.54166666666667, 156)
	effector:setKey(_TRACK_Y, 0.54166666666667, 240)
	effector:setKey(_TRACK_X, 0.625, 158)
	effector:setKey(_TRACK_Y, 0.625, 240)
	effector:play()
 
 
	-- -- Layer 7.png/8
	-- element = CreateCompositionElement(PREFIX_PATH.."7.png")
	-- element:setName("7.png/8")
	-- compositiontake:addElement(element)
	-- element:setHotSpot(456, 4)
	-- element:setParentElement(compositiontake)
	-- element:setXY(648, -2)
 
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 1.16666666666667)
	-- effector:setKey(_TRACK_A, 0, 0)
	-- effector:setKey(_TRACK_A, 0.28938802083333, 0.00678099230712)
	-- effector:setKey(_TRACK_A, 1.16666666666667, 0.04789293914259)
	-- effector:play()
 
 
	-- -- Layer 8.png/9
	-- element = CreateCompositionElement(PREFIX_PATH.."8.png")
	-- element:setName("8.png/9")
	-- compositiontake:addElement(element)
	-- element:setHotSpot(9, 9)
	-- element:setParentElement(compositiontake)
	-- element:setXY(5, 4)
 
 
	-- effector = element:getEffector()
	-- effector:setLifeTime(0, 1.16666666666667)
	-- effector:setKey(_TRACK_A, 0, 0.031377271258)
	-- effector:setKey(_TRACK_A, 0.41886393229167, 0.02471674371812)
	-- effector:setKey(_TRACK_A, 1.16666666666667, 0.00093450646773)
	-- effector:play()
 
	compositiontake:play()
 
	return compositiontake
end
 
