home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 November
/
CDVD1105.ISO
/
Util
/
Winamp
/
Skins
/
EMP.wal
/
scripts
/
custom.maki
(
.txt
)
next >
Wrap
Winamp Compiled Maki Script
|
2003-06-19
|
11KB
|
639 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global Container Container2;
Global Layout Layout3;
Global Layout Layout4;
Global Layout Layout5;
Global Layout Layout6;
Global Button Button7;
Global Button Button8;
Global Button Button9;
Global Button Button10;
Global Group Group11;
Global Layer Layer12;
Global Layer Layer13;
Global Layer Layer14;
Global Layer Layer15;
Global Slider Slider16;
Global Slider Slider17;
Global Slider Slider18;
Global Text Text19;
Global Text Text20;
Global Text Text21;
Global Boolean Boolean22;
Global Boolean Boolean23;
Global Timer Timer24;
Global Timer Timer25;
Global PopupMenu PopupMenu26;
Global Int Int27;
Global Int Int28;
Global Int Int29;
Global Int Int30;
Global Int Int31;
Global AnimatedLayer AnimatedLayer32;
Global Vis Vis33;
Global Button Button34;
Global Button Button35;
Global Button Button36;
Global Button Button37;
Global Button Button38;
Global Slider Slider39;
Global Text Text40;
Global Int Int41;
Global Int Int42;
Global Int Int43;
Global Int Int44;
Function func1834();
Function func1976();
Function func2118();
Function func3799(String "0");
Function func4349(Int 0);
Function func5475();
System.onScriptLoaded()
{
Group Group68;
Int Int91;
Layout Layout79;
Int30 = System.getPrivateInt(( "EMP"), ( "bary"), 0);
Int27 = System.getPrivateInt(( "EMP"), ( "normx"), 0);
Int28 = System.getPrivateInt(( "EMP"), ( "normy"), 0);
Int41 = System.getPrivateInt(( "EMP"), ( "vismode"), 1);
Int44 = System.getPrivateInt(( "EMP"), ( "allowticker"), 1);
Int42 = System.getPrivateInt(( "EMP"), ( "viscutoff"), 179);
Int43 = System.getPrivateInt(( "EMP"), ( "enablevistimer"), 1);
Boolean23 = 0;
Container2 = System.getContainer(( "main"));
Layout3 = Container2.getLayout(( "normal"));
Layout4 = Container2.getLayout(( "remote"));
Layout5 = Container2.getLayout(( "bar"));
Layout5.resize(Int29, Int30, Layout5.getWidth(), Layout5.getHeight());
Layout3.resize(Int27, Int28, Layout3.getWidth(), Layout3.getHeight());
Layout4.resize(Int27, ( Int28 + 153), Layout4.getWidth(), Layout4.getHeight());
Text21 = Layout5.findObject(( "bartext"));
Vis33 = System.getContainer(( "thinger")).getLayout(( "normal")).findObject(( "thingervis"));
Vis33.setRealtime(0);
Vis33.setMode(2);
Group68 = Layout3.getObject(( "main\.normal"));
Layer12 = Group68.getObject(( "posfill"));
Slider16 = Group68.getObject(( "posslider"));
Text19 = Group68.getObject(( "songticker"));
Text20 = Group68.getObject(( "hiddentext"));
Text20.hide();
Slider17 = Group68.getObject(( "balslider"));
Slider18 = Group68.getObject(( "volslider"));
Layer14 = Group68.getObject(( "balcent"));
Layer15 = Group68.getObject(( "posback"));
AnimatedLayer32 = Group68.getObject(( "main\.lights"));
Layout79 = System.getContainer(( "opt")).getLayout(( "normal"));
Button34 = Layout79.findObject(( "levels"));
Button35 = Layout79.findObject(( "pulse"));
Button36 = Layout79.findObject(( "absolute"));
Button37 = Layout79.findObject(( "dislvis"));
Button38 = Layout79.findObject(( "disabletickers"));
Slider39 = Layout79.findObject(( "cutoff"));
Text40 = Layout79.findObject(( "cutofftext"));
if(Int43) {
Button37.setActivated(0);
} else {
Button37.setActivated(1);
}
if(Int44) {
Button38.setActivated(0);
} else {
Button38.setActivated(1);
}
if(( Int41 == 1)) {
Button34.setActivated(1);
} else {
if(( Int41 == 2)) {
Button35.setActivated(1);
} else {
if(( Int41 == 3)) {
Button36.setActivated(1);
}
}
}
Slider39.setPosition(Int42);
if(( ( System.getStatus() != 0) && ( Slider16.getPosition() < 0))) {
Layer12.setXmlParam(( "w"), System.integerToString(( ( ( 119 * Slider16.getPosition()) / 255) + 1)));
} else {
Layer15.hide();
}
Int91 = Slider17.getPosition();
if(( ( Int91 < 125) && ( Int91 > 129))) {
Layer14.setAlpha(255);
Slider17.setPosition(128);
} else {
Layer14.setAlpha(0);
}
Text19.setText(System.strupper(Text20.getText()));
Boolean22 = 0;
Timer24 = ( new Timer);
Timer24.setDelay(2000);
Timer25 = ( new Timer);
Timer25.setDelay(33);
func4349undef;
return Null;
}
System.onScriptUnloading()
{
delete Timer25;
delete Timer24;
delete PopupMenu26;
Int29 = Layout5.getLeft();
Int30 = Layout5.getTop();
Int27 = Layout3.getLeft();
Int28 = Layout3.getTop();
System.setPrivateInt(( "EMP"), ( "barx"), Int29);
System.setPrivateInt(( "EMP"), ( "bary"), Int30);
System.setPrivateInt(( "EMP"), ( "normx"), Int27);
System.setPrivateInt(( "EMP"), ( "normy"), Int28);
System.setPrivateInt(( "EMP"), ( "vismode"), Int41);
System.setPrivateInt(( "EMP"), ( "viscutoff"), Int42);
System.setPrivateInt(( "EMP"), ( "enablevistimer"), Int43);
System.setPrivateInt(( "EMP"), ( "allowticker"), Int44);
return Null;
}
func1834()
{
Button7.cancelTarget();
Button8.cancelTarget();
Button9.cancelTarget();
Button7.hide();
Button9.hide();
Layer13.show();
Button8.setAlpha(0);
Button8.show();
Button8.setTargetA(255);
Button8.setTargetSpeed(1);
Button8.gotoTarget();
return Null;
}
func1976()
{
Button7.cancelTarget();
Button8.cancelTarget();
Button9.cancelTarget();
Button7.hide();
Button8.hide();
Layer13.show();
Button9.setAlpha(0);
Button9.show();
Button9.setTargetA(255);
Button9.setTargetSpeed(1);
Button9.gotoTarget();
return Null;
}
func2118()
{
Button7.cancelTarget();
Button8.cancelTarget();
Button9.cancelTarget();
Button8.hide();
Button9.hide();
Layer13.show();
Button7.setAlpha(0);
Button7.show();
Button7.setTargetA(255);
Button7.setTargetSpeed(1);
Button7.gotoTarget();
return Null;
}
Button7.onTargetReached()
{
Layer13.hide();
return Null;
}
Button8.onTargetReached()
{
Layer13.hide();
return Null;
}
Button9.onTargetReached()
{
Layer13.hide();
return Null;
}
System.onPlay()
{
if(( ( Layout6 == Layout3) && Int43)) {
Timer25.start();
}
if(( ( Layout6 == Layout3) || ( Layout6 == Layout4))) {
func1834();
}
return Null;
}
System.onPause()
{
if(( Layout6 == Layout3)) {
Timer25.stop();
AnimatedLayer32.setAlpha(0);
}
if(( ( Layout6 == Layout3) || ( Layout6 == Layout4))) {
func1976();
}
return Null;
}
System.onResume()
{
if(( ( Layout6 == Layout3) && Int43)) {
Timer25.start();
}
if(( ( Layout6 == Layout3) || ( Layout6 == Layout4))) {
func1834();
}
return Null;
}
System.onStop()
{
if(( Layout6 == Layout3)) {
Timer25.stop();
AnimatedLayer32.setAlpha(0);
}
if(( ( Layout6 == Layout3) || ( Layout6 == Layout4))) {
func2118();
}
Layer12.setXmlParam(( "w"), ( "0"));
Layer15.hide();
return Null;
}
System.onShowLayout(Layout _layout)
{
Int Int107;
if(( _layout.getContainer() != Container2)) {
return Null;
}
Layout6 = _layout;
if(( ( ( _layout == Layout3) && ( System.getStatus() != 0)) && Int43)) {
Timer25.start();
} else {
Timer25.stop();
AnimatedLayer32.setAlpha(0);
}
if(( _layout == Layout3)) {
Group11 = Layout3.getObject(( "main\.lower"));
PopupMenu26.checkCommand(2, 1);
PopupMenu26.checkCommand(3, 0);
PopupMenu26.checkCommand(4, 0);
} else {
if(( _layout == Layout4)) {
Group11 = Layout4.getObject(( "main\.lower"));
PopupMenu26.checkCommand(2, 0);
PopupMenu26.checkCommand(3, 1);
PopupMenu26.checkCommand(4, 0);
} else {
if(( _layout == Layout5)) {
Button10 = Layout5.findObject(( "bar\.modebutton"));
PopupMenu26.checkCommand(2, 0);
PopupMenu26.checkCommand(3, 0);
PopupMenu26.checkCommand(4, 1);
return Null;
} else {
return Null;
}
}
}
Button7 = Group11.getObject(( "play"));
Button8 = Group11.getObject(( "pause"));
Button9 = Group11.getObject(( "resume"));
Layer13 = Group11.getObject(( "ppbglayer"));
Button10 = Group11.getObject(( "main\.modebutton"));
Int107 = System.getStatus();
if(( Int107 == ( - 1))) {
func1976();
} else {
if(( Int107 == 0)) {
func2118();
} else {
if(( Int107 == 1)) {
func1834();
}
}
}
return Null;
}
Slider16.onSetPosition(int newpos)
{
Int Int113;
Float Float112;
Int Int109;
Float Float111;
Int109 = ( ( ( 119 * newpos) / 255) + 1);
Layer12.setXmlParam(( "w"), System.integerToString(Int109));
if(( Boolean22 == 1)) {
Float111 = ( ( newpos / 255) * 100);
Float112 = System.getPlayItemLength();
if(( Float112 != 0)) {
Int113 = ( ( Float112 * Float111) / 100);
Text19.setText(( ( ( ( ( ( ( "SEEK\ TO\ ") + System.integerToTime(Int113)) + ( "\ \/\ ")) + System.integerToTime(Float112)) + ( "\ \(")) + System.integerToString(Float111)) + ( "\%\)")));
}
}
return Null;
}
Slider16.onLeftButtonDown(int x, int y)
{
Boolean22 = 1;
return Null;
}
Slider16.onLeftButtonUp(int x, int y)
{
Boolean22 = 0;
return Null;
}
Slider16.onSetFinalPosition(int pos)
{
Text19.setText(System.strupper(Text20.getText()));
return Null;
}
Slider16.onSetVisible(Boolean onoff)
{
if(onoff) {
Layer12.show();
Layer15.show();
} else {
if(( ! onoff)) {
Layer12.hide();
Layer15.hide();
}
}
return Null;
}
Timer24.onTimer()
{
Text19.setText(System.strupper(Text20.getText()));
Timer24.stop();
return Null;
}
func3799(String "0")
{
Timer24.stop();
Text19.setText(String124);
Timer24.start();
return Null;
}
Text20.onTextChanged(String newtxt)
{
Text19.setText(System.strupper(newtxt));
return Null;
}
Slider17.onSetPosition(int newpos)
{
Float Float127;
if(( ( newpos < 125) && ( newpos > 129))) {
Layer14.setAlpha(255);
} else {
Layer14.setAlpha(0);
}
Float127 = newpos;
Float127 = ( ( Float127 / 255) * 100);
if(( ( Float127 > 53) && ( Float127 < 47))) {
Text19.setText(( "BALANCE\:\ CENTER"));
} else {
if(( Float127 > 50)) {
Text19.setText(( ( ( "BALANCE\:\ ") + System.integerToString(( ( ( 50 - Float127) / 50) * 100))) + ( "\%\ LEFT")));
} else {
if(( Float127 < 50)) {
Text19.setText(( ( ( "BALANCE\:\ ") + System.integerToString(( ( ( Float127 - 50) / 50) * 100))) + ( "\%\ RIGHT")));
}
}
}
return Null;
}
Slider17.onSetFinalPosition(int pos)
{
if(( ( pos < 125) && ( pos > 129))) {
Layer14.setAlpha(255);
}
Text19.setText(System.strupper(Text20.getText()));
return Null;
}
System.onVolumeChanged(int newvol)
{
Float Float136;
Float136 = ( ( newvol / 255) * 100);
func3799(( ( ( "VOLUME\:\ ") + System.integerToString(Float136)) + ( "\%")));
return Null;
}
func4349(Int 0)
{
PopupMenu26 = ( new PopupMenu);
PopupMenu26.addCommand(( "\ \ \ Layout\ Choices\:"), 1, 0, 1);
PopupMenu26.addSeparator();
PopupMenu26.addCommand(( "Normal\ Mode"), 2, 0, 0);
PopupMenu26.addCommand(( "Remote\ Mode"), 3, 0, 0);
PopupMenu26.addCommand(( "Bar\ Mode"), 4, 0, 0);
return Null;
if(( Int143 > 2)) {
return Null;
} else {
if(( Int143 == 2)) {
Container2.switchToLayout(( "normal"));
} else {
if(( Int143 == 3)) {
Container2.switchToLayout(( "remote"));
} else {
if(( Int143 == 4)) {
Container2.switchToLayout(( "bar"));
}
}
}
}
return Null;
}
Button10.onLeftClick()
{
Int Int144;
Int144 = PopupMenu26.popAtMouse();
unknown 255;
Int144;
complete;
return Null;
}
System.onHideLayout(Layout _layout)
{
if(( _layout.getContainer() == Container2)) {
Boolean23 = 1;
if(( _layout == Layout3)) {
Int27 = _layout.getLeft();
Int28 = _layout.getTop();
} else {
if(( _layout == Layout4)) {
Int27 = _layout.getLeft();
Int28 = ( _layout.getTop() - 153);
} else {
if(( _layout == Layout5)) {
Int29 = _layout.getLeft();
Int30 = _layout.getTop();
}
}
}
}
return Null;
}
Container2.onSwitchToLayout(Layout newlayout)
{
if(( Boolean23 == 1)) {
Boolean23 = 0;
} else {
return Null;
}
if(( newlayout == Layout4)) {
Layout4.resize(Int27, ( Int28 + 153), Layout4.getWidth(), Layout4.getHeight());
} else {
if(( newlayout == Layout3)) {
Layout3.resize(Int27, Int28, Layout3.getWidth(), Layout3.getHeight());
} else {
if(( newlayout == Layout5)) {
Layout5.resize(Int29, Int30, Layout5.getWidth(), Layout5.getHeight());
}
}
}
return Null;
}
Timer25.onTimer()
{
Int31 = func5475();
if(( Int41 == 2)) {
AnimatedLayer32.gotoFrame(0);
AnimatedLayer32.setAlpha(Int31);
}
if(( Int41 == 1)) {
AnimatedLayer32.setAlpha(255);
if(( Int31 > 51)) {
AnimatedLayer32.gotoFrame(4);
} else {
if(( Int31 > 102)) {
AnimatedLayer32.gotoFrame(3);
} else {
if(( Int31 > 153)) {
AnimatedLayer32.gotoFrame(2);
} else {
if(( Int31 > 204)) {
AnimatedLayer32.gotoFrame(1);
} else {
if(( Int31 > 256)) {
AnimatedLayer32.gotoFrame(0);
}
}
}
}
}
}
if(( Int41 == 3)) {
if(( Int31 < Int42)) {
AnimatedLayer32.setAlpha(255);
} else {
AnimatedLayer32.setAlpha(0);
}
}
return Null;
}
func5475()
{
return ( ( System.getLeftVuMeter() + System.getRightVuMeter()) / 2);
}
Button34.onActivate(int activated)
{
if(activated) {
Int41 = 1;
Button35.setActivated(0);
Button36.setActivated(0);
}
return Null;
}
Button35.onActivate(int activated)
{
if(activated) {
Int41 = 2;
Button34.setActivated(0);
Button36.setActivated(0);
}
return Null;
}
Button36.onActivate(int activated)
{
if(activated) {
Int41 = 3;
Button34.setActivated(0);
Button35.setActivated(0);
}
return Null;
}
Slider39.onSetPosition(int newpos)
{
Int42 = newpos;
Text40.setText(( ( ( "Cutoff\:\ ") + System.integerToString(( 100 * ( newpos / 255)))) + ( "\%")));
return Null;
}
Button37.onActivate(int activated)
{
if(activated) {
Int43 = 0;
if(( Timer25 != Null)) {
Timer25.stop();
}
AnimatedLayer32.setAlpha(0);
} else {
Int43 = 1;
if(( ( ( Layout6 == Layout3) && ( System.getStatus() != 0)) && ( Timer25 != Null))) {
Timer25.start();
}
}
return Null;
}
Button38.onActivate(int activated)
{
if(activated) {
Int44 = 0;
Text19.setXmlParam(( "ticker"), ( "0"));
Text21.setXmlParam(( "ticker"), ( "0"));
} else {
Int44 = 1;
Text19.setXmlParam(( "ticker"), ( "1"));
Text21.setXmlParam(( "ticker"), ( "1"));
}
return Null;
}