home *** CD-ROM | disk | FTP | other *** search
/ 3D World 136 / 3DW_136.iso / pc / 3dw.exe / 3dw.dxr / Internal_23_thumbnail_next_button.ls < prev    next >
Encoding:
Text File  |  2009-06-30  |  1.3 KB  |  64 lines

  1. property Active, sp, pfadeMode, pfadeVal, pFadeMin, pfadeSpeed
  2. global currentThumbStart, currentSection, mainIndex, nextEnabled
  3.  
  4. on mouseUp me
  5.   if nextEnabled = 1 then
  6.     sprite(me.spriteNum + 1).color = rgb(0, 0, 0)
  7.     currentThumbStart = currentThumbStart + 6
  8.     showThumbnails(currentThumbStart, currentSection)
  9.     sp.blend = pFadeMin
  10.     cursor(-1)
  11.   end if
  12. end
  13.  
  14. on beginSprite me
  15.   sp = sprite(me.spriteNum)
  16.   pfadeMode = 0
  17.   pFadeMin = 60
  18.   pfadeSpeed = 8
  19.   pfadeVal = pFadeMin
  20.   sp.blend = pfadeVal
  21.   Active = 1
  22. end
  23.  
  24. on mouseEnter me
  25.   if nextEnabled = 1 then
  26.     cursor(280)
  27.     sprite(me.spriteNum + 1).color = rgb(255, 255, 255)
  28.     if pfadeMode < 1 then
  29.       pfadeMode = 1
  30.     end if
  31.   end if
  32. end
  33.  
  34. on mouseLeave me
  35.   if nextEnabled = 1 then
  36.     cursor(-1)
  37.     sprite(me.spriteNum + 1).color = rgb(0, 0, 0)
  38.     if pfadeMode < 2 then
  39.       pfadeMode = 2
  40.     end if
  41.   end if
  42. end
  43.  
  44. on enterFrame me
  45.   if pfadeMode > 0 then
  46.     if pfadeMode = 2 then
  47.       if pfadeVal > pFadeMin then
  48.         pfadeVal = pfadeVal - pfadeSpeed
  49.       else
  50.         pfadeVal = pFadeMin
  51.         pfadeMode = 0
  52.       end if
  53.     else
  54.       if pfadeVal < 100 then
  55.         pfadeVal = pfadeVal + pfadeSpeed
  56.       else
  57.         pfadeVal = 100
  58.         pfadeMode = 0
  59.       end if
  60.     end if
  61.     sp.blend = pfadeVal
  62.   end if
  63. end
  64.