2013-07-18 17:41:00 -04:00
|
|
|
local Color1 = color(Var "Color1");
|
|
|
|
|
|
|
|
|
|
local t = Def.ActorFrame {
|
|
|
|
|
LoadActor(Var "File1") .. {
|
2014-10-19 18:29:06 -05:00
|
|
|
OnCommand=function(self)
|
|
|
|
|
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
|
|
|
|
|
self:scale_or_crop_background()
|
|
|
|
|
self:diffuse(Color1)
|
2015-02-05 00:37:08 -07:00
|
|
|
-- The playback rate in the simfile is used to set the update rate
|
|
|
|
|
-- on the ActorFrame, but effectclock("music") causes the sprite to
|
|
|
|
|
-- ignore the passed in delta time and use the music time instead.
|
|
|
|
|
-- So this passes the update rate in to the texture. -Kyz
|
|
|
|
|
if self.GetTexture then
|
|
|
|
|
self:GetTexture():rate(self:GetParent():GetUpdateRate())
|
|
|
|
|
end
|
|
|
|
|
if self.loop then
|
2014-10-19 18:29:06 -05:00
|
|
|
self:loop(false)
|
|
|
|
|
-- make videos start at beginning to prevent sticking on last frame
|
|
|
|
|
self:position(0)
|
|
|
|
|
end
|
|
|
|
|
self:effectclock("music")
|
|
|
|
|
end;
|
2013-07-18 17:41:00 -04:00
|
|
|
GainFocusCommand=cmd(play);
|
|
|
|
|
LoseFocusCommand=cmd(pause);
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return t;
|