Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

source: trunk/lingosource/castlib2/simpleGoToAction.ls

Last change on this file was 244, checked in by alex, 2 years ago

open linked script now also opens script fouind in member comments, if not a linked scripts

File size: 2.6 KB
Line 
1property pEvent, pParam, pMarkerToGo
2property pChangeCursor, pWhichCursor
3
4-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5
6on beginsprite me
7  pChangeCursor = (pWhichCursor <> 0)
8end
9
10-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
11
12on endsprite me
13  if pChangeCursor then cursor 0
14end
15
16-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
17
18on mouseEnter me
19  if pChangeCursor then cursor pWhichCursor
20  if pEvent = #mouseEnter then mDoAction me
21  pass
22end
23
24-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
25
26on mouseLeave me
27  if pChangeCursor then cursor 0
28  if pEvent = #mouseLeave then mDoAction me
29  pass
30end
31
32-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
33
34on mouseUp me
35  if pEvent = #mouseUp then mDoAction me
36end
37
38-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
39
40on mouseDown me
41  if pEvent = #mouseDown then mDoAction me
42end
43
44-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
45
46on exitFrame me
47  if pEvent = #exitFrame then mDoAction me
48end
49
50-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
51
52on 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 
68end
69
70-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
71
72on 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
86end
Note: See TracBrowser for help on using the repository browser.