home *** CD-ROM | disk | FTP | other *** search
- global theLastactiveWindow, mainFolder
-
- on new me
- return me
- end
-
- on select me, spriteNo
- if (spriteNo < 1) or (spriteNo > 48) then
- exit
- end if
- tell the activeWindow
- if the memberNum of sprite spriteNo = 0 then
- exit
- end if
- set iconName to the name of member the memberNum of sprite spriteNo
- if char length(iconName) - 7 to length(iconName) of iconName = "Selected" then
- unselect(me, spriteNo)
- exit
- else
- repeat with i = 1 to 48
- if the memberNum of sprite i > 0 then
- set iconName to the name of member the memberNum of sprite i
- if char length(iconName) - 7 to length(iconName) of iconName = "Selected" then
- unselect(me, i)
- end if
- end if
- end repeat
- puppetSprite(spriteNo, 1)
- set qName to the name of member the memberNum of sprite spriteNo
- set the member of sprite spriteNo to member (qName & "Selected")
- end if
- end tell
- end
-
- on unselect me, spriteNo
- if (spriteNo < 1) or (spriteNo > 48) then
- exit
- end if
- tell the activeWindow
- if the memberNum of sprite spriteNo = 0 then
- exit
- end if
- set iconName to the name of member the memberNum of sprite spriteNo
- if iconName contains "Selected" then
- set the member of sprite spriteNo to member char 1 to length(iconName) - 8 of iconName
- end if
- if not ((iconName contains "Mac") or (iconName contains "PC")) then
- puppetSprite(spriteNo, 0)
- end if
- end tell
- end
-