loadFromFile

loadFromFile(fileName: String);

The loadFromFile method of the Sound class loads the .wav file specified in the fileName parameter string and updates the format and binary data for the Sound object. In JADE thin client mode, this method by default attempts to load the specified file from the presentation client.

The code fragment in the following example shows the use of the loadFromFile method.

beginTransaction;
    create sound;
    sound.loadFromFile("c:\jade\pics\heat.wav");
    sound.play;
commitTransaction;

An exception is raised if this method is invoked from a server method. (For details about the processing of this method when the application is running in JADE thin client mode, see the MultiMediaType class usePresentationFileSystem property, earlier in this chapter.)