MOVIE_THEATRE_PLAY_23 = "theatre movie play 23"

function BuildTheatreMovieComposition()

        createCompositionRolik_Zal = function()
    
        local compositionRolik_Zal = CreateCompositionSequence();
        local compositionDuration = 13;
        compositionRolik_Zal:SetDuration(compositionDuration);
    
    
        -- Layer Prince_Head
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/head.png");
        element:SetName("Prince_Head");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(18.5, 37.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 545.316665649414);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 321.91667175293);
        effector:SetKey(_TRACK_X, 10.25, 541.066665649414);
        effector:SetKey(_TRACK_Y, 10.25, 326.41667175293);
        effector:SetKey(_TRACK_X, 12.4583333333333, 530.816665649414);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 336.41667175293);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, 0.19253235598285);
        effector:SetKey(_TRACK_A, 12.4583333333333, -1.70386901144478);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_right_forearm
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/Rforearm.png");
        element:SetName("Prince_right_forearm");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(29.5, 4.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 535.75);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 334.25);
        effector:SetKey(_TRACK_X, 10.25, 541.25);
        effector:SetKey(_TRACK_Y, 10.25, 342);
        effector:SetKey(_TRACK_X, 12.4583333333333, 528);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 352.75);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, -2.18838859775346);
        effector:SetKey(_TRACK_A, 12.4583333333333, 0.34798445032716);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_right_arm
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/RArm.png");
        element:SetName("Prince_right_arm");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(23, 7);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 540);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 327);
        effector:SetKey(_TRACK_X, 10.25, 538.25);
        effector:SetKey(_TRACK_Y, 10.25, 331.75);
        effector:SetKey(_TRACK_X, 12.4583333333333, 533.5);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 343.5);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, -0.82884905784188);
        effector:SetKey(_TRACK_A, 12.4583333333333, 0.04534597049195);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_left_forearm
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/LForearm.png");
        element:SetName("Prince_left_forearm");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(7, 7.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 554.25);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 334.75);
        effector:SetKey(_TRACK_X, 10.25, 557.5);
        effector:SetKey(_TRACK_Y, 10.25, 333);
        effector:SetKey(_TRACK_X, 12.4583333333333, 548.75);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 332.5);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, -1.03752922608563);
        effector:SetKey(_TRACK_A, 12.4583333333333, -0.52977649194334);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_left_arm
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/LArm.png");
        element:SetName("Prince_left_arm");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(7.5, 10.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 551.5);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 329);
        effector:SetKey(_TRACK_X, 10.25, 550.375);
        effector:SetKey(_TRACK_Y, 10.25, 328.75);
        effector:SetKey(_TRACK_X, 12.4583333333333, 541.375);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 333.25);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, -0.51675426700689);
        effector:SetKey(_TRACK_A, 12.4583333333333, -0.95504499264878);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_Torso
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/kamzol.png");
        element:SetName("Prince_Torso");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(44, 74);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 9.20833333333333, 546.25);
        effector:SetKey(_TRACK_Y, 9.20833333333333, 344.5);
        effector:SetKey(_TRACK_X, 10.25, 550.25);
        effector:SetKey(_TRACK_Y, 10.25, 345.5);
        effector:SetKey(_TRACK_X, 12.4583333333333, 551.25);
        effector:SetKey(_TRACK_Y, 12.4583333333333, 346.5);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, -0.37521728637073);
        effector:SetKey(_TRACK_A, 12.4583333333333, -1.04961843850613);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Prince_Legs
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/legs.png");
        element:SetName("Prince_Legs");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(22.5, 138);
        element:SetParentElement(compositionRolik_Zal);
        element:SetXY(545.25, 384.5);
    
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_A, 10.25, 0.14311500826907);
        effector:SetKey(_TRACK_A, 12.4583333333333, 0.17602861279478);
        effector:SetKey(_TRACK_O, 9.16666666666667, 0);
        effector:SetKey(_TRACK_O, 9.20833333333333, 1);
    
        effector:Play();
    
    
        -- Layer Curtains
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/zanaves.png");
        element:SetName("Curtains");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(512, 225.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 30.0416666666667);
    
        effector:SetKey(_TRACK_X, 0, 512);
        effector:SetKey(_TRACK_Y, 0, 192);
        effector:SetKey(_TRACK_X, 6.04166666666667, 512);
        effector:SetKey(_TRACK_Y, 6.04166666666667, -92);
    
        effector:Play();
    
    
        -- Layer Prince
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/prince.png");
        element:SetName("Prince");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(82.5, 133);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 1.58333333333333, 756.413681030273);
        effector:SetKey(_TRACK_Y, 1.58333333333333, 350.248199462891);
        effector:SetKey(_TRACK_X, 8.125, 545.913681030273);
        effector:SetKey(_TRACK_Y, 8.125, 350.248199462891);
        effector:SetKey(_TRACK_A, 1.125, 0);
        effector:SetKey(_TRACK_A, 1.41666666666667, 0.07195195214353);
        effector:SetKey(_TRACK_A, 1.75, 0);
        effector:SetKey(_TRACK_A, 2.25, -0.05701611425207);
        effector:SetKey(_TRACK_A, 2.75, 0.02416825010344);
        effector:SetKey(_TRACK_A, 3.29166666666667, -0.04269775910644);
        effector:SetKey(_TRACK_A, 3.91666666666667, 0.01570283671979);
        effector:SetKey(_TRACK_A, 4.5, -0.04941957113026);
        effector:SetKey(_TRACK_A, 5.16666666666667, 0.01649440583553);
        effector:SetKey(_TRACK_A, 5.75, -0.09838188973019);
        effector:SetKey(_TRACK_A, 6.45833333333333, -0.01189107321005);
        effector:SetKey(_TRACK_A, 7, -0.08035221927369);
        effector:SetKey(_TRACK_A, 7.45833333333333, -0.01541217286422);
        effector:SetKey(_TRACK_A, 7.95833333333333, -0.00403418328078);
        effector:SetKey(_TRACK_A, 8.375, -0.06781170738693);
        effector:SetKey(_TRACK_A, 8.70833333333333, -0.00596081329454);
        effector:SetKey(_TRACK_O, 9.16666666666667, 1);
        effector:SetKey(_TRACK_O, 9.20833333333333, 0);
    
        effector:Play();
    
    
        -- Layer Princess_head
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/head_1.png");
        element:SetName("Princess_head");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(29, 36);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 11.7083333333333, 445);
        effector:SetKey(_TRACK_Y, 11.7083333333333, 321);
        effector:SetKey(_TRACK_X, 13.2916666666667, 446);
        effector:SetKey(_TRACK_Y, 13.2916666666667, 321.5);
        effector:SetKey(_TRACK_A, 11.7083333333333, 0);
        effector:SetKey(_TRACK_A, 13.2916666666667, 0.12197215539065);
        effector:SetKey(_TRACK_O, 11.6666666666667, 0);
        effector:SetKey(_TRACK_O, 11.7083333333333, 1);
    
        effector:Play();
    
    
        -- Layer Princess_left_forearm
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/Lforearm_1.png");
        element:SetName("Princess_left_forearm");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(7.5, 12.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 11.7083333333333, 456.75);
        effector:SetKey(_TRACK_Y, 11.7083333333333, 338.5);
        effector:SetKey(_TRACK_X, 13.2916666666667, 452.25);
        effector:SetKey(_TRACK_Y, 13.2916666666667, 340.5);
        effector:SetKey(_TRACK_A, 11.7083333333333, 0);
        effector:SetKey(_TRACK_A, 13.2916666666667, 1.61783311079884);
        effector:SetKey(_TRACK_A, 13.8333333333333, 2.04784308275474);
        effector:SetKey(_TRACK_O, 11.6666666666667, 0);
        effector:SetKey(_TRACK_O, 11.7083333333333, 1);
    
        effector:Play();
    
    
        -- Layer Princess_right_hand
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/Rhand.png");
        element:SetName("Princess_right_hand");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(46.5, 14);
        element:SetParentElement(compositionRolik_Zal);
        element:SetXY(439.5, 326.75);
    
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_A, 11.7083333333333, 0);
        effector:SetKey(_TRACK_A, 13.8333333333333, -0.81230729665576);
        effector:SetKey(_TRACK_O, 11.6666666666667, 0);
        effector:SetKey(_TRACK_O, 11.7083333333333, 1);
    
        effector:Play();
    
    
        -- Layer Princess_body
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/dress.png");
        element:SetName("Princess_body");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(82.5, 133);
        element:SetParentElement(compositionRolik_Zal);
        element:SetXY(445.5, 350.25);
    
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
        element:SetAngle(0);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_O, 11.6666666666667, 0);
        effector:SetKey(_TRACK_O, 11.7083333333333, 1);
    
        effector:Play();
    
    
        -- Layer Princess_left_hand
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/Lhand.png");
        element:SetName("Princess_left_hand");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(5, 7.5);
        element:SetParentElement(compositionRolik_Zal);
        element:SetXY(449.75, 328.5);
    
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_A, 11.7083333333333, 0);
        effector:SetKey(_TRACK_A, 13.2916666666667, 0.37634493586891);
        effector:SetKey(_TRACK_O, 11.6666666666667, 0);
        effector:SetKey(_TRACK_O, 11.7083333333333, 1);
    
        effector:Play();
    
    
        -- Layer Princess
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/prinsess1.png");
        element:SetName("Princess");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(82.5, 133);
        element:SetParentElement(compositionRolik_Zal);
        element:SetScaleX(0.3);
        element:SetScaleY(0.3);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 25);
    
        effector:SetKey(_TRACK_X, 2.25, 309.413681030273);
        effector:SetKey(_TRACK_Y, 2.25, 350.248199462891);
        effector:SetKey(_TRACK_X, 8.66666666666667, 445.413681030273);
        effector:SetKey(_TRACK_Y, 8.66666666666667, 350.248199462891);
        effector:SetKey(_TRACK_A, 1.91666666666667, 0);
        effector:SetKey(_TRACK_A, 2, -0.0523598775);
        effector:SetKey(_TRACK_A, 2.08333333333333, 0.0174532925);
        effector:SetKey(_TRACK_A, 2.25, 0.0174532925);
        effector:SetKey(_TRACK_A, 2.33333333333333, -0.0174532925);
        effector:SetKey(_TRACK_A, 2.41666666666667, 0.034906585);
        effector:SetKey(_TRACK_A, 2.58333333333333, -0.034906585);
        effector:SetKey(_TRACK_A, 2.95833333333333, 0.034906585);
        effector:SetKey(_TRACK_A, 3.45833333333333, -0.0523598775);
        effector:SetKey(_TRACK_A, 4.08333333333333, 0.06981317);
        effector:SetKey(_TRACK_A, 4.75, -0.034906585);
        effector:SetKey(_TRACK_A, 5.625, 0.034906585);
        effector:SetKey(_TRACK_A, 6.33333333333333, -0.0523598775);
        effector:SetKey(_TRACK_A, 6.875, 0.0872664625);
        effector:SetKey(_TRACK_A, 7.33333333333333, -0.034906585);
        effector:SetKey(_TRACK_A, 7.75, 0.104719755);
        effector:SetKey(_TRACK_A, 8.125, -0.034906585);
        effector:SetKey(_TRACK_A, 8.625, 0.06981317);
        effector:SetKey(_TRACK_A, 9.20833333333333, 0);
        effector:SetKey(_TRACK_O, 11.6666666666667, 1);
        effector:SetKey(_TRACK_O, 11.7083333333333, 0);
    
        effector:Play();
    
    
        -- Layer BG
        local element = CreateCompositionElement("data/Texture/Scenes/23_theatre_play/Background.jpg");
        element:SetName("BG");
        compositionRolik_Zal:AddElement(element);
        element:SetHotSpot(512, 384);
        element:SetParentElement(compositionRolik_Zal);
        element:SetXY(512, 384);
    
        element:SetScaleX(1);
        element:SetScaleY(1);
        element:SetAngle(0);
        element:SetOpacity(1);
    
        effector = element:GetEffector();
        effector:SetLifeTime(0, 31.5416666666667);
    
    
        effector:Play();
    
        compositionRolik_Zal:Play();
    
        return compositionRolik_Zal;
    end
    
    return createCompositionRolik_Zal();

end


function BuildTheatrePlayMovieScreen()
    local movieScreen = CreateMovieScreen(MOVIE_THEATRE_PLAY_23);
    local composition = BuildTheatreMovieComposition();
    composition:AttachTo(movieScreen);
    composition:Play();

    movieScreen:SetDuration(composition:GetDuration());
    movieScreen:SetTerminatesOnAnyKey(false);
	movieScreen:SetFadesOutOnEnd(true);

    return movieScreen;
end