TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
TQS 2.5

Back to Reference

getStateImg Function

Retrieves the path of the image file used to represent a given state.

path = getStateImg(state);

The state whose image should be returned. Can be one of the following values:
The location has not been visited.
The location has been visited but not completed.
The location has been completed.
The location has been completed with a score of 100%.

The path of the image file is returned.


Regardless of whether the image is the built-in state image, or a custom image set through the STATEIMG element, the returned path name includes the required path for TQS to display the image.

The functions getLocState and getCurLocState can be used to retrieve the states of locations.


myImgEl.src = getStateImg("DONE");
myImgEl.src = getStateImg(getCurLocState());

©2016 Bot Productions. All rights reserved.Last Updated: September 9, 2007