CORRECT ElementSpecifies text to be displayed when a question is answered correctly (QUESTIONS location type only). Specifies a sound to be associated with a correct answer (all location types). Syntax<CORRECT SOUND="sound">correct</CORRECT> Attributes
PlacementTQS 2.0, 2.1 The CORRECT element must be a child of the QUESTIONS element, either inside of an individual location element or within global settings. TQS 2.5 The CORRECT element can be a direct child of the GLOBAL element, or can be used within these elements within a location or global settings: QUESTIONS and HANGMAN; or within these elements within global settings only: HTML and CUSTOM_*. ChildrenNo children are supported within the CORRECT element. RemarksBy default, the string "Correct!" is displayed. There is no default sound. When used as a direct child of the GLOBAL element, the CORRECT element is only used to retrieve the SOUND attribute. The QUESTIONS location retrieves the display text only when the CORRECT element is located within a QUESTIONS element, either within a location or global settings. The HANGMAN location type will play sounds as specified by the SOUND attribute, but will not display any text. With the HTML and CUSTOM_* location types, the sounds will not be used; you may invoke them by calling the playSound function. In order for any sounds to be played, the TQS element's USESSOUNDS element must be set to "1". TQS 2.5 The sound file must reside in the data root folder. This is, by default, the folder containing the .TQS file.
Examples<CORRECT>Right answer!</CORRECT> <GLOBAL> <CORRECT SOUND="defcorrect.wav"/> <INCORRECT SOUND="defincorrect.wav"/> <QUESTIONS ...> <CORRECT>Right answer!</CORRECT> <INCORRECT>Wrong answer!</CORRECT> </QUESTIONS> <HANGMAN ...> <CORRECT SOUND="hangcorrect.wav"/> <INCORRECT SOUND="hangdead.wav"/> </HANGMAN> </GLOBAL> Use the playSound function within your SCRIPT code to invoke your custom correct and incorrect sounds. <GLOBAL> ... <CUSTOM_FOO ...> <CORRECT SOUND="foocorrect.wav"/> <INCORRECT SOUND="fooincorrect.wav"/> ... </CUSTOM_FOO> </GLOBAL> |