LoadSurface
From Spheriki
Load an image file into a new Surface.
Contents |
Usage
- filename string. The path to the image file, relative to the
images/directory. - Surface is returned, which is a Sphere Surface object containing the image data.
Examples
To load an image named "bleh.jpg" in images/ into your game:
var surface = LoadSurface("bleh.jpg");
Notes
- To load images in subdirectories other than
other/, use one of the following prefixes, followed by the desired path:-
~/to load from the game's base directory. This allows for better organisation. -
/common/to load fromSphere/common/, a directory that can be shared by all games.
-
- If you only plan to display images, consider using LoadImage() instead.
See also
- Sphere Surface object