--Otherwise, things don't look right. -Kid
local ten_height_ratio = SCREEN_HEIGHT/480
local ten_width_ratio = SCREEN_WIDTH/640
return Def.ActorFrame{
  Name= "xtl_actor_a",
  InitCommand= function(self) ten_ALL_BG = self end,
  Def.Sprite{
    Name= "xtl_actor_b",
    Frames= {
      {Frame= 0, Delay= 0.034},
      {Frame= 1, Delay= 0.034},
      {Frame= 2, Delay= 0.034},
      {Frame= 3, Delay= 0.034},
  },
    InitCommand= function(self) ten_static = self; self:draworder(-999); end,
    OnCommand= cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffusealpha,0),
    Texture= "./_static 4x1.png",
  },
  Def.Sprite{
    Name= "xtl_actor_c",
    InitCommand= function(self) ten_bg = self; end,
    OnCommand= cmd(diffusealpha,0.5;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;zoom,0;rotationz,540;rotationx,720;rotationy,360;--Split zoom into x & y. -Kid
	linear,15*(60/140);zoomx,ten_width_ratio;zoomy,ten_height_ratio;rotationx,0;rotationy,0;rotationz,0),
    Texture= "../bg.png",
  },
  Def.Sprite{
    Name= "xtl_actor_d",
    OnCommand= function(self)
	ten_ebg1=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffusealpha(1)
	self:cropright(1)
	self:zoomx(ten_width_ratio):zoomy(ten_height_ratio)--Added zooms. -Kid
	end,
    Texture= "background_90.png",
  },
  Def.Sprite{
    Name= "xtl_actor_e",
    OnCommand= function(self)
	ten_ebg2=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffusealpha(1)
	self:cropright(1)
	self:zoomx(ten_width_ratio):zoomy(ten_height_ratio)--Added zooms. -Kid
	end,
    Texture= "background.png",
  },
  Def.Sprite{
    Name= "xtl_actor_f",
    OnCommand= function(self)
	ten_ebg3=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffusealpha(1)
	self:cropright(1)
	self:zoomx(ten_width_ratio):zoomy(ten_height_ratio)--Added zooms. -Kid
	end,
    Texture= "background_91.png",
  },
  Def.Sprite{
    Name= "xtl_actor_g",
    OnCommand= function(self)
	ten_ebg4=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffusealpha(1)
	self:cropright(1)
	self:zoomx(ten_width_ratio):zoomy(ten_height_ratio)--Added zooms. -Kid
	end,
    Texture= "background_180.png",
  },
  Def.Sprite{
    Name= "xtl_actor_h",
    OnCommand= function(self)
	ten_ebg5=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffusealpha(1)
	self:cropright(1)
	self:zoomx(ten_width_ratio):zoomy(ten_height_ratio)--Added zooms. -Kid
	end,
    Texture= "background_90.png",
  },
  Def.Quad{
    Name= "xtl_actor_i",
    OnCommand= function(self)
	ten_helperq=self
	ten_wackyTimes=0
	ten_wackyNum=1
	self:visible(false)
	end,
    StartWackyCommand= function(self)

	if ten_wackyTimes==0 then
		ten_ebg1:stoptweening()
		ten_ebg1:visible(true)
		ten_ebg1:cropright(0)
	else

	end

	if ten_wackyNum<5 then

		_G['ten_ebg'..ten_wackyNum]:visible(true)
		_G['ten_ebg'..ten_wackyNum]:linear(2)
		_G['ten_ebg'..ten_wackyNum]:cropright(0)
		_G['ten_ebg'..ten_wackyNum]:sleep(2)
		_G['ten_ebg'..ten_wackyNum]:cropright(1)
		ten_wackyNum=ten_wackyNum+1
		ten_wackyTimes=1
	else
		_G['ten_ebg'..1]:visible(true)
		_G['ten_ebg'..1]:cropright(0)
		_G['ten_ebg'..5]:visible(true)
		_G['ten_ebg'..5]:cropright(1)
		_G['ten_ebg'..5]:linear(2)
		_G['ten_ebg'..5]:cropright(0)
		_G['ten_ebg'..5]:sleep(0)
		_G['ten_ebg'..5]:cropright(1)
		--ten_wackyTimes=0
		ten_wackyNum=2
	end

	self:sleep(2)
	self:queuecommand('StartWacky')


	end,
  },
  Def.Quad{
    Name= "xtl_actor_j",
    OnCommand= function(self)
	ten_bgCover=self
	self:x(SCREEN_CENTER_X)
	self:y(SCREEN_CENTER_Y)
	self:diffuse(0,0,0,0)
	self:zoomx(SCREEN_WIDTH)
	self:zoomy(SCREEN_HEIGHT)
	end,
  },
}
