Accessibility
 
Home > Products > Authorware > Support > Release Notes
Macromedia authorware Support Center - Release Notes
Authorware 6.5 Release Notes

This document gives you detailed information about the changes that are part of Macromedia Authorware 6.5. It is meant to accompany and update the Using Authorware 6 manual.

Authorware 6.5 contains many new features and bug fixes. This release focuses on accessibility, extensibility, and usability. Authorware 6.5 also includes improved support for rich media types, such as Macromedia Flash MX and XML.

Accessibility
Extensibility
Rich Media Support
New system functions
New system variables
Expressions in response fields
Open properties
Windows controls
RTF objects
Enhanced Calculation Editor
Bug fixes

 
Accessibility

Making learning applications accessible to all end-users, including those with disabilities, has become a priority for developers.

Macromedia Authorware 6.5 includes the Authorware Application Accessibility Kit (AAAK), which consists of accessibility Knowledge Objects, commands, models, and techniques all demonstrated in a comprehensive Accessibility Kit Tutorial. This tutorial will help you understand what is needed to make your Authorware application compliant with Section 508 of the Rehabilitation Act, enacted by the U.S. Congress. In the tutorial, you will discover how to make text audible, run movies with captions, and create an accessible user interface, menu, and quiz.

The AAAK includes scripting to automatically detect and utilize the text-to-speech facilities already installed in the end-user's computer, including popular screen readers like JAWS and Window-Eyes. The AAAK is Windows and Macintosh compatible.

In addition, two new system variables, ObjectOverID and ObjectOver have been added to Authorware 6.5. They contain the icon ID and icon title of the displayed object that is currently under the mouse pointer. You can use these variables to perform any action, including actions that can assist the disabled in using your courseware. For example, use these variables and the Authorware Application Accessibility Kit included with this release to control text-to-speech technology on the end-user's computer.

With the release of Authorware 6.5, developing accessible Authorware applications is quicker and easier. The AAAK takes advantage of several new Authorware 6.5 features. By following the demonstrated techniques and using the supplied accessibility tools in your own productions, you will be able to satisfy recommended guidelines and legislated requirements for accessible software.

To start the course, open the file Accessibility Kit Tutorial.a6p in the Accessibility Kit subfolder of your Authorware 6.5 installation.

 
Extensibility

A number of new Authorware features are designed to promote extensibility.

 
Additional properties exposed
One of the keys to extensibility is to open as many properties of each Authorware icon as possible so that you as an Authorware developer can write code that makes use of these properties. This makes it much easier for you to create commands and Knowledge Objects that can save you countless hours of work. Authorware 5 and Authorware 6 opened a great many properties to Authorware developers. Authorware 6.5 exposes more than 35 additional properties. These properties are described later in this document.

 
Non-modal commands
As an Authorware developer, you can save a lot of time and effort in creating and maintaining source files by using commands. Introduced in Authorware 6, commands were modal in nature. This means that when you opened a command, you could not click and work in the flowline of your source file until you closed the command. Authorware 6.5 allows commands to be non-modal. This makes them much more versatile, in that a command can now act as an assistant that stays open while you make changes to your file. It is now easier to write and use commands such as improved spell checkers, find and replace engines, bug trackers, media browsers and importers, and a great many other types of tools. In a later section of this article, you will see how to create non-modal commands.

 
New command and Knowledge Object functions
In Authorware 6.5, several new functions have been added to make your commands and Knowledge Objects more versatile. Four functions in particular that specifically target the writing of commands and Knowledge Objects are OpenIcon , CommandRefresh , KORefresh , and SetTargetModal . A full list of new functions is included later in this document.

 
Setting a layer from U32 functions
Authorware 6.5 now allows a developer writing an external function in a U32 file to set a layer for objects that the U32 function posts to the presentation window. While you have always been able to layer screen objects in Authorware, external functions could only post to layer zero. In Authorware 6.5, external functions can set the layer for a posted object below or above other objects.

To do this, you use the APWC_POST wParam parameter to set the layer for the object.

 
New Knowledge Object Software Development Kit
You can build commands and Knowledge Objects using Authorware to extend Authorware's functionality. With Authorware 6.5, we also provide an updated Knowledge Object Software Development Kit (KOSDK) for Borland Delphi. The KOSDK allows you to take advantage of new extensibility features in Authorware 6.5 when building commands and Knowledge Object Wizards. With the KOSDK and Borland's Delphi, you can rapidly develop powerful Authorware extensions.

 
Writing non-modal commands
You now know that commands can be made non-modal in Authorware 6.5. The new SetTargetModal function lets you switch from a modal to a non-modal state from inside a command. By default, commands are modal. To switch a command to a non-modal state, you use the following function call:

result := CallTarget("SetTargetModal", WindowHandle, FALSE)

When you switch a command to non-modal state, you or the Authorware developer using your command will be able to drag icons from the icon palette to the flowline, erase icons, and perform any other actions you normally are able to do. To switch the command back to a modal state, you use the following call:

result := CallTarget("SetTargetModal", WindowHandle, TRUE)

When a command sends the SetTargetModal message, it does so only for itself. If the command returns 0, it was successful. If the command returns a nonzero value, you should check the system variables EvalStatus and EvalMessage for more information.

The WindowHandle argument tells the target which command is sending the request. The second argument indicates the state you want:

FALSE = Non-modal
TRUE = Modal
For example, you might use non-modal commands in a tutorial on how to use Authorware. You can now have the tutorial running in a command that gives the student instructions while in a modal state, then switches to a non-modal state to allow the user to follow the instructions and work in the Authorware file. The tutorial might instruct the user, for example, to drag a display icon onto the flowline, and then wait for the user to complete the action.

After the user returns to the command, which is still open, the command can check the user's work, perhaps by scanning the flowline, and then give the user feedback.

Only the current modal command can issue requests, including the request to release the target from the modal state. Commands that are not in the active window cannot issue these requests. Once you make the target non-modal, the user can launch another command.

When the target is non-modal, any command that may be running can put the target in the modal state and issue requests. A command does not need to put the target in the modal state in order to safely close down; Authorware still removes it from the list of currently running commands.

While commands are active, a timer checks the running commands every three seconds. If a command crashes, the command is removed from the list when the timer ticks off. If that command was last in the list, the target is put into the non-modal state.

 
Usability

Authorware 6.5 improves usability in several ways. You can now create script functions in calculation icons, strings, and external text files. In addition, the user interface has been improved. For instance, you can place icons inside a map icon simply by dragging the icon and dropping it onto the unopened map icon. You can also link a framework page to a navigate icon, a display object to an animation icon, or a map full of icons to an erase icon, just by dragging.

 
Script function icons
In this release you can create user-defined script functions inside or outside of Authorware 6.5. Script functions can be created in a calculation icon, an external text file, or in a string. First, let's take a look at turning a calculation icon into a script function.

Each script function resides in its own calculation icon. A script function icon can reside anywhere in an Authorware file. You may decide to place all of your script function icons in a map icon and place the map icon at the start or at the bottom of your file so that you can easily find it.

To create a script function:

1 Place a calculation icon on the flowline.
2 Title the icon the name by which you want the function to be known. The name of the calculation icon must be unique. It cannot be the same as any other icon, though it can be the same as that of a system function—the two will not conflict.
3 Open the properties dialog for the calculation icon by choosing Modify > Icon > Properties, or by right-clicking the icon and choosing Properties.
4 Select Contains Script Function. This tells Authorware that you are defining the icon as a script function.
5 Click OK. The calculation icon changes from

to

.

You can see a list of all the script function icons defined in a file in the Functions dialog under the Script Icons category.

You can place any Authorware script inside the script function icon. For example, in the following code, the system beep is repeated ten times using the Beep function.

repeat with i := 1 to 10
    Beep()
end repeat

Unlike other calculation icons, when a script function calculation icon is encountered in the normal flow, it is not automatically executed. The script function is ignored until you call it through the CallScriptIcon function.

After you've defined a script function, you can call it by using the CallScriptIcon system function. In the illustration above, a script function icon called Beep has been created. From anywhere within Authorware, you can call the script function Beep by using the following script line:

CallScriptIcon(@"Beep")

Once the script function has finished, the result of the CallScriptIcon function call is returned.

Just like with the variables you create, your script functions should always be documented. To do so, you can enter a description either in the Functions dialog or in the description of the calculation icon.

Like Authorware's system functions, the first line of a script function description should be the declared format of the function. When you select Paste from the Functions dialog, the first line of the script function description is pasted into the current calculation icon. Any text between brackets [optional argument] is excluded. If there is no description, Authorware pastes CallScriptIcon(@"IconTitle") , with IconTitle replaced by the name of the script function.

A script function can be any standard Authorware script and can have arguments passed to it. You can also specify a return value.

Besides the script function icon title, the CallScriptIcon function takes up to three other parameters.

result := CallScriptIcon(IconID@"IconTitle" [,args] [,byValue] [,owner])

The second argument allows you to pass a value to the function; in essence you are passing an argument to the function. You can pass any type of value, from a simple number to a multidimensional list. The following example code calls a script function called Standard Deviation and passes it an argument called values .

CallScriptIcon(@"Standard Deviation", values)

Within the function script, you use an icon variable called Args to capture the argument that is passed into the script.

As an example, let's create a script function that draws a number of randomly sized and placed circles on the screen.

We will call our function (a calculation icon with Contains Script Function selected) Circles and we will pass it the number of circles to draw. This would be the script for our new function:

repeat with i := 1 to Args@"Circles"
    Circle(Random(1,3,1), Random(1,WindowWidth,1), ¬
      Random(1,WindowHeight,1), Random(1,WindowWidth,1), ¬
      Random(1,WindowHeight,1))
end repeat

This example draws a circle as many times as indicated by the repeat loop's upper limit. The upper limit is determined by the Args icon variable. Each circle is drawn with a random thickness between 1 and 3 pixels; the location of the circle is randomly chosen to be somewhere in the Presentation window.

To call the above script function, you use the following script line:

CallScriptIcon(@"Circles", 12)

This script passes the value 12 to the Circles script function, which means the repeat loop will go through 12 iterations, drawing 12 circles. Later, you can call the same script function using a different value from 12; the function will use the new value as the number of circles to draw.

The argument can be any value type, including a list. For instance, if you create a script function to perform a statistical standard deviation, the best way to pass the numeric values to analyze would be to pass a list argument to the function.

A script function can also return a value. The standard deviation function would need to return a result value. You can pass back a value by setting an icon variable called Result in your script function.

For example, the following script function will accept a list of words and return a string that is a concatenation of each word. We'll call our function Sentence .

NewString := ""
repeat with i := 1 to ListCount(Args@"Sentence")
    NewString := NewString ^ " " ^ Args@"Sentence"[i]
end repeat

-- now take out initial space
NewString := SubStr(NewString, 2, CharCount(NewString))

-- return the result
Result@"Sentence" := NewString

If we use the following script to call our function:

MySentence := CallScriptIcon(@"Sentence", ["This","is","a","test"])

The value of MySentence will be "This is a test".

CallScriptIcon 's optional third parameter controls whether the executor passes the argument (if it is a list) by reference or by value. When True, the argument is passed by value. When the argument is passed by value, the executor makes a copy of the list and passes that to your script function. When false (the default) the argument is passed by reference. Passing a variable by reference means that the script function modifies the list you used for the argument, rather than working on a copy of the list.

CallScriptIcon 's optional fourth parameter sets the owner icon for the script function being executed. By default, the calling icon (the one in which CallScriptIcon is located) is the owner. Being the owner means anything drawn on the screen belongs to it. Automatic erase options apply to what was drawn and any references to IconTitle or IconID in the script function refer to the owner. Setting the fourth parameter to true makes the script function icon (the one that CallScriptIcon is calling through the @ sign) the owner.

A script function can call other script functions, including nested script function calls (calling the script function from within itself). However, there is a limit to how many times a script function can call another script function. The size of the evaluation stack for the CallScriptIcon function is limited; each parameter passed takes up one space in the stack. Specifying the Args parameter gives you about half the number of possible nested calls. Specifying all four parameters gives you about one-fourth of the number of possible nested calls. EvalStatus and EvalMessage are set when the stack limit has been reached.

Though a script function may call itself, note that this is not true recursion, because you must maintain your own variable stack. The easiest way to do this is to use a list. True recursion means that any variables you use in your script are local to the current recursion iteration and a new set of variables by the same name is created each time the function calls itself. In this case, variables used in the function are global, which means that when the function calls itself, the variables not only retain their old values but will be overwritten by any subsequent values that are assigned to them.

To avoid this problem, if you want to write a recursive function you need to create your own variable stack. This is best done by setting up a list that increases by one location each time the function calls itself, and decreases by one location each time a function call ends and control returns to the previous function call. If you need to track multiple variables in your script function, use a multidimensional list to track the values instead.

Using the GoTo function within a script function is highly discouraged because it can lead to an endless loop or to improper execution of subsequent icons. You should always exit a function normally and then navigate to another icon if necessary.

 
External script functions
As shown in the earlier example, using the CallScriptIcon function allows you to call script functions you write in calculation icons. However, you can also store script functions in external text files. These text files can be on a local drive or can be passed as a URL.

To read in a script function from an external text file, use the CallScriptFile function. It works similarly to CallScriptIcon .

result := CallScriptFile("filename" [,args] [,byValue])

Note that you provide a file path and name instead of a calculation icon title. Also, because you're not calling a script function icon, you will define the Args and Result icon variables in the calculation icon making the call to the CallScriptFile function.

For instance, let's take our previous example that forms a sentence and turn it into a script file. We'll create a text file and call it sent.txt. We will then place the script for our function in that file:

NewString := ""
repeat with i := 1 to ListCount(Args@IconID)
    NewString := NewString ^ " " ^ Args@(IconID)[i]
end repeat

-- now take out initial space
NewString := SubStr(NewString, 2, CharCount(NewString))

-- return the result
Result@IconID := NewString

Note that in this case we used @IconID instead of @"Sentence" when referring to the Args and Result icon variables. This allows the external script function to be called from any calculation icon, regardless of its icon title. However, when doing this, you must still create Args and Result icon variables in each calculation icon that calls the external script function. And, since you're using an expression-based @ reference for an icon variable, you'll need to create the user variables Args and Result at the file level as well.

Now, let's say we want to call the external script function from an icon titled Call :

Args@"Call" := ""
Result@"Call" := ""
MyVal := CallScriptFile(FileLocation^"sent.txt",["Hello","World "])

The first two lines ensure that the two icon variables exist and are initialized. The third line calls the external script file, passing it a list with two words. The returned value is "Hello World" .

 
String script functions
The third method of calling a script function is used when the script function has been stored in a string. This is done typically when you need to process text from an external source before it can be executed as a script function. For instance, you may be reading the script function from an encrypted text file, which must be decrypted before it can be used, or you may be retrieving the script string from a database.

To call a script function stored in a string, use the CallScriptString function.

For example, the following code makes the speaker beep 10 times:

script := "repeat with i := 1 to 10" ^ Return
script := script ^ "Beep()" ^ Return
script := script ^ "end repeat"  ^ Return
CallScriptString(script)

 
The new ExitIcon system variable
You can now specify a calculation icon to be run when the user exits the course file, no matter what method is used to exit, even if the user closes the file through shortcut keys or close boxes. The exit calculation icon also works if you call the Quit function. The exit script is executed before the Presentation window closes. After the exit calculation icon is executed, the file exits normally.

The exit calculation icon should be placed out of the way, perhaps at the very bottom of your flowline, so that it is not executed before it's needed. To indicate which calculation icon is to be used upon exiting, set the new system variable ExitIcon . If the specified icon is not a calculation icon, Authorware ignores the assignment. To clear the ExitIcon variable so that the script is not executed upon exiting, set the variable to zero.

For instance, let's suppose that you create a calculation icon to do two things whenever the user exits the lesson file. It writes out the value of a variable called score to a text file and deletes a temporary file you have created in the lesson. You could create a calculation icon called My Exit Routine and place it at the bottom of the flowline, placing the following script inside the calculation icon:

WriteExtFile("c:\\results.txt", score)
DeleteFile("c:\\temp.txt")

During any initialization script at the beginning of the lesson file, be sure to include the following line:

ExitIcon := IconID@"My Exit Routine"

The Goto , SyncWait , and the SyncPoint functions have no effect if called from within the exit icon script.

Note: During authoring, hold down the Control key to override execution of the ExitIcon script. This override key is for authoring convenience only and is not available at runtime.

 
New locations for data files
In Authorware 6.5 the locations for the records files, cache, and initialization files have changed. The change improves the way Authorware works on restricted systems, both at authoring time and at runtime.

Authorware now stores and retrieves its data on Windows 32-bit systems from the user's Application Data directory. The location of this directory varies by OS version and registry settings. The new system variable UserApplicationData contains the complete path to this directory.

Authorware still supports its previous behavior, for backward compatibility. For example, some developers distribute an AWx.INI with their piece to control the location of the records directory and other runtime options. If the AW65.INI file doesn't exist in the user's Application Data directory, Authorware checks the directories it used to use, next to the application and then the Windows directory. If Authorware finds the .INI file there, it uses that location. If Authorware can't find the .INI file, it defaults to writing and reading its data from the user's Application Data directory.

On Macintosh and Windows 16-bit systems, the behavior has not changed from previous versions.

 
Interface improvements
The following improvements have been made to the Authorware user interface:

We've improved the Authorware interface to make development easier and faster.

The application title bar now includes the filename, which makes it easier to find the right window when you have several open. If you change the file and need to save it, an asterisk appears after the filename.
You can now drag icons onto others to organize or link them. Dragging an icon onto a closed map, framework, or Knowledge Object icon places the dragged icon inside. The dragged icon becomes the last icon within the map, framework, or Knowledge Object icon. If you hold down the Control key, the dragged icon becomes the first icon inside the map, framework, or Knowledge Object icon. This saves you the steps of having to open an icon to place other icons inside it. When you drag an icon onto a framework icon, holding down the Shift key places the icon in the exit pane. Otherwise the icon is placed in the entry pane.
You can now drag a branching icon onto another branching icon. In the past, you could not, for instance, drag an interaction icon to the right of another interaction icon. Now, the branching icon is automatically grouped into a new map icon before being placed on the flowline. This holds true for all branching icons: framework, interaction, sound, digital movie, and decision.
You can now drag a framework page to a navigate icon to set the hyperlink to that framework page. Authorware creates the hyperlink as Jump to Page. If you hold down the Control key while dragging the framework page onto the navigate icon, the link is set up as Call and Return.
You can now drag any of the following icons onto an erase icon: display, digital movie, wait, calculation, sprite Xtra, map, and Knowledge Object. Doing so adds the icon to the list of icons to erase or preserve. Icons already in the list are not added again. When you drag a map icon or Knowledge Object icon, all of its erasable children are added automatically.
Similarly, you can now drag a display, digital movie, calculation, or sprite Xtra icon onto a motion icon to link it.

 
Rich Media Support

In Authorware 6.5, several improvements have been made to rich media support.

 
Flash MX Xtra
The Flash Xtra now supports files created with Macromedia Flash MX.

 
The XML Parser
The XML Parser Xtra now reads XML files directly from a local path or URL. This enables it to parse XML files larger than 32KB, which gives you much greater versatility in using XML files, which can grow quite large.

 
The digital movie icon
The digital movie icon now supports the Windows Media Player through a new a6wmp32.xmo file. This Windows-only feature allows the Authorware movie icon to play any media type that the Windows Media Player supports, such as ASF, ASX, WMV, and IVF. In addition to the newly supported file types, the Windows Media Player can optionally support other media types traditionally supported by the Authorware digital movie icon, such as AVI.

If you want to play AVI files through the Windows Media Player, instead of the traditional movie icon support, add a WMP extension to the files. For example, you can rename mymovie.avi to mymovie.avi.wmp. When selected in the digital movie icon, the file plays through the Windows Media Player support. If the DIVX codec is installed on your system (and that of your clients), you can play DIVX movies as well using the same approach.

In supporting a wide array of media, the Windows Media Player must deal with many different codecs, playback rates, and measurements for each media type. This restricts what information Authorware can obtain about the media. For example, the frame rate of some media formats is determined by conditions at playback time (such as bandwidth), so there is no way to determine the frame rate for those files until after they have played. Other formats do not support seeking, which affects the ability to pause and resume.

In the digital movie icon Properties dialog, Rate can be set for some file types, but not all. The default value is 1.0. A value of 1.9 is very fast and 0.1 is very slow. Some media types do not support turning the sound on or off. What works best for your application depends on the media type you choose to use and your playback environment.

Support is through the Windows Media Player control, which must be installed on your client systems. Authorware checks the system registry for the class ID of the Windows Media Player {22D6F312-B0F6-11D0-94AB-0080C74C7E95} before displaying the file dialog for the digital movie icon. If the media player control cannot be found, Authoware does not give you the option of linking to the new media types.

 
New system functions

New system functions have been added to Authorware 6.5.

 
Beep

Beep([system sound or frequency], [duration])

The Beep function has been improved in Authorware 6.5. The Beep function activates the system's beep sound. Passing no arguments results in a simple beep sound. On systems with Windows 95 or later, the first optional parameter plays the waveform sound for the given type, which is determined by an entry in the Windows registry.

1 = SystemAsterisk

2 = SystemExclamation

3 = SystemHand

4 = SystemQuestion

5 = SystemDefault

In Windows NT-based systems, you can use the first optional parameter to play the waveform type or, if you specify the second optional parameter, you can play a sound of a specific frequency and duration. When specifying two parameters, the first sets the frequency of the sound in hertz. This parameter must be in the range 37 through 32,767. The second parameter sets the duration of the sound in milliseconds.

 
CallScriptFile
See External script functions.

 
CallScriptString
See String script functions.

 
CallScriptIcon
See Script function icons.

 
CommandRefresh
Syntax: CommandRefresh()

This function reloads the Commands menu from the Commands folder on your hard drive. Commands are always loaded when you start Authorware. If you have added new commands since opening Authorware during the current session, you can use this function call to reread the Commands folder and recreate the Commands menu.

This function is best used when you write a command that is installing or copying commands to the Commands folder, after which you should update the Commands menu.

The CommandRefresh function is available only at authoring time.

 
GetVariableList and GetFunctionList
The GetVariableList and GetFunctionList functions have changed in this release to include new optional parameters.

In previous versions of Authorware, large files often had such a large number of variables and functions that the values returned were not always complete. In Authorware 6.5, you can add masks so that only those properties that match the mask are returned.

For variables, you can now use the following optional masks with GetVariableList :

GetVariableList(CategoryNumber, #Category)
GetVariableList(CategoryNumber, #VariableName)
GetVariableList(CategoryNumber, #Assignable)
GetVariableList(CategoryNumber, #InitialValue)
GetVariableList(CategoryNumber, #Type)

If you do not provide a mask, all of the above properties are returned. You can mix masks together by placing one after the other. For example:

GetVariableList(CategoryNumber, #VariableName, #Assignable, #Type)

For system functions, you can use the following optional masks with GetFunctionList :

GetFunctionList(CategoryNumber, #FunctionName)
GetFunctionList(CategoryNumber, #NumArgs)
GetFunctionList(CategoryNumber, #Description)

If you do not provide a mask, all properties except description are returned. You can mix masks together by placing one after the other. For example:

GetFunctionList(CategoryNumber, #FunctionName, #NumArgs)

This rule applies to the following as well.

For User (U32) functions, you can use the following optional masks:

GetFunctionList(CategoryNumber, #FunctionName)
GetFunctionList(CategoryNumber, #FileName)
GetFunctionList(CategoryNumber, #CrsIntName)
GetFunctionList(CategoryNumber, #Description)

If you do not provide a mask, all properties are returned except description.

For XTRA functions, you can use the following optional masks:

GetFunctionList(CategoryNumber, #FunctionName)
GetFunctionList(CategoryNumber, #FileName)
GetFunctionList(CategoryNumber, #NumArgs)

If you do not provide a mask, all properties are returned except description.

For UDF ScriptIcon functions, you can use the following optional masks:

GetFunctionList(CategoryNumber, #FunctionName)
GetFunctionList(CategoryNumber, #Description)

If you do not provide a mask, you get only the function name.

 
KORefresh
Syntax: KORefresh()

This function reloads the Knowledge Objects window from the Knowledge Objects folder on your hard drive. Knowledge Objects are always loaded when you start Authorware. If you have added new Knowledge Objects since opening Authorware, you can click the Refresh button in the Knowledge Objects dialog. Alternatively, from within a script you can use this function call to reread the Knowledge Objects folder and refresh the Knowledge Objects dialog.

This function is best used when you write a Command or Knowledge Object that is installing or copying Knowledge Objects to the Knowledge Objects folder, after which you should update the Knowledge Objects dialog.

KORefresh is available only at authoring time.

 
LaunchCommand
Syntax: LaunchCommand(WindowHandle, "filename" [, args])

This function launches the command specified in filename . Be sure to provide the full path and filename of the command. Use the LaunchCommand function to start a command as part of your script. You should ensure that the command to launch actually exists.

You can pass optional arguments to the command by using the args argument.

LaunchCommand is available only at authoring time and only from commands. Calling LaunchCommand forces the calling command into non-modal mode.

 
MoveCursor
Syntax: MoveCursor(x, y)

The MoveCursor function places the mouse pointer at the specified x and y coordinates.

 
OpenIcon
Syntax: OpenIcon(IconID@"IconTitle" [, #which ] [, shift ])

This function opens the specified icon. Each icon may have several windows or dialogs that can open. Specify the #which argument, according to the following table, to control which window or dialog opens.

#display

Displays the contents of the icon in the presentation window and opens the icon for editing. Used with display and interaction icons. If you pass TRUE as the #shift argument, the contents of the Presentation window are preserved when the icon is opened.

#map

Opens the icon to show its children. Used with map, framework, and Knowledge Object icons. Locked Knowledge Object icons do not open.

#property

Opens the Property dialog for the icon. Can be used with any icon. The default if #which is not specified.

#response

Opens the response properties dialog for a response icon. Use with any icon that is a child of an interaction icon.


The OpenIcon function is available only at authoring time. It can be called from the flowline, from a command, or from a Knowledge Object wizard. When called from a command, the OpenIcon function sets the command to non-modal mode before opening a dialog. When called from a wizard, the only option is #map, since wizards cannot go into non-modal mode.

 
SetTargetModal
See Writing non-modal commands.

 
SystemMessageBox
Syntax: SystemMessageBox(WindowHandle, "text", "caption" [,type or #icon, #buttons , default, #modality])

SystemMessageBox displays a message box. On Windows-based systems, SystemMessageBox takes the exact same parameters as the Windows API MessageBox function and displays the same message box types. It returns the number of the button the user selects in the dialog. The Enhanced Calculation Editor has a dialog so you can visually select the message box type you want.

On Macintosh systems, the function displays a simple Alert dialog in which you can specify the text.

 
URLDecode
Syntax: URLDecode("string")

This function decodes the URL string you pass it back to standard characters. It does the opposite of URLEncode . This can be useful when you are reading in URL strings, for instance from the ActiveX browser control.

 
URLEncode
Syntax: URLEncode("string")

This function encodes the string passed to it so that the string does not contain special characters not accepted in the parameters of a URL. For example, the @ symbol is replaced with %40. This is useful when you are passing data as part of a URL. In this example, we pass an e-mail address and an answer string that contains spaces to an active server page on a server.

email := "pierre@macromedia.com"
email := URLEncode(email)
answer := "Planet of the Apes"
answer := URLEncode(answer)
sendServer := "http://www.myserver.com/
track.asp?Email="^email^"&Answer="^answer
ReadURL(sendServer)

If we looked at the complete URL, it would look like this:

http://www.myserver.com/track.asp? 
Email=pierre%40macromedia.com&Answer=Planet%20of%20the%20Apes

 
New system variables

New system variables have been added to Authorware 6.5.

 
ExitIcon
See The new ExitIcon system variable.

 
ObjectMatchedID
The ObjectMatchedID contains the icon ID of the last display icon matched in a movable object or hot spot interaction. Use ObjectMatchedID@"IconTitle" to get the value for a specific interaction.

 
ObjectOver and ObjectOverID
The ObjectOverID and ObjectOver functions have been added to Authorware 6.5 to improve development of accessible content. They contain the icon ID and icon title of the displayed object currently under the mouse cursor. You can use these variables to respond to the user's moving the cursor over an object. For example, you might read the title of the icon to the user through text-to-speech technology.

 
UserApplicationData
On Windows systems UserApplicationData contains the full path to the Application Data folder for the current user. This value is determined by the Windows system registry and may vary for each user. On Macintosh, and when Authorware Web Player is running a piece in non-trusting mode, the value is null.

 
Expressions in response fields

Authorware 6.5 supports the use of variables for button labels, for keypress and text entry responses, and for pull-down menu items.

 
Buttons
The Label text box in the Button Response Properties dialog now accepts expressions. If this text box is left blank, the button in the Presentation window uses the icon's title as the button label. If you enter an expression in the Label text box, the icon title is ignored and the result of the expression is used as the button label.

 
Pull-down menus
Take a look at the following pull-down menu. There are four items under the File pull-down menu. Let's take a look at how each is set up.

In the Presentation window, the menu looks like this.

Note that only the first item matches the actual icon title, Open. It is set up like this in Response Properties, with nothing in the Menu Item text box, so that it defaults to the icon's title.

The second item, whose title is simply Second Item, uses a literal string, "Save", in the Menu Item text box. As the text box is filled, Authorware uses that text instead of the icon title.

The third item, whose icon title is Variable, uses a variable called MenuItem in place of the menu item. It has been set previously to the value "Joe Ganci File", so it is that value that appears in the pull-down menu.

The fourth item, whose icon title is Today's Date, uses an expression in the Menu Item text box:

 
Keypress
For keypress responses, you may also now use an expression. Place a literal string in quotation marks; otherwise, Authorware attempts to evaluate the string as an expression. In this case, the expression needs to be one that normally could be used in this field, meaning one that evaluates to a single character or a choice such as "a|A".

 
Text entry
The same principle holds for text entry responses. You may now use an expression in the Pattern text box. This expression can be any pattern normally acceptable in this text box, including a word or set of words, with or without the * and ? wildcard characters.

 
Open properties

With the release of Authorware 6.5, we've exposed nearly every icon property accessible through a dialog, bringing the total number exposed to 150. Use the GetIconProperty function to obtain the value of an icon property. In many cases, you can also use the SetIconProperty function to set the value of an icon property.

The following properties are newly exposed for Authorware 6.5.

Property Result
#awButtonIndex

Used with button response icons. Each value corresponds to a different button found in the button editor, including custom buttons you may have created. Using this property, you can obtain the button index for a particular button, and then set other buttons to use the same button type.

#awCursorIndex

Used with button, hot spot, and hot object response icons. This is the index for the cursor being used.

The number returned is equivalent to the following:

0 = arrow

1 = I-beam

2 = cross

3 = plus

4 = blank

5 = hourglass (Windows), watch (Macintosh)

6 = hand

If the file has custom cursors, the index number returned will be 51 or higher.

Using this property, you can obtain the cursor index for a particular response, and then set other responses to use the same cursor type.

#awCalcIsFunction

Used with calculation icons. Returns TRUE if the Contains Script Function option was selected for the calculation icon.

#awNavType

Used with navigate icons. This property returns one of the following values, indicating the navigate icon's setting:

#awNavSpecific - Anywhere

#awNavNext - Next

#awNavPrev - Previous

#awNavFirst - First

#awNavLast - Last

#awNavExit - Exit Framework/Return

#awNavBackup - Go Back

#awNavRecent - List Recent Pages

#awNavSearch - Search

#awNavIconExpr - Calculate

#awNavIcon

Used with navigate icons that are set to Anywhere. Returns the icon ID of the icon to which the navigate icon will jump.

#awNavCall

Used with navigate icons. Returns TRUE if the navigate icon is set to Call and Return, otherwise returns FALSE.

#awNavFindWhere

Used with navigate icons. When you determine that the navigate icon is set to Search using the #awNavType property, you can further test the icon to determine the scope of the search. This property contains one of these two values:

#awNavFindEntireFile

#awNavFindThisFramework

#awNavFindIn

Used with navigate icons. When you determine that the navigate icon is set to Search using the #awNavType property, you can further test the icon to determine whether the keywords, screen text, or both are searched. This property contains one of these three values:

#awNavSearchKeywords

#awNavSearchText

#awNavSearchBoth

#awNavAutoSearch

Used with navigate icons. When you determine that the Navigate icon is set to Search using the #awNavType property, you can further test the icon to determine whether the Search Immediately check box is selected. The value is TRUE if Search Immediately is selected, FALSE if it is not.

#awNavShowInContext

Used with navigate icons. When you determine that the navigate icon is set to Search using the #awNavType property, you can further test the icon to determine whether the Show in Context check box is selected. The value is TRUE if Show in Context is selected, FALSE if it is not.

#awMovieTimes

Used with Digital Movie icons. This property contains the number of times the movie is set to repeat.

#awMovieUntil

Used with digital movie icons. This property contains the expression used with the Play: Until TRUE option.

#awMotionBeyondRange

Used with motion icons that are set to Direct to Line, Direct to Grid, or Path to Point. This property contains the value in the Beyond Range text box. It contains one of these three values:

#stopAtEnds -- Stop at Ends

#loop -- Loop

#goPastEnds -- Go Past Ends

#awMotionLayer

Used with motion icons. This property contains the layer expression set in the icon.

#awMotionTiming

Used with motion icons. This property contains the value in the Timing text box. It contains one of these two values:

#seconds -- Time (sec)

#rate -- Rate (sec/in)

#awMotionWhen

Used with motion icons only when they are set to Path to End. This property is the value contained in the Move When text box.

#awResponseType

Used with response icons (those attached to Interaction icons).

#button - Button

#hotSpot - Hot Spot

#hotObject - Hot Object

#targetArea - Target Area

#pulldownMenu - Pull-down Menu

#conditional - Conditional

#textEntry - Text Entry

#keypress - Keypress

#timedResponse - Time Limit

#triesResponse - Tries Limit

#event - Event

#awButtonLabel

Used with button response icons. This property is the text found in the Label text box.

#awButtonDefault

Used with button response icons. This property returns TRUE if the Make Default option is selected, otherwise it returns FALSE.

#awButtonHide

Used with button response icons. This property returns TRUE if the Hide When Inactive option is selected, otherwise it returns FALSE.

#awTimeansRestart

Used with time limit response icons. This property returns TRUE if the Restart for Each Try check box is selected, otherwise it returns FALSE.

#awCondition

Used with conditional response icons. This property returns the text found in the Condition text box.

#awMenuItem

Used with pull-down response icons. This property returns the text found in the Menu Item text box.

#awTargetDrop

Used with target area response icons. This property returns the last option chosen in the Target Object pop-up menu:

#leaveAtDestination - Leave at Destination

#putBack - Put Back

#snapToCenter - Snap to Center

#awTargetAnyObject

Used with target area response icons. This property returns TRUE if the Accept Any Object check box has been selected, otherwise FALSE.

#awTextEntryPattern

Used with text entry response icons. This property returns the value found in the Pattern text box.

#awCMIInteractionID

This property shows the value of the Interaction ID text box found on the CMI tab of the interaction icon Properties dialog box.

#awCMIObjectiveID

This property shows the value of the Objective ID text box found on the CMI tab of the interaction icon Properties dialog box.

#awCMIQuestionType

This property is the last option chosen in the Type pop-up menu found on the CMI tab of the interaction icon Properties dialog box. The value is one of the following:

#multipleChoice - Multiple Choice (C)

#fillIn - Fill in the Blank (F)

#fromSlot - From Field

#awCMIQuestionTypeSlot

This property shows the value found in the field below the Type pop-up menu on the CMI tab of the interaction icon Properties dialog box when the type is From Field.

#awWizardName

Used with Knowledge Object icons, this property is the value found in the KO icon Wizard text box.

#awWizardId

Used with Knowledge Object icons, this property is the value found in the KO icon Knowledge Object ID text box.

#awWizardLocked

Used with Knowledge Object icons, this property indicates whether the KO is locked (TRUE if it is, FALSE if it is not).

#awWizardLockInsert

Used with Knowledge Object icons, this property indicates whether the Lock Icon option is selected (TRUE if it is, FALSE if it is not).

#awWizardRunInsert

Used with Knowledge Object icons, this property indicates whether the Run Wizard option is selected (TRUE if it is, FALSE if it is not).

#awWizardEmpty

Used with Knowledge Object icons, this property indicates whether the Empty option is selected (TRUE if it is, FALSE if it is not).

#awIconKeywords

Used with any icon, this function returns the keywords that have been established for that icon. You add keywords to an icon in Authorware by right-clicking and choosing Keywords, or by choosing Modify > Icon > Keywords. Set keywords by passing a string with returns between keywords.

#awSoundTimes

Used with sound icons, this property returns the expression in the Fixed Number of Times text box.

#awSoundUntil

Used with sound icons, this property returns the expression in the Until True text box.


 
Windows controls

Authorware 6.5 features several improvements to the Windows controls and one new control type.

 
Improved color support
The following properties now accept hexadecimal color values: Color, FontColor , TabColorSelected , TabColorUnselected.

Hexadecimal color values start with a #, followed by three hexadecimal values representing different amounts of red, green, and blue. For example, #FF0000 is red and #0000FF is blue.

Windows controls also support two new color functions, wcColorToRGB and wcRGBToColor . The wcColorToRGB function returns the RGB value for a color name used by color-related properties, such as FontColor . The wcRGBToColor function returns the color name that represents an RGB value, such as "Aqua" or "Blue."

 
Improved ListBox control
The ListBox control now supports five more properties.

ImageIndex specifies which image number to display in the list box.
Indent specifies, in pixels, how far the items are indented from the left.
ScrollBars displays scrollbars for the list box.
ItemHeight sets the height, in pixels, of an image item in a list box. If the list box is not displaying any images, the value of ItemHeight is ignored.
Images is a return-delimited list of bitmapped image filenames that can be displayed in the ListBox control. The bitmaps must be 16 x 16 pixels. The lower left pixel of the image is reserved for the transparent color. Any pixel in a bitmap that matches the lower left pixel is transparent.

 
Improved TreeView control
The TreeView control now supports the following properties.

Expanded specifies whether a TreeView item is expanded or collapsed. When an item is expanded, the minus button is shown and child items are displayed. When a TreeView item is expanded or collapsed, the change event is fired and the change event variable is assigned a value of "2". This is the same as a double-click event, which also expands and collapses the items in a TreeView control.
Images is a return-delimited list of bitmapped image filenames that can be displayed in the TreeView control. The bitmaps must be 16 x 16 pixels. The lower left pixel of the image is reserved for the transparent color. Any pixel in a bitmap that matches the lower left pixel is transparent.

 
New Menu control
The new Menu control displays a menu when the user clicks either the left or right mouse button. Use the MouseButton property to set which button triggers the menu.

You can use the menu control to make menubar menus or pop-up menus. When the MouseButton property is set to Left, the menu appears at the bottom of the specified rectangle. When the MouseButton property is set to Right, the menu appears at the mouse pointer position.

The Menu control supports the following properties:

Alignment
Checked
Clear
Cursor
DispatchKeys
Enabled
Focus
FocusEvents
Handle
Hint
HotKey
IconID
ImageIndex
Images
ItemEnabled
Items
MouseButton
ShowHint
TabStop
Text
Value
Visible

 
Improved authoring
To make authoring with Windows controls easier, when you hold down the Control key and move the mouse over a control, a hint window displays the IconID and the IconTitle that created the control. This is an authoring time-only feature.

 
RTF objects

The RTF objects support a new layer parameter. Use this parameter to set up the RTF object's layer position. You can set the layer through the rtfCreate function or through a new layer field in the Create RTF Object KO. The layer determines the RTF object's position from back to front relative to other objects on the screen. RTF objects are placed in layer number 0 by default. Objects with higher layer numbers appear in front of layer 0; negative layer numbers appear behind layer 0.

A new rtfUpdate function updates an existing RTF object. This allows you to manipulate an RTF object through code. You can update the displayed source and any embedded variables/expressions without having to erase and re-create the RTF object.

RTF objects now include the ability to dynamically change font face, size, and style through scripting. You can use the following tags to change text style.

To make the text bold: {font-b}...{/font-b}
To make the text italic: {font-i}...{/font-i}
To make the text underlined: { font-u}...{/font-u}
To set the font size: {font-size=18}...{/font-size}
To set the font color: {font-color=red}...{/font-color}
To set the font: {font-face=Arial}...{/font-face}
To make the text subscript: {font-sub}...{/font-sub}
To make the text superscript: {font-super}...{/font-super}

Aside from setting the font color as shown above, you can also set the font color using hexadecimal color values, such as {font-color=#FF0000}...{/font-color} .

 
Enhanced Calculation Editor

The Enhanced Calculation Editor now supports code snippets. Code snippets are blocks of Authorware code. For example, a code snippet could be an if-then statement, a database query, or any block of Authorware script that you want to paste into a calculation.

There are two ways to access the code snippets. The first is to click the Insert Snippet button on the Enhanced Calculation Editor toolbar.

Note: You manage the toolbar buttons in the Preference dialog of the ECE, under the Toolbar tab.

The second way to access code snippets is to right-click in the Calculation window and choose Insert > Snippet to open the Insert Snippet dialog.

To insert a code snippet:

Select the name of the snippet and click Insert.

You can also double-click the code snippet name to insert it. Authorware inserts the code snippet into the calculation at the position of the caret.

If the caret is at an indented position, Authorware inserts the snippet with the same indentation level.

To add your own snippets to the list:

1 Open the Code Snippets dialog, either by clicking the Snippets icon on the Enhanced Calculation Editor toolbar or by right-clicking in the Calculation window and choosing Insert > Snippet.
2 Select an existing folder or create a new one by clicking on the folder icon at the top of the Snippets dialog.
3 Click the New Snippet button at the top of the Snippets dialog.
4 Type a name and description for the new snippet.
5 Type or paste the code into the code window at the bottom of the Snippets dialog.
All of the code snippets are stored in a snippets.xml file in the Authorware application directory.

To delete a code snippet:

Select a code snippet or a folder and click on the trash can icon in the toolbar.

When creating your own snippets, you can determine where the caret will be placed when Authorware inserts the snippet. The pipeline character "|" determines where the caret appears. Add one to any location in your snippet. If you do not include a pipeline character, the caret is placed at the end of the snippet. If the snippet contains more than one pipeline character, the caret is placed at the last instance.

 
Bug fixes

Numerous bug fixes are included in Authorware 6.5.

 
General
The following are general fixes.

In previous versions there was a limit on having no more than 2GB of physical plus virtual memory during authoring time. That limit has been removed.
Calling "javascript:" from ReadURL no longer requires TRUSTED mode.
The icon modified time was not being set when the icon description or icon color were changed, or when icons/models were pasted.
Information has been added to the ReadURL description explaining that a call to a URL that does not return a result sets an error value of 5006.
Setting or moving the start or stop flags did not set the Authorware file as changed. Either condition now sets the file as changed.
The Apply Styles dialog would creep toward the task bar if the task bar was on the top or left of the Windows desktop. This behavior was rectified.
InsertIcon was not working when the paste hand was inside a closed map. It now operates as intended under this condition.
The round function was off in certain special cases. This situation has been corrected.
Max and Min properties returned an incorrect value in certain circumstances. The returned value is now correct.
The InsertIcon function was not checking for arguments out of bounds. It now does so.
The navigate icon always showed the last framework icon selected by the user, even if the user opened a navigate icon that already had a link. This automatically selected the wrong framework icon and no page selection. If the user clicked OK, then the original link was lost. The navigate icon now always shows Entire File when opening a navigate icon.
The description for the CallTarget function was incorrect in the Functions dialog. The description now displays correctly.
The online resources command "AWARE Discussion List Archives" did not work. It now does.
When a concurrent sound was used under a hot object, the "Erase before next entry" setting did not work properly. The setting has been fixed.
Sound icons with children would in some cases break perpetual buttons. This state of affairs now no longer occurs.
Setting an icon property in a dialog would sometimes result in a return value of "0". This has been fixed.
The Detect Web Player HTML template wouldn't detect the Authorware 6 Web Player. (The template failed to detect any version, whereas the Authorware 5 Web Player would pass the test.) The template now detects the Authorware 6.5 Web Player.
When the filepath type was set to DOS (8.3) instead of long filenames, the source files in OBP's files tab would still use long filenames.
Added MIX32.X32 to Xtras.ini for OBP of the Flash Asset Xtra.
The catalog was truncating the filename that spanned the 1024th character in the return string, resulting in part of one file name to be missing.
GetIconContents , GetFunctionList , and GetVariableList could cause the OBP to hang.
The variables pane in the calculation icon Properties dialog box showed the value of a list variable only once.
The SortByProperty function description had a repeated word.
The "Techno1" template in the Quiz Knowledge Object contained an inactive quit button.
Authorware would crash when you selected File > Close with the Button Editor open.
Changed the Message Box Knowledge Object to use the new SystemMessageBox function instead of the function in Winapi.u32.
Changed the Move Cursor Knowledge Object to use the new MoveCursor function instead of the function in Winapi.u32.
The dive routine on all of the show-me files has been updated to account for sounds and movies becoming branching icons in Authorware 6.0.

 
Windows controls
The following fixes were applied to Windows controls.

When you disabled a ColorCombo, DriveCombo, FileListBox, FolderListBox, or FontCombo control, the control would be disabled, but the displayed text would not become dimmed. The text now dims appropriately.
WinControls crashed on JumpFileReturn when a WinControl was visible. The crashing behavior has been eliminated.
If you expanded a TreeView node using the Plus (+) sign before the TreeView had focus (before any item was selected), the change event variable triggered a 1 instead of a 2. In Authorware 6.5, the change event variable triggers both a 1 (change event) and a 2 (expanded event).
In the TreeView control, if a child node was selected and you collapsed the parent node using the Minus (-) sign, the change event variable triggered a 2, but not a 1. Now selection changes from the child node to the parent node trigger both a 2 (collapse event) and a 1 (change event).
In assigning a long line of Text, when you set both the Visible property and the Focus property in the same calculation icon that created the Edit control, only the last 24 characters displayed in the Edit control. That is, the first part of the Text was off the left edge of the Edit control, even though the Edit control is clearly wide enough to contain the entire Text. That behavior has been corrected.
When you set the ButtonBitmap property to "Help," button controls would not trigger the change event variable. Button controls now operate as expected in this scenario.
Windows controls in framework icons could cause painting problems, especially when you moved them to a new position that overlapped the previous position. This has been corrected.
A disabled Windows control would send OnFocus and OnBlur events when "FocusEvents" was True and "Enabled" was False. This is also corrected.
If ButtonBitmap were set to anything other than "OK" (for example: "Cancel"), the 1-pixel black border around Button controls would disappear. The border is now retained.
When two or more Windows controls were displayed and the author closed the Presentation window (Control+1 or Control+J), returned to the flowline, and opened a calculation window, the following keys would not respond: Z, X, C, and V. Those keys now respond appropriately.
Changing the Value (or the Text) property for a ComboBox control programmatically would not trigger a change event. Consequently, variable-aware ComboBox controls wouldn't update themselves when setting the Value (or Text) property. Those controls now update correctly.
When setting the ItemEnabled parameter on a CheckListBox control, the check box would appear dimmed, but the item itself would not be dimmed (and vice versa). Both the check box and the item dim appropriately now.

 
RTF objects
These fixes were applied to RTF objects.

RTF objects were not truly transparent. That has been corrected.
If you used the JumpFileReturn function to run another Authorware file that used the rtfCreate and rtfShow functions, the application crashed on quitting. This behavior has been corrected.
The last hyperlink in an RTF object was off by one line if there was one blank line after that last hyperlink. This behavior has been corrected.
The RTF Hot Text KO would crash Authorware if the piece were left running longer than 90 seconds. Eventually, an "unable to execute a user code function" error appeared, followed by an "internal error" and a "memory could not be read" error. The RTF Hot Text KO no longer crashes Authorware under this condition.
Embedding list variables in an RTF source would destroy the list variable value. That behavior has been fixed.
The vertical RTF Object scrollbar appeared erroneously when (a) another hook procedure was installed, and (b) the user closed and re-opened the presentation window during authoring. The scrollbar now does not appear under this condition.
Expressions embedded into expressions, for example, {{FileLocation}Data\MyBmp.bmp}, would not get evaluated. Now they are evaluated appropriately.

 
Enhanced Calculation Editor
The following bugs were fixed in the Enhanced Calculation Editor.

The behavior of the Change button in the ECE Find/Replace was not intuitive. When clicking the Change button, the next occurrence of the search text was replaced (or, if there were no more occurrences of the search text, a "text not found" message appeared). In this version, the Change button does not search for text, but replaces the current selection instead.
Change and Change All in the ECE did not work properly on long lines. When the change caused the line to exceed the maximum line length (1024 characters), then part of the text was placed on the next line. In this version, a dialog appears, explaining that the change will cause the line to exceed its line length limit, and the change is ignored.
Insert Message Box inserts the (internal) SystemMessageBox function instead of the (winapi.u32) MessageBox function.
The Insert Symbol, Insert Message Box, and Insert Snippet toolbar buttons are on by default.

 
Flash Xtra
The following bugs were resolved in the Flash Xtra. These bugs were not in the Flash ActiveX control.

Clicks from touchscreens are now passed properly to the Flash movie.
The LoadMovie and LoadMovieNum functions now work as expected.
# preload was not working in the Xtra. It now works.
The Flash Xtra now can play Flash movies with buttons animated in the down state.