function OnSceneLoad(screen)    
    game_state = {}        
    LoadData(screen)
    local pf = play_field
    local level = pf:GetLevelScreen()
    game_state.custom_cursors = {}
    game_state.locked_objects = {}
    game_state.active_objects = {}
    --level:AddTaskSafe(CreateTask('', '', ''))
    
	--zone = CreateZoomZone('')
    game_state.locker = ReferenceCounter()
    game_state.active_zone = nil
        
    play_field:IgnoreOnTestPoint('sprait_5')        
    
    
    play_field:GetObject('casket_cover'):GetAnimation():SetMode(HGEANIM_FWD + HGEANIM_NOLOOP)
    play_field:GetObject("casket_cover"):GetAnimation():Stop()
    
    game_state.locked_objects['dart1'] = true
    game_state.locked_objects['key'] = true   
	
	play_field:IgnoreOnTestPoint('sprait_1')
	play_field:IgnoreOnTestPoint('champain')
	game_state.meta_object = 'cigar2'
end

function OnScreenShown()
end

function OnSceneFree()
    FreeData()
end

function OnUpdate(dt)    
end

function OnNotebookOpened()
    --OnSceneStateChanged(play_field)
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local pf = play_field
    local is_wrong_click = true

    is_wrong_click = DefaultOnObjectMouseDown(object)

    if is_wrong_click then
        --pf:ShowWrongObjectEffect()
    end

    return is_wrong_click;    
end

function OnObjectMouseUp(object)	
end

function OnObjectWillBeFound(object)    
end

function OnObjectWasFound(object)
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)	
end

function OnObjectReachPanel(object)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function CanBeHinted(obj)
    if locked_object[obj] ~= true then
        return true
    else
        return false
    end
end

function OnLostFocus()
end

function OnGainFocus()
end

-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Animations/Window.dds',0,0,292,290,25,8)
	anim:SetHotSpot(146,145)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Window',anim,392,231,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Zoom/drawer_bak.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('drawer_bak',anim,512,384,160,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel1',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel2',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel3',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel4',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Animations/casket.png',0,0,144,106,1,0)
	anim:SetHotSpot(72,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('casket',anim,375,631,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Animations/casket_cover.dds',0,0,144,86,21,13)
	anim:SetHotSpot(72,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('casket_cover',anim,373,598,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Effect/particles.png',0,32,32,32,1,0)
	anim:SetHotSpot(16,16)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('particle',anim,100,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/casket_cover_empty.png',0,0,144,86,1,0)
	anim:SetHotSpot(72,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('casket_cover_empty',anim,373,598,112,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/Sheriff.dds',0,0,532,636,1,0)
	anim:SetHotSpot(266,256)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Sheriff',anim,734,390,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/Museum_director.dds',0,0,504,756,1,0)
	anim:SetHotSpot(252,378)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Museum_director',anim,454,397,200,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/eye_md.png',0,0,20,21,1,0)
	anim:SetHotSpot(10,10)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('eye_md',anim,506,237,202,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/eyes.png',0,0,79,33,1,0)
	anim:SetHotSpot(39,16)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('eyes',anim,729,212,500,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/bg.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg',anim,512,384,80,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/dart.png',0,0,56,42,1,0)
	anim:SetHotSpot(28,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dart1',anim,820,127,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/garbage.png',0,0,100,72,1,0)
	anim:SetHotSpot(50,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('garbage',anim,255,623,130,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/dart2.png',0,0,59,66,1,0)
	anim:SetHotSpot(29,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dart2',anim,292,508,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/dart3.png',0,0,69,24,1,0)
	anim:SetHotSpot(34,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dart3',anim,246,626,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/target.png',0,0,55,56,1,0)
	anim:SetHotSpot(27,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('target',anim,544,176,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/refusebin.png',0,0,129,112,1,0)
	anim:SetHotSpot(64,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('refusebin',anim,245,740,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/broom.png',0,0,59,210,1,0)
	anim:SetHotSpot(29,105)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('broom',anim,481,371,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/horned_helm.png',0,0,85,58,1,0)
	anim:SetHotSpot(42,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('horned_helm',anim,528,367,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/helm.png',0,0,36,39,1,0)
	anim:SetHotSpot(18,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('helm',anim,504,456,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/dustpan.png',0,0,49,40,1,0)
	anim:SetHotSpot(24,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dustpan',anim,419,434,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/champain.png',0,0,21,19,1,0)
	anim:SetHotSpot(10,9)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('champain',anim,412,436,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/key.png',0,0,20,52,1,0)
	anim:SetHotSpot(10,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('key',anim,544,177,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/anchor.png',0,0,51,59,1,0)
	anim:SetHotSpot(25,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('anchor',anim,479,208,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/bell.png',0,0,70,43,1,0)
	anim:SetHotSpot(35,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell',anim,957,151,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/cat.png',0,0,35,96,1,0)
	anim:SetHotSpot(17,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cat',anim,287,365,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/clock.png',0,0,28,33,1,0)
	anim:SetHotSpot(14,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('clock',anim,908,243,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/hourglass.png',0,0,15,37,1,0)
	anim:SetHotSpot(7,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hourglass',anim,565,591,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/glove1.png',0,0,49,34,1,0)
	anim:SetHotSpot(24,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glove1',anim,551,380,117,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/glove2.png',0,0,94,60,1,0)
	anim:SetHotSpot(47,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glove2',anim,826,553,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/mask1.png',0,0,47,88,1,0)
	anim:SetHotSpot(23,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mask1',anim,758,71,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/mask2.png',0,0,105,144,1,0)
	anim:SetHotSpot(52,72)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mask2',anim,233,474,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/bag.png',0,0,56,32,1,0)
	anim:SetHotSpot(28,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bag',anim,249,532,111,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/pen.png',0,0,84,18,1,0)
	anim:SetHotSpot(42,9)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pen',anim,693,649,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/radio.png',0,0,84,54,1,0)
	anim:SetHotSpot(42,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('radio',anim,327,372,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/shoes.png',0,0,57,44,1,0)
	anim:SetHotSpot(28,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('shoes',anim,242,388,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/statue.png',0,0,75,211,1,0)
	anim:SetHotSpot(37,105)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('statue',anim,978,497,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('drawer',anim,678,205,102,0,17,6)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('drawer2',anim,682,205,100,0,18,6)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/vase.png',0,0,117,129,1,0)
	anim:SetHotSpot(58,64)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vase',anim,295,335,108,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/pinaplle.png',0,0,61,91,1,0)
	anim:SetHotSpot(30,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pinaplle',anim,612,133,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/seahorse.png',0,0,30,72,1,0)
	anim:SetHotSpot(15,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('seahorse',anim,768,224,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/umbrella.png',0,0,165,50,1,0)
	anim:SetHotSpot(82,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('umbrella',anim,422,499,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/candle.png',0,0,52,48,1,0)
	anim:SetHotSpot(26,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle',anim,845,228,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/starfish1.png',0,0,46,53,1,0)
	anim:SetHotSpot(23,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish1',anim,704,30,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/starfish2.png',0,0,56,65,1,0)
	anim:SetHotSpot(28,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish2',anim,637,735,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/starfish3.png',0,0,52,37,1,0)
	anim:SetHotSpot(26,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('starfish3',anim,545,750,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/skull.png',0,0,150,271,1,0)
	anim:SetHotSpot(75,135)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull',anim,469,293,109,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/box.png',0,0,88,47,1,0)
	anim:SetHotSpot(44,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('box',anim,537,399,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Layers/books_layer.png',0,0,83,73,1,0)
	anim:SetHotSpot(41,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('books_layer',anim,265,353,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/cigar2.png',0,0,118,78,1,0)
	anim:SetHotSpot(59,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar2',anim,461,586,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/teapot.png',0,0,68,57,1,0)
	anim:SetHotSpot(34,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('teapot',anim,921,545,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/4_directors_museum_office_2/Items/coins.png',0,0,34,40,1,0)
	anim:SetHotSpot(17,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coins',anim,559,590,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
