home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 2 / boot-disc-1996-10.iso / Demo.dir / 00008_Script_8 < prev    next >
Text File  |  1996-08-09  |  2KB  |  74 lines

  1. on startmovie
  2.   openxlib "FileIO"
  3.   clearglobals
  4.   set the actorlist=[]
  5.   set obj=new(script "ResourcesClass","DemoList","CategoryList","welcomeScreen",21)
  6.   new(script "videoBtnClass",21)
  7.   startcycle obj
  8.   set the scrolltop of member "DemoList" to 0
  9.   new(script "StatusClass")
  10. end
  11.  
  12. on pressbtn 
  13.   set spritenum=the clickon
  14.   set upcast=the membernum of sprite spritenum
  15.   set upcastname=the name of member upcast
  16.   set downcast=the number of member (upcastname&"Down")
  17.   puppetsprite spritenum,true
  18.   set the membernum of sprite spritenum to downcast
  19.   updateStage
  20.   repeat while the mousedown
  21.   end repeat
  22.   set the membernum of sprite spritenum to upcast
  23.   updateStage
  24.   puppetsprite spritenum,false
  25.   return rollover(spritenum)
  26. end
  27.  
  28. on scroll delta,prefix
  29.   if voidP(prefix) then set prefix="d_"
  30.   set btnsprite=the clickon
  31.   set btn=the membernum of sprite btnsprite
  32.   set btndown=the number of member ((the name of member btn)&"Down")
  33.   puppetsprite btnsprite,true
  34.   set the membernum of sprite btnsprite to btndown
  35.   updateStage
  36.   repeat with index=1 to 48
  37.     set curcast=the membernum of sprite index
  38.     if curcast>0 then
  39.       if offset(prefix,the name of member curcast)=1 then
  40.         set spritenum=index
  41.         exit repeat
  42.       end if
  43.     end if
  44.   end repeat
  45.   set pos=the scrolltop of member curcast
  46.   set textwidth=the bottom of sprite spritenum-the top of sprite spritenum
  47.   set totalheight=the height of member curcast
  48.   repeat while the mousedown
  49.     if textwidth>=totalheight then exit repeat
  50.     if the rightMouseDown then
  51.       set mult=5
  52.     else
  53.       set mult=2
  54.     end if
  55.     if delta>0 then
  56.       set pos=min(pos+delta*Mult,totalheight-textwidth)
  57.     else
  58.       set pos=max(pos+delta*mult,0)
  59.     end if
  60.     set the scrolltop of member curcast to pos
  61.   end repeat
  62.   set the membernum of sprite btnsprite to btn
  63.   updateStage
  64.   puppetsprite btnsprite,false
  65. end
  66.  
  67. on resetAllText prefix
  68.   if voidP(prefix) then set prefix="d_"
  69.   repeat with index=1 to the number of members
  70.     if the type of member index=#richText then
  71.       set the scrolltop of member index to 0
  72.     end if
  73.   end repeat
  74. end