home *** CD-ROM | disk | FTP | other *** search
/ Comic Book Maker: The Smurfs / COMIC.iso / pc / data_w / cba2_40 / 00013_selectRects&cursor.ls < prev    next >
Encoding:
Text File  |  2001-02-22  |  1.3 KB  |  53 lines

  1. property myTimer, myCounter, curs, mouseBlocked
  2. global gObj1, gObj2
  3.  
  4. on new me, selectionList
  5.   set curs to 0
  6.   set myCounter to 1
  7.   set myTimer to the ticks + 6
  8.   return me
  9. end
  10.  
  11. on update me, noSelectRect
  12.   if mouseBlocked then
  13.     set the mouseDownScript to EMPTY
  14.     set the mouseUpScript to EMPTY
  15.     set mouseBlocked to 0
  16.   end if
  17.   set theSelection to the theSelection of gObj1
  18.   if the ticks > myTimer then
  19.     set myCounter to (myCounter + 1) mod 8
  20.     if voidp(noSelectRect) then
  21.       if count(theSelection) then
  22.         set the pattern of member 62 to myCounter + 57
  23.       end if
  24.     end if
  25.     set myTimer to the ticks + 6
  26.   end if
  27.   if the mouseUp and count(theSelection) and not (the rollOver = 114) then
  28.     if not inside(point(the mouseH, the mouseV), the frameRect of gObj2) then
  29.       if not (curs = -1) then
  30.         cursor(-1)
  31.         set curs to -1
  32.       end if
  33.     else
  34.       repeat with i in theSelection
  35.         if inside(point(the mouseH, the mouseV), the rect of sprite i) then
  36.           if not (curs = 260) then
  37.             cursor(260)
  38.             set curs to 260
  39.           end if
  40.           set f to 1
  41.           exit repeat
  42.         end if
  43.       end repeat
  44.       if not f then
  45.         if not (curs = -1) then
  46.           cursor(-1)
  47.           set curs to -1
  48.         end if
  49.       end if
  50.     end if
  51.   end if
  52. end
  53.