home *** CD-ROM | disk | FTP | other *** search
- property pcnt, picon1, picon2, picon3, psp
- global gkategorie, gno
-
- on birth me, sp
- set the psp of me to sp
- set the pcnt of me to 0
- set the picon1 of me to 0
- set the picon2 of me to 0
- set the picon3 of me to 0
- return me
- end
-
- on destroy me
- deleteAll(me)
- end
-
- on append me
- if not objectp(the picon1 of me) then
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon1 of me to f
- location(the picon1 of me, 45, 35, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- else
- if not objectp(the picon2 of me) then
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon2 of me to f
- location(the picon2 of me, 46, 160, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- else
- if not objectp(the picon3 of me) then
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon3 of me to f
- location(the picon3 of me, 47, 286, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- else
- if the pcnt of me = 0 then
- deletebyno(me, 0)
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon1 of me to f
- location(the picon1 of me, 45, 35, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- else
- if the pcnt of me = 1 then
- deletebyno(me, 1)
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon2 of me to f
- location(the picon2 of me, 46, 160, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- else
- if the pcnt of me = 2 then
- deletebyno(me, 2)
- set f to birth(script "FileIcon", gkategorie, gno)
- set the picon3 of me to f
- location(the picon3 of me, 47, 286, 348)
- set the pcnt of me to (the pcnt of me + 1) mod 3
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on show me
- if objectp(the picon1 of me) then
- location(the picon1 of me, 45, 35, 348)
- end if
- if objectp(the picon2 of me) then
- location(the picon2 of me, 46, 160, 348)
- end if
- if objectp(the picon3 of me) then
- location(the picon3 of me, 47, 286, 348)
- end if
- end
-
- on hide me
- if objectp(the picon1 of me) then
- hide(the picon1 of me)
- end if
- if objectp(the picon2 of me) then
- hide(the picon2 of me)
- end if
- if objectp(the picon3 of me) then
- hide(the picon3 of me)
- end if
- end
-
- on showp me
- if objectp(the picon1 of me) then
- show(the picon1 of me)
- end if
- if objectp(the picon2 of me) then
- show(the picon2 of me)
- end if
- if objectp(the picon3 of me) then
- show(the picon3 of me)
- end if
- end
-
- on delete me, f
- if the picon1 of me = f then
- if objectp(the picon1 of me) then
- deletebyno(me, 0)
- end if
- else
- if the picon2 of me = f then
- if objectp(the picon2 of me) then
- deletebyno(me, 1)
- end if
- else
- if the picon3 of me = f then
- if objectp(the picon3 of me) then
- deletebyno(me, 2)
- end if
- end if
- end if
- end if
- end
-
- on deletebyno me, n
- if n = 0 then
- if objectp(the picon1 of me) then
- hide(the picon1 of me)
- destroy(the picon1 of me)
- set the picon1 of me to 0
- end if
- else
- if n = 1 then
- if objectp(the picon2 of me) then
- hide(the picon2 of me)
- destroy(the picon2 of me)
- set the picon2 of me to 0
- end if
- else
- if n = 2 then
- if objectp(the picon3 of me) then
- hide(the picon3 of me)
- destroy(the picon3 of me)
- set the picon3 of me to 0
- end if
- end if
- end if
- end if
- end
-
- on deleteAll me
- repeat with i = 0 to 2
- deletebyno(me, i)
- end repeat
- end
-
- on deletebycastnum me, cst
- if objectp(the picon1 of me) then
- set cst2 to the pcast of the picon1 of me
- if cst = cst2 then
- deletebyno(me, 0)
- exit
- end if
- end if
- if objectp(the picon2 of me) then
- set cst2 to the pcast of the picon2 of me
- if cst = cst2 then
- deletebyno(me, 1)
- exit
- end if
- end if
- if objectp(the picon3 of me) then
- set cst2 to the pcast of the picon3 of me
- if cst = cst2 then
- deletebyno(me, 2)
- exit
- end if
- end if
- end
-
- on whichbrowser me, sp
- if sp = 45 then
- if objectp(the picon1 of me) then
- return the pkate of the picon1 of me
- end if
- else
- if sp = 46 then
- if objectp(the picon2 of me) then
- return the pkate of the picon2 of me
- end if
- else
- if sp = 47 then
- if objectp(the picon3 of me) then
- return the pkate of the picon3 of me
- end if
- end if
- end if
- end if
- return EMPTY
- end
-
- on whatpictno me, sp
- if sp = 45 then
- if objectp(the picon1 of me) then
- return the pno of the picon1 of me
- end if
- else
- if sp = 46 then
- if objectp(the picon2 of me) then
- return the pno of the picon2 of me
- end if
- else
- if sp = 47 then
- if objectp(the picon3 of me) then
- return the pno of the picon3 of me
- end if
- end if
- end if
- end if
- return 0
- end
-
- on iswithin me, anitem
- global gdragitem
- if (anitem = gdragitem) and objectp(gdragitem) then
- set mousexy to point(the mouseH, the mouseV)
- if inside(mousexy, the rect of sprite the psp of me) then
- append(me)
- erasedragedobject(gdragitem)
- set gdragitem to 0
- end if
- end if
- end
-
- on iswithout me, anitem
- global gdragfileicon
- if (anitem = gdragfileicon) and objectp(gdragfileicon) then
- set mousexy to point(the mouseH, the mouseV)
- if not inside(mousexy, the rect of sprite the psp of me) then
- set cst to the pBaseCast of gdragfileicon
- erasedragedobject(gdragfileicon)
- set gdragfileicon to 0
- deletebycastnum(me, cst)
- end if
- end if
- end
-