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

Ignore:
Timestamp:
04/06/08 11:11:43 (4 years ago)
Author:
alex
Message:

now with version checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib2/aleXtrasMovieScript.ls

    r150 r163  
    1818----------------------------------- 
    1919 
    20  
    2120property pAleXtras 
    2221 
    2322on mGetAleXtras 
    2423   
     24  alextras = (script "aleXtrasMovieScript").pAleXtras 
     25  if not(objectP(alextras)) then 
     26    alextras = new(script "commonMovieScript") 
     27    if ilk(alextras) <> #instance then 
     28      alert "HandlerMenu: Script" & QUOTE & "commonMovieScript" & QUOTE && "is missing. This movie can't proceed!" 
     29      halt 
     30    end if 
     31    (script "aleXtrasMovieScript").pAleXtras = alextras 
     32  end if 
     33  return alextras 
     34  ----------------------------- 
    2535   
    2636  alextras = (script "aleXtrasMovieScript").pAleXtras 
     
    6171  ----------------------------------- 
    6272   
     73  alextras = mGetAleXtras() 
     74  scrName = string(scrName) 
     75  if length(scrName) < 1 then return alextras 
     76  if scrName = "commonMovieScript" then return alextras 
     77   
     78  inst = alextras.mGetInstance(scrName, 1) 
     79  if ilk(inst) <> #instance then 
     80    if the runmode contains "aut" then 
     81      put "HandlerMenu: Script" && QUOTE & scrName & QUOTE && "is missing! This may cause unwanted behavior" 
     82    end if 
     83      inst = [] 
     84    end if 
     85  return inst 
     86  ---------------------- 
     87   
     88   
    6389  scrName = symbol(scrName) 
    6490  if ilk(scrName) <> #symbol then scrName = #commonmoviescript 
     
    99125  --         TODO: - 
    100126  ----------------------------------- 
     127  exit 
     128   
    101129   
    102130  mediaList = mGetAleXtras() 
     
    144172on mLoadXScript whichName 
    145173   
     174  exit 
     175   
     176   
    146177  whichName = string(whichName) 
    147178  if length(whichName) < 1 then return 0 
     
    168199 
    169200on mLoadScriptsFromLDM whichSprite 
     201   
     202  cms = xscr() 
     203  globs = cms.mGetGlobalList() 
     204  includes = globs[#gParentScriptInstances] 
     205  if not(objectP(includes)) then 
     206    includes = [:] 
     207    globs[#gParentScriptInstances] = includes 
     208  end if 
     209   
     210  tell sprite(whichSprite) 
     211    cl = the number of castlibs 
     212    repeat with n = 1 to cl 
     213      num = the number of members of castlib cl 
     214      repeat with m = 1 to num 
     215        mem = member(m,n) 
     216        if length(mem.name) > 0 then 
     217          if mem.type = #script then 
     218            includes.setaProp(mem.name, mem.script) 
     219          end if 
     220        end if 
     221      end repeat 
     222    end repeat 
     223  end tell 
     224   
     225  exit 
     226  ------------------------------ 
    170227   
    171228  mediaList = mGetAleXtras() 
     
    204261 
    205262on mListAleXtras 
     263  put "Handler mListAleXtras deprecated" 
     264  exit 
     265   
    206266  alextras = (script "aleXtrasMovieScript").pAleXtras 
    207267  if voidP(alextras) then mLoadScripts 
     
    253313  sel = the selection of castlib cl 
    254314   
    255   delim = the last char of the applicationpath 
     315   
     316  mp = the moviepath 
     317  if length(mp) < 1 then 
     318    if the runmode contains "plug" then 
     319      mp = "/" 
     320    else 
     321      mp = the applicationpath 
     322    end if 
     323  end if 
     324  delim = the last char of mp 
    256325   
    257326  the itemdelimiter = "/" 
Note: See TracChangeset for help on using the changeset viewer.