| 1 | property pEvent, pParam, pMarkerToGo |
|---|
| 2 | property pChangeCursor, pWhichCursor |
|---|
| 3 | |
|---|
| 4 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 5 | |
|---|
| 6 | on beginsprite me |
|---|
| 7 | pChangeCursor = (pWhichCursor <> 0) |
|---|
| 8 | end |
|---|
| 9 | |
|---|
| 10 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 11 | |
|---|
| 12 | on endsprite me |
|---|
| 13 | if pChangeCursor then cursor 0 |
|---|
| 14 | end |
|---|
| 15 | |
|---|
| 16 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 17 | |
|---|
| 18 | on mouseEnter me |
|---|
| 19 | if pChangeCursor then cursor pWhichCursor |
|---|
| 20 | if pEvent = #mouseEnter then mDoAction me |
|---|
| 21 | pass |
|---|
| 22 | end |
|---|
| 23 | |
|---|
| 24 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 25 | |
|---|
| 26 | on mouseLeave me |
|---|
| 27 | if pChangeCursor then cursor 0 |
|---|
| 28 | if pEvent = #mouseLeave then mDoAction me |
|---|
| 29 | pass |
|---|
| 30 | end |
|---|
| 31 | |
|---|
| 32 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 33 | |
|---|
| 34 | on mouseUp me |
|---|
| 35 | if pEvent = #mouseUp then mDoAction me |
|---|
| 36 | end |
|---|
| 37 | |
|---|
| 38 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 39 | |
|---|
| 40 | on mouseDown me |
|---|
| 41 | if pEvent = #mouseDown then mDoAction me |
|---|
| 42 | end |
|---|
| 43 | |
|---|
| 44 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 45 | |
|---|
| 46 | on exitFrame me |
|---|
| 47 | if pEvent = #exitFrame then mDoAction me |
|---|
| 48 | end |
|---|
| 49 | |
|---|
| 50 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 51 | |
|---|
| 52 | on mDoAction me |
|---|
| 53 | if pChangeCursor then cursor 0 |
|---|
| 54 | |
|---|
| 55 | if pMarkerToGo = "Go To Frame X" then |
|---|
| 56 | if char 1 of pParam = "+" then |
|---|
| 57 | go the frame + integer(pParam.char[2 .. pParam.char.count]) |
|---|
| 58 | else if char 1 of pParam = "-" then |
|---|
| 59 | go the frame - integer(pParam.char[2 .. pParam.char.count]) |
|---|
| 60 | else |
|---|
| 61 | go integer(pParam) |
|---|
| 62 | end if |
|---|
| 63 | else |
|---|
| 64 | if the markerlist.getPos(pMarkerToGo) > 0 then go to pMarkerToGo |
|---|
| 65 | else put "Label" && pMarkerToGo && "not found!" |
|---|
| 66 | end if |
|---|
| 67 | |
|---|
| 68 | end |
|---|
| 69 | |
|---|
| 70 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 71 | |
|---|
| 72 | on getPropertyDescriptionList |
|---|
| 73 | retliste = [:] |
|---|
| 74 | |
|---|
| 75 | mli = ["Go To Frame X"] |
|---|
| 76 | repeat with thisM in the markerlist |
|---|
| 77 | mli.add(thisM) |
|---|
| 78 | end repeat |
|---|
| 79 | |
|---|
| 80 | retliste[#pEvent] = [#format:#symbol, #default:#mouseUp, #range:[#mouseUp, #mouseDown, #mouseEnter, #mouseLeave, #exitFrame], comment:"Trigger:"] |
|---|
| 81 | retliste[#pMarkerToGo] = [#default: "", #format:#string, #range: mli, #comment:"Label name or frame number ?"] |
|---|
| 82 | retliste[#pParam] = [#format:#string, #default:"+0", comment:"Frame number (if label name = go to frame x)"] |
|---|
| 83 | retliste[#pWhichCursor] = [#format:#integer, #default:280, comment:"Change cursor on mouseEnter (0 = no cursor change)"] |
|---|
| 84 | |
|---|
| 85 | return retliste |
|---|
| 86 | end |
|---|