Old 19th June 2006, 15:08   #1
product247
Junior Member
 
Join Date: Jun 2006
Location: clearwater, fla
Posts: 4
Play Pause as one button

Im coding a skin that has a play/pause button but it is one button and the only code I can find is set up for two buttons.. can someone help me with this?
product247 is offline   Reply With Quote
Old 19th June 2006, 15:16   #2
NickMikh
Member
 
NickMikh's Avatar
 
Join Date: Mar 2006
Location: Russia
Posts: 90
Send a message via ICQ to NickMikh Send a message via Yahoo to NickMikh
Try this script: http://forums.winamp.com/showthread....838#post684838
NickMikh is offline   Reply With Quote
Old 19th June 2006, 15:36   #3
JW
Senior Member
 
Join Date: Nov 2004
Location: Valencia, CA
Posts: 304
That script doesn't work quite right without modification. Use this one instead...

PHP Code:
#include ../../../lib/std.mi

Global Button PlayPause;

System.onScriptLoaded()
{
  
Group ButtonsGrp getScriptGroup();

  
Pause ButtonsGrp.findObject("Pause");
  
Play ButtonsGrp.findObject("Play");

  
Pause.hide();
  
Play.hide();

  if (
System.getStatus() == -1)      //Paused
  
{
    
Play.show();
  }
   else if (
System.getStatus() == 0//Stopped
  
{
    
Play.show();
  }
  else if (
System.getStatus() == 1)  //Playing
  
{
    
Pause.show();
  }
}

System.onPlay() {
  
Play.hide();
  
Pause.show();
}

System.onPause() {
  
Play.show();
  
Pause.hide();
}

System.onStop() {
  
Play.show();
  
Pause.hide();
}

System.onResume() {
  
Play.hide();
  
Pause.show();

Compile and put that in the same group as your play & pause buttons.
JW is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump