home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 November
/
CDVD1105.ISO
/
Util
/
Winamp
/
Skins
/
Official_Batman_Winamp5_Skin.wal
/
maki
/
shade.m
< prev
next >
Wrap
Text File
|
2004-07-30
|
830b
|
39 lines
#include <lib/std.mi>
#define ROTATION_LAYER_VAR MyVar
#include <lib/rotationlayer.m>
Global Group thisGroup;
Global Layer seekLayer;
Global Map seekMap;
Global Timer m_timer;
System.onScriptLoaded() {
thisGroup = getScriptGroup();
seekMap = new map;
seekMap.loadMap("shade.map");
seekLayer = thisGroup.getObject("POS full");
m_timer = new timer;
m_timer.setDelay(200);
m_timer.start();
_MyVarInit(thisGroup, "knobs");
}
System.onVolumeChanged(int newvol) {
_MyVarRotateDegree(newvol*(360/255));
}
System.onSeek(int newpos) {
if (newpos <= 0) return;
int len = getPlayItemLength();
if(len <= 0) return;
int devby = len/255;
if(devby <= 0) return;
seekLayer.setRegionFromMap(seekMap,newpos/devby,1);
}
m_timer.onTimer() {
System.onSeek(getPosition());
}