--[[
Animations of Main Menu Ambients, Map ambients, and other random stuff

--]]


----Map ambients
function animateMap()
	print( "animateMap" )
	
-- put stuff behind ICON_LEVEL_13


-- flocks of white swallows...

local whitebird_1 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_2 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_3 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_4 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_5 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_6 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_7 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_8 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_9 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_10 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_11 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_12 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_13 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_14 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_15 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_16 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_17 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_18 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_19 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_20 = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_1B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_2B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_3B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_4B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_5B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_6B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_7B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_8B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_9B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_10B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_11B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_12B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_13B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_14B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_15B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_16B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_17B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_18B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_19B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})
local whitebird_20B = scene:newChildSprite(
		{alpha = 0.0, x = -30, y = -30, scale = math.Random (0.3, .8), image = "whitebird_1", section = "scenemap", name = "flocking_1"})

		
	whitebird_1:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_2:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_3:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_4:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_5:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_6:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_7:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_8:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_9:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_10:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_11:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_12:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_13:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_14:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_15:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_16:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_17:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_18:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_19:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_20:moveInFrontOf( scene:child("ICON_LEVEL_1") )
	whitebird_1B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_2B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_3B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_4B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_5B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_6B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_7B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_8B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_9B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_10B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_11B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_12B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_13B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_14B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_15B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_16B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_17B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_18B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_19B:moveInFrontOf( scene:child("ICON_LEVEL_1") )	
	whitebird_20B:moveInFrontOf( scene:child("ICON_LEVEL_1") )
	
	whitebird_1:setFlipImageHorizontal(true)
	whitebird_2:setFlipImageHorizontal(true)
	whitebird_3:setFlipImageHorizontal(true)
	whitebird_4:setFlipImageHorizontal(true)
	whitebird_5:setFlipImageHorizontal(true)
	whitebird_6:setFlipImageHorizontal(true)
	whitebird_7:setFlipImageHorizontal(true)
	whitebird_8:setFlipImageHorizontal(true)
	whitebird_9:setFlipImageHorizontal(true)
	whitebird_10:setFlipImageHorizontal(true)
	whitebird_11:setFlipImageHorizontal(true)
	whitebird_12:setFlipImageHorizontal(true)
	whitebird_13:setFlipImageHorizontal(true)
	whitebird_14:setFlipImageHorizontal(true)
	whitebird_15:setFlipImageHorizontal(true)
	whitebird_16:setFlipImageHorizontal(true)
	whitebird_17:setFlipImageHorizontal(true)
	whitebird_18:setFlipImageHorizontal(true)
	whitebird_19:setFlipImageHorizontal(true)
	whitebird_20:setFlipImageHorizontal(true)
	whitebird_1B:setFlipImageHorizontal(true)
	whitebird_2B:setFlipImageHorizontal(true)
	whitebird_3B:setFlipImageHorizontal(true)
	whitebird_4B:setFlipImageHorizontal(true)
	whitebird_5B:setFlipImageHorizontal(true)
	whitebird_6B:setFlipImageHorizontal(true)
	whitebird_7B:setFlipImageHorizontal(true)
	whitebird_8B:setFlipImageHorizontal(true)
	whitebird_9B:setFlipImageHorizontal(true)
	whitebird_10B:setFlipImageHorizontal(true)
	whitebird_11B:setFlipImageHorizontal(true)
	whitebird_12B:setFlipImageHorizontal(true)
	whitebird_13B:setFlipImageHorizontal(true)
	whitebird_14B:setFlipImageHorizontal(true)
	whitebird_15B:setFlipImageHorizontal(true)
	whitebird_16B:setFlipImageHorizontal(true)
	whitebird_17B:setFlipImageHorizontal(true)
	whitebird_18B:setFlipImageHorizontal(true)
	whitebird_19B:setFlipImageHorizontal(true)
	whitebird_20B:setFlipImageHorizontal(true)
	
	whitebird_1:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_2:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_3:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_4:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_5:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_6:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_7:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_8:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_9:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_10:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_11:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_12:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_13:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_14:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_15:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_16:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_17:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_18:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_19:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_20:animate({startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_1B:animate({rotation = -110, startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_2B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_3B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_4B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_5B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_6B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_7B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_8B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_9B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_10B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_11B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_12B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_13B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_14B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_15B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_16B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_17B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_18B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_19B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	whitebird_20B:animate({rotation = -110,startFrame = 0, endFrame = 37, frameTime = math.Random(28,36), loops = "forever"})
	
	-- startFrame = 0, endFrame = 37, frameTime = math.Random(40,45), loops = 14
		
		whitebird_1:doEvery(math.Random(17000,19000), function()
		whitebird_1:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_2:doEvery(math.Random(17000,19000), function()
		whitebird_2:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_3:doEvery(math.Random(17000,19000), function()
		whitebird_3:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_4:doEvery(math.Random(17000,19000), function()
		whitebird_4:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_5:doEvery(math.Random(17000,19000), function()
		whitebird_5:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_6:doEvery(math.Random(17000,19000), function()
		whitebird_6:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_7:doEvery(math.Random(17000,19000), function()
		whitebird_7:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_8:doEvery(math.Random(17000,19000), function()
		whitebird_8:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_9:doEvery(math.Random(17000,19000), function()
		whitebird_9:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_10:doEvery(math.Random(17000,19000), function()
		whitebird_10:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_11:doEvery(math.Random(17000,19000), function()
		whitebird_11:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_12:doEvery(math.Random(17000,19000), function()
		whitebird_12:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_13:doEvery(math.Random(17000,19000), function()
		whitebird_13:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_14:doEvery(math.Random(17000,19000), function()
		whitebird_14:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_15:doEvery(math.Random(17000,19000), function()
		whitebird_15:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_16:doEvery(math.Random(17000,19000), function()
		whitebird_16:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_17:doEvery(math.Random(17000,19000), function()
		whitebird_17:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_18:doEvery(math.Random(17000,19000), function()
		whitebird_18:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_19:doEvery(math.Random(17000,19000), function()
		whitebird_19:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_20:doEvery(math.Random(17000,19000), function()
		whitebird_20:animate(
			{x = math.Random(140,229), y = math.Random(243,291)},
			{alpha = 1.0, duration = 100},
			{dx = 17, dy = -16, duration = 1300, style = "easeIn"}, -- birds pop in a forested area near SCLab
			{x = math.Random(412,482), y = math.Random(202,261), duration = 13000},  -- and fly to the right to an area near 
			{dx = 12, dy = 16, duration = 1300, style = "easeOut"},
			{alpha = 0.0, duration = 100}
		)
		return 42000
		end
	)
		whitebird_1B:doEvery(math.Random(28000,30000), function()
		whitebird_1B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_2B:doEvery(math.Random(28000,30000), function()
		whitebird_2B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_3B:doEvery(math.Random(28000,30000), function()
		whitebird_3B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_4B:doEvery(math.Random(28000,30000), function()
		whitebird_4B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_5B:doEvery(math.Random(28000,30000), function()
		whitebird_5B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_6B:doEvery(math.Random(28000,30000), function()
		whitebird_6B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_7B:doEvery(math.Random(28000,30000), function()
		whitebird_7B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_8B:doEvery(math.Random(28000,30000), function()
		whitebird_8B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_9B:doEvery(math.Random(28000,30000), function()
		whitebird_9B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_10B:doEvery(math.Random(28000,30000), function()
		whitebird_10B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_11B:doEvery(math.Random(28000,30000), function()
		whitebird_11B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_12B:doEvery(math.Random(28000,30000), function()
		whitebird_12B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_13B:doEvery(math.Random(28000,30000), function()
		whitebird_13B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_14B:doEvery(math.Random(28000,30000), function()
		whitebird_14B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_15B:doEvery(math.Random(28000,30000), function()
		whitebird_15B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_16B:doEvery(math.Random(28000,30000), function()
		whitebird_16B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_17B:doEvery(math.Random(28000,30000), function()
		whitebird_17B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_18B:doEvery(math.Random(28000,30000), function()
		whitebird_18B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_19B:doEvery(math.Random(28000,30000), function()
		whitebird_19B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		whitebird_20B:doEvery(math.Random(28000,30000), function()
		whitebird_20B:animate(
			{x = math.Random(475,566), y = math.Random(397,447)},
			{alpha = 1.0, duration = 100},
			{dx = -10, dy = -10, duration = 1300, style = "easeInOut"}, -- birds pop in a forested area near SCLab
			{x = math.Random(313,363), y = math.Random(168,190), duration = 13000},  -- and fly to the right to an area near 
			{dx = -4, dy = 4, duration = 1300, style = "easeInOut"},
			{alpha = 0.0, duration = 100}
		)
		return 32000
		end
	)
		
	-- 3 waves near Beach area...
	local	wave_1 = scene:newChildSprite(
	{image = "Wave_1", rotation = 11, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_2 = scene:newChildSprite(
	{image = "Wave_2", rotation = 11, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_3 = scene:newChildSprite(
	{image = "Wave_3", rotation = 11, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	wave_1:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_2:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_3:moveBehind( scene:child("ICON_LEVEL_13") )
	
	
	wave_1:setPivotPoint("center")
	wave_1:setAnchorPoint("center")
	wave_2:setPivotPoint("center")
	wave_2:setAnchorPoint("center")
	wave_3:setPivotPoint("center")
	wave_3:setAnchorPoint("center")
	
	
	wave_1:doEvery(math.Random(300,6000), function()
		wave_1:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (230, 390), y = math.Random (530, 570)},
			{alpha = math.Random (0.1, 0.6), dx = 14, dy = -11, duration = 2700},
			{alpha = 0, dx = 14, dy = -11, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_2:doEvery(math.Random(300,6000), function()
		wave_2:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (230, 390), y = math.Random (530, 570)},
			{alpha = math.Random (0.1, 0.6), dx = 14, dy = -11, duration = 2700},
			{alpha = 0, dx = 14, dy = -11, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_3:doEvery(math.Random(300,6000), function()
		wave_3:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (230, 390), y = math.Random (530, 570)},
			{alpha = math.Random (0.1, 0.6), dx = 14, dy = -11, duration = 2700},
			{alpha = 0, dx = 14, dy = -11, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- 3 waves near Docks area...
	local	wave_4 = scene:newChildSprite(
	{image = "Wave_1", rotation = -40, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_5 = scene:newChildSprite(
	{image = "Wave_2", rotation = -40, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_6 = scene:newChildSprite(
	{image = "Wave_3", rotation = -40, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	
	wave_4:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_5:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_6:moveBehind( scene:child("ICON_LEVEL_13") )
	
	wave_4:setPivotPoint("center")
	wave_4:setAnchorPoint("center")
	wave_5:setPivotPoint("center")
	wave_5:setAnchorPoint("center")
	wave_6:setPivotPoint("center")
	wave_6:setAnchorPoint("center")
	
	
	wave_4:doEvery(math.Random(300,6000), function()
		wave_4:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (726,800), y = math.Random (443,490)},
			{alpha = math.Random (0.1, 0.6), dx = -23, dy = -5, duration = 2700},
			{alpha = 0, dx = -23, dy = -5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_5:doEvery(math.Random(300,6000), function()
		wave_5:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (726,800), y = math.Random (443,490)},
			{alpha = math.Random (0.1, 0.6), dx = -23, dy = -5, duration = 2700},
			{alpha = 0, dx = -23, dy = -5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_6:doEvery(math.Random(300,6000), function()
		wave_6:animate(
			{scale = math.Random (.7, 1.0), x = math.Random (726,800), y = math.Random (443,490)},
			{alpha = math.Random (0.1, 0.6), dx = -23, dy = -5, duration = 2700},
			{alpha = 0, dx = -23, dy = -5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- 3 waves near Living area...
	local	wave_7 = scene:newChildSprite(
	{image = "Wave_1", rotation = -115, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_8 = scene:newChildSprite(
	{image = "Wave_2", rotation = -115, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_9 = scene:newChildSprite(
	{image = "Wave_3", rotation = -115, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	
	wave_7:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_8:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_9:moveBehind( scene:child("ICON_LEVEL_13") )
	
	
	wave_7:setPivotPoint("center")
	wave_7:setAnchorPoint("center")
	wave_8:setPivotPoint("center")
	wave_8:setAnchorPoint("center")
	wave_9:setPivotPoint("center")
	wave_9:setAnchorPoint("center")
	
	
	wave_7:doEvery(math.Random(300,6000), function()
		wave_7:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (785,820), y = math.Random (237,300)},
			{alpha = math.Random (0.1, 0.4), dx = -15, dy = 5, duration = 2700},
			{alpha = 0, dx = -15, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_8:doEvery(math.Random(300,6000), function()
		wave_8:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (785,820), y = math.Random (237,300)},
			{alpha = math.Random (0.1, 0.4), dx = -15, dy = 5, duration = 2700},
			{alpha = 0, dx = -15, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_9:doEvery(math.Random(300,6000), function()
		wave_9:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (785,820), y = math.Random (237,300)},
			{alpha = math.Random (0.1, 0.4), dx = -15, dy = 5, duration = 2700},
			{alpha = 0, dx = -15, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- 3 waves near Shipwreck area...
	local	wave_10 = scene:newChildSprite(
	{image = "Wave_1", rotation = -166, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_11 = scene:newChildSprite(
	{image = "Wave_2", rotation = -166, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_12 = scene:newChildSprite(
	{image = "Wave_3", rotation = -166, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	
	wave_10:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_11:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_12:moveBehind( scene:child("ICON_LEVEL_13") )
	
	wave_10:setPivotPoint("center")
	wave_10:setAnchorPoint("center")
	wave_11:setPivotPoint("center")
	wave_11:setAnchorPoint("center")
	wave_12:setPivotPoint("center")
	wave_12:setAnchorPoint("center")
	
	
	wave_10:doEvery(math.Random(300,6000), function()
		wave_10:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (520,585), y = math.Random (101,127)},
			{alpha = math.Random (0.1, 0.4), dx = -10, dy = 10, duration = 2700},
			{alpha = 0, dx = -10, dy = 10, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_11:doEvery(math.Random(300,6000), function()
		wave_11:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (520,585), y = math.Random (101,127)},
			{alpha = math.Random (0.1, 0.4), dx = -10, dy = 10, duration = 2700},
			{alpha = 0, dx = -10, dy = 10, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_12:doEvery(math.Random(300,6000), function()
		wave_12:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (520,585), y = math.Random (101,127)},
			{alpha = math.Random (0.1, 0.4), dx = -10, dy = 10, duration = 2700},
			{alpha = 0, dx = -10, dy = 10, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- 3 waves near Ruins area...
	local	wave_13 = scene:newChildSprite(
	{image = "Wave_1", rotation = 151, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_14 = scene:newChildSprite(
	{image = "Wave_2", rotation = 151, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_15 = scene:newChildSprite(
	{image = "Wave_3", rotation = 151, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	
	wave_13:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_14:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_15:moveBehind( scene:child("ICON_LEVEL_13") )
	
	wave_13:setPivotPoint("center")
	wave_13:setAnchorPoint("center")
	wave_14:setPivotPoint("center")
	wave_14:setAnchorPoint("center")
	wave_15:setPivotPoint("center")
	wave_15:setAnchorPoint("center")
	
	
	wave_13:doEvery(math.Random(300,6000), function()
		wave_13:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (120,146), y = math.Random (142,177)},
			{alpha = math.Random (0.1, 0.4), dx = 9, dy = 5, duration = 2700},
			{alpha = 0, dx = 9, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_14:doEvery(math.Random(300,6000), function()
		wave_14:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (120,146), y = math.Random (142,177)},
			{alpha = math.Random (0.1, 0.4), dx = 9, dy = 5, duration = 2700},
			{alpha = 0, dx = 9, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_15:doEvery(math.Random(300,6000), function()
		wave_15:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (120,146), y = math.Random (142,177)},
			{alpha = math.Random (0.1, 0.4), dx = 9, dy = 5, duration = 2700},
			{alpha = 0, dx = 9, dy = 5, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- 3 waves near SCLab area...
	local	wave_16 = scene:newChildSprite(
	{image = "Wave_1", rotation = 65, alpha = 0.0, section = "scenemap", name = "Wave_ambient1", blendmode= "additive"})
	local	wave_17 = scene:newChildSprite(
	{image = "Wave_2", rotation = 65, alpha = 0.0, section = "scenemap", name = "Wave_ambient2", blendmode= "additive"})
	local	wave_18 = scene:newChildSprite(
	{image = "Wave_3", rotation = 65, alpha = 0.0, section = "scenemap", name = "Wave_ambient3", blendmode= "additive"})
	
	wave_16:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_17:moveBehind( scene:child("ICON_LEVEL_13") )
	wave_18:moveBehind( scene:child("ICON_LEVEL_13") )
	
	
	
	wave_16:setPivotPoint("center")
	wave_16:setAnchorPoint("center")
	wave_17:setPivotPoint("center")
	wave_17:setAnchorPoint("center")
	wave_18:setPivotPoint("center")
	wave_18:setAnchorPoint("center")
	
	
	wave_16:doEvery(math.Random(300,6000), function()
		wave_16:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (30,70), y = math.Random (410,420)},
			{alpha = math.Random (0.1, 0.4), dx = 7, dy = 2, duration = 2700},
			{alpha = 0, dx = 7, dy = 2, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_17:doEvery(math.Random(300,6000), function()
		wave_17:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (30,70), y = math.Random (410,420)},
			{alpha = math.Random (0.1, 0.4), dx = 7, dy = 2, duration = 2700},
			{alpha = 0, dx = 7, dy = 2, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	wave_18:doEvery(math.Random(300,6000), function()
		wave_18:animate(
			{scale = math.Random (.4, 1.0), x = math.Random (30,70), y = math.Random (410,420)},
			{alpha = math.Random (0.1, 0.4), dx = 7, dy = 2, duration = 2700},
			{alpha = 0, dx = 7, dy = 2, duration = 1800}
			)
		return math.Random(8000, 16000)
		end
	)
	
-- sparkly open sea

	local	searef_1 = scene:newChildSprite(
	{image = "SeaRef_1", alpha = 0.0, section = "scenemap", name = "sea reflections 1", blendmode= "additive"})
	local	searef_2 = scene:newChildSprite(
	{image = "SeaRef_2", alpha = 0.0, section = "scenemap", name = "sea reflections 2", blendmode= "additive"})
	local	searef_3 = scene:newChildSprite(
	{image = "SeaRef_3", alpha = 0.0, section = "scenemap", name = "sea reflections 3", blendmode= "additive"})
	local	searef_4 = scene:newChildSprite(
	{image = "SeaRef_4", alpha = 0.0, section = "scenemap", name = "sea reflections 4", blendmode= "additive"})
	local	searef_5 = scene:newChildSprite(
	{image = "SeaRef_5", alpha = 0.0, section = "scenemap", name = "sea reflections 5", blendmode= "additive"})
	
	searef_1:moveBehind( scene:child("ICON_LEVEL_13") )
	searef_2:moveBehind( scene:child("ICON_LEVEL_13") )
	searef_3:moveBehind( scene:child("ICON_LEVEL_13") )
	searef_4:moveBehind( scene:child("ICON_LEVEL_13") )
	searef_5:moveBehind( scene:child("ICON_LEVEL_13") )
		
	searef_1:doEvery(100, function()
		searef_1:animate(
			{alpha = math.Random (0.2, 0.3), duration = 500},
			{alpha = 0, duration = 500}
			)
		return 2500
		end
	)
	searef_2:doEvery(600, function()
		searef_2:animate(
			{alpha = math.Random (0.2, 0.3), duration = 500},
			{alpha = 0, duration = 500}
			)
		return 2500
		end
	)
	searef_3:doEvery(1100, function()
		searef_3:animate(
			{alpha = math.Random (0.2, 0.3), duration = 500},
			{alpha = 0, duration = 500}
			)
		return 2500
		end
	)
	searef_4:doEvery(1600, function()
		searef_4:animate(
			{alpha = math.Random (0.2, 0.3), duration = 500},
			{alpha = 0, duration = 500}
			)
		return 2500
		end
	)
	searef_5:doEvery(2100, function()
		searef_5:animate(
			{alpha = math.Random (0.2, 0.3), duration = 500},
			{alpha = 0, duration = 500}
			)
		return 2500
		end
	)
	
end

----end of Map ambients


----Scene Complete
function animateLevelComplete()
	local	ring1 = scene:newChildSprite(
	{scale= .60, x = 400, y = 300, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_1", section = "scenemainmenu", name = "LevelCompleteGraphic", blendmode= "additive"})
	local	ring2 = scene:newChildSprite(
	{scale= .60, blendmode= "additive",x = 400, y = 300, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_2", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	local	ring3 = scene:newChildSprite(
	{scale= .60, blendmode= "additive",x = 400, y = 300, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_3", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	local	ring4 = scene:newChildSprite(
	{scale= .60, blendmode= "additive",x = 400, y = 300, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_4", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	local	scparticle = scene:newChildSprite(
	{class = "ParticleEffect", x = 400, y =300, library = "SCENE_COMPLETE_PARTICLE", section = "scenelevels", name = "COMPLETE_SPARKLER",})
	scparticle:animate({delay=1700},
	{call=function() scparticle:play() end}) 
	local	lcg = scene:newChildSprite(
	{scale= .5, x = 400, y = 300, alpha = 0, anchorPoint = "center", image = "IMAGE_SCENE_COMPLETE", section = "scenelevels", name = "LevelCompleteGraphic"})


	ring1:animate(
			{scale= .8, duration= 2500},
			{rotation ="clockwise",duration = 30000})
	ring2:animate(
			{scale= .8, duration= 2500},
			{rotation ="counterclockwise", duration = 42500})
	ring3:animate(
			{scale= .8, duration= 2500},
			{rotation ="clockwise", duration = 40500})
	ring4:animate(
			{scale= .8, duration= 2500},
			{rotation ="counterclockwise", duration = 41000})

	---Animation
	lcg:animate(
			{delay= 2200},
			{scale =1.05, duration = 350}, 
			{scale =1.0, duration = 100})
	lcg:animate(
			{delay= 2300},
			{alpha =1, duration = 1000},
			{delay= 3000},
			{alpha = 0, duration= 1500})

	ring1:animate(
			{delay= 2700},
			{alpha = .3, duration=500},
			{delay= 1000},
			{alpha = 0, duration= 2000})
	ring2:animate(
			{delay= 3000},
			{alpha =.3, duration=500},
			{delay= 1300},
			{alpha = 0, duration= 2000})
			
	ring3:animate(
			{delay= 3300},
			{alpha = .3, duration=500},
			{delay= 1600},
			{alpha = 0, duration= 2000})
	ring4:animate(
			{delay= 3600},
			{alpha =.3, duration=500},
			{delay= 1900},
			{alpha = 0, duration= 2000})
			

end
----end of Scene Complete


----Main Menu ambients
function animateMainMenuPlayClicked()
	local	ring1 = scene:newChildSprite(
	{x = 407,y = 386, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_1", section = "scenemainmenu", name = "LevelCompleteGraphic", blendmode= "additive"})
	local	ring2 = scene:newChildSprite(
	{blendmode= "additive",x = 407, y = 386, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_2", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	local	ring3 = scene:newChildSprite(
	{blendmode= "additive",x = 407, y = 386, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_3", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	local	ring4 = scene:newChildSprite(
	{blendmode= "additive",x = 407, y = 386, alpha = 0, anchorPoint = "center", image = "IMAGE_MM_RING_4", section = "scenemainmenu", name = "LevelCompleteGraphic"})
	
	ring1:moveBehind( scene:child("MENU_BORDER") )
	ring2:moveBehind( scene:child("MENU_BORDER") )
	ring3:moveBehind( scene:child("MENU_BORDER") )
	ring4:moveBehind( scene:child("MENU_BORDER") )

	ring1:animate(
			{rotation ="clockwise",duration = 25000})
	ring2:animate(
			{rotation ="counterclockwise", duration = 25000})
	ring3:animate(
			{rotation ="clockwise", duration = 25000})
	ring4:animate(
			{rotation ="counterclockwise", duration = 25000})

	ring1:animate(
			{delay= 300},
			{alpha = .5, duration=500},
			{delay= 900},
			{alpha = 0, duration=630})
	ring2:animate(
			{delay= 600},
			{alpha =.5, duration=500},
			{delay= 1200},
			{alpha = 0, duration= 630})
	ring3:animate(
			{delay= 900},
			{alpha = .5, duration=500},
			{delay= 1500},
			{alpha = 0, duration= 630})
	ring4:animate(
			{delay= 1200},
			{alpha =.5, duration=500},
			{delay= 1800},
			{alpha = 0, duration= 630})

	-- here you go, Rodney
end


function animateMainMenu()
	local	martinSheen = scene:child("PLAYSHEEN")
	martinSheen:doEvery(3500, function()		-- repeat this stuff
		martinSheen:animate(
			{startframe = 0, frametime = 40}
		)
		return math.Random(7000,12000)		-- this number is delay before repeating; must be larger than duration of stuff we do above.
		end
	)

	local	flower = scene:child("FLOWER_1")	-- get the flower sprite from the scene
	if flower ~= nil then
		flower:doEvery(0, function()		-- repeat this stuff
			flower:animate(
				{rotation = math.Random(5,8), duration = math.Random(1000,2000), style="easeInOut"},	-- rotates flower to the right
				{rotation = math.Random(2,5), duration = math.Random(1000,2000), style="easeInOut"}		-- rotates flower to the left
			)
			return math.Random(2000,4000)		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	flower = scene:child("FLOWER_1")	-- get the flower sprite from the scene
	if flower ~= nil then
		flower:doEvery(0, function()		-- repeat this stuff
			flower:animate(
				{x =46, duration = math.Random(1000,2000), style="easeInOut"},	-- moves flower to the right
				{x =44, duration = math.Random(1000,2000), style="easeInOut"}	-- moves flower to the left
			)
			return math.Random(2000,4000)		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	leaf9 = scene:child("LEAF_9")	-- get the leaf sprite from the scene

	if leaf9 ~= nil then
		leaf9:doEvery(0, function()		-- repeat this stuff
			leaf9:animate(
				{rotation = math.Random(155,160), duration = 2000, style="easeInOut"},	-- rotates leaf9 to the right
				{rotation = math.Random(150,155), duration = 2000, style="easeInOut"}	-- rotates leaf9 to the left
			)
			return 4000		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	leaf10 = scene:child("LEAF_10")	-- get the leaf sprite from the scene

	if leaf10 ~= nil then
		leaf10:doEvery(0, function()		-- repeat this stuff
			leaf10:animate(
				{rotation = math.Random(230,240), duration = 2400, style="easeInOut"},	-- rotates leaf10 to the right
				{rotation = math.Random(220,230), duration = 2400, style="easeInOut"}	-- rotates leaf10 to the left
			)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end
	
	local	leaf11 = scene:child("LEAF_11")	-- get the leaf sprite from the scene

	if leaf11 ~= nil then
		leaf11:doEvery(0, function()		-- repeat this stuff
			leaf11:animate(
				{rotation = math.Random(115,120), duration = 2000, style="easeInOut"},	-- rotates leaf11 to the right
				{rotation = math.Random(110,115), duration = 2000, style="easeInOut"}	-- rotates leaf11 to the left
			)
			return 4000		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	leafset3 = scene:child("LEAF_SET3")	-- get the leaf sprite from the scene

	if leafset3 ~= nil then
		leafset3:doEvery(0, function()		-- repeat this stuff
			leafset3:animate(
				{rotation = math.Random(120,121), duration = 2000, style="easeInOut"},	-- rotates leafset3 to the right
				{rotation = math.Random(119,120), duration = 2000, style="easeInOut"}	-- rotates leafset3 to the left
			)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	set3leaf1 = leafset3:child("LEAF_1")	-- get the leaf sprite from the scene

	if set3leaf1 ~= nil then
		set3leaf1:doEvery(0, function()		-- repeat this stuff
			set3leaf1:animate(
				{rotation = math.Random(72,74), duration = 2400, style="easeInOut"},	--rotates set3leaf1 to the right
				{rotation = math.Random(70,72), duration = 2400, style="easeInOut"}	-- rotates set3leaf1 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

		local	set3leaf2 = leafset3:child("LEAF_2")	-- get the leaf sprite from the scene

	if set3leaf2 ~= nil then
		set3leaf2:doEvery(0, function()		-- repeat this stuff
			set3leaf2:animate(
				{rotation = math.Random(143,146), duration = 2400, style="easeInOut"},	-- rotates set3leaf2 to the right
				{rotation = math.Random(138,143), duration = 2400, style="easeInOut"}	-- rotates set3leaf2 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

		local	set3leaf3 = leafset3:child("LEAF_3")	-- get the leaf sprite from the scene

	if set3leaf3 ~= nil then
		set3leaf3:doEvery(0, function()		-- repeat this stuff
			set3leaf3:animate(
				{rotation = math.Random(40,42), duration = 2400, style="easeInOut"},	-- rotates set3leaf3 to the right
				{rotation = math.Random(38,40), duration = 2400, style="easeInOut"}	-- rotates set3leaf3 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

		local	set3leaf4 = leafset3:child("LEAF_4")	-- get the leaf sprite from the scene

	if set3leaf4 ~= nil then
		set3leaf4:doEvery(0, function()		-- repeat this stuff
			set3leaf4:animate(
				{rotation = math.Random(57,59), duration = 2400, style="easeInOut"},	-- rotates set3leaf4 to the right
				{rotation = math.Random(55,57), duration = 2400, style="easeInOut"}	-- rotates set3leaf4 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

		local	set3leaf5 = leafset3:child("LEAF_5")	-- get the leaf sprite from the scene

	if set3leaf5 ~= nil then
		set3leaf5:doEvery(0, function()		-- repeat this stuff
			set3leaf5:animate(
				{rotation = math.Random(-22,-20), duration = 2400, style="easeInOut"},	-- rotates set3leaf5 to the right
				{rotation = math.Random(-24,-22), duration = 2400, style="easeInOut"}	-- rotates set3leaf5 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

	local	leafset1 = scene:child("LEAF_SET1")	-- get the leaf sprite from the scene

	if leafset1 ~= nil then
		leafset1:doEvery(0, function()		-- repeat this stuff
			leafset1:animate(
				{rotation = math.Random(20,21), duration = 2000, style="easeInOut"},	-- rotates leafset1 to the right
				{rotation = math.Random(19,20), duration = 2000, style="easeInOut"}	-- rotates leafset1 to the left
			)
			return 4000		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end

	local	set1leaf1 = leafset1:child("LEAF_1")	-- get the leaf sprite from the scene

	if set1leaf1 ~= nil then
		set1leaf1:doEvery(0, function()		-- repeat this stuff
			set1leaf1:animate(
				{rotation = math.Random(72,74), duration = 2400, style="easeInOut"},	--rotates set1leaf1 to the right
				{rotation = math.Random(70,72), duration = 2400, style="easeInOut"}	-- rotates set1leaf1 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

	local	set1leaf2 = leafset1:child("LEAF_2")	-- get the leaf sprite from the scene

	if set1leaf2 ~= nil then
		set1leaf2:doEvery(0, function()		-- repeat this stuff
			set1leaf2:animate(
				{rotation = math.Random(143,146), duration = 2400, style="easeInOut"},	-- rotates set1leaf2 to the right
				{rotation = math.Random(138,143), duration = 2400, style="easeInOut"}	-- rotates set1leaf2 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end

		local	set1leaf3 = leafset1:child("LEAF_3")	-- get the leaf sprite from the scene

	if set1leaf3 ~= nil then
		set1leaf3:doEvery(0, function()		-- repeat this stuff
			set1leaf3:animate(
				{rotation = math.Random(40,42), duration = 2400, style="easeInOut"},	-- rotates set1leaf3 to the right
				{rotation = math.Random(38,40), duration = 2400, style="easeInOut"}	-- rotates set1leaf3 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end
			local	set1leaf4 = leafset1:child("LEAF_4")	-- get the leaf sprite from the scene

	if set1leaf4 ~= nil then
		set1leaf4:doEvery(0, function()		-- repeat this stuff
			set1leaf4:animate(
				{rotation = math.Random(57,59), duration = 2400, style="easeInOut"},	-- rotates set1leaf4 to the right
				{rotation = math.Random(55,57), duration = 2400, style="easeInOut"}	-- rotates set1leaf4 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end
	
		local	set1leaf5 = leafset1:child("LEAF_5")	-- get the leaf sprite from the scene

	if set1leaf5 ~= nil then
		set1leaf5:doEvery(0, function()		-- repeat this stuff
			set1leaf5:animate(
				{rotation = math.Random(-22,-20), duration = 2400, style="easeInOut"},	-- rotates set1leaf5 to the right
				{rotation = math.Random(-24,-22), duration = 2400, style="easeInOut"}	-- rotates set1leaf5 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end	
			local	set1leaf7 = leafset1:child("LEAF_7")	-- get the leaf sprite from the scene

	if set1leaf7 ~= nil then
		set1leaf7:doEvery(0, function()		-- repeat this stuff
			set1leaf7:animate(
				{rotation = math.Random(-17,-16), duration = 2400, style="easeInOut"},	-- rotates set1leaf7 to the right
				{rotation = math.Random(-18,-17), duration = 2400, style="easeInOut"}	-- rotates set1leaf7 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end
	
				local	set1leaf8 = leafset1:child("LEAF_8")	-- get the leaf sprite from the scene

	if set1leaf8 ~= nil then
		set1leaf8:doEvery(0, function()		-- repeat this stuff
			set1leaf8:animate(
				{rotation = math.Random(69,70), duration = 2400, style="easeInOut"},	-- rotates set1leaf8 to the right
				{rotation = math.Random(68,69), duration = 2400, style="easeInOut"}	-- rotates set1leaf8 to the left
				)
			return 4800		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
			)
	end
	
	local	leafset2 = scene:child("LEAF_SET2")	-- get the leaf sprite from the scene

	if leafset2 ~= nil then
		leafset2:doEvery(0, function()		-- repeat this stuff
			leafset2:animate(
				{rotation = math.Random(-115,-114), duration = 3000, style="easeInOut"},	-- rotates leafset2 to the right
				{rotation = math.Random(-116,-115), duration = 3000, style="easeInOut"}	-- rotates leafset2 to the left
			)
			return 6000		-- this number is delay before repeating; must be larger than duration of stuff we do above.
			end
		)
	end
	
-- Matt's ants
-- the following is the ant that walks around/near the play button. Currently on hiatus while we figure out what works best

--[[	local	ant_1 = scene:newChildSprite(
	{image = "Ant_Mainmenu", scale = .5, rotation = -115, section = "scenemainmenu", name = "walking ant"})
	
	ant_1:moveBehind( scene:child("SHADOW") )
	
	ant_1:setFlipImageHorizontal(false)
	ant_1:setPivotPoint("center")
	ant_1:setAnchorPoint("center")
	
	
	ant_1:doEvery(math.Random(3000,56000), function()
		ant_1:animate(
			{x = -40, y = 240, rotation = 35},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 4},
				{x = 60, y = 282, duration = 1584},
			},
			{
				{rotation = 0, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = 273, y = 282, duration = 2376},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 120), direction = "backward"},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 120), direction = "backward"},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = 449, y = 293, duration = 2376},
			},
			{
				{rotation = 45, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{delay = 1500},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 3},
				{x = 502, y = 345, duration = 1188},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 120), direction = "backward"},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 120), direction = "backward"},
			{
				{rotation = 90, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = 523, y = 455, duration = 2376},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 120), direction = "backward"},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 120)},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 80), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{
				{rotation = 120, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = 401, y = 630, duration = 3168},
			}
			)
		return math.Random(58000,126000)
		end
	)

--]]

-- marching ant procession consists of 12 ants on loose rails,  punctuated with certain pauses, antennae wiggles and cleanings...
	local	ant_march_1 = scene:newChildSprite(
	{image = "Ant_Mainmenu",alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 1"})
	local	ant_march_2 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .25, rotation = 110, section = "scenemainmenu", name = "walking ant 2"})
	local	ant_march_3 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 3"})
	local	ant_march_4 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .3, rotation = 110, section = "scenemainmenu", name = "walking ant 4"})
	local	ant_march_5 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 5"})
	local	ant_march_6 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 6"})
	local	ant_march_7 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .25, rotation = 110, section = "scenemainmenu", name = "walking ant 7"})
	local	ant_march_8 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 8"})
	local	ant_march_9 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 9"})
	local	ant_march_10 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 10"})
	local	ant_march_11 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .2, rotation = 110, section = "scenemainmenu", name = "walking ant 11"})
	local	ant_march_12 = scene:newChildSprite(
	{image = "Ant_Mainmenu", alpha = .7, scale = .3, rotation = 110, section = "scenemainmenu", name = "walking ant 12"})
	
	ant_march_1:moveBehind( scene:child("SHADOW") )
	ant_march_2:moveBehind( scene:child("SHADOW") )
	ant_march_3:moveBehind( scene:child("SHADOW") )
	ant_march_4:moveBehind( scene:child("SHADOW") )
	ant_march_5:moveBehind( scene:child("SHADOW") )
	ant_march_6:moveBehind( scene:child("SHADOW") )
	ant_march_7:moveBehind( scene:child("SHADOW") )
	ant_march_8:moveBehind( scene:child("SHADOW") )
	ant_march_9:moveBehind( scene:child("SHADOW") )
	ant_march_10:moveBehind( scene:child("SHADOW") )
	ant_march_11:moveBehind( scene:child("SHADOW") )
	ant_march_12:moveBehind( scene:child("SHADOW") )
	
	ant_march_1:setFlipImageHorizontal(false)
	ant_march_2:setFlipImageHorizontal(false)
	ant_march_3:setFlipImageHorizontal(false)
	ant_march_4:setFlipImageHorizontal(false)
	ant_march_5:setFlipImageHorizontal(false)
	ant_march_6:setFlipImageHorizontal(false)
	ant_march_7:setFlipImageHorizontal(false)
	ant_march_8:setFlipImageHorizontal(false)
	ant_march_9:setFlipImageHorizontal(false)
	ant_march_10:setFlipImageHorizontal(false)
	ant_march_11:setFlipImageHorizontal(false)
	ant_march_12:setFlipImageHorizontal(false)
	ant_march_1:setPivotPoint("center")
	ant_march_2:setPivotPoint("center")
	ant_march_3:setPivotPoint("center")
	ant_march_4:setPivotPoint("center")
	ant_march_5:setPivotPoint("center")
	ant_march_6:setPivotPoint("center")
	ant_march_7:setPivotPoint("center")
	ant_march_8:setPivotPoint("center")
	ant_march_9:setPivotPoint("center")
	ant_march_10:setPivotPoint("center")
	ant_march_11:setPivotPoint("center")
	ant_march_12:setPivotPoint("center")
	ant_march_1:setAnchorPoint("center")
	ant_march_2:setAnchorPoint("center")
	ant_march_3:setAnchorPoint("center")
	ant_march_4:setAnchorPoint("center")
	ant_march_5:setAnchorPoint("center")
	ant_march_6:setAnchorPoint("center")
	ant_march_7:setAnchorPoint("center")
	ant_march_8:setAnchorPoint("center")
	ant_march_9:setAnchorPoint("center")
	ant_march_10:setAnchorPoint("center")
	ant_march_11:setAnchorPoint("center")
	ant_march_12:setAnchorPoint("center")
	
	
	ant_march_1:doEvery(8000, function()
		ant_march_1:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 80)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 80)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_2:doEvery(12000, function()
		ant_march_2:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 80), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 60), direction = "backward"},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 120), direction = "backward"},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_3:doEvery(16000, function()
		ant_march_3:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 80)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{delay = math.Random(300,1000)},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_4:doEvery(20000, function()
		ant_march_4:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_5:doEvery(24000, function()
		ant_march_5:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{delay = math.Random(300,1000)},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 80)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_6:doEvery(28000, function()
		ant_march_6:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{delay = math.Random(300,1000)},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_7:doEvery(32000, function()
		ant_march_7:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 80)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_8:doEvery(36000, function()
		ant_march_8:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_9:doEvery(40000, function()
		ant_march_9:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{delay = math.Random(300,1000)},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_10:doEvery(44000, function()
		ant_march_10:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 80), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 60), direction = "backward"},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{startFrame = 12, endFrame = 23, frameTime = math.Random (33, 80)},
			{startFrame = 23, endFrame = 12, frameTime = math.Random (33, 80), direction = "backward"},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_11:doEvery(48000, function()
		ant_march_11:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{delay = math.Random(300,1000)},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = math.Random(80,98), duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(555,570), y = -40, duration = 3168},
			}
			)
		return 126000
		end
	)
	ant_march_12:doEvery(52000, function()
		ant_march_12:animate(
			{x = 244, y = -40, rotation = 110},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 6},
				{x = math.Random(220,226), y = 55, duration = 2376},
			},
			{
				{rotation = 130, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(165,172), y = 129, duration = 2772},
			},
			{
				{rotation = -15, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 8},
				{x = math.Random(350,370,226), y = math.Random(89,112), duration = 3168},
			},
			{
				{rotation = 10, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 7},
				{x = math.Random(505,522), y = 86, duration = 2772},
			},
			{
				{rotation = -70, duration = 396},
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 1},
			},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 80), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 60), direction = "backward"},
			{delay = math.Random (1000,2500)},
			{startFrame = 24, endFrame = 35, frameTime = math.Random (33, 120)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 60), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 27, frameTime = math.Random (33, 80), direction = "backward"},
			{startFrame = 27, endFrame = 35, frameTime = math.Random (33, 70)},
			{startFrame = 35, endFrame = 24, frameTime = math.Random (33, 60), direction = "backward"},
			{
				{startFrame = 0, endFrame = 11, frameTime = 33, loops = 5},
				{x = math.Random(555,570), y = -40, duration = 1980},
			}
			)
		return 126000
		end
	)




--End Matt's Ants
end
----end Main Menu ambients
