QuickScript Functions - Overview

To access the power of OpusScript without doing any programming yourself we have provided a series of ready-made functions to add to your publication via the QuickScript option on the QuickBuild menu. Further functions will be available to download from the website or will be available from third party suppliers.

Functions supplied with the program include Orbit, ColourCycle, Pulsar and more. Further details are provided via the links below. Any functions included with the program which are not detailed here or those added from the website should have instructions and comments included in the scripts themselves.

Using the QuickScript Functions

There are two parts to using any of the QuickScript functions. You have to make the function available in your publication and then you have to call the function as and when you need it.

Adding the Function to Your Publication

Add the Script Object containing the function to your publication by selecting the function from the list on the QuickBuild menu. A Script Object will be appear in the Organiser. Make sure it is not attached to a specific object otherwise only that object will be able to see the function it contains.

Note:
Your function is only available to use on the page you have placed it on. If you want to use the function on several pages in your publication you should attach the Script Object to a Master Page and use this as the master for the pages you want to use it on.

Using the Function

Once the script object is on you page you can call it using an action. Set an object to trigger the function just as you would with any other action. Choose the Programming tab and select Script from the options available.

You now need to type your script into the box provided using the "syntax" listed in the details of that function. This usually means putting a few details in a set of brackets when calling the function. The details required by the function will usually include the object you want to apply the function to – usually labelled in the syntax as inObject. Remember you can use the keyword this as the object name if you want the function to apply to the object triggering it.There might also be a setting for the speed or a preset style.

In the case of the Orbit function for example, the syntax is described as:

Orbit(inObject, effectSize, style)

This means that when you trigger the action you need to tell the function what object to apply it to, the size the effect should be and which of the readymade styles you want to use. So one example might be

 Orbit(myText,175,"vertical")

This will make the object called myText orbit in a loop 175 pixels wide in the vertical direction.

 

Functions supplied with the program include:

Orbit

Orbit

Orbit causes an object to orbit around any objects in its orbit by circling behind and then in front of them.

Shuffle

Now replaced with a full-blown Opus action.

Actions: Shuffle Positions

Pulsar

Pulsar

Creates a ghost pulse of a vector object.

Split Name

Split Name

This script will divide a name up into the first and last name and place them in the ready-made Opus variables USER_FIRSTNAME and USER_SURNAME respectively. This is particularly useful in SCORM publications because a SCORM-conformant Learning Management System provides the learner’s name in a specific format – last name then first name separated by a comma.

Colour Cycle

Colour Cycling

Cycles the colours of the polygons in a vector object through a palette of colours from a set of your choosing.

Other Cycle Scripts

Other Cycle Scripts

There are also a set of scripts which cycle an effect through the objects in a frame. Each works in a similar way but applying a different effect.

Fade Cycle - will fade each object in a frame to a particular level an back. Varying the trail setting allows you to set the phasing of the effect across the objects allowing you to create effects similar to the fade cycles often used for flash preloaders.

Flare Cycle – cycles a flare effect through the objects in a frame. Set the colour of the flare and the phasing.

Scale Cycle – cycles a scaling effect through the objects in a frame. Set the minimum and maximum amount of scale and the phasing.

Spin Cycle – cycles a 360 degree rotation through the objects in a frame.

 

Acknowledgement:

Our thanks to the following for scripting many of the more interesting functions above:

Anyone needing some additional scripting or other programming can contact him via his website.