local bt=60/127 --beattime, 60 seconds over 127 bpm

local dog5h=math.random(100,SCREEN_HEIGHT-100)


return Def.ActorFrame{

	InitCommand=function(self)

		self:sleep(9999)

		--SCREENMAN:SystemMessage("hey")

	end,

	

	Def.Sprite{

		Name="dog1",

		Texture="../_Graphics/mpdog",

		InitCommand=function(self)

			self:zoom(0.5):xy(SCREEN_WIDTH+100,math.random(20,SCREEN_HEIGHT-20))
		end, --InitCommand()
		

		OnCommand=function(self)

			self:linear(bt):x(-100)
		end --OnCommand()

		
	}, --Def.Sprite	

	Def.Sprite{

		Name="dog2",

		Texture="../_Graphics/mpdog",

		InitCommand=function(self)

			self:zoom(0.5):xy(SCREEN_WIDTH+100,math.random(20,SCREEN_HEIGHT-20))
		end, --InitCommand()
		

		OnCommand=function(self)

			self:sleep(bt*0.5):linear(bt):x(-100)
		end --OnCommand()

		
	}, --Def.Sprite	

	Def.Sprite{

		Name="dog3",

		Texture="../_Graphics/mpdog",

		InitCommand=function(self)

			self:zoom(0.5):xy(SCREEN_WIDTH+100,math.random(20,SCREEN_HEIGHT-20))
		end, --InitCommand()
		

		OnCommand=function(self)

			self:sleep(bt):linear(bt):x(-100)
		end --OnCommand()

		
	}, --Def.Sprite	

	Def.Sprite{

		Name="dog4",

		Texture="../_Graphics/mpdog",

		InitCommand=function(self)

			self:zoom(0.5):xy(SCREEN_WIDTH+100,math.random(20,SCREEN_HEIGHT-20))
		end, --InitCommand()
		

		OnCommand=function(self)

			self:sleep(bt*1.313):linear(bt):x(-100)
		end --OnCommand()

		
	}, --Def.Sprite	

	
	Def.ActorFrame{
		Name="dog5AF",
		InitCommand=function(self)
		end,
		OnCommand=function(self)
			self:sleep(bt*2)
			:accelerate(bt*0.5):y(SCREEN_HEIGHT-dog5h)
		end,
		Def.Sprite{

			Name="dog5",

			Texture="../_Graphics/utdog",

			InitCommand=function(self)

				self:zoom(0.5):xy(SCREEN_WIDTH+100,dog5h-50)
			end, --InitCommand()
			

			OnCommand=function(self)

				self:sleep(bt*2):linear(bt*0.5):x(SCREEN_CENTER_X)--:queuecommand("Stay")
				:sleep(bt*1)
				:decelerate(bt*0.125):y(-500)
			end, --OnCommand()

--[[
			StayCommand=function(self)
				self:sleep(bt*math.random(1,3)):queuecommand("Hop")
			end
			HopCommand=function(self)
				self:GetParent():queuecommand("Hop")
				if (dog5yflip==1 and dog5x+30>SCREEN_WIDTH-50) then
					dog5yflip=0
					dog5dx=-1
				elseif (dog5yflip=0 and dog5x-30<50) then
					dog5yflip=1
					dog5dx=1
				end
				self:rotationy(180*dog5yflip)
				:decelerate(0.1):x(dog5x+5*dog5dx):accelerate(0.1):x(dog5x+10*dog5dx)
				:decelerate(0.1):x(dog5x+15*dog5dx):accelerate(0.1):x(dog5x+20*dog5dx)
				:decelerate(0.1):x(dog5x+25*dog5dx):accelerate(0.1):x(dog5x+30*dog5dx)
				:queuecommand("stay")
				dog5x=dog5x+30*dog5dx
			end	
]]--		
		} --Def.Sprite
	}
}