Changeset 215 for trunk/lingosource/castlib1/thisMoviesScript.ls
- Timestamp:
- 12/15/08 13:00:15 (3 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/thisMoviesScript.ls (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/thisMoviesScript.ls
r136 r215 1 --------------------------------------------- 2 -- IMPORTANT: 3 -- If you prefer to use buddyMenu xtra (which is buggy, but free) over OSControl xtra (you need a license to use it in authoring) 4 -- simply replace the OSControl menu member with another member. You can use the member "OSControlReplacement". 5 -- Select sprite 2 and 3 in the score window, then select member "OSControlReplacement" in the cast window and select: 6 -- "Edit -> Exchange Cast Members" (or press Cmd + E). 7 -- You can delete the OSControl member "oscontrolMenu" afterwards. 8 -- From that time on the buddyMenu xtra is used to draw the menu instead of the OSControl xtra. 9 -- the only difference in the script is in script "OSCmenu_Utilities" and "OSCmenu_Handlers": 10 -- if sprite(me.spritenum).member.type = #OSmenu then ... 11 12 -- Please read the readme file in order to learn how to add your own handlers to this menu 13 --------------------------------------------- 1 -- thisMoviesScript 2 ----------------------------------- 3 -- DESCRIPTION: 4 -- Main movie script of this movie, with the standard moviescript handlers like: 5 -- startMovie, stopmovie, closeWindow and idle 6 -- 7 -- REQUIRES: 8 -- script "aleXtrasMovieScript" as provider for library scripts -> xscr() 9 -- script "commonMovieScript" -- standard handlers 10 -- script "GetSetPrefs" -- read and write preferences 11 -- 12 -- WARNINGS: 13 -- IMPORTANT NOTES: 14 -- This movie uses the sleep method on idle in order to prevent CPU hogging 15 -- by a movie, which is supposed ti run all the time 16 -- This means, that on mac, you will sleep one tick on idle, while on PC it is only a millisecond 17 -- While that keeps the CPU usage low, the main movie won't run at "full speed" 18 -- So in order to test the speed of the main movie close this MIAW tool! 19 -- 20 -- which xtra to use for the menu? 21 -- If you prefer to use buddyMenu xtra (which is buggy, but free) over OSControl xtra 22 -- (you need a license to use it in authoring) 23 -- simply replace the OSControl menu member with another member. 24 -- You can use the member "OSControlReplacement". 25 -- Select sprite 2 and 3 in the score window, then select 26 -- member "OSControlReplacement" in the cast window and select: 27 -- "Edit -> Exchange Cast Members" (or press Cmd + E). 28 -- You can delete the OSControl member "oscontrolMenu" afterwards. 29 -- From that time on the buddyMenu xtra is used to draw the menu instead of the OSControl xtra. 30 -- the only difference in the script is in script "OSCmenu_Utilities" and "OSCmenu_Handlers": 31 -- if sprite(me.spritenum).member.type = #OSmenu then ... 32 33 -- Please read the readme file in order to learn how to add your own handlers to this menu 34 ----------------------------------- 14 35 15 36 on startmovie … … 18 39 19 40 prefsScript = xscr(#GetSetPrefs) 20 theResult = prefsScript.mReadPrefs("handlerMenuToolPrefs") 21 theResult = prefsScript.mGetPrefValue(#windowrect) 41 if ilk(prefsScript) = #instance then 42 theResult = prefsScript.mReadPrefs("handlerMenuToolPrefs") 43 theResult = prefsScript.mGetPrefValue(#windowrect) 44 end if 22 45 if ilk(theResult) <> #rect then theResult = rect(0,0,(the activewindow).rect.width, (the activewindow).rect.height).offset(50, 50) 23 46 (the activewindow).rect = theResult … … 38 61 39 62 -------------- I've put it back in now, as I am having a problem on windows anyway, that I'll need to investigate further 40 theResult = call(#mSetPrefValue, [mGetXscript(#GetSetPrefs)], #windowrect, (the activewindow).rect) 41 theResult = call(#mSavePrefs, [mGetXscript(#GetSetPrefs)], "handlerMenuToolPrefs", 1) 63 prefsScript = xscr(#GetSetPrefs) 64 if ilk(prefsScript) = #instance then 65 theResult = call(#mSetPrefValue, prefsScript, #windowrect, (the activewindow).rect) 66 theResult = call(#mSavePrefs, prefsScript, "handlerMenuToolPrefs", 1) 67 end if 42 68 43 69 forget the activewindow … … 57 83 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 58 84 -- get a list of all handlers used in the current stage movie, sorted by scripttype and castlib 85 -- the more scripts you have in your main movie, the longer it takes 86 -- therefore it caches the results, so that it is only slow the first time the handler menu is opened 59 87 60 88 on mBuildList kw … … 338 366 parentheseOffs = offset(")", l1) 339 367 if parentheseOffs > 0 then 340 put " " into char parentheseOffs of scrtext 368 -- put " " into char parentheseOffs of scrtext 369 delete char parentheseOffs of scrtext 341 370 end if 342 371 end if
Note: See TracChangeset
for help on using the changeset viewer.
