The Lingoworkshop Code Library

The Lingoworkshop codelib is a repository of code and utilities that you are free use use or adapt.

Note - most of these scripts have been created with Director 7, 8, 8.5 or DMX. They should work fine with DMX2004 - except where they use Timeout objects (the syntax for creating timeout objects has changed with DirectorMX 2004). If you are experiencing "Script Error: Object Expected" errors using DMX2004, then either set the scriptExecutionStyle to 9 or change the timeout creation lingo as follows:

-- DMX 8.5/MX syntax
aTimerObj = timeout(timername).new(10, #Callback, me)

-- DMX 2004 syntax
aTimerObj = timeout().new(timername, 10, #Callback, me)

Some scripts may also create an error in DMX2004 where they are checking for the existence of a script using the syntax

if member("ScriptName").type = #script

This will generate an error because the syntax member("SomeMemberThatDoesnotExist") will return VOID in DMX2004 - where as it used to return a reference to a member of type #empty. To fix this, change the above lingo to

if scriptP("scriptName") then 

... and add a movie script function to your movie like this

on scriptP( aScriptName )
  if member(aScriptName).ilk = #member then
    return (member(aScriptName).type = #Script)
  end if
  return false
First published 18/05/2005