INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: how to have play and pause in one button  (Read 1245 times)

nkj_skinner

  • Regular Member
  • Member
  • *
  • Posts: 4
how to have play and pause in one button
« on: July 15, 2002, 08:14:04 am »

i don't know how u can have play and pause in one button like in windows media player if it can be done plase tell how
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:how to have play and pause in one button
« Reply #1 on: July 16, 2002, 07:09:11 am »

nkj_skinner,

It's possible, but you have to create two buttons located in the same place and hide/show them depending on the state.

Take a look at the LowerRight skin for an example of the implementation.

Nikolay
Logged

ZRocker

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1257
RE:how to have play and pause in one button
« Reply #2 on: July 17, 2002, 04:34:47 pm »

nkj,

LowerLeft/Right do it with simply on a OnPlayStateChanged event...here's the actual code that changes the bitmap of the custom 'Play' button (realtime) in my skins:

function SetBitmapPlayButton()
{
  Player.GetSkinItem( typeButton, "PlayCustom" ).SetBitmap
     ( g_Playback.State == playPlaying ? "pause.bmp" : "play.bmp", defTransColor );
}
Logged
Pages: [1]   Go Up