home *** CD-ROM | disk | FTP | other *** search
- property psaved, pSprite, pBaseCast
- global mostForeSp
-
- on birth me, sp, bcast
- set mostForeSp to 48
- set the psaved of me to the puppet of sprite sp
- set the pSprite of me to sp
- set the pBaseCast of me to the number of cast bcast
- puppetSprite(the pSprite of me, 1)
- return me
- end
-
- on destroy me
- end
-
- on represent me
- set the visible of sprite the pSprite of me to 1
- end
-
- on hide me
- set the visible of sprite the pSprite of me to 0
- end
-
- on drag me
- startdrag(me)
- end
-
- on stepFrame me
- traceDrag(me)
- end
-
- on startdrag me
- when mouseUp then mouseUpEater
- hide(me)
- set the visible of sprite mostForeSp to 1
- puppetSprite(mostForeSp, 1)
- set the type of sprite mostForeSp to 1
- set the visible of sprite mostForeSp to 1
- set the locH of sprite mostForeSp to the mouseH
- set the locV of sprite mostForeSp to the mouseV
- set the castNum of sprite mostForeSp to the pBaseCast of me
- set the visible of sprite mostForeSp to 1
- appenddragedobject(me)
- end
-
- on traceDrag me
- if the stillDown then
- set the locH of sprite mostForeSp to the mouseH
- set the locV of sprite mostForeSp to the mouseV
- else
- erasedragedobject(me)
- end if
- end
-
- on enddrag me
- global gfilelister, gdragitem, gdragfileicon
- set the type of sprite mostForeSp to 0
- set the locH of sprite mostForeSp to -10000
- set the locV of sprite mostForeSp to -10000
- set the visible of sprite mostForeSp to 1
- puppetSprite(mostForeSp, 0)
- if objectp(gfilelister) then
- if objectp(gdragitem) then
- iswithin(gfilelister, gdragitem)
- end if
- if objectp(gdragfileicon) then
- iswithout(gfilelister, gdragfileicon)
- end if
- end if
- represent(me)
- end
-