home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2003 #3 / K-CD_2003-03.iso / Winamp / winamp3_0-full.exe / Skins / Default.wal / scripts / firststart.m < prev    next >
Text File  |  2002-07-22  |  777b  |  35 lines

  1. #include <lib/std.mi>
  2.  
  3. Global Boolean startit;
  4. Global GuiObject ThingerIcon;
  5. Global Timer timor;
  6.  
  7. System.onScriptLoaded() {
  8.   startit = 0;
  9.   if (getPrivateInt("firststart", "done", 0) == 1) return;
  10.   startit = 1;
  11. }
  12.  
  13. System.onScriptUnloading() {
  14.   if (timor != NULL) delete timor;
  15. }
  16.  
  17. System.onPlay() {
  18.   if (!startit) return;
  19.   startit = 0;
  20.   Layout l = getContainer("main").getLayout("normal");
  21.   if (l == NULL) return;
  22.   ThingerIcon = l.findObject("Thinger");
  23.   if (ThingerIcon == NULL) return;
  24.   ThingerIcon.onNotify("forcedwobbling", "", 1, 0);
  25.   setPrivateInt("firststart", "done", 1);
  26.   timor = new Timer;
  27.   timor.setDelay(3000);
  28.   timor.start();
  29. }
  30.  
  31. timor.onTimer() {
  32.   ThingerIcon.onNotify("forcedwobbling", "", 0, 0);
  33.   timor.stop();
  34. }
  35.