Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Blur Range/Pendulum-Alphamania
PictureXtra
Import Linked Bitmaps
Store and restore Director objects as an XML string
Drag Light-Alphamania
Urdu text editor
Convert Fonts
File Open Dialog Behavior
Append Text to File Example
Valentina Spider 1.0
 

 

 

Behavior Add all to the search path

Added on 10/31/2000

 

Compatibilities:
D7 D8 Mac PC Script

Required Xtras:
Buddy API

This item has not yet been rated

Author: MediaMacros (website)

This script adds all fodlers relative tot eh movie to the searchPath to avoid errors of files not being found.

global theD

on addFolders
  if the platForm contains "win" then
    theD = "\"
  else
    theD = ":"
  end if
  --get a list of all folders
  l = []
  readFolders(the moviePath, l)
  the searchPath = l
end

on readFolders whatPath, whatList
  folders = baFolderList(whatPath)
  if folders.count > 0 then
    repeat with x = 1 to folders.count
      path = addD(whatPath) & folders[x]
      whatList.add(path)
      readFolders(path, whatList)      
    end repeat
  end if
end

on addD whatString
  if whatString.char[whatString.char.count] <> theD then
    whatString = whatString & theD
  end if
  return whatString
end

on getBehaviorDescription me
  return "This script adds all folders and sub folders relative to the movie to teh searchPath."
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail