Name
SetDefaultLoader -- set default loader (V10.0)
Synopsis
SetDefaultLoader(type, loader$)
Function
This function can be used to set the default loader for the type specified by type to the loader specified by loader$. All Hollywood functions that support loaders of the specified type will then default to the loader set using this function.

The following loader types are currently supported by Hollywood and can be passed in type:

#LOADER_IMAGE:
Image loaders, used for example by functions like LoadBrush().

#LOADER_ANIM:
Animation loaders, used for example by functions like OpenAnim().

#LOADER_SOUND:
Sound loaders, used for example by functions like OpenMusic().

#LOADER_VIDEO:
Video loaders, used for example by functions like OpenVideo().

#LOADER_ICON:
Icon loaders, used for example by functions like LoadIcon().

#LOADER_FONT:
Font loaders, used for example by functions like OpenFont().

The default loader for all the loader types listed above is default which means that Hollywood will first ask plugin loaders, then inbuilt loaders, then native loaders to open a file. An exception is #LOADER_FONT where, due to compatibility reasons, only native loaders will be asked to open the font.

The string you pass in loader$ can contain one or more loaders. If several loaders are specified, they must be separated by | characters. See Loaders and adapters for details.

Inputs
type
loader type to use (see above for possible values)
loader$
new default for the specified loader
Example
SetDefaultLoader(#LOADER_IMAGE, "plugin")
LoadBrush(1, "test.jpg")
The code above will set the default image loader to plugin. This means that functions like LoadBrush() will no longer use Hollywood's inbuilt image loader or the image loader provided by the OS. Only plugin image loaders will be asked to load image files.

Show TOC