on getPropertyDescriptionList me
set description = [:]
soundlist=locatesound(me)
if the currentspritenum = 0 then exit
theMember = sprite(the currentSpriteNum).member
theMemberNumber = theMember.number
addProp description, #pKeytocheck, [#comment: "Key to check:",#format:#symbol, #range: [#None,#upArrow, #downArrow, #leftArrow, #rightArrow,#Enter, #Backspace, #spacebar, #tab, #pageUp, #pageDown, #home, #end, #delete,#pause, #F4, #F11, #`, #-, #=, #[, #], #\, #;, #', #,, #., #/, #numpad1,#numpad2, #numpad3, #numpad4, #numpad5, #numpad6, #numpad7, #numpad8, #numpad9,#1, #2, #3, #4, #5, #6, #7, #8, #9, #0, #a, #b, #c, #d, #e, #f, #g, #h, #i, #j,#k, #l, #m, #n, #o, #p, #q, #r, #s, #t, #u, #v, #w, #x, #y, #z],#default:"none"]
addProp description, #pRollcursor, [#comment: "Set the Roll over cursor :",#format:#cursor,#default:280]
addProp description, #pRollmember, [#comment: "Set Roll over member :" ,#format:#Graphic,#default:member(theMemberNumber+1)]
addProp description, #pClickcursor, [#comment: "Set the Click cursor :",#format:#cursor,#default:280]
addProp description, #pClickmember, [#comment: "Set the Click member :" ,#format:#Graphic,#default:member(theMemberNumber+2)]
addProp description, #pGowhere, [#format : #marker, #default : #next, #comment : "Where to go"]
if soundlist.count > 0 then
addProp description, #pSoundmember, [#comment: "Play sound on mouseDown :",#format:#String,#range:soundlist,#default:soundlist[1]]
addProp description, #pSoundchannel, [#comment: "Choose Sound channel :",#format:#Integer,#range:[#min:1,#max:8],#default:1]
end if
return description
end getPropertyDescriptionList
on beginsprite
pStdmember = sprite(spritenum).member
pSavedcursor=sprite(spritenum).cursor
end
on MouseWithin me
Sprite(Spritenum).member = pRollmember
Sprite(Spritenum).cursor = pRollcursor
end MouseEnter
on MouseLeave me
Sprite(Spritenum).member = pStdmember
Sprite(Spritenum).cursor = pSavedcursor
end MouseLeave
on mousedown me
if pSoundchannel >= 1 then
if member(pSoundmember).type = #sound then
puppetsound pSoundchannel pSoundmember
end if
if member(pSoundmember).type = #swa then
member(pSoundmember).play()
end if
end if
repeat while the stilldown
Sprite(Spritenum).cursor = pClickcursor
sprite(spritenum).member = pClickmember
updatestage
end repeat
end mousedown me
on mouseup me
go pGowhere
end mouseup me
on checkkey
if getaProp(gMyKeyList,symbol(pKeytocheck)) = the keyCode then
if pSoundchannel >= 1 then
if member(pSoundmember).type =#sound then
puppetsound pSoundchannel pSoundmember
end if
if member(pSoundmember).type =#swa then
member(pSoundmember).play()
end if
end if
end if
go pGowhere
end
on endsprite
cursor -1
end
on locatesound me
soundlist = []
maxCastLib = the number of castLibs
repeat with theCastLib = 1 to maxCastLib
maxMember = the number of members of castLib theCastLib
repeat with memberNumber = 1 to maxMember
theMember = member(memberNumber, theCastLib)
if theMember.type = #sound or theMember.type=#swa then
if theMember.name = EMPTY then
soundlist.append(theMember)
else
soundlist.append(theMember.name)
end if
end if
end repeat
end repeat
return soundlist
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA