Opus Script Additions

We have added scripting support for the features introduced in v8 and we have also added support for constant expressions in Flash.

OpusScript support for Features in v8

GetQuestionValue()

Allows you to get the user’s score for a particular Question. This would be the "8" in "8 out of 10" for an individual question. Obviously this only has a value once the user has answered the question.

GetQuestionPossible()

Allows you to get the total possible score for a Question. This would be the "10" in "8 out of 10"

GetQuestionCorrect()

A boolean (true/false) variable which tells you whether the user answered the question correctly.

GetQuestionIncorrect()

A boolean (true/false) variable which tells you whether the user answered the question incorrectly.

ConfirmQuestion()

A script version of the Confirm Question action which allows you to submit answers using a script command.

ResetQuestion()

A script version of the Reset Question action which allows you to reset all the elements and scoring of a question so that it can be retaken.

SetUserAnswer(n)

A script version of the Set User Answer action which allows you to select answers using a script command. Useful for questions where the success has been evaluated in a script or for using the Question scoring structures in simulations and more complex training.

The parameter n indicates the index of the answer the user has chosen or is awarded – eg.: myQuestion1.SetUserAnswer(2)

ResetUserAnswer(n)

A script version of the Reset User Answer action which allows you to reset a previously selected answer using a script command.

The parameter n indicates the index of the answer the user has chosen or is awarded – eg.: myQuestion1.SetUserAnswer(2)

 

 

Other Recent OpusScript Additions

 

 

Switch Case

Support for the Switch statement now allows you to perform case selection functions in OpusScript and thereby adds significant functionality and efficiency.

Strict Equality [===]

OpusScript now offers a strict equality comparison to check the object type as well as the content.

FindText() and FindTextInSelection parameter

An additional parameter has been added to the FindText() and FindTextinSelection() function to allow you to ignore the case of the text – no more duplication of code to check for different cases or to convert test to a consistent case.

Script Console

The script console has been improved and is now supported in Flex publications to allow proper debugging of Flash output

PrintPage

New parameters to support the new printing features.

PrintObject

New parameters to support the new printing features.

Pause() - sound

Pause a WAV sound file.

Resume() - sound

Resumes a WAV sound file previously paused.

Play() - multiframe

Play a multiframe.

Stop() - multiframe

Stop a multiframe.

SetBlur(h,v,q)

Allows script to set the values for the new Blur effect being horizontal amount, vertical amount and quality.

RemoveBlur()

Script action to remove the blur from an object.

tween.Play()

Play a tween animation from the current frame.

tween.Stop()

Stop a tween animation from the current frame.

tween.GotoFrame(frame)

Go to a specific frame in a tween animation.

tween.GotoAndPlay(frame)

Go to a specific frame in a tween animation and start playing the tween.

tween.GotoAndStop(frame)

Go to a specific frame in a tween animation and stop playing the tween.