home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Util / Winamp / Skins / CCZ_Skateboard.wal / maki / tracker.m < prev    next >
Text File  |  2004-10-13  |  1KB  |  55 lines

  1. #include <lib/std.mi>
  2.  
  3. Global Container thisContainer;
  4. Global AnimatedLayer ani;
  5. Global Layout eql;
  6. Global Group eqg;
  7. Global Int whichWay;
  8. Global Button backButton;
  9.  
  10. System.onScriptLoaded() {
  11.   getContainer("ccz_browser").show();
  12.   thisContainer = getContainer("main");
  13.   thisContainer.switchToLayout("main1");
  14.   eql = thisContainer.getLayout("eq");
  15.   eqg = eql.getObject("eq2");
  16.   ani = eql.getObject("anim");
  17.   backButton = eqg.getObject("Back OFF");
  18. }
  19.  
  20. backButton.onLeftButtonUp(int x, int y) {
  21.   eqg.hide();
  22.   whichWay = 1;
  23.   ani = eql.getObject("anim");
  24.   ani.setXMLParam("image", getPrivateString("skate", "mode", "mode1"));
  25.   ani.setStartFrame(ani.getLength()-1); 
  26.   ani.setEndFrame(0); 
  27.   ani.gotoFrame(ani.getLength()-1);
  28.   ani.show();
  29.   ani.play();
  30. }
  31.  
  32. thisContainer.onSwitchToLayout(Layout newlayout) {
  33.   String meh = newLayout.getXMLParam("id");
  34.   if(meh != "eq" && meh != "shade") {
  35.     setPrivateString("skate", "mode", meh);
  36.   } if(meh == "eq") {
  37.     whichWay = 0;
  38.     eqg.hide();
  39.     ani.setXMLParam("image", getPrivateString("skate", "mode", "mode1"));
  40.     ani.setStartFrame(0); 
  41.     ani.setEndFrame(ani.getLength()-1); 
  42.     ani.gotoFrame(0);
  43.     ani.show();
  44.     ani.play();
  45.   }
  46. }
  47.  
  48. ani.onStop() {
  49.   if(whichWay == 0) {
  50.     ani.hide();
  51.     eqg.show();
  52.   } else if(whichWay == 1) {
  53.     thisContainer.switchToLayout(getPrivateString("skate", "mode", "mode1"));
  54.   }
  55. }