on mouseDown me
set pPopupCastName = "Popup List"
PopupMouseDown me
return
end
on PopupMouseDown me
set lastChar = the number of chars in field pPopupCastName + 1
set mySprite = the spriteNum of me
set pActiveSprite = mySprite
set myCast = the castnum of sprite mySprite
puppetsprite mySprite, 1
set the castnum of sprite mySprite = the number of cast pPopupCastName
updatestage
hilite line the mouseline of field pPopupCastName
set myLine = the mouseline
-- highlight detection. Thanks Mark Shepherd
repeat while the mouseDown
if mySprite > 0 then
if rollover(mySprite) then
if myLine <> the mouseLine then
set myLine = the mouseline
if myLine > 0 then hilite line myLine of field pPopupCastName
end if
else
if myLine <> 0 then
set myLine = 0
hilite char lastChar of field pPopupCastName
end if
end if
end if
end repeat
-- here we handle what to do on mouseUp
set the castnum of sprite pActiveSprite = myCast
puppetsprite pActiveSprite, 0
updatestage
if myline > 0 then
-- insert stuff here to do things
end if
end
on DoDelay seconds
set now = the timer
startTimer
repeat while now + seconds * 60 > the timer
end repeat
end
on GetBehaviorDescription
return "Turns what you mousedown on into a text popup menu. Fun for the whole family. The text member to use as the popup list is specified in pPopupCastName in the MouseDown handler - Zav"
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA