Instructor User Guide
Instructor User Guide
SumTotal Systems, the SumTotal Systems logo, ToolBook, the ToolBook logo, Aspen,
the Aspen logo, TotalLMS, TotalLCMS, TotalVCS, TotalInformation,
TotalCollaboration, TotalAccess, and TotalPerformance are trademarks of SumTotal
Systems, Inc. All other company and product names are the property of their respec-
tive owners.
The software described in this document is furnished under a Software License
Agreement. Please read it thoroughly. The software may be used or copied only
in accordance with the terms of this agreement.
Information in this document is subject to change without notice.
Contents
Chapter 2
Basic concepts
About the ToolBook product family 27
About ToolBook Instructor 28
Planning your project 30
Building an application 35
Using the Actions Editor 39
Using OpenScript 40
Extending Instructor using
Windows technologies 41
Using resources in your application 43
iii
Chapter 3
Learning the Instructor interface
Introducing the visual interface 45
Working at Author level 46
Working at Reader level 68
Navigating in an application 69
Chapter 4
Creating books and pages
About books and pages 74
About templates 75
Creating a new book 78
Creating pages and backgrounds 81
Organizing pages and backgrounds 85
Working with backgrounds 90
Setting the page size 92
Setting properties for books 94
Navigating through a book 96
Enhancing a book’s performance 100
iv
Chapter 5
Working with the Catalog
About the Catalog 102
Authoring with the Catalog 103
Exploring types of Catalog objects 107
Customizing the Catalog 111
Chapter 6
Working with objects
About objects 115
Adding objects from the Catalog 115
Creating objects using the tool palette 117
Selecting objects 118
Creating hyperlinks 121
Cutting, copying, pasting, duplicating,
and deleting objects 125
Moving objects 127
Spreading and centering objects 128
Flipping and rotating objects 128
Aligning objects 129
Changing the size and shape of objects 131
Modifying the appearance of objects 134
Moving objects between layers 139
Grouping objects 144
v
Chapter 7
Setting object properties
Understanding properties and extended properties 152
Using the Properties dialog box 153
Using the right-click menu 158
Using the Extended Properties dialog box 160
Using the Property Browser 161
Chapter 8
Working with text
About fields 165
Working with fields 167
Creating fields 168
Setting field properties 170
Adding text to fields 174
Selecting and editing text 178
Formatting text in fields 182
Inserting inline graphics 187
Inserting special characters 189
Finding and replacing text 191
Working with record fields 193
vi
Chapter 9
Using graphics
About graphics 200
Using graphics on the Internet 201
Adding graphics to your book 201
Modifying graphics 205
Chapter 11
Working with list boxes and combo boxes
About list boxes and combo boxes 236
Creating list boxes 238
Setting list box properties 240
Adding text to a list box 244
Creating combo boxes 246
Setting combo box properties 246
Adding text to combo boxes 248
Determining user selection 249
Chapter 12
Creating a quiz using question objects
About question objects 255
Working with question objects 256
Question objects in action 258
Scoring questions 263
Specifying feedback 265
Chapter 13
Hiding, showing, and animating objects
Creating visual effects 273
Hiding and showing objects 273
Animating Instructor objects 277
Playing an animation at Reader level 282
Modifying an animation in the Animation Editor 287
viii
Chapter 14
Adding audio and video files
About digital media 291
Choosing a media player 291
Using the Universal Media Player 294
Using other media players 301
Creating and managing clips 305
Chapter 16
Creating action sequences: Practical examples
About the examples 357
Using the examples 358
Example 1: Using conditions 359
Example 2: Using variables 367
Example 3: Changing object properties 374
Example 4: Using shared action sequences 379
Troubleshooting action sequences 394
Chapter 18
Importing and exporting data
About importing and exporting 416
Importing and exporting text 417
Importing and exporting graphics 429
Importing books and pages 431
Customizing the import process 435
Chapter 21
Preparing native ToolBook applications for release
Organizing and checking your application 481
Preparing your application
based on a distribution method 487
Using the AutoPackager 492
Using Instructor on a network 496
Installing and testing your application 497
Uninstalling an application 498
Glossary 499
PART I
This part of the ToolBook Instructor User Guide describes how to set up and
install ToolBook Instructor,™ introduces basic Instructor concepts, and
explores the user interface.
I N THIS PART
Chapter 1 Getting started
Chapter 2 Basic concepts
Chapter 3 Learning the Instructor interface
Chapter 1
Getting started
I N THIS CHAPTER
Introducing ToolBook Instructor 15
Before you install 16
Installing Instructor 18
Starting and exiting Instructor 18
Learning Instructor 19
About this book 23
Chapter 1 Getting started 15
After you have created a course using Instructor, you can deliver it on
demand to any student with access to the Internet, or you can deploy it
on your company’s intranet. Instructor offers several flexible deployment
options. Your students can view your course in a Web browser that
displays Internet-based file formats such as HTML (Hypertext Markup
Language). Alternatively, use the ToolBook Neuron browser plug-in to
show your course as a native ToolBook book (TBK file) in a Web
browser. You can also distribute your course as a run-time (stand-alone)
application that runs from a hard drive or CD-ROM.
Chapter 1 Getting started 16
System requirements
To run ToolBook, a computer must meet the requirements below.
* Depending on the options chosen during setup, your installation might require
more space.
† You must have an administrator account on Windows XP and Windows 2000 in order to
install Instructor. See your system administrator or refer to your Windows documentation for
details.
Chapter 1 Getting started 17
Installing Instructor
To install Instructor and its associated files, use the Setup program,
which provides options and instructions for each step. The Setup program
decompresses the files and transfers them to your hard disk.
The Setup program is set to run automatically when you insert the Instructor
program disc into your CD-ROM drive. You can also manually install
Instructor, as described below.
➤ To install Instructor:
3 In the Run dialog box, type the location from which you are installing
Instructor, plus the word setup. (For example, type d:\setup. If your
CD-ROM drive letter is not d, substitute the letter of the drive containing
your program disc.)
4 Click OK, and then follow the instructions on the screen.
➤ To start Instructor:
When you start Instructor, the ToolBook Instructor Startup dialog box
appears. Use this tabbed dialog box to start a new book or open an
existing book.
➤ To exit Instructor:
— Click the Close button on the title bar of the ToolBook Instructor
Startup dialog box or the Instructor main window.
Learning Instructor
Instructor includes both online and printed documentation, as well as
a number of other resources to help you learn to use Instructor. Further
assistance is available from the ToolBook site, www.toolbook.com and
from technical support staff.
The Instructor documentation includes several online books:
◆ This book, the ToolBook Instructor User Guide, discusses how to use
Instructor’s features and provides the context and procedures you’ll
need to use Instructor effectively.
◆ A short introductory book, Getting Started with ToolBook, covers the
basic techniques for authoring in ToolBook.
◆ Programming in OpenScript provides information about how to extend
the features of your application using the OpenScript programming
language.
Chapter 1 Getting started 20
Figure 1
The ToolBook Coach
Chapter 1 Getting started 22
Part 5, “Using resources and data,” describes how to use the resource
system to manage graphical elements. Also included is a description of
powerful features that you can use to import and export text, graphics,
and other data.
Part 6, “Creating simulations,” presents tools that enable you to construct
software simulations. It also describes how to use the Sim AutoBuilder to
capture activity in a software application and generate a simulation file.
Part 7, “Distributing your application,” describes how to prepare and
package a course for distribution and how to distribute your course on
the Internet.
Document conventions
This book uses the following visual conventions to help you identify
and interpret information.
Document conventions
Example format Meaning
Basic concepts
I N THIS CHAPTER
About the ToolBook product family 27
About ToolBook Instructor 28
Planning your project 30
Building an application 35
Using the Actions Editor 39
Using OpenScript 40
Extending Instructor using
Windows technologies 41
Using resources in your application 43
Chapter 2 Basic concepts 27
Figure 1
The ToolBook Instructor Catalog
Chapter 2 Basic concepts 29
With Catalog objects, it’s easy to add interactive behavior to your applica-
tion. You simply drag objects with the behavior you want from the Catalog
to a page. The ToolBook Catalog includes hundreds of objects with
preprogrammed capabilities that handle everything from page navigation
and quiz scoring to special effects like multimedia feedback and animation.
These objects provide prebuilt functionality for the majority of your
authoring tasks.
If you are new to developing online learning applications, you’ll find that
the easy-to-use templates and the Catalog will get you quickly on your
way to producing high-quality interactive courses. More experienced
course designers will appreciate the robust content-creation environment
of Instructor, the Actions Editor visual programming tool, the powerful
OpenScript programming language, and a variety of design options.
When you have finished authoring, you can distribute the application you
created in several ways: using the Internet or an intranet, a local area
network, or a CD-ROM. Instructor prepares your files according to the
distribution method you choose.
\French
IntroFrench.tbk (the ToolBook book)
\French media
EiffelTower.avi (a video file)
Now let’s say your application is more complex. You have one main book
about Romance languages, and several related books about French,
Spanish, etc. You could organize the files using several book
subdirectories under a central directory, as shown in this example:
\Romance
Romance.tbk
\Romance and shared media
\French
IntroFrench.tbk
AdvFrench.tbk
\French media
EiffelTower.avi
\Spanish
IntroSpan.tbk
AdvSpan.tbk
\Spanish media
PradaMuseum.avi
etc.
Chapter 2 Basic concepts 32
Via the Internet Microsoft Internet ◆ Do not use the OpenScript programming
or intranet as Explorer 5.5 SP1 language in your application; instead, use
a series of or later; the Actions Editor visual programming
Web pages that Netscape 8.1, tool.
incorporate Firefox 2.0 or 1.5, or ◆ Ensure that any media or ancillary files are
DHTML Mozilla browsers compatible with Internet standards.
◆ Use the ToolBook Web Specialist to
export your application.
Via the Internet Windows 2000 SP 3, ◆ Use all of Instructor’s powerful features
or an intranet as a Windows XP or later; for creating rich, interactive applications,
native ToolBook Internet Explorer including the OpenScript programming
application 4.0 or later, Netscape language and the Actions Editor visual
displayed in a 4.0 or later; Firefox 2.0 programming tool.
Web browser or 1.5 ◆ Ensure that users have (or can download)
using Neuron the Neuron browser plug-in.
◆ Use the ToolBook Web Specialist to
prepare your application.
(continued)
Chapter 2 Basic concepts 34
Distribution Platform
method required Preparation guidelines
Building an application
You build an application in Instructor by starting a book and adding your
content: text, interactive objects, graphics, navigation, and so on. You
can control the appearance and behavior of objects by setting properties.
The Actions Editor visual programming tool can also control the behavior
of objects, or you can use the OpenScript programming language in
books that will not be exported to DHTML. You create applications at
Author level; users interact with them at Reader level.
Reader level is the level at which you test your applications as you
develop them, and also the level at which users run your applications.
At this level, users can navigate to particular pages, type text into fields,
respond to interactive question objects, and trigger events.
For more information about Author level and Reader level, see Chapter 3,
“Learning the Instructor interface.”
Chapter 2 Basic concepts 36
Author level
Reader level
Figure 2
Author level and Reader level in ToolBook Instructor
Chapter 2 Basic concepts 37
The main Instructor window displays one page. In addition, you can create
pages to display in windows that appear along with the main window.
These windows are called viewers and can be small, like a pop-up
window, or larger, like the main window. For example, you might use
the main window to display your application and use a smaller viewer
to display glossary definitions.
Chapter 2 Basic concepts 38
Click More. . .
Figure 3
Display multiple pages simultaneously using viewers
The tool palette contains tools you can use to draw objects on a page.
You can draw graphical objects, such as circles and lines, as well as
functional objects, such as buttons.
The Catalog contains a rich collection of objects that you use to construct
and enhance an interactive application. Many Catalog objects have
preprogrammed, built-in behavior.
Each object has a set of properties that define its appearance and behavior.
A text field, for example, has properties such as fill color, width, and
height that determine its color and size, and other properties such as text
alignment and field type that define how it displays text and whether it
allows users to enter data.
Some objects have extended properties that determine more sophisticated
capabilities. A media player, for example, has properties that control the
player’s interactive functionality, such as which media file will play and
how Instructor will play the file at Reader level.
For more information about objects and object properties, see Chapter 6,
“Working with objects,” and Chapter 7, “Setting object properties.”
You can set most properties using dialog boxes available in the Instructor
interface. However, some behavior can be set only by using the Actions
Editor or OpenScript.
In the Actions Editor, you use familiar interface elements to create action
sequences that play media, display pages or documents, prompt users for
information, and much more. In an action sequence, you can specify
conditions for behavior or create loops to execute actions repetitively. An
action sequence for an object handles a particular event such as a button
click, a page loading, or the selection of an item from a list.
For more information about adding behavior to your application using the
Actions Editor, see Chapter 15, “Using the Actions Editor,” and Chapter 16,
“Creating action sequences: Practical examples.”
Using OpenScript
OpenScript, the ToolBook programming language, is easy to use because
its syntax is similar to English.
A script you write in OpenScript defines an object’s appearance or
behavior. For example, a script might control what happens when a
learner clicks a button, enters a page, or chooses a selection from a list
box. Many of these properties can also be controlled using the Actions
Editor or Catalog objects with preprogrammed behaviors; there is often
more than one way to accomplish such a task.
Scripts created using the OpenScript programming language do not export
to DHTML when you use the ToolBook Web Specialist. If you’ve added
functionality to your application using OpenScript, you can deliver it over
the Internet as a native ToolBook application using the ToolBook Neuron
browser plug-in, or you can deliver it as a native ToolBook application
over an intranet or on CD-ROM.
For complete information about using OpenScript, refer to the
Programming in OpenScript online book. You can also consult the
online Help system, which contains an OpenScript reference resource.
Chapter 2 Basic concepts 41
Extending OpenScript
with dynamic-link libraries
To extend the capabilities of OpenScript, you can call dynamic-link
libraries (DLLs), which are libraries of functions available to any Windows
program. Windows includes a number of DLLs that you can call to interact
directly with Windows; for example, you can display windows, receive
Windows messages directly, or determine the current state of the system.
In addition, third-party vendors often provide DLLs as a way for you to
use their products. For details about how to call the DLLs supplied with
another product, refer to the documentation that came with the product.
For more information about DLLs and how to use them to extend the
capabilities of OpenScript, see Chapter 13, “Using dynamic-link libraries,”
in the Programming in OpenScript online book.
I N THIS CHAPTER
Introducing the visual interface 45
Working at Author level 46
Working at Reader level 68
Navigating in an application 69
Chapter 3 Learning the Instructor interface 45
Menu bar
Toolbar
Book
Explorer
Catalog
objects
Status
bar
Grid Tool palette
Figure 1
Author-level tools
Chapter 3 Learning the Instructor interface 47
◆ Menu bar Allows you to execute commands and access dialog boxes.
◆ Toolbar Provides a collection of buttons that you can use as shortcuts
for commonly used menu commands.
◆ Status bar Shows you the name of objects, Help text for menu
commands, and the current mouse position. The right side of the bar
provides a quick way to select the current page and contains tools
that you can use to navigate between pages.
◆ Rulers Show you the exact size and position of objects.
◆ Grid Displays a matrix of dots that helps you size and position objects
precisely.
◆ Right-click menus Appear when you right-click an object, providing
quick access to common settings and dialog boxes.
Chapter 3 Learning the Instructor interface 48
You can hide and show each of these tools and customize their appear-
ance. The following sections describe in detail each interface element’s
function and capabilities.
(continued)
Chapter 3 Learning the Instructor interface 50
◆ Caption area Displays Help text for menu commands, the Help text
for toolbar or tool palette buttons, or the name of an object, depending
on the position of the pointer. Instructor also displays progress mes-
sages in the caption area when a process is under way.
◆ Mouse position indicator Displays the coordinates of the pointer in
page units.
◆ Page selection indicator Shows that you are working on the
foreground. You can click here to select the entire page.
◆ Status box Displays the current page number and total number
of pages, or the word “Background” if you are working on the
background.
Navigation
Caption area Page selection indicator controls
Figure 2
The status bar at Author level
Chapter 3 Learning the Instructor interface 52
If you create viewers, which are additional windows, each viewer can have
its own status bar. You can hide and show each status bar individually,
including the one for the main window.
Using OpenScript
You can write and execute OpenScript code using the script editor or
Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript online book.
◆ To show or hide the status bar for the current window, use the show or
hide command. To specify that a window should show or hide the status
bar by default, set its authorStatusBar or readerStatusBar property:
Instructor palettes
Use this palette... If you want to...
◆ From the View menu, point to Palettes, and then choose a palette.
Alternatively, click the palette’s button on the Instructor toolbar.
➤ To move a palette:
◆ Position the pointer at the top of the palette, and then drag the palette
to its new position.
Chapter 3 Learning the Instructor interface 54
Color tray
Figure 3
You can show as many palettes as you like, hide them to make room
onscreen, or move them around as needed.
Chapter 3 Learning the Instructor interface 55
Figure 4
The ToolBook Instructor Catalog
Chapter 3 Learning the Instructor interface 56
Figure 5
The ToolBook Coach
Figure 6
The Properties dialog box
The toolbar in the Properties dialog box includes buttons to give you quick
access to commands, other object properties, and online Help. For example,
if you make a mistake, you can click the Undo button to reverse the
changes you made.
You can also use the Properties dialog box to specify behavior that extends
beyond individual objects. For example, you can set properties for a page,
a background, and a book. Instructor also provides a Properties for Lesson
dialog box, where you can set scoring and logging options.
Chapter 3 Learning the Instructor interface 59
— Press SHIFT+F6.
— With the object selected, click the Extended Properties button on the
Instructor toolbar.
— In the object’s Properties dialog box, click the Extended Properties
button on the dialog box toolbar.
— With the object selected, press CTRL+F6.
Action sequence
Actions palette
Figure 7
The Actions Editor window
— With the object selected, click the Actions button on the Instructor
toolbar.
— Right-click the object, and then click the Actions button on the
toolbar of the right-click menu.
— With the object selected, press F5.
— With the object selected, display the Properties dialog box, and then
click the Actions button on the toolbar of the Properties dialog box.
Chapter 3 Learning the Instructor interface 62
For more information about the Actions Editor, see Chapter 15, “Using
the Actions Editor,” and Chapter 16, “Creating action sequences: Practical
examples.”
Figure 8
The Book Explorer
Chapter 3 Learning the Instructor interface 63
You can use the Book Explorer for many different tasks. Click an object in
the Book Explorer to select this object in the main window. Use drag and
drop to move any object to a different layer or add an object to a group.
Display the properties for any object with a right-click.
Multiple objects can be selected in the Book Explorer if they have the
same parent. Use CTRL+click or SHIFT+click to select more than one
object.
Figure 9
The Property Browser
The grid is a matrix of dots spaced an equal distance apart in the main
window. You can specify that Instructor align objects with the grid
automatically when you move or resize them. The grid does not have
to be visible for you to “snap” objects to it.
You can show and hide the grid as needed at Author level; however, even
if the grid is visible at Author level, it never appears at Reader level. You
can set the grid spacing to any width you want.
◆ To show or hide the grid, select or clear the Show grid check box.
◆ To change the default space between grid dots, enter an increment
in the Page units, Pixels, or Inches (Centimeters) box.
◆ To specify whether objects align with or move independently of the
grid, select or clear the Snap to grid check box.
◆ To specify the units of measure, select Metric or English.
3 Click OK.
Chapter 3 Learning the Instructor interface 66
A B C D E F G H
Figure 10
Sample right-click menu and the right-click menu toolbar
Using OpenScript
◆ Use the following statements to enable right-click menus at
Reader level:
Chapter 3 Learning the Instructor interface 68
These changes occur when you switch from Author to Reader level:
◆ The menu bar changes to a Reader-level menu bar that does not
contain Author-level commands.
◆ The toolbar, Catalog, Coach, palettes, rulers, dialog boxes, and grid
disappear.
◆ The status bar and right-click menus disappear, though you can choose
to make them available.
Figure 11
Reader level
Navigating in an application
You can use a variety of methods to move from one page to another in
a book, including:
◆ page navigation features on the status bar.
— Click the numbers. Instructor will prompt you to enter the number
of a page. Click the check mark or press ENTER to go to that page.
Click the X or press ESC to cancel.
Figure 12
Using the status bar to navigate
Chapter 3 Learning the Instructor interface 71
This part of the ToolBook Instructor User Guide presents concepts and
techniques to help you construct and customize your online learning
application. In these chapters, you will learn about starting a new book,
using the Catalog, and adding elements such as text and graphics.
I N THIS PART
Chapter 4 Creating books and pages
Chapter 5 Working with the Catalog
Chapter 6 Working with objects
Chapter 7 Setting object properties
Chapter 8 Working with text
Chapter 9 Using graphics
Chapter 4
In this chapter, you will learn about creating books and pages,
setting book properties to specify how your book will run, setting
up navigation between pages, and controlling how objects display
on a page. In addition, this chapter provides some tips about
enhancing the performance of your book.
I N THIS CHAPTER
About books and pages 74
About templates 75
Creating a new book 78
Creating pages and backgrounds 81
Organizing pages and backgrounds 85
Working with backgrounds 90
Setting the page size 92
Setting properties for books 94
Navigating through a book 96
Enhancing a book’s performance 100
Chapter 4 Creating books and pages 74
You can display pages in a book’s main window and also in special
viewers—like a pop-up window. For details about creating and using
viewers, see the online book included with ToolBook Instructor, Advanced
Features for Native ToolBook Applications.
Chapter 4 Creating books and pages 75
About templates
A template is a prebuilt book that provides a basic structure for your
application, including page organization, graphic theme, interactive
objects, and navigation controls. To this structure, you add your own
custom content. You can fully customize templates by adding or deleting
pages, changing page order, or replacing graphics. Using templates can
help you save time and provide a consistent look and feature set for each
new application.
You can choose a template from the New Book dialog box (choose New
from the File menu) or from the ToolBook Instructor Startup dialog box
that appears when you open Instructor. Instructor provides a variety of
special-purpose and general-use templates that you can select in these
dialog boxes, and you can create your own custom templates that can
appear here as well. When you select a template and click OK, Instructor
opens a copy of the template that you name and save.
When selecting a template, consider your plan for distributing the appli-
cation. Some templates are available in different versions, each identified
by a distinguishing icon color on the Templates tab of the ToolBook
Instructor Startup dialog box and the New Book dialog box. If you plan
to distribute your application on the Internet after exporting to DHTML,
select the HTML version of the template optimized for use on the Internet.
If your users have a high-bandwidth Internet connection (for example,
on a corporate intranet), select the version of the template optimized for
high-bandwidth Internet connections.
Chapter 4 Creating books and pages 76
You can use the default template included with Instructor, or you can
designate any template to serve as the default template. The default
template appears on the Quick Start tab of the ToolBook Instructor
Startup dialog box and the New Book dialog box.
3 Under the option labeled Use template for new books, enter or
navigate to the book you want to use as the default template.
A shortcut for the template appears on the Quick Start tab. A small
check mark on the icon indicates that the template is the default
template.
Tip You can create a shortcut on the Quick Start tab for any
template on the Templates tab. Simply right-click a template icon
and then choose Show Shortcut on Quick Start Tab.
Chapter 4 Creating books and pages 77
When you save a book as a template, you’ll want to save it in the Tem-
plate directory of the Instructor program directory. That way, when you
start Instructor or choose New from the File menu, the custom template
you’ve created appears on the Templates tab of the ToolBook Instructor
Startup dialog box and the New Book dialog box. The Template directory
is the default location for storing templates. If you choose another direc-
tory in which to store templates, you can navigate to that directory using
the Templates directory list on the Templates tab.
➤ To save a book as a template:
3 In the Select a Name and Location for Your New Book dialog box,
name the file, accept the default directory or choose another file
location, and then click OK.
Instructor opens the book.
Tip You can bypass the New Book dialog box and automatically
open the default template each time you open a new book. In the
Instructor Options dialog box (available from the View menu), clear
the following check box: Show New Book dialog when starting new
book.
◆ Book Wizard Builds a book that reflects your input about distribution
method, page styles, and outline for page organization. You can design
a sophisticated outline of pages that can serve as the basis for any
online course.
◆ Lesson Design Wizard Builds a book that reflects your input about
instructional goals, page styles, and learning topics. You can include
prepared text and graphics files as well as preprogrammed question
objects.
Chapter 4 Creating books and pages 80
2 Click the Quick Start tab, select either the Blank DHTML Book icon or
the Blank Native ToolBook Book icon, and then click OK.
The Insert menu has the New Page command and the New Background
command. While both commands allow you to add a page to your book,
they each give you different options about the type of page or background
you add.
Choosing New Page from the Insert menu allows you to add an empty
page using the current background, duplicate a page from your book, or
add a page from a template. After choosing one of these options, you can
specify that the page introduce a new background, so that changes made
to this new background will not affect the background you duplicated.
Choosing New Background from the Insert menu allows you to add a page
Chapter 4 Creating books and pages 82
that uses a new background. You can add a new page with an empty
background, duplicate a background from your book, or add a background
from a template.
1 If the Catalog is not currently open, click the View menu and choose
Catalog.
The new page is inserted after the page you were viewing.
1 Go to the page after which you want to add the new page.
2 Do one of the following:
The New Page dialog box appears. Enter a name for the page, and
then select an empty page, a page from the current book, or a page
from a template.
◆ To add a new page that uses a new background, choose New
Background from the Insert menu.
3 Click OK.
Instructor inserts the new page after the current page (the page dis-
played in the Instructor main window) and gives it the next
sequential page number.
Chapter 4 Creating books and pages 83
Tip You can modify your settings so that Instructor adds new pages
without opening the New Page dialog box. From the View menu,
choose Options; on the New tab, clear the Show New Page dialog on
New Page command check box. Now Instructor will automatically
apply the settings from the page you are on to the new page it
creates.
Using OpenScript
You can write and execute OpenScript code using the script editor or
Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript
online book.
◆ To add a new page that uses an existing background, display a page
that uses the background you want, and then send the newPage
message from the page:
◆ To add a new page that uses a new background, display the page after
which you want to add the new page, and then send the newBackground
message:
send newBackground
Instructor inserts the new page after the current page (the page displayed
in the Instructor main window) and gives it the next sequential page
number.
information into the correct location and adds the resources on the
imported pages to the resources of the target book. More information
about resources is available in Chapter 17, “Using resources.”
➤ To import pages:
1 Open the target book, and then display the page after which you want
to import the source book’s pages.
2 From the Insert menu, choose Pages.
4 Select the source book or type in the source book’s name, including its
path if the book is in another directory.
Instructor imports the specified pages from the source book into the
target book.
Chapter 4 Creating books and pages 85
Using OpenScript
◆ To import the entire source book into the target book, display the page
after which you want to import the book, and then use the import book
command:
◆ To import one or more pages, use the import pages command. To import
pages without the source book’s background, add the without back-
ground parameter. For example:
If the source book’s page size is larger than that of the target book, you
may need to increase the target book’s page size to see all of the objects.
For details, see “Setting the page size,” later in this chapter.
Figure 2
The Book Explorer
Using OpenScript
◆ Set the pageNumber property to renumber a page and change its order
in a book, where <value> is the new page number:
You can also move a page by cutting and then pasting it. This method is
especially useful if you want to move a page to a different book.
Note When you reorder the pages in your book using a cut-and-
paste operation, Instructor gives the page you are moving a new ID
number. When you reorder the pages in your book using either the
Properties for Page dialog box or the Book Explorer, the ID numbers
do not change.
Chapter 4 Creating books and pages 89
The Cut command removes the page from the book and puts it on the
Clipboard; the Delete Page command and the DELETE key remove the
page entirely.
Using OpenScript
◆ Use the select command and the cut or clear message to remove a page
from a book:
Using OpenScript
◆ You can set properties for a background by specifying the
background’s name or ID number, or you can set properties for the
current background by using this background. To set colors, set the
fillColor and strokeColor or the rgbFill and rgbStroke properties. To set
the pattern, set the pattern property:
Note When you export your book to DHTML, the ToolBook Web
Specialist will size the browser window according to the size of the
largest background.
You can change a book’s page size and orientation at any time, even
after you add objects to the pages. However, Instructor does not rear-
range objects to fit the new page size or orientation. To fit the objects
into a smaller page size or different orientation, move them to their new
locations before you reduce or reorient the page. If necessary, you can
return to the original page size to see the objects in their original posi-
tions.
2 Click the Page tab, and then enter the size you want in page units,
pixels, or inches.
Tip You can change the default unit type from page units to either
pixels or inches on the New tab of the Instructor Options dialog
box. To open the Instructor Options dialog box, choose Options
from the View menu.
Using OpenScript
The book’s size property sets a default page size for the book. The
background’s size property can be set for individual backgrounds. This
size affects only the pages that share that background.
◆ To set a default page size for the book or a background, set the size
property. Page size is specified in Instructor page units (1/1440 of an inch):
◆ To view the page size of the book or the background, use one of the
following commands:
➤ To define a password:
4 In the Set Passwords dialog box, in the Password box, type the password
required for the particular user activity, based on the button you
clicked in step 3.
5 Retype the password in the Confirm password box, and then click OK.
CurrentPasswords = passwordTypes("c:\instruct\WebBook.tbk")
CurrentPasswords = passwordTypes(name of this book)
Using OpenScript
◆ Set the skipNavigation property for the page to true:
1 Select the object or word that contains the hyperlink to another page
(for example, the Next button in a navigation panel).
4 Under Style, select a transition effect from the Transition effect list.
Click Test to see a sample of the selected effect (optional).
5 Click OK.
Chapter 4 Creating books and pages 99
7 In the Actions Editor, from the File menu, choose Update Actions & Close.
◆ Use the same background for similar pages and limit the number of
different backgrounds.
Testing is an essential step in building a book. Test each part of your book
as you complete it. Switch to Reader level to see how the pages will look
to the user and try out buttons and hotwords to make sure they work. After
the book is complete, test it as a whole. Go through it yourself to see
whether the overall design and organization work. Then get someone else
to try it—a fresh perspective can be invaluable.
Chapter 5
I N THIS CHAPTER
About the Catalog 102
Authoring with the Catalog 103
Exploring types of Catalog objects 107
Customizing the Catalog 111
Chapter 5 Working with the Catalog 102
The Catalog window contains buttons that display the names of categories
of objects. You click a category button to view the objects available in
that category.
Figure 1
The ToolBook Instructor Catalog
Chapter 5 Working with the Catalog 103
Figure 2
Right-click menu for categories in the Catalog
Chapter 5 Working with the Catalog 106
Viewing objects
You might want to preview an object to view it at full size.
1 In the Catalog, select the small thumbnail image of the object you want
to view.
2 Right-click the object. From the right-click menu, select Preview
Object.
Instructor shows you a full-size view of the object in a pop-up window.
Action triggers
Action trigger buttons can start and reset objects on the page. With trigger
and reset buttons, you can hide and show objects, play an animation, and
create dynamic effects. You can trigger an action interactively by setting
the effect to occur when the user clicks the action trigger at Reader level.
Alternatively, you can trigger an action automatically by setting the effect
to occur when the user enters the page. Among the action buttons you’ll
find are:
◆ Action Trigger A button that can show, hide, animate, and trigger
another object.
◆ Score Page A button that displays the score for all of the question
objects on the page.
◆ Reset Page A button that resets the questions on the current page
and clears any score that the student has accumulated for the page.
Session information is preserved and a log entry is made indicating
that the page was reset.
◆ Score Quiz A button that displays the final score for a quiz or lesson.
◆ Score Field A text field that you can use in conjunction with a question
object and a score button to display a score.
◆ Feedback Field A text field that you can use in conjunction with a
question object and (optionally) a score button to display feedback.
Placeholders
The placeholders included with Instructor are objects that you can use to
display images, embed HTML code, and integrate other Web technologies.
You apply settings to each object using that object’s Extended Properties
dialog box. In books that will be exported to DHTML, the placeholders
include:
◆ HTML Placeholder A placeholder in which you can place any HTML
code that you want to include in an application that will be exported
for the Web.
Chapter 5 Working with the Catalog 109
Media players
Media players are objects that you add to your application to enable
users to play sound, video, or animation files. The Universal Media Player
is the primary object for adding media files to an Instructor application: It
supports most standard media types, is programmable using the Actions
Editor, and retains all functionality when exported to DHTML. The Catalog
also includes several other media objects with more specific functionality.
Among the objects you’ll find are:
◆ Media Player A button that plays a specific media type.
◆ Media Player (hotword) A hotword in a text field that plays a
media file.
◆ Video Player A simple stage or a stage with controls that plays
visual media.
Chapter 5 Working with the Catalog 110
Navigation
Navigation objects are buttons and fields that enable students to move
through your application and that can also display the current location.
Some examples include:
◆ Automatic Menu An object that automatically creates a menu that
includes hotwords that jump to each named page in your book.
◆ Button Group A grouped object consisting of buttons for general
navigation.
Questions
Question objects allow you to create questions that test your users on
their understanding of your content. You can customize question objects
in many ways. These objects have built-in behavior that provides feedback
to your users, supplies you with information on how your users interacted
with the question, and interacts with a learning management system to
track the behavior of groups of learners. Among the question objects
provided with Instructor are the following:
◆ Match-items object A button set that allows the user to drag an
arrow to define pairs of matching items.
◆ Multiple-choice object A button set that allows the user to select the
correct answer by clicking one of several available choices.
◆ Fill-in-the-blank object A field that allows the user to enter text for
an answer and then evaluates whether the text is correct.
Chapter 5 Working with the Catalog 111
Figure 3
The Customize Catalog dialog box
Tip In the Customize Catalog dialog box, you can clear the check
box next to a category to hide the selected category from view.
This does not permanently delete the category from the Catalog.
When you add an object to the Catalog, you can assign it a name and
search keywords. If you want to enter multiple search keywords, use
commas to separate them.
1 In the main window, select the object you want to add to the Catalog.
2 Open the Catalog if it is not already open.
4 In the list of objects, select the name of the object you want to remove.
5 Click the Remove button.
I N THIS CHAPTER
About objects 115
Using the Book Explorer 115
Adding objects from the Catalog 117
Creating objects using the tool palette 118
Selecting objects 121
Creating hyperlinks 122
Cutting, copying, pasting, and deleting objects 125
Moving objects 127
Spreading and centering objects 128
Flipping and rotating objects 128
Aligning objects 129
Changing the size and shape of objects 131
Modifying the appearance of objects 134
Moving objects between layers 139
Grouping objects 144
Chapter 6 Working with objects 115
About objects
All the visual elements of your application—buttons, fields, graphics,
viewers, and even the pages and backgrounds—are objects. You build
your application by creating objects, specifying their properties, and
defining how they will work together. ToolBook Instructor offers a variety
of objects with built-in functions for quick and easy authoring. But you
aren’t limited to these preprogrammed features: You can
position, group, or change the properties of any object to affect its
appearance and behavior.
◆ move an object to a different layer on the page using drag and drop
◆ display the shortcut menu for an object with a right-click
You can select one or more objects in the Book Explorer. Use CTRL+click
or SHIFT+click to select more than one object.
2 If a the Catalog is not already open, click the Catalog button on the
Instructor toolbar.
3 Select a category.
4 Drag the object you want from the object pane, and then drop it
onto your page or background.
The tool palette is available only at Author level and appears by default
on the left side of the main window. However, you can reshape the tool
palette and move it to a new location to suit your work style.
Chapter 6 Working with objects 119
Selection indicator
Select tool Magnify tool
Pushbutton tool Label button tool
Radio button tool Check box tool
Radio button 3D tool Check box 3D tool
Field tool Record field tool
Borderless field tool Single-select list box tool
Combo box tool Line tool
Arc tool Angled line tool
Curve tool Rectangle tool
Rounded rectangle tool Ellipse tool
Polygon tool Irregular polygon tool
Pie tool Stage tool
Figure 2
Instructor tool palette
➤ To draw an object:
1 Choose a tool from the tool palette by clicking the tool’s button.
2 Point where you want to start the new object.
3 Hold down the left mouse button while you drag, and then release
when the object is the size you want.
3 From the polygon palette, choose one of the polygon shapes, or type
a number in the box to specify the number of sides for the polygon.
4 Hold down the left mouse button where you want the center of the
polygon, and then drag from the center and release when the shape
is the size you want.
Note You can use the angled line tool to draw an object that looks
like an enclosed object. However, avoid having users click these
objects, because they require clicking precisely on the line. If you
want an irregularly shaped enclosed object, create the shape with
the irregular polygon tool.
Chapter 6 Working with objects 121
➤ To draw curves:
3 Point where you want the curve to begin curving, and then click.
4 Continue to point and click to add as many curves as you want.
Selecting objects
Before you can change an object or define its properties, you must first
select the object. When you select an object, Instructor displays handles
around the object. You use the handles to align and size objects.
If you select multiple objects, your next command or mouse action affects
all of the selected objects. For example, you can drag them, change their
properties, and cut or copy them as if you had selected a single object.
Chapter 6 Working with objects 122
Selecting objects
To... Do this...
Creating hyperlinks
Hyperlinks allow the users of your application to move from one page
to another. A user can display a page out of sequence or even display
a page in a different application. All objects you can put on a page have
built-in hyperlink capabilities that let you connect ideas, information,
or topics.
Chapter 6 Working with objects 123
Figure 3
The Hyperlink dialog box
Hyperlinking to a URL
Choose this option... If you want to define a hyperlink that...
➤ To create a hyperlink:
3 In the Type of link list, select the kind of link you want to use.
4 Under Link to, select the type of link you want.
Tip With an object selected, you can also use the standard
Windows shortcut keys CTRL+X, CTRL+C, and CTRL+V to cut, copy,
and paste.
After you cut or copy an object, you can paste it on the same page or
anywhere else in the current book or in another book.
➤ To paste an object:
➤ To duplicate an object:
➤ To delete an object:
Moving objects
You can move an object to another location on a page by dragging it to
a new location or by “nudging” it pixel by pixel.
— Nudge the object by clicking it and using the arrow keys to move
the object one pixel at a time in the desired direction. Press SHIFT
as you’re using the arrow keys to move the object faster.
Tip When dragging an object, press the CTRL key if you want to
restrict the object to horizontal or vertical movement.
Chapter 6 Working with objects 128
2 From the Draw menu, point to Spread, and then choose an option from
the submenu.
2 From the Draw menu, point to Center, and then choose an option from
the submenu.
◆ Flip Vertical Flips the selected object vertically within its bounding
box, switching the location of the object’s top and bottom.
Aligning objects
You can use the following methods to precisely position objects on
a page:
◆ Arrange objects using the grid as a reference
Figure 4
Aligning objects with each other
Chapter 6 Working with objects 131
If you drag the handle of one object when several objects are selected,
only the object with the handle you drag resizes; the other objects maintain
Chapter 6 Working with objects 132
their original sizes. To resize several objects at once, you must group
them. For details about grouping objects, see “Grouping objects,” later in
this chapter.
To change the appearance of a polygon, curve, arc, angled line, or pie
wedge, you can use the Reshape command to display the object’s reshape
handles, which are handles that can be used to alter the shape of these
objects.
➤ To reshape an object:
1 Select the object (angled line, curve, arc, polygon, or pie wedge) whose
shape you want to change, and then from the Draw menu, choose
Reshape. Alternatively, double-click the object.
The handles change to allow you to reshape the object.
For more precise control over the shape of some objects, you can add
reshape handles that enable you to add another vertex to a side of
the object.
Constraining objects
Press CTRL
with this tool... To constrain...
Note You can also press CTRL before you move an object to
restrict its movement to horizontal and vertical directions, which is
useful when you want to move objects that are precisely aligned
with one another.
◆ To assign a stroke color to the object, click the Stroke color button.
A pop-up window appears, where you can choose from a palette of
commonly used colors.
4 Optional. To choose a color not shown in the color palette, click More
Colors and select a color.
Choosing this command does not change the fill and stroke colors that
you have set for the object; it just overrides those settings. If you clear the
Use Windows Colors command, Instructor will revert to using the object’s
fill and stroke colors.
1 Select the object or display a page that shares the background that will
use the Windows colors.
2 From the Draw menu, choose Use Windows Colors.
Tip Instructor can also draw a background using the dialog box
color that is part of an operating system’s color scheme. To draw
a background using a dialog box color, on the Draw tab of the
Properties for Background dialog box, choose Use standard Windows
colors, and then select Use dialog box color.
Tip To make an object invisible, set its fill and stroke colors to
white, and then make it transparent. If you lose an invisible object
on the screen, choose Select All from the Edit menu. Instructor
displays handles for all objects on the page.
Title
Back
Figure 5
The layers of a page
Chapter 6 Working with objects 140
When you create a new object, Instructor adds a layer to the front of the
current page or background and then places the new object on that layer.
The layer order affects the following aspects of a page:
◆ When objects overlap, the objects on higher layers appear to be placed
on top of objects on lower layers.
◆ When tabbing between buttons and fields, the focus moves in order
from the object on the lowest layer to the object on the highest layer.
For more information about the focus and tabbing, see “Planning layer
order for tabbing at Reader level,” later in this chapter.
◆ When Instructor searches for text, it starts searching from the field or
button with the focus and then searches fields on higher layers before
continuing to the next page. Any fields on layers lower than the object
with the focus will not be searched until after Instructor searches the
rest of the book.
Bring Closer moves the object one layer up, or forward, in the layer
order. Send Farther moves the object one layer down, or back, in the
layer order.
Select an object. . .
Figure 6
Changing layer order
2 From the Draw menu, point to Layer, and then choose Send to Back.
2 From the Draw menu, point to Layer, and then choose Bring to Front.
Chapter 6 Working with objects 142
1 Select the object, and then click the Properties button on the Instructor
toolbar.
2 Type a number in the Layer box.
The tab order—the order in which the focus moves when a user presses
TAB—follows the layer order of the objects, beginning with layers on the
background and then moving to layers on the page. If the layer order is
the order in which you created those objects, the tab order could seem
random to the user. For example, the first field you create may be at the
bottom of the page, the second at the top, and the last in the middle; your
user has to look all over the page for the focus. To make your application
easier to use, you can define a new tab order.
There are two ways to determine the order in which readers will tab
through objects on a page: by setting tab order in the Set Tab Order
dialog box and by changing the layer number of objects in the Properties
dialog box.
➤ To set the tab order using the Set Tab Order dialog box:
1 Select all the objects for which you want to define the tab order.
2 From the Draw menu, point to Layer, and then choose Set Tab Order.
Chapter 6 Working with objects 143
3 In the Set Tab Order dialog box, specify the starting layer and whether
the order will follow from left to right or top to bottom.
4 Click OK.
You can also define a tab order by specifying the layer for each object in
the Properties dialog box.
3 Repeat this procedure for the remaining objects in the order you want
tabbing to occur, giving each object an incrementally higher layer
number. Then, switch to Reader level and test the tab order by pressing
TAB and observing where the focus moves.
◆ If too many fields and buttons appear on a page, a user might have
trouble finding the focus when pressing TAB. If your pages are
crowded, consider simplifying them and adding new ones.
Chapter 6 Working with objects 144
◆ To exclude a field or record field from the tab order, select the Lock the
text and activate mouse events if the field is enabled option on the
Behavior tab of the Properties dialog box.
Grouping objects
You can create a group of objects that you work with as a single unit.
This allows you to move and format the objects together. For example,
you can combine different types of objects, such as a polygon and field,
into a group, and then set properties for the group.
When you create a group, Instructor places it on the lowest layer occupied
by an object in the group. For example, if you draw three objects on
layers 1, 2, and 3, and then group them, the group is on layer 1. The next
object you add will be on layer 2.
➤ To create a group:
◆ SHIFT+click to select each object you want in the group, and then press
CTRL+G (or choose Group from the Object menu). After you group the
objects, one set of handles surrounds the group.
Chapter 6 Working with objects 145
Editing groups
You can work with a group as a whole, or you can work with the indi-
vidual objects within the group. For example, you can change properties
for individual objects in a group without affecting the properties of the
group itself. You can move, size, add objects to, and delete objects from
a group without ungrouping it. You can also nest groups within groups.
Before you can edit a group, you must first select it.
➤ To select a group:
Any changes you make apply to all of the objects within the group.
➤ To deselect a group:
The group’s bounding box expands to encompass the new object. That
object occupies the uppermost layer of the group.
Note You cannot have fewer than two objects in a group. If you try
to delete one of the last two remaining objects, Instructor ignores
the Delete command.
Note Selecting the Visible option on the Draw tab of the Properties
for Group dialog box does not affect the Visible option of individual
objects in the group.
Chapter 6 Working with objects 149
Figure 7
Properties for Group dialog box
Ungrouping objects
Groups can easily be ungrouped. Ungrouping does not affect individual
object ID numbers or names. However, Instructor discards the group’s ID
number and name.
➤ To ungroup a group:
◆ Select the group you want to ungroup, and then press CTRL+G (or
choose Ungroup from the Object menu).
Instructor replaces the single set of group handles with handles for
each object, showing that the objects are now ungrouped.
Chapter 6 Working with objects 150
Nesting groups
You can make a subgroup of objects within an existing group. The inner
(or child) group acts like a single object within the outer (or parent)
group. When you ungroup, the child group remains intact. You might
want to make child groups when you are creating a complex drawing;
when part of the drawing is finished, group it so that you will not
accidentally change or move it.
Chapter 7
I N THIS CHAPTER
Understanding properties and extended properties 152
Using the Properties dialog box 153
Using the right-click menu 157
Using the Extended Properties dialog box 158
Using the Book Explorer 160
Using the Property Browser 161
Chapter 7 Setting object properties 152
Understanding properties
and extended properties
All ToolBook Instructor objects (pages, backgrounds, fields, draw objects,
buttons, hotwords, and so forth) have basic properties that define their
appearance and behavior. While Instructor sets a few properties, such as
an object’s ID number, most are set by you. The properties you set for a
button, for example, might include its fill color, button graphic, and
caption.
Many of the objects in the Catalog have additional properties that set
more sophisticated capabilities. These properties are called extended
properties. A media player, for example, has extended properties that
control the player’s interactive functionality, such as which media clip
will play and how Instructor will play the clip at Reader level.
Figure 1
The Properties and Extended Properties dialog boxes for a media player
Chapter 7 Setting object properties 153
— From the Object menu, choose one of the properties options. (For
example, if a button is selected, choose Properties for Button.)
— Press SHIFT+F6.
Draw Set the properties that control the way the object is
drawn, such as fill color, line style, color palette, or
border style
1 Select the object, and then click the Properties button on the Instructor
toolbar.
2 Click a tab to view the properties page containing the category of
property you want to set.
3 Choose or enter the properties or settings you want. If you type a value
in a box, you must press ENTER, press TAB, or click in another field
before the changes will take effect.
4 Optional. Click a button on the toolbar to set other available properties
of the selected object, such as Extended Properties, Hyperlink, and Path
Animation.
More information about the buttons on the Properties dialog box
toolbar is available in the following section.
5 Optional. Close the Properties dialog box.
Tip After you customize an object by setting its properties, you can
copy it to the My Objects category of the Catalog and use it again
later. Copying an object to the My Objects category allows you
to easily share and reuse custom objects among your Instructor
applications. For details, see Chapter 5, “Working with the Catalog.”
Chapter 7 Setting object properties 156
A B C D E F G H I J K L M
Figure 2
The toolbar in the Properties dialog box
D Edit Child Changes the displayed properties to the child of the currently
selected object.
E Set Units Allows you to choose by what units the object is measured
(pixels, page units, inches, or centimeters).
F Extended Properties Opens the Extended Properties dialog box for the
selected object.
G Actions Opens the Actions Editor, where you can program a series of
behaviors (called action sequences) for the selected object.
H Hyperlink Opens the Hyperlink dialog box, where you can specify
a hyperlink for the selected object.
Chapter 7 Setting object properties 157
I Path Animation Opens the ToolBook Animation Editor, where you can
create an animation.
J Edit Script Opens the script editor, where you can write or edit a script
for the selected object.
K Edit Shared Script Opens the script editor, where you can edit a
shared script.
M Help Opens the online Help topic for the currently displayed tab in the
Properties dialog box.
When you have finished setting properties, you can click the Close button
in the upper-right corner of the dialog box.
A B C D E F G H
Figure 3
Sample right-click menu and the right-click menu toolbar
— Right-click the object, and then click the Extended Properties button
on the right-click toolbar.
— In the Properties dialog box for the object, click the Extended
Properties button on the toolbar.
Figure 4
A selected button object and its Extended Properties dialog box
1 From the View menu, point to Browsers, and then choose Property.
Chapter 7 Setting object properties 162
Tip You can also double-click the entry in the Value column to edit
the property.
The User tab of the Property Browser displays some properties that are
built in to Instructor. You can add a new property for an object by specify-
ing a user property in the Property Browser.
You can add text to your book using field objects, such as text
and record fields. Field objects on the pages and backgrounds of
your book can be used to convey information and instructions.
You can also add inline graphics to field objects to create visual
interest within text. This chapter describes how to create, format,
and use text in fields and record fields.
I N THIS CHAPTER
About fields 165
Working with fields 167
Creating fields 168
Setting field properties 170
Adding text to fields 174
Selecting and editing text 178
Formatting text in fields 182
Inserting inline graphics 187
Inserting special characters 189
Finding and replacing text 191
Working with record fields 193
Chapter 8 Working with text 165
About fields
Fields are objects that hold text. Before you can add text to your book,
you must add a field to contain that text. Instructor offers two basic types
of fields: text fields and record fields. A text field can be placed on a page
or on a background. If you place a text field on the background, the field
and the text it contains appear identically on every page that shares that
background. A record field must be placed on a background; unlike a text
field placed on the background, a record field can display different text on
every page that shares that background.
◆ To display identical text in the same position and in the same style on
every page that shares a particular background, use a text field placed
on the background.
◆ To display text that appears on one particular page, use a text field
placed on the page (the foreground).
The Catalog provides a wide variety of text fields and record fields that
you can use to present information on the screen. To add text to your
page, you can drag the type of field you want from the Catalog to your
page. Then you can replace its placeholder text with your own text.
Chapter 8 Working with text 166
Figure 1
Text fields in the Catalog
Text fields and record fields, like other objects, have properties that you
can set to define their physical appearance, such as border style, font, and
fill color. In addition, some fields in the Catalog have extended properties
that you can set. These properties define the extended capabilities of a
field, such as automatic sizing, which you set in the object’s Extended
Properties dialog box. Together, these properties of a text object define its
appearance and interactive behavior in your application.
Chapter 8 Working with text 167
Fields can contain graphics and hotwords. For example, you can insert
a graphic, such as a bitmap, into a field to create an inline graphic. You
can also select a word or phrase and make it a hotword. Hotwords act
as buttons: They can trigger an action, such as navigating to a page or
playing an animation. For details about creating hotwords, see Chapter 10,
“Working with buttons and hotwords.”
For the most part, you work with record fields in the same way that you
work with text fields. However, take care when cutting, pasting, or deleting
record fields. If you cut a record field from the background and paste it on
the page, it becomes a regular text field. In addition, removing the record
field from the background of one page removes it (and the data it contains)
from all pages that share that background. Instructor displays a warning if
you attempt to remove a record field.
Chapter 8 Working with text 168
Creating fields
There are three ways to create a text or record field. You can drag a field
from the Catalog to your page. Alternatively, you can create a field using
the Instructor tool palette. Finally, you can use OpenScript to draw a field.
1 Click the Catalog button on the Instructor toolbar to open the Catalog.
◆ Field tool Use the field tool to draw a field. You can draw a field on
the page (foreground) or background.
◆ Borderless field tool Use the borderless field tool to draw a field
without a border. You can draw a borderless field on the page or
background.
◆ Record field tool Use the record field tool to draw a record field on
a background. This tool is disabled when you are working on the page
and becomes available when you switch to the background.
3 On your page, hold down the mouse button as you drag to draw a field.
◆ Use the draw command to draw a field or record field. Fields are
measured in page units. For example:
Figure 2
Properties for Text Field dialog box
Fields are identified by the same properties that identify other objects,
such as a name and ID number. Additional properties define specific
characteristics of fields. The field type property defines the type and
function of a field—for example, whether it is a wordwrap text field or
a multiple-select list box. A field also has properties that define its behavior
at run time, such as whether a field is editable (allows users to enter text)
or activated (locks the text and activates mouse events) at Reader level.
Chapter 8 Working with text 171
1 Select the field, and then click the Properties button on the Instructor
toolbar.
The Properties for Text Field or Properties for Record Field dialog box
appears.
2 Click one or more tabs and select or enter the options you want to set,
as described in the table below.
You can also use the Actions Editor visual programming tool to create
action sequences that set certain field properties while the application is
running. For more information about the Actions Editor, see Chapter 15,
“Using the Actions Editor,” and Chapter 16, “Creating action sequences:
Practical examples.”
Chapter 8 Working with text 172
Figure 3
Field border styles
You can change the way text wraps within a field using the options in the
Field type list in the Properties dialog box.
Chapter 8 Working with text 173
Enable the field The field can receive the focus or mouse-event
messages at Reader level.
Allow users to enter The text in a field can be edited by users at
or modify text Reader level. This option is available when
a field is enabled.
Lock the text and The text in a field cannot be edited by users at
activate mouse events Reader level. Mouse events are activated (for
example, a hotword’s hyperlinks can be run).
This option is available when a field is enabled.
Typing text
To select or enter text, double-click a field to switch Instructor from
object-selection mode to text-editing mode. You can also switch to text-
editing mode by selecting a field and then choosing Edit Text from the
Text menu.
➤ To type text:
3 To end text-editing mode, click outside the field or press the ESC key.
Using OpenScript
◆ To enter text in a field, you set the text property of that field:
Importing text
You can add text to your book from other programs by importing a file or
by copying and pasting a selection of text. When you add text from another
program, most character formatting is kept, and paragraph formatting
used in the first paragraph is applied to subsequent paragraphs in the
selection.
Instructor allows you to import text in Rich Text Format (RTF) or in ASCII
(American Standard Code for Information Interchange) format. Most text-
editing applications, such as Microsoft Word, allow you to save your text
in either of these formats.
➤ To import text:
If your field already contains text, Instructor notifies you that the
current contents of your field will be replaced.
Note When you import text, Instructor replaces the entire contents
of the field. To avoid losing existing text, you can always import the
text into an empty field and copy and paste the text to the location
you want.
Chapter 8 Working with text 177
Note When using RTF text, you may see paragraph formatting in
the source application that does not appear in Instructor. Although
some formatting may be lost, no text data is lost.
1 In the source application, select the text you want, and then copy it
to the Clipboard.
Navigating in text
You can double-click a field to create an I-beam called the insertion
point, which you use to indicate where you want text to be inserted when
you type. You can click with the mouse to move the insertion point within
any text in a field or to another field on the same page.
The following table describes the keyboard shortcuts you can use to
navigate in a text field.
Navigating in text
Press this key or
To move the insertion point... key combination...
Selecting text
Before you can change the appearance of text, you must select it. Selecting
highlights just the text with which you want to work.
Selecting text
To... Do this...
Tip You can also cut, copy, and paste fields or selected text using
the right-click menu or using the standard Windows shortcut keys
CTRL+X, CTRL+C, and CTRL+V.
Chapter 8 Working with text 180
Using OpenScript
◆ To copy the text, fonts, and styles of one field to another, set the
richText property of the field you want to receive the formats to the
richText of the field containing the desired formats:
◆ To copy the text of one field to another without copying the formatting,
set the text property of one field to the text property of the other:
◆ To copy the RTF codes separately from the text, set the text property of
one field to the richText property of another:
➤ To paste text:
4 To end text-editing mode, click outside the field or press the ESC key.
Using OpenScript
◆ You can use the send paste statement to paste the contents of the
Clipboard into a new field.
Deleting text
You can remove text from a field. If you delete text by mistake, immediately
choose Undo from the Edit menu to restore it; otherwise, your text will
be lost.
➤ To delete text:
Using OpenScript
◆ To change character style for the entire field using OpenScript, specify
the field name:
◆ To change the character style used in all fields on a page, select the
fields and set the font:
◆ To change the default text style, set the sysFontFace, sysFontStyle, and
sysFontSize properties:
sysFontFace = "Arial"
sysFontStyle = "bold"
◆ You can set the textAlignment, spacing, indents, tabType, and tabSpacing
field properties to modify paragraph formats. For example, to set line
spacing in a field:
You can format specific characters by selecting them and applying character
styles to them. You can also change the character style of an entire field,
or set a default character style so that all of the text you enter has a
consistent format. Your default character style remains in effect for the
current session.
Chapter 8 Working with text 184
4 Click OK.
Using OpenScript
Using OpenScript
◆ The strokeColor property defines the default color of text in a field or
record field. The fillColor property defines the color of the area within
the field. You can specify a color by its OpenScript keyword, such as
yellow or green, or you can use RGB (red, green, blue) or HLS (hue,
lightness, saturation) values. For example:
◆ text alignment.
◆ spacing between lines of text.
1 Select the field, and then click the Properties button on the Instructor
toolbar.
Using OpenScript
◆ You can set the textAlignment, spacing, indents, tabType, and tabSpacing
field properties to modify paragraph formats. For example, to set line
spacing in a field:
You can cut, copy, paste, or delete inline graphics just like any character.
Text formatted in RTF that contains bitmaps can be pasted into fields. The
bitmaps become inline graphics. In addition, you can drag bitmaps and
other graphic resources from the Media category of the Catalog to a field
to quickly create an inline graphic.
Inline graphics wrap to the next line as you add text, and the bottom of
each graphic is aligned along the text’s baseline. To add space above or
below an inline graphic, use the Superscript or Subscript command on
the Text menu.
Chapter 8 Working with text 188
1 Double-click the field to display the insertion point, and then move the
insertion point to where you want to insert the graphic.
Using OpenScript
◆ Use the insert graphic command to insert the graphic into a field:
Note Some font styles do not support the ANSI character set.
You may need to change fonts in order to use some ANSI
characters.
The table on the following page displays the ANSI character set.
Chapter 8 Working with text 190
Instructor searches the entire book starting on the current page and
prompts you to start over when it reaches the end of the book. If you
want to limit the search, you can select one of the options in the Find
dialog box. You can search for text in:
◆ all fields and list boxes shown on the current page.
2 Enter the text for which you want to search in the Find what box. If
you are replacing text, enter the new text in the Replace with box.
When Instructor reaches the end of the book, you are prompted to
continue searching from the beginning of the book. Click Yes or No.
When you finish searching, close the Find or Replace dialog box.
Chapter 8 Working with text 193
Like any object placed on a background, a record field appears in the same
style and in the same position on any page that shares that background.
However, unlike a regular text field placed on the background, a record
field allows you to enter and display different text from page to page.
Instructor can also sort pages and print reports using record fields.
Tip To prevent users from typing text into a record field in which
you’re displaying text or inline graphics, in the Properties for Record
Field dialog box, select the Lock the text and activate mouse events
if the field is enabled check box.
Chapter 8 Working with text 194
A record field
displays different
text on every page.
Figure 4
A record field displays text in same location on pages that share the background
Note If you paste record fields into your book using the Paste
command, be sure that you are on the background when you paste;
otherwise, Instructor will create text fields from them.
When you import pages and choose not to include the source book’s
backgrounds, Instructor adds the record field text to the destination
book’s record field text if the source and destination books’ record field
names or ID numbers match. If the source and destination books’ record
field names or ID numbers do not match, the source record field text is
added to the destination record field using layer order. The source book’s
first record field is mapped to the destination book’s first record field. If
the source book contains more record fields than the destination book,
the extra record field text is not mapped to a destination record field.
Because sorting is based on record fields, only the set of pages that share
the same background can be sorted; however, within that set you can
specify a range of pages to sort. If your application is designed so that a
user can add entries, you can provide sorting at Reader level using the
Sort dialog box, or you can design your own sorting option using the
OpenScript sort command. The sort command is much more flexible and
can sort across books using any page-based comparison.
For details about using the sort command, refer to its entry in the
OpenScript reference in online Help.
2 Select the record field by which you want to sort in the Available
record fields box, and then click Add.
If you want to add more than one record field to the Sort on record
field(s) list, you must select each individually and click Add for each
one. Instructor sorts pages using the record fields in the order that you
have selected them.
Chapter 8 Working with text 197
◆ Date Sorts pages using the date entered in the record field. For
example, if you choose Ascending, Instructor puts a page with the
date 08/18/68 before a page with the date 02/07/93. Instructor uses
the date format set by the sysDateFormat property.
◆ Name Sorts pages using the name entered in the record field.
Instructor uses the last word in this field for sorting. For example, if
you choose Ascending, Instructor puts a page with the name “Zoe Z.
Benton” before a page with the name “Angela Victor.”
If Instructor encounters data that does not match the type you have
specified (for example, text in a field that you’re sorting as a date), it
places that page at the end.
Using OpenScript
◆ To sort pages, use the sort command with any expression that can be
evaluated in the context of a page, such as page name or page ID
number. Alternatively, specify a range of pages with an expression.
For example:
When you sort pages by a record field treated as a name, Instructor treats
the first word in the first paragraph as a first name, the second word as
Chapter 8 Working with text 198
a middle name, and the third word as a last name. Additional words are
ignored. Instructor sorts by last name, then by first name, and finally by
middle name or initial. A one-word paragraph is considered a last name;
two words are considered to be first and last name, in that order. Two
words concatenated with the tilde (~) character are evaluated as one
word. For example, “Hubert Van~Beek” is sorted by “Van Beek” but
“Hubert Van Beek,” is sorted by “Beek.” The tilde appears only onscreen
and is not printed. Any amount of additional text can follow the first
paragraph.
Chapter 9
Using graphics
I N THIS CHAPTER
About graphics 200
Using graphics on the Internet 201
Adding graphics to your book 201
Modifying graphics 205
Chapter 9 Using graphics 200
About graphics
You can paste or import graphics created in other programs into your
ToolBook Instructor application. When you paste or import a graphic,
Instructor creates one of the following types of graphic objects:
To identify the graphic type at a glance, right-click the graphic. The top
bar identifies the graphic type by the icon shown on the left .
Figure 1
Right-click menu for an imported graphic
Chapter 9 Using graphics 201
1 Run the application that contains the graphic you want to paste.
◆ From the Edit menu, choose Paste. Instructor adds the graphic in the
richest file format that the copied graphic will yield.
◆ From the Edit menu, choose Paste Special. In the As list, select a file
format, and then click OK. Instructor adds the graphic in the file
format you selected.
Importing graphics
When you import a graphic using the Graphic command on the Insert
menu, Instructor uses an import filter to convert the graphic file to a
picture object or paint object.
To import graphics, you must have the appropriate graphic filters installed
on your system. An import filter is a program Instructor runs to convert a
graphic to a format it can use. The Files of type list in the Import Graphic
dialog box shows the filters available to you.
Using OpenScript
You can write and execute OpenScript code using the script editor or
Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript
online book.
◆ To import a graphic, use the importGraphic command. Specify the file
name and extension, along with the complete path, if necessary. For
example:
importGraphic "c:\windows\city.bmp"
Chapter 9 Using graphics 204
Modifying graphics
Like other objects, graphics have properties that you can set to modify
their appearance or behavior. You can modify an imported graphic in
several ways, depending on the type of object. For example, you can:
If you move the handles of a paint object, Instructor crops the right side
of the image to fit within the new bounding box size. If you try to make
a paint object larger than its original size, Instructor adds a transparent
area around the image. If you move the handles of a picture object, the
image is resized.
Figure 2
Cropped paint object
Using OpenScript
◆ Adjust the size of a paint object by setting its bounds property:
3 In the Line style list, select the line style you want.
4 Click Stroke color.
Using OpenScript
1 Select the picture object, and then click the Properties button on the
Instructor toolbar.
2 In the Properties dialog box, click the Draw tab, and then click Convert
to Paint Object.
Using OpenScript
selection = picture ID 3
send convertPicture
After the picture object is converted to a paint object, you can adjust its
handles to crop the image.
1 Select the paint object, and then click the Properties button on the
Instructor toolbar.
2 In the Properties dialog box, click the Draw tab, and then select Use fill
color as chromakey.
Chapter 9 Using graphics 210
3 Click Fill color, and then choose the color you want to be transparent
in the paint object.
4 Optional. Close the Properties dialog box.
Using OpenScript
◆ To set the chromakey property of a paint object, send the
useChromakey and fillcolor messages:
You can also set transparent areas in bitmap resources. For more
information, see Chapter 17, “Using resources.”
PART III
Adding interactive
features to your application
Using powerful objects from the Catalog, you can build dynamic, interactive
applications to present your learning material. In this part of the ToolBook
Instructor User Guide, you will learn about using buttons; creating a quiz
using question objects; hiding, showing, and animating objects; and using
multimedia in your application.
I N THIS PART
Chapter 10 Working with buttons and hotwords
Chapter 11 Working with list boxes and combo boxes
Chapter 12 Creating a quiz using question objects
Chapter 13 Hiding, showing, and animating objects
Chapter 14 Adding audio and video files
Chapter 10
You can add buttons and hotwords to your application when you
want your users to interact with your book. A ToolBook Instructor
button, like any Windows button, is an object that the user can
click to cause something to happen. A hotword is a selection of
text that the user can click like a button. Buttons and hotwords
can be used to navigate between pages, as controls for setting
options, to start and stop an animation, and for a variety of other
uses. This chapter describes how to use buttons and hotwords in
your application.
I N THIS CHAPTER
About buttons 213
Defining how buttons look 213
Using and modifying buttons 214
Adding a graphic to a button 224
About hotwords 229
Creating and modifying hotwords 230
Editing hotwords 232
Removing hotwords 234
Chapter 10 Working with buttons and hotwords 213
About buttons
Buttons facilitate user interaction. They are commonly used as controls—
to turn options on and off, to navigate between pages, or to choose one
option from among a related set of options. For example, a button can:
◆ take the user to another page or a Web site.
Figure 1
Buttons are used to provide choices and control actions
Chapter 10 Working with buttons and hotwords 214
1 Click the Catalog button on the Instructor toolbar to open the Cata-
log.
2 In the Catalog, explore the categories that contain buttons.
5 In the Properties for Button dialog box, select or enter the properties
you want.
1 From the tool palette, choose the button tool of your choice.
2 Click on your page and drag the cursor until the button is the
desired size.
2 Click one or more tabs and select or enter the options you want to set,
as described in the table below.
Using OpenScript
You can specify a variety of button border styles using the Properties for
Button dialog box or OpenScript.
None none
Pushbutton pushbutton
Command commandbutton
Rectangle rectangle
Rounded rounded
Shadowed shadowed
1 Select the button, and then click the Properties button on the Instructor
toolbar.
2 Click the Font tab in the Properties for Button dialog box.
3 Choose the font, style, size, effects, and other options you want.
4 Optional. Close the Properties for Button dialog box.
Tip Because text doesn’t wrap in a button caption, you might need
to resize a button to encompass its caption. For multiple lines of
text, use a field instead of a button.
You can also specify an access key for a button, which appears as an
underlined character in the button’s caption. An access key allows a user
to achieve a button click via the keyboard. The user can either click the
button with the mouse or press the ALT key in combination with the
underlined character in the caption. To set the access key, type an
ampersand (&) before the letter you want to use as the access key. For
example, to create the caption Style, where e is the access key, type Styl&e.
Creating hyperlinks
Hyperlinks allow you to connect information in a variety of ways. For
example, you can define a hyperlink that navigates to or pops up a
related page to display more information about a topic. You can also
define special effects for hyperlinks. For example, when the link goes to
another page, you can specify a transition effect. When the link pops up
Chapter 10 Working with buttons and hotwords 222
another page, you can select a style for the pop-up window. In addition,
you can create links that navigate to a URL on the Internet or an intranet.
4 Under Link to, select or enter the page or URL option you want.
5 Optional. Do one of the following:
◆ Specify a style for the hyperlink’s pop-up window. These settings are
available only when you choose Pop up another page as the type of
link you want to use.
6 Click OK.
For more information about hyperlinks and linking options, see Chapter 6,
“Working with objects.”
Chapter 10 Working with buttons and hotwords 223
Scripting a button
You can write a script specifying how a button should behave using the
script editor. For example, the following script displays a question in a
pop-up dialog box and responds to a user’s choice:
Note Keep in mind that you should not write scripts for
objects if you plan to export your book to DHTML.
to handle buttonClick
request "Do you want to continue?" with Yes or No
if it = yes
go to next page
end if
end buttonClick
Like any other object, buttons can be grouped. You can write a script that
sets the behavior of individual buttons and the behavior of the group. For
example, you might create several buttons and write a script for each that
defines the behavior of a specific tool. You could then group the buttons
into a tool palette and write a script to define different aspects of the
group’s behavior, such as the default location of the palette.
For details about using OpenScript to define button behavior, refer to the
Programming in OpenScript online book.
Chapter 10 Working with buttons and hotwords 224
For details about using the Actions Editor to add interactive behavior
to your applications, see Chapter 15, “Using the Actions Editor,” and
Chapter 16, “Creating action sequences: Practical examples.”
You can assign a graphic to a button state using the Properties for Button
dialog box. Alternatively, you can add a graphic to a button by dragging
a graphic object from the Catalog to the button. You can also use
OpenScript to define this property. You can assign as many as four
different graphics to a button (one for each of the four button states).
Chapter 10 Working with buttons and hotwords 225
Using OpenScript
◆ To apply a graphic to a button, set the checkedGraphic, disabledGraphic,
invertGraphic, or normalGraphic property of a button to a bitmap,
cursor, or icon resource. For example:
Use chromakey
Figure 2
The Use chromakey option
Chapter 10 Working with buttons and hotwords 228
1 In the Properties for Button dialog box, click the Graphics tab.
2 Under Button graphics, select the button state (Normal, Invert, Disabled,
or Checked) containing the bitmap in which you want to create a
transparent area.
Portions of the bitmap resource that match this color value become
transparent.
Figure 3
Caption position is relative to the button graphic
Chapter 10 Working with buttons and hotwords 229
About hotwords
Hotwords are special areas of text that you can create within fields. You
can make a hotword from any group of characters in a field. For example,
a hotword can be a few characters, a word, a phrase, a sentence, or all
the text in a field. Several hotwords can appear in the same sentence, but
no two hotwords can overlap. Inline graphics can also be hotwords.
Hotwords function much like buttons, except that they are part of the text
of a field. At Reader level, a user can click a hotword to navigate or
perform some other action. The user can easily identify a hotword because
the pointer changes to a hand when it is paused over a hotword.A
hotword generates events and sends messages to other objects.
Tip You can create hotwords that play media using
a special media player object from the Catalog.
1 Select the text or inline graphic that you want to make into a hotword.
2 Choose Create Hotword from the Text menu, or press CTRL+H.
3 With the hotword still selected, from the Object menu, choose
Hyperlink, or press CTRL+SHIFT+H.
4 In the Hyperlink box, specify the type of link and the link destination,
and then click OK.
5 Press F3 to go to Reader level, and then click the hotword to test the
hyperlink.
Using OpenScript
1 Select the hotword, and then click the Properties button on the Instruc-
tor toolbar.
2 Select one or more options to set the hotword’s properties:
A hotword must contain at least one character. You can format hotwords
just as you format other text. For details about formatting text, see
Chapter 8, “Working with text.”
Using OpenScript
◆ Use the book’s hotwordStyle property to set all hotwords in a book to a
color, add a border, or to have no style attributes. The default value of
hotwordStyle is color:
◆ Use the hotwordStyle property of the hotword to set a different style for
that hotword:
Editing hotwords
You can select and edit a hotword just as you edit other text in Instructor.
When you edit hotword text, use these guidelines:
◆ If the insertion point is within a hotword, any additional characters you
type become part of the hotword.
◆ Text you paste into a hotword becomes part of the hotword.
◆ If you select a hotword and include text that is not part of the hotword
in the selection, Instructor treats the selection as text, not as a hotword.
◆ You can delete a hotword by using the BACKSPACE key or the DELETE
key. As long as one character of the hotword text remains, the
hotword’s object properties (such as hyperlinks) remain. Instructor
discards the hotword as an object when the last character of the
hotword is deleted.
Chapter 10 Working with buttons and hotwords 233
To make hotword editing easier, you can choose Show Hotwords from the
View menu to display all the hotwords on a page. Alternatively, send the
OpenScript showHotwords message.
Removing hotwords
You can remove a hotword by changing it into regular text.
1 Place the insertion point in the hotword or select any part of it.
Using OpenScript
◆ To remove a hotword, send the removeHotword message:
You can display multiple choices for your users with a list box,
which is a type of field in ToolBook Instructor, or with a combo
box object. This chapter describes how to create and format list
boxes and combo boxes in your application.
I N THIS CHAPTER
About list boxes and combo boxes 236
Creating list boxes 238
Setting list box properties 240
Adding text to a list box 243
Creating combo boxes 244
Setting combo box properties 246
Adding text to combo boxes 248
Determining user selection 249
Chapter 11 Working with list boxes and combo boxes 236
Figure 1
List box with a scroll bar
Most of the time, you’ll create a list box using a text field rather than a
record field. But if you have a similar list on several pages with the same
background, you can create a list box from a record field.
Chapter 11 Working with list boxes and combo boxes 237
A combo box has three parts: a single-line edit box, a pushbutton, and
a drop-down list box. When the user clicks the pushbutton, the drop-
down list appears. Users can type in the edit box or select an item from
the drop-down list. The edit box displays the currently selected item.
When the user selects an item in the drop-down list, the list box is hidden
and the newly selected item appears in the edit box. By default, users
cannot enter text in combo boxes at Reader level; that is, the user can
only select the items in the drop-down list. You can also create a combo
box that can be edited by the user. In this case, the user can click an
insertion point in the edit box and type any entry.
Figure 2
Combo box
◆ the set of choices is too large for radio buttons or check boxes.
◆ space is tight, making radio buttons and list boxes impractical.
1 Click the Catalog button on the Instructor toolbar to open the Catalog.
2 In the Catalog, select the Text Fields category.
1 From the tool palette, choose the single-select list box tool.
2 Click in the main window and hold down the mouse button while you
drag to draw the list box.
◆ To make a field into a list box, set the fieldType property to either
singleSelect or multiSelect. For example:
1 Select the list box, and then click the Properties button on the Instructor
toolbar.
2 Click one or more tabs and select or enter the options you want to set,
as described in the table on the next page.
Chapter 11 Working with list boxes and combo boxes 241
Single-select Multi-select
list box list box
Figure 3
Single-select and multi-select list boxes
1 Click the Draw tab of the Properties for Text Field dialog box.
2 In the Field type list, select Multi-select list box.
Note Text does not wrap at the ends of lines in a list box. If you
want to type in more text than fits on a line, you must first resize
the list box.
Using OpenScript
◆ You enter text in a list box by setting the text property of the field.
Separate the items in the list with a carriage return/linefeed (CRLF).
For example:
◆ You can also use textline to set each item in the list separately:
You can also paste text from the Clipboard into a list box.
2 Double-click inside the list box into which you want to paste the text.
An insertion point appears.
3 From the Edit menu, choose Paste, and then click outside the list box.
Note If the text you paste is too long to fit the list box, Instructor
displays as much text as possible. You cannot scroll to see missing
text, but if you resize the list box, the text becomes visible. You can
also set the OpenScript property borderStyle to scrolling.
For details about working with text in fields, see Chapter 8, “Working
with text.”
1 Click the Catalog button on the Instructor toolbar to open the Catalog.
2 In the Catalog, select the Text Fields category.
3 Drag a combo box onto your page.
2 Click in the main window and hold down the mouse button while you
drag to draw the combo box.
The box you draw will include both the edit box and the pushbutton.
Edit box
Pushbutton
◆ Use the draw command to draw the combo box and the lineCount
property to set the height of the drop-down list. For example:
2 To specify the behavior of the combo box at Reader level, click the
Behavior tab, and then select one or more of the following options:
◆ Enable the combo box Specifies whether the combo box can
receive the focus and mouse-event messages at Reader level.
Combo boxes are enabled by default.
◆ Make the combo box editable Allows a user to edit the combo
box at Reader level.
3 Click one or more of the other tabs and select or enter the options you
want to set.
4 Optional. Close the Properties for Combo Box dialog box.
Chapter 11 Working with list boxes and combo boxes 248
Using OpenScript
◆ You can use the scrollable, sortItems, editable, lineCount, and enabled
properties to format your combo box:
Using OpenScript
◆ Use the dropDownItems property to add items to the drop-down list. If
you want default text to appear in the edit box, use the text property:
Conditional
expression
Action
Figure 4
Using an action sequence to determine the user selection
Chapter 11 Working with list boxes and combo boxes 251
to handle buttonClick
--Make sure a line is selected in the single-select list box
choice = selectedTextlines of field "list"
if choice < > null
--Gets the text of the selected list
vHighlightedText = textline choice of text of field "list"
request vhighlightedText
end if
end buttonClick
When the user selects an item, the current value of the edit box (the
contents of the text property of the combo box) is discarded and replaced
with the user’s choice. If you want to preserve the old value, save it
before the selectChange message is sent. One option is to store the old
value as a user property of the combo box when the user presses the
combo box’s pushbutton and the enterDropDown message is sent. For
example, put both of these handlers in the script of a combo box:
to handle enterDropDown
saveText of self = text of self
end enterDropDown
--Adds the old value of the edit box to the drop-down list
to handle selectChange
vText = dropDownItems of self
if (saveText of self & CRLF) is not in (vText & CRLF) then
--If value is not already in drop-down list, adds it
dropDownItems of self = vText & CRLF & saveText of self
end
end
Chapter 11 Working with list boxes and combo boxes 253
You can also use the selectedItem property to determine the selected item
by position number in the combo box. Use this script in the combo box to
determine what the user has selected:
to handle enterDropDown
--Creates a user property to save value of initial selected item
my oldSelectedItem = my selectedItem
end
to handle leaveDropDown
--oldSelectedItem is a user property of the combo box
--and is set in an enterDropDown handler
conditions
when my selectedItem > my oldSelectedItem
send greaterItemChosen
when my selectedItem < my oldSelectedItem
send lesserItemChosen
else
send sameItemChosen
end conditions
end leaveDropDown
Creating a quiz
using question objects
I N THIS CHAPTER
About question objects 255
Working with question objects 256
Question objects in action 258
Scoring questions 263
Specifying feedback 265
Chapter 12 Creating a quiz using question objects 255
There are many types of question objects available from the Catalog. You
can customize their appearance and behavior or use them as they are
provided and simply add your own content.
1 If the Catalog is not already open, from the View menu choose Catalog.
Figure 3
The Properties for Question dialog box
Chapter 12 Creating a quiz using question objects 257
The Properties for Question dialog box differs slightly for each type of
question object, but most question objects allow you to specify:
◆ how many times the student can try to answer the question.
◆ the options for assigning a score to the question.
◆ Select Score this question, specify the weight of an answer, and then
specify the scoring options you want.
Chapter 12 Creating a quiz using question objects 258
6 Click the Immediate Feedback tab, and then specify the feedback that
occurs at the time a user responds to a question.
7 Click the Delayed Feedback tab, and then specify the feedback that
occurs at a later (delayed) time.
8 Click OK.
Figure 4
A question created using an arrange-objects object
Figure 5
A question created using a drag-objects question
Figure 6
A question created using a drop-target object
Figure 7
A question created using a fill-in-the-blank object
Figure 8
A question created using a match-items object
Figure 9
A question created using a multiple-choice object
Figure 10
A question created using an order-text object
Scoring questions
In addition to indicating which answer is correct, you can specify that a
question object calculate a student’s score. You can report the score to
the student at the end of the book or record the score in a log file. A log
file is a text file that includes information such as the student’s score,
response to each question, and time spent working on the page. You
specify options for a log file in the Properties for Lesson dialog box, which
is available from the Object menu. You can also have Instructor report
the score to a learning management system which can maintain the
student’s score in a database for administrators to examine later.
At its simplest, scoring is a tally of the questions the student has answered
correctly. For more flexibility, you can assign different point values to
different questions. You can also assign a weight to each correct answer
by specifying a correctness factor within any question object. You can
subtract points from the student’s score for incorrect answers, and you
can limit the number of times a user attempts to answer the question.
➤ To enable scoring:
3 In the Properties for Question dialog box, click the Scoring tab.
4 Select the Score this question check box.
You display a student’s score in your application using the Show Score,
Score Page, and Score Quiz buttons available from the Scoring and
Tracking category in the Catalog. These buttons are preprogrammed to
calculate the score for an individual question object or for several question
objects. You can use a scoring button in combination with a score field
to display the score to the user. Score fields are also available in the
Evaluation category of the Catalog.
You can modify the weights in the Properties for Question dialog box.
You can assign a negative weight to an incorrect answer, making the
incorrect answer penalize the score for the question until it is either zero
or the minimum score for the question, whichever is lower. For example,
with a multiple-choice/multiple-correct question, incorrect answers may
have a negative weight that cancels correct answers. The Automatic
check box on the Scoring tab makes this negative weight assignment
automatic.
Chapter 12 Creating a quiz using question objects 265
For question objects that can recognize only a single answer at a time,
such as a fill-in-the-blank or rating-by-multiple-choice question object,
you can assign a higher weight to the most desirable answer and a lower
weight to the other answers. For example, if your application solicited an
opinion with a question such as “Please rate the service at our hotel,” you
might use a rating-by-multiple-choice object with three possible answers,
weighted as shown below.
Excellent 100%
Average 50%
Poor 0%
Specifying feedback
With question objects, you can specify feedback, which is how the object
responds when the student interacts with it. For example, when a student
chooses the correct answer for a multiple-choice question, the question
object can display the message “Correct.”
Types of feedback
Instructor provides several types of feedback that you can specify
for question objects. For example, you can:
You can combine these methods and use more than one type of feedback
in response to the user’s choice. For example, you can both play a sound
file and display text in a pop-up window when the user selects the correct
choice in a multiple-choice question. If you specify more than one feed-
back option, they are executed in the order in which they appear in the
bullet list above. In the example given, the student would hear the sound
and then see the text in the pop-up window.
1 Select the question object, and then click the Extended Properties
button on the Instructor toolbar.
2 Click the Immediate Feedback tab.
5 Specify one or more of the following feedback types (the object activates
the feedback in this order):
◆ Play media clip Click the Select Clip button to specify a wave
audio (WAV) file or media clip for Instructor to play.
◆ Feedback text Click the Edit Text button to specify text for
Instructor to display in a pop-up window or in a text or record field
named Feedback that appears on the current page or background.
You can hide and show objects and animate objects to add visual
effects to your book. Hiding and showing objects is a simple way to
add interactivity, and animation can effectively demonstrate change
over time or illustrate a chain of events. This chapter describes how
to hide, show, and animate objects using the ToolBook Animation
Editor, the Actions Editor, and OpenScript.
I N THIS CHAPTER
Creating visual effects 273
Hiding and showing objects 273
Animating Instructor objects 277
Playing an animation at Reader level 282
Modifying an animation in the Animation Editor 287
Chapter 13 Hiding, showing, and animating objects 273
To create hide-and-show behavior, you can use an action trigger from the
Catalog. You can also use the Actions Editor to create an action sequence
to hide and show objects. One advantage of hiding and showing objects
in an action sequence is that you can closely control how the effect fits
into your overall lesson design. For example, you can hide or show an
object as part of a longer sequence of actions, all activated by the same
event. You can also create conditional expressions and loops that deter-
mine when an object is hidden or shown.
Chapter 13 Hiding, showing, and animating objects 274
1 If the Catalog is not open, from the View menu choose Catalog.
2 Click the Draw Objects category and drag an ellipse object onto your
page.
3 From the Action Objects category, drag two action triggers onto
your page. Arrange the three objects on your page so that none are
overlapping.
4 Select one of the action triggers, and then click the Extended Properties
button on the Instructor toolbar.
5 In the Properties for Action Trigger dialog box, under Objects to trigger,
click Add. In the Add an Object dialog box, do the following:
A In the Select object list, select the ellipse.
B Under Perform what action, choose Hide.
C Click OK.
6 In the Properties for Action Trigger dialog box, under Trigger on what
event, do the following:
A Select the When clicked check box, and clear the When entering
page check box.
Chapter 13 Hiding, showing, and animating objects 275
B Select the Button is visible at reader check box, and clear the Loop
continuously check box.
C Click OK.
7 Select the second action trigger, and then click the Extended Properties
button on the Instructor toolbar.
8 In the Properties for Action Trigger dialog box, under Objects to trigger,
click Add. In the Add an Object dialog box, do the following:
A In the Select object list, select the ellipse.
B Under Perform what action, choose Show.
C Click OK.
9 In the Properties for Action Trigger dialog box, under Trigger on what
event, do the following:
A Select the When clicked check box, and clear the When entering
page check box.
B Select the Button is visible at reader check box, and clear the Loop
continuously check box.
C Click OK.
10 Switch to Reader level (press F3) to test your hide-and-show sequence.
3 In the Event list, select an event that activates the action sequence (for
example, On click or On load page).
4 From the Insert menu in the Actions Editor, point to Action, point to
Object, and then choose Set Property.
5 In the Properties for Action dialog box, do the following:
A In the Select the object for which to set the property list, select the
object you want to hide or show; or, drag the Choose object button
over the object to select it.
7 From the File menu in the Actions Editor, choose Update Actions
& Close.
8 Switch to Reader level (press F3) to test your sequence.
For more information about using the Actions Editor to create action
sequences, see Chapter 15, “Using the Actions Editor,” and Chapter 16,
“Creating action sequences: Practical examples.”
Chapter 13 Hiding, showing, and animating objects 277
◆ You can show and hide a series of objects in a stack, each of which is
a slight variation of the same image:
to handle buttonClick
step ctr from 1 to 6
if ctr < 6 then
show ellipse ("ellipse" & (ctr + 1)) --Shows next view
end if
hide ellipse ("ellipse" & ctr) --Hides the current one
pause 20
end step
show ellipse ("ellipse1") --Restores first view
end buttonClick
A B C D E F G H I
Figure 1
ToolBook Animation Editor
Chapter 13 Hiding, showing, and animating objects 279
1 Optional. In the main window, select the object you want to animate.
2 From the Object menu, choose Path Animation.
To create a path animation in the Animation Editor, you use the mouse to
draw the path you want the object to follow. A path consists of segments
connected by vertices. You can create a path animation that moves an
object while the object changes size. In addition, you can create multiple
animations for an object that you can trigger using an action trigger from
the Catalog, using a command you create in the Actions Editor, or using
OpenScript. When you are finished drawing the path, Instructor compiles
information about the path and stores it as a property of the object.
Object
Segment
Vertex
Figure 2
Creating a path animation
Chapter 13 Hiding, showing, and animating objects 280
➤ To test an animation:
◆ Click the Run button in the Animation Editor. Alternatively, use the
slide bar at the bottom of the Animation Editor to step through an
animation sequence.
Figure 4
Six cels from a cel animation
After creating all of the individual cels, you arrange them on top of each
other in the correct consecutive layer order and then group them. When
you play a cel animation, Instructor shows and hides the cells from first
to last, over and over.
6 Click the Properties button on the toolbar, and in the Properties for
Group dialog box, assign a name to the group. If you do not assign
a unique name to the group, you will not be able to trigger your
animation from the Properties for Action Trigger dialog box or from
the ToolBook Actions Editor.
7 Select the group, and then choose Path Animation from the Object
menu.
Chapter 13 Hiding, showing, and animating objects 282
➤ To test an animation:
◆ Click the Run button in the Animation Editor. Alternatively, use the
slide bar at the bottom of the Animation Editor to step through an
animation sequence.
You can also use the Actions Editor to create an action sequence that
triggers or resets an object’s path or cel animation. One advantage of this
method is that you can set the animation to occur as part of a longer
sequence of actions, all activated by the same event. You can also create
conditional expressions and loops that determine when, and how many
times, an animation plays.
Alternatively, you can use OpenScript to play and stop a path animation.
Chapter 13 Hiding, showing, and animating objects 283
Figure 4
The Properties for Action Trigger dialog box
You can also specify whether you want the action trigger to be visible at
Reader level. At Reader level, the animation will either play automatically
when entering the page, or interactively when the user clicks the action
trigger, depending on what you have specified.
Chapter 13 Hiding, showing, and animating objects 284
1 Open the Catalog and drag an action trigger onto the same page as the
animation you’ve just created.
2 Select the trigger, and then click the Extended Properties button on the
Instructor toolbar.
3 In the Properties for Action Trigger dialog box, under Objects to trigger,
click Add. In the Add an Object dialog box, do the following:
A In the Select object list, select the object for which you created the
animation.
4 In the Properties for Action Trigger dialog box, under Trigger on what
event, do the following:
A Select the When clicked check box, and clear the When entering
page check box.
B Select the Button is visible at reader check box, and clear the Loop
continuously check box.
C Click OK.
5 Switch to Reader level (press F3) to test your animation.
Chapter 13 Hiding, showing, and animating objects 285
4 From the Insert menu in the Actions Editor, point to Action, point to
Media, and then choose Play Media.
The Properties for Action dialog box appears.
5 In the Select the media type list, select Animate an object.
6 In the Select an object to animate list, select the object for which an
animation has been created; or drag the Choose object button over the
object to select it.
7 Click OK.
8 From the File menu in the Actions Editor, choose Update Actions
& Close.
9 Switch to Reader level (press F3) to test your animation.
Chapter 13 Hiding, showing, and animating objects 286
◆ To move the object one step along its animation path, send the
playStep message:
Because Instructor sends the playStep message to the object for each step
of the animation, you can write a handler to modify the animation as it is
running. Be sure to forward the playStep message if you want the object
to continue on its path:
(continued)
--Monitors the animation at each step. When the animation is
--half completed, plays a .wav file.
to handle playStep
system halfway --Variable set earlier when animation began
system soundAlreadyPlayed
if anim_elapsedTime of target > halfway then
if soundAlreadyPlayed = false then
mmPlay clip "chimes"
soundAlreadyPlayed = true
end if
end if
forward
end playStep
Modifying an animation
in the Animation Editor
After you create an animation and play it at Reader level to see how it
works, you can modify it using the Animation Editor. For example, you can:
Selecting an animation
Before you can modify an animation or its animation settings, you must
select the animation you want to edit. There are two ways to select an
animation: either in the main window before you open the Animation
Editor, or from within the Animation Editor.
2 Click the object you want to select in the main window of the
Animation Editor.
3 In the Select Object dialog box, do the following:
A In the Object to animate list, select the name of the object or group
to animate.
You can click the Select Object button to open the Select Object dialog
box, where you can select an object to edit.
Chapter 13 Hiding, showing, and animating objects 289
1 Open the Animation Editor and select the animation whose options
you want to edit.
2 Click the Animation Settings button.
I N THIS CHAPTER
About digital media 291
Choosing a media player 291
Using the Universal Media Player 294
Using other media players 301
Creating and managing clips 305
Chapter 14 Adding audio and video files 291
If you plan to deliver pages via the Internet by exporting your book to
DHTML, use Internet-compatible file formats when choosing media
elements.
If you will distribute your application as a native ToolBook file that users
can view with the Neuron browser plug-in, you can expect the media
elements that you include to perform just as they do in Instructor.
Universal Most currently Works the same Will not display some
Media Player available digital when exported still image formats
video, audio, and to DHTML as in
streaming media ToolBook runtime
formats
Programmable
using the Actions
Editor visual
programming tool
Has a single,
consistent authoring
interface, which
makes it easy to
learn and use
Media players Specific audio, Allow you more To play certain types
digital video, and control over the of media files, users
still image files, appearance of must load the proper
as listed in the the object on the software drivers on
Catalog description* page in ToolBook their computers
runtime
Allow limited
programming with the
Actions Editor visual
programming tool
* Will play other file formats if you install proper MCI software drivers
(continued)
Chapter 14 Adding audio and video files 293
Video players AVI files (digital Allow you more To play certain types
video)* control over the of media files, users
appearance of the must load the proper
object on the page software drivers on
in ToolBook runtime their computers
Allow limited
programming with the
Actions Editor visual
programming tool
Allow limited
programming with the
Actions Editor visual
programming tool
Chapter 14 Adding audio and video files 294
Windows Media Player Audio files: *.aif, *.aifc, *.aiff, *.mid, *.midi,
*.rmi, *.wav
MP3 files: *.mp3, *.mpa, *.m3u
MPEG files: *.mpg, *.mpeg, *.m1v, *.mp2
QuickTime files: *.mov, *.qt
Video files: *.avi
Windows Media files: *.asf, *.asx, *.wm,
*.wma, *.wmv, *.wax
RealPlayer Animated GIF: *.gif
Audio files: *.aa
Flash and Shockwave files: *.swf
Graphic files: *.gif, *.jpeg, *.jpg, *.png
MP3 files: *.mp3, *.dat
MP3 Playlist files: *.m3u, *.pls
RealMedia files: *.ra, *.rm, *.rmj
RealMedia metafiles: *.ram, *.rmm, *.rpm
RealPix files: *.rp
RealText files: *.rt
RealText3D files: *.r3t
SMIL files: *.smi, *.smil
Chapter 14 Adding audio and video files 295
You can find the Universal Media Player in the Media Players category of
the Catalog.
3 Drag the Universal Media Player from the object pane, and then drop it
onto your page.
1 Select the Universal Media Player object, and then click the Extended
Properties button on the toolbar.
The Properties dialog box appears.
B Select Periodic.
C Type a value for the intervals between the time markers.
3 Click OK.
Chapter 14 Adding audio and video files 297
1 Select the Universal Media Player object, and then click the Extended
Properties button on the toolbar.
The Properties for Universal Media Player dialog box appears.
— Click Play, and as the file plays, set a time marker at the current
position in the media file by clicking Add time marker.
— Select the field under Marker Time, press CTRL+ENTER (or right-
click and select New Time Marker), and then replace Enter Marker
with a time in milliseconds or a frame number that corresponds
with a position in the media file.
D Optional. Enter descriptive text in the Comment field.
Tip To set several time markers at once, play the media file and,
while it is playing, click Add time marker as the player reaches the
positions of interest in the media file. Once you have set the time
markers, you can go back to insert comments or edit the individual
time markers.
1 Select the Universal Media Player object, and then click the Actions
button on the toolbar.
4 In the Actions Editor, from the File menu, choose Update Actions
& Close.
Chapter 14 Adding audio and video files 299
You can also create an action sequence that responds with different
behavior depending on which time marker generated the media
timing event.
In the Actions Editor, you can distinguish one media timing event from
another by creating a conditional expression that compares whether the
parameter sent with the event is equal to a specific value (such as 1050).
In this way, you can respond to multiple media timing events in one
action sequence.
1 Select the Universal Media Player object, and then click the Actions
button on the toolbar.
The Actions Editor appears.
If the Properties for Condition dialog box does not appear, click the
Properties button on the Actions Editor toolbar.
5 Do the following:
A In the Select the type of item to insert list, select Variables and
parameters; in the Select a variable or parameter list, select
mediaPosition.
B Insert the cursor at the end of the expression and type = (the equal
symbol), and then type in the value of your first time marker.
C Click OK.
6 Select the conditional expression you just created, and then create an
action or series of actions that Instructor runs if that condition is true.
7 Repeat steps 3 through 6 until you have created a sequence of actions
to handle each time marker event that you defined.
8 From the Actions Editor File menu, choose Update Actions & Close.
Figure 1
Handling multiple media timing events in an action sequence
Chapter 14 Adding audio and video files 301
➤ To draw a stage:
Using OpenScript
◆ Use the draw command with the stage object type, followed by the
bounds, and then assign the stage a name using the name property.
For example:
◆ display area, which sets the size and position of visual media clips in
a stage.
◆ transition effects, which determine the effect before and after a visual
media clip plays.
Creating clips
A clip is defined by a file name or media source and start and end points.
For example, a clip’s start and end points could define the clip as the
third song on a music CD or the first 20 frames of a digital video file. A
clip could also reference an entire file.
➤ To create a clip:
1 Do one of the following to open the Clip Manager dialog box:
◆ From the Object menu, choose Clips.
◆ From the Extended Properties dialog box of the media player,
click Choose a Clip. In the Choose Media Clip dialog box, click the
Clips button.
2 Click New to open the Choose Source Type dialog box, select the type
of multimedia you want, and then click OK.
If you are creating a clip from a file, the Choose Source File dialog
box appears. Navigate to and select the file you want to use, and then
click OK.
Chapter 14 Adding audio and video files 306
3 In the Clip Editor, type a name for the clip you’re creating in the Clip
box.
4 On the Timing and Options tabs, adjust the settings that apply to your
clip, such as volume control, start and end points, and palette options.
5 Click OK to close the Clip Editor.
6 Repeat steps 2 through 5 until you have finished creating clips.
7 Click Close to close the Clip Manager.
Note Start and stop position settings for a clip are not supported in
an exported DHTML application. If you export your book to DHTML,
the entire media file will play in a Web browser.
Chapter 14 Adding audio and video files 307
Opens the
Choose Media Clip
dialog box
Opens the
Clip Manager
dialog box
Figure 2
Creating a clip
Chapter 14 Adding audio and video files 308
Using OpenScript
You can write and execute OpenScript code using the script editor
or Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript
online book.
◆ Create a new clip using the new clip command. Set the beginning point
using mmBeginPoint, the ending point using mmEndPoint, and the
media search path Instructor will use to locate the media source file
using mmSearchHD and/or mmSearchCD:
Managing clips
In Instructor, only a reference to a clip is stored in your application; the
actual digital data remains stored in the original media source file. When
you add a clip to your application, Instructor keeps track of the location
of that clip and includes it when you package your book for distribution.
If you add a clip to your application and then delete or move the original
file, the clip will not play. Therefore, you will want to take care when
organizing any media clips you add to your Instructor application.
Tip Remove a clip from your book if you are not using it. Removing
unused clips will reduce the size of your application file. Be certain,
however, that a clip you remove is not referenced in any script. If
you remove a clip that is referenced in a script, you will get an
error message when the script attempts to access the clip.
Chapter 14 Adding audio and video files 309
➤ To manage clips:
1 From the Object menu, choose Clips to open the Clip Manager.
2 In the Available clips list, select the clip you want to work with.
Using OpenScript
◆ Remove a clip using the remove resource command:
Figure 3
The Clip Manager dialog box
File organization becomes especially important when you are setting the
media search paths for your book. Although we recommend a structure in
which your media files are contained in a subdirectory of your book files
(for example, Books\Media), Instructor is able to adapt to almost any
orderly, consistent organization.
When you create a new clip, Instructor checks the source file path against
the existing media search paths and removes the portion of the clip’s
path that is already in the search paths. (By default, the current book’s
path is included in the hard disk search path.) If you store the full path
with the clip when you create it but decide later to make the clip path
independent, you can change the links to the clip’s source file using the
ToolBook AutoPackager. For more information about using the
AutoPackager, see Chapter 21, “Preparing native ToolBook applications
for release.”
When you are ready to distribute your application, you can specify that
the media search paths match the directories in which users will install
your application. Instructor stores media path information in two book
properties and three clip properties.
C:\Books\Bells.wav
C:\Books\AVI\Bells.wav
C:\Books\WAV\Bells.wav
Instructor uses the same search process if mmSearchCD is true but extracts
search paths from CDMediaPath instead of from HDMediaPath. (If both
mmSearchHD and mmSearchCD are true, the paths in HDMediaPath are
searched first.)
There are two very important special values that you can use for
HDMediaPath and CDMediaPath: <BookPath> and <CDROM>.
Similarly, if the media search path contains the string <CDROM>, Instructor
searches all of the CD-ROM drives on the user’s computer. If the user has
more than one CD-ROM drive, Instructor will search them all. This is the
simplest way to handle media paths on a CD-ROM drive.
Both the <BookPath> and <CDROM> special values can be combined with
additional path information, as in the following examples:
<CDROM>Media
<BookPath>\Media
<CDROM>\Media
<BookPath>Media
1 From the Object menu, choose Clips to open the Clip Manager.
2 Click the Media Paths button to open the Media Paths dialog box.
Chapter 14 Adding audio and video files 316
◆ To add the current book’s path, click Add Book Path. Instructor adds
<BookPath> to the search path, which is automatically interpreted as
the path of the current book (the TBK file).
◆ To add the current CD-ROM path, click Add CD-ROM Path. Instructor
adds <CDROM> to the search path.
Using OpenScript
◆ To add a path to the HDMediaPath or CDMediaPath book property, use
the push command:
Adding behavior
with action sequences
This part of the ToolBook Instructor User Guide introduces the Actions
Editor visual programming tool. In these chapters, you will learn the basic
concepts you need to know to use the Actions Editor. You will also receive
step-by-step instructions for creating sample action sequences that add
interactive behavior to your Instructor applications.
I N THIS PART
Chapter 15 Using the Actions Editor
Chapter 16 Creating action sequences: Practical examples
Chapter 15
I N THIS CHAPTER
About action sequences 319
Choosing when to create action sequences 321
Opening the Actions Editor 323
Creating action sequences using the Actions Editor 324
Creating and using shared action sequences 341
Managing action sequences 349
Chapter 15 Using the Actions Editor 319
In Instructor, you create action sequences using the Actions Editor. The
Actions Editor is a tool for visual programming—that is, you specify
behavior using an interface that features familiar elements such as menus
and a toolbar.
You can create action sequences to program the behavior of any object
you add to your Instructor application. An action sequence for an object
responds to a specific event. In Figure 1, the event handled by the action
sequence for the button is a button click.
Chapter 15 Using the Actions Editor 320
Figure 1
Action sequence for an object
Chapter 15 Using the Actions Editor 321
You can also create shared action sequences. A shared action sequence
is not linked to a specific event and does not belong to any individual
object. Instead, you can use a shared action sequence to assign the same
behavior to multiple objects. A shared action sequence is stored under a
unique name that you assign and is available to be executed as part of
any other action sequence. For more information, see “Creating and using
shared action sequences,” later in this chapter.
Choosing when to
create action sequences
Action sequences that you build in the Actions Editor work in both native
ToolBook applications and exported DHTML applications. In Instructor,
there are other tools you can use to create interactive behavior as well.
For example, many Catalog objects have predefined behaviors that may
meet your needs. You can also use OpenScript to create and refine
behavior for objects if you do not plan to export your book to DHTML.
Chapter 15 Using the Actions Editor 322
— Select the object, and then click the Actions button on the Instructor
toolbar.
— Right-click the object, and then click the Actions button on the
toolbar of the right-click menu.
— Select the object, and then press F5.
Object type Object name
Action sequence
Actions palette
Figure 2
The Actions Editor
Chapter 15 Using the Actions Editor 324
Hide button
Figure 3
The actions palette
You can resize or close the actions palette. If you close the actions
palette, you can select actions from the Insert menu of the Actions Editor.
Choosing an event
Action sequences for objects handle specific events. You can create an
action sequence for each event supported by an object. For example, a
button might have one action sequence to handle a click and a different
action sequence to handle a right-click. You specify the event for which
you want to create an action sequence by selecting it from the Event list
in the Actions Editor.
Chapter 15 Using the Actions Editor 327
Figure 4
Opening the event list
The list of available events depends on the object and includes only
events appropriate for the object. For example, since editable fields do
not respond to mouse events, the On click and On double-click events
are not available.
Some events (a button click, for example) are initiated by users as they
interact with your Instructor application. Other events you create using
commands available on the Actions Editor menus; these include Send
User Event, Trigger, Set Property, and Reset.
Chapter 15 Using the Actions Editor 329
Most events are generated as a result of the user performing some action,
or as the result of some change in the system. You can also send a
generic event called User event. With the User event, you can send any
data in a single parameter. This data may be in the form of a literal value,
variable, or expression. The User event is generated by the Send User
Event action.
1 From the Insert menu point to Action, point to Object, and choose
Send User Event.
The Properties for Action dialog box appears, if this default option is
set on the Actions tab of the Instructor Options dialog box.
2 Do the following:
A In the Select the object to receive the User event list, select an
object. Or, drag the Choose object button over a named object
to select it.
B Optional. In the Specify a value to pass as a parameter with this
event list, type in a literal value or use the Build Expression dialog
box to create an expression to pass as a parameter with the event.
C Click OK.
1 Select the object that you specified to receive the User event.
3 In the first line of the action sequence, click the name of the event to
open the Event list.
1 Optional. If your action sequence will use variables to store values that
are used in the action sequence, click the Define Variables button on
the Actions Editor toolbar to display the Variables dialog box, define
the variables you plan to use, and then click OK.
3 From the Insert menu, point to Actions, Conditions, or Loops, and then
choose the action you want to insert. Or, you can drag one of the
actions available in the actions palette to the action sequence.
4 Optional. Open the Properties dialog box if it is not already open and
select or enter the properties for the action.
Chapter 15 Using the Actions Editor 331
Actions
Actions add behavior to your application. Some actions are visible to
users. For example, you may choose to play media, display a document,
or set an object property in response to an event; these all affect how the
application appears to the user. Other actions are not immediately visible
to the user and are actions that you can use to control how Instructor
functions. Setting a variable and executing a shared action sequence are
examples of this type of action.
Figure 5
A Properties for Action dialog box
For details about accessing action properties, see “Setting properties for
actions” later in this chapter.
Chapter 15 Using the Actions Editor 332
Conditions
You can insert a condition into your action sequence to respond to a
particular circumstance, such as the state of an object or the selection
a user makes. Inserting a condition creates a conditional structure—a
junction at which Instructor follows one of two or more distinct paths as
it executes the action sequence.
When you insert a conditional If structure, Instructor automatically inserts
an End if statement to indicate the end of the structure. Any subsequent
conditions you insert in the same structure begin with Else if or, for the
final conditional expression, Else. Else is a “catch-all” that covers any
condition not specified in an If or Else if statement. Within this conditional
structure, Instructor carries out only the sequence of actions directly
following the first true conditional expression it encounters. After you
insert a condition in an action sequence, you define the condition in the
Properties dialog box that appears when you click the expression hotword
in the action sequence.
Conditional structures
Figure 6
Using conditions in an action sequence
Loops
You can add a loop to your action sequence to run an action or series
of actions repetitively. A step loop runs the same action or actions
a specified number of times. A conditional loop runs the same action
or actions until a condition is met. For example, if you want to keep
prompting users for input until they provide the correct answer, you
can use a conditional loop.
Chapter 15 Using the Actions Editor 334
Figure 7
The Properties for Step Loop and Properties
for Conditional Loop dialog boxes
— Select the action, and then click the Action Properties button on the
Actions Editor toolbar.
— Click the name of the event on the first line of an action sequence.
— Select the action, and then choose Properties from the Action menu.
Chapter 15 Using the Actions Editor 335
Figure 8
Invalid action
You can also check the validity of all actions in the book at once using
the Validate Actions command: on the Tools menu point to Actions, and
then choose Validate Actions. For more information about valid actions,
see “Validating actions,” later in this chapter.
Chapter 15 Using the Actions Editor 336
Building expressions
When you create an action, you can use an expression in place of a literal
value such as a number or word. In an expression, you can combine
values (variables, object properties, and literal values) using operators
and functions to produce a result.
5
b^2-4*a*c
characters 1 to 5 of userEntry
charCount(userEntry)
Chapter 15 Using the Actions Editor 337
When you are creating an action, you can type an expression anywhere a
value is required. Clicking the Build Expression button displays the Build
Expression dialog box, which helps you create a valid expression. The
elements from which you can build an expression are grouped as follows:
Operators and functions, variables and parameters, object properties, and
special values.
Type an expression
here, or use the lists Checks if expression
below to build an is in correct form
expression
Shows operation
performed by
Inserts selected items
selected item
into expression
Figure 9
The Build Expression dialog box
Object properties
You can use an object property in an expression anywhere you can use
a literal value or variable. In the Build Expression dialog box, you can
select the page and background in which you are working, all named
objects on the page, self, and target. Target refers to the object that first
received the message that generated the event. Self refers to the object to
which the action sequence belongs. The options available in the Property
list change depending on the object you select.
Special values
Special values are variables with system-defined values that are available
in different contexts. For example, the special value pi represents the
trigonometric constant pi (approximately 3.14159).
Chapter 15 Using the Actions Editor 339
Using variables
Variables are named containers that store values that can be modified
while an action sequence runs. In the Actions Editor, you can define two
types of variables: local and global. You can use a local variable only as
part of the action sequence in which you defined it; so, local variables in
different action sequences are unrelated even if you give them the same
name. A local variable is reset to its initial value each time the action
sequence runs.
Global variables may be used by any action sequence. If an action
sequence contains a local variable with the same name as a global
variable, the local variable is used when the action sequence runs.
➤ To define a variable:
1 In the Actions Editor, click the Define Variables button on the toolbar.
The Variables dialog box appears
3 In the Variables dialog box, type the name of the variable, and then
click OK.
Figure 10
The Variables dialog box
Using arrays
You can define an array to store related data in one variable. An array
has a variable name followed by an index in brackets. The index specifies
which element of the array is being referenced. For example, in an array
named city, city[3] references the value stored in the third element of the
array, which could store a value such as “Seattle”.
In the Actions Editor, an array can have only a single dimension. The
array index can be numeric or any string that does not contain a space,
comma, or tab. In the following examples the array index is a string of
characters:
PersonalInfo[“FirstName”]
PersonalInfo[“LastName”]
PersonalInfo[“Age”]
Chapter 15 Using the Actions Editor 341
➤ To define an array:
1 In the Actions Editor, click the Define Variables button on the toolbar.
4 Select the checkbox labeled Make this variable an array, and then
click OK.
You can refer to an element of an array in an expression or in any action
that allows you to set a variable. In actions that allow a variable to be
set, such as Set Variable or Score Pages, you can choose array variables
from a list or you can type in an array name followed by the specific
element in brackets.
This section addresses the differences between the two types of action
sequences and what you need to know to use shared action sequences
in your application.
2 Click New.
You can also use a shared action sequence (like a function) to perform
an operation and return a value to the action sequence that calls it.
When you create a shared action sequence for this purpose, you can
define parameters that the shared action sequence uses to complete the
operation.
Figure 11
Creating a shared action sequence
Chapter 15 Using the Actions Editor 345
2 Click the Define Variables and Parameters button on the Actions Editor
toolbar.
6 Repeat steps 3, 4, and 5 until you have defined all the variables used
in your shared action sequence.
Chapter 15 Using the Actions Editor 346
2 In the Actions Editor, from the Insert menu point to Action, point
to General, and then select Set Return Value.
The Properties for Action dialog box appears.
3 Type in the value to return to the action sequence or use the Build
Expression dialog box to build an expression, and then click OK.
2 Select the action after which you want the shared action sequence
to run.
3 From the Insert menu point to Action, point to General, and then
choose Execute Shared Actions.
4 Do the following:
A In the Select a shared action sequence list, select the shared action
sequence.
Figure 12
Executing a shared action sequence
Chapter 15 Using the Actions Editor 349
Using parameters
When you create a shared action sequence, you can define parameters
that the shared action sequence uses to complete any operations it
performs. When you call the shared action sequence from another action
sequence, you can supply values for those parameters. These may be
literal values, variables, object properties, or expressions. The parameter
list is only enabled if the shared action sequence accepts parameters.
Figure 13
Sending parameters to a shared action sequence
Validating actions
Only valid actions will run at Reader level. When you finish authoring,
you can check the validity of all the actions you’ve created for a group of
objects, a page, a background, or the entire book.
➤ To validate actions:
1 From the Tools menu, point to Actions, and then choose Validate
Actions. (You can also access this command from the Tools menu in
the Actions Editor.)
2 In the Validate actions for list, select the object(s) to check.
An action can be technically valid, but not produce the behavior you
expect. Before you distribute your application, test all action sequences
at Reader level (and/or in a Web browser) to ensure that the actions
perform as you want them to.
Chapter 15 Using the Actions Editor 351
1 From the Tools menu, point to Actions, and then choose Dump Book
Actions. (You can also access this command from the Tools menu in
the Actions Editor.)
2 In the Dump Book Actions dialog box, specify a name and location for
the text file.
3 Click OK.
Chapter 15 Using the Actions Editor 352
----------------------------------------------------------------------
Actions for Button "Calculate" of Page "Commuter calculator"
----------------------------------------------------------------------
Event
-- On click... -------------------------------------------------------
Variables Define local variable "Time" (Initial value: 0)
Figure 14
Actions displayed in a text file
1 From the Tools menu, point to Actions, and then choose Show
Page Actions.
3 Click Close.
Chapter 15 Using the Actions Editor 353
In the Actions Editor, you can select and export specific actions. You can
also import actions and insert them after a selected action in the action
sequence. In the Shared Actions dialog box, you can export an entire
shared action sequence or create a new shared action sequence by
importing actions.
Chapter 15 Using the Actions Editor 354
1 Open the action sequence from which you want to export actions.
2 Select the actions you want to export. To select multiple actions, press
CTRL while you click the actions.
3 From the Actions Editor File menu, choose Export Actions.
1 Open the action sequence into which you want to import actions, or
open the Actions Editor for a new action sequence.
2 Select the shared action sequence you want to export, and then
click Export.
2 Click Import.
3 Select the .tba file you want to import, and then click OK.
5 Optional. Click Edit to make any changes to the new shared action
sequence you imported.
6 Click Close.
Chapter 16
I N THIS CHAPTER
About the examples 357
Using the examples 358
Example 1: Using conditions 359
Example 2: Using variables 367
Example 3: Changing object properties 374
Example 4: Using shared action sequences 379
Troubleshooting action sequences 394
Chapter 16 Creating action sequences: Practical examples 357
◆ Adding actions that display text, change object properties, and send
users to certain pages
◆ Building expressions
◆ Using shared action sequences
For more information about using the Actions Editor to create action
sequences, see Chapter 15, “Using the Actions Editor.”
Chapter 16 Creating action sequences: Practical examples 358
This chapter assumes you are familiar with basic Instructor concepts.
Before you begin, you should feel comfortable switching between Author
and Reader level, adding pages and backgrounds, adding objects to pages
using the Catalog or the tool palette, and using the Properties dialog box
to refine an object’s appearance and behavior.
Since the examples that follow are self-contained, you can complete them
in any order you like. Each example takes between five and twenty
minutes to complete, depending on your level of experience with Instructor
and your knowledge of basic programming conventions. When you finish
an example, you can view the results immediately.
Chapter 16 Creating action sequences: Practical examples 359
1 Start Instructor.
2 On the Welcome tab of the ToolBook Instructor Startup dialog box,
select Walkthrough.tbk, and then click OK.
Note To work with an object in the Actions Editor, you must assign
it a unique name.
Chapter 16 Creating action sequences: Practical examples 361
Figure 1 shows the action sequence applied to the Continue button for
Example 1. Instructor executes the action sequence as follows: First,
Instructor evaluates which one of two radio buttons a user selected.
Depending on the radio button selection, Instructor sends the user to a
specific page. If the user did not select a radio button, Instructor prompts
the user to check a button and try again.
Figure 1
Full action sequence for Example 1
Tip As you work through the following procedures, you can refer
back to Figure 1 for an example of how the action sequence
should look.
Chapter 16 Creating action sequences: Practical examples 362
◆ select an event.
◆ define conditions for behavior.
◆ go to pages in a book.
◆ display a message in a dialog box.
2 On the second page of the Actions Editor Walkthrough book, select the
Continue button.
3 From the Object menu, choose Actions.
Inserting actions
Because you want to send users to two different locations depending on
their radio button selections, you need to determine which button a user
has selected. You can insert a condition to create a conditional expression
that tests user selection.
➤ To insert a condition:
1 From the Insert menu point to Condition, and then select If.
2 If the Properties for Condition dialog box does not open automatically,
click the Properties button on the Actions Editor toolbar.
3 Click the Build expression button at the end of the Condition box to
open the Build Expression dialog box.
4 In the Build Expression dialog box, do the following:
A In the Select the type of item to insert list, select Object properties.
B In the Select an object list, select Button “New user.” Or, drag the
Choose object button over the New user radio button to select it.
C In the Select a property list, select checked.
D Click Insert into Expression.
5 Optional. Click Check Syntax to check the syntax of your expression.
6 Click OK to close the Build Expression dialog box, and then click OK
again to close the Properties dialog box.
Instructor inserts the expression you created and an End if statement
to indicate the end of the conditional structure.
7 Using the skills learned above, create a second conditional expression
directly below the first: Else if checked of Button “Advanced user.”
8 From the Insert menu, point to Condition, and choose Else.
Chapter 16 Creating action sequences: Practical examples 364
Note The Else condition covers any other possible condition. In this
example, the only possible other condition is that neither radio
button is checked.
Once you have determined which radio button the user selected, you
need to send the user to the appropriate page of the book. You can use
the Go to page action to send a user to a particular page.
C In the Select a specific page box, click the Choose page button.
D In the Choose Page dialog box, select Page “Contents,” and then
click OK.
If a user fails to select a radio button before clicking continue, you need
to prompt the user to select an option. There are several options you can
choose from to display a message to users. This action sequence uses the
Display alert action to create a dialog box with a note to the user.
2 From the Insert menu, point to Action, point to Prompts, and then
choose Display Alert.
B In the Specify the text to display box, type Please select an option
and try again.
C Click OK to close the Properties dialog box.
4 In the Actions Editor, from the File menu, choose Update Actions
& Close.
Tip You can leave the Actions Editor open while you test an action
sequence. From the File menu, choose Update Actions rather than
Update Actions & Close.
Chapter 16 Creating action sequences: Practical examples 366
2 Click Continue.
If a dialog box appears with the message, “Please select an option and
try again,” it indicates that both your conditional structure and Display
alert action are working. Now test the Go to page action.
2 Click Continue.
If the Contents page appears, your action sequence is working and you
are ready to return to Author level and continue with the next example.
If your results were different than those described above, your action
sequence is not working. Return to Author level and review the
instructions in Example 1.
Chapter 16 Creating action sequences: Practical examples 367
Figure 2 shows the action sequence for Example 2 and the Variables dialog
box. Instructor executes the action sequence as follows: First, Instructor
evaluates each conditional expression in turn, comparing the value stored
in the global variable named g_HintCounter against a specific integer. If an
expression is true (for example, if the value stored in g_HintCounter is 0),
Instructor runs the Display Popup text action that follows. Finally, the Set
variable action increases the value of g_HintCounter by 1.
Figure 2
Full action sequence for Example 2
Chapter 16 Creating action sequences: Practical examples 369
Defining a variable
This action sequence uses a global variable named g_HintCounter to track
how many times the user clicks the Hint button. This action sequence uses
a global variable rather than a local variable since the value of a local
variable is reset each time the action sequence runs.
➤ To define a variable:
3 In the Variables dialog box, type g_HintCounter, and then click OK.
4 In the Initial Value box, type 0 (zero).
5 Click OK.
Note When you define variables, they are not displayed as part of
the action sequence. To see a list of variables defined for an action
sequence, click the Define Variables button on the Actions Editor
toolbar.
Inserting actions
In order to display a different hint each time a user clicks the Hint button,
you need to track the number of times the user clicks this button. Since
the value of the variable g_HintCounter corresponds with the number of
clicks, you need to determine the value of g_HintCounter before displaying
a hint. You can insert a condition to create a conditional expression that
tests the value of g_HintCounter.
Chapter 16 Creating action sequences: Practical examples 371
➤ To insert a condition:
1 From the Insert menu, point to Condition, and then choose If.
2 If the Properties for Condition dialog box does not open automatically,
click the Properties button on the Actions Editor toolbar.
3 You can type g_HintCounter = 0, or you can use the lists in the Build
Expression dialog box to create the same expression:
Else if g_HintCounter = 1
Else
To display a hint to a user, you need to show text on the page. This
action sequence uses popup text to display a hint to a user.
Chapter 16 Creating action sequences: Practical examples 372
1 Select the first condition in the action sequence (If g_HintCounter = 0).
2 From the Insert menu, point to Prompts, and then choose Display
Popup Text.
3 If the Properties for Action dialog box does not open automatically,
click the Properties button on the Actions Editor toolbar.
➤ To edit an action:
1 Select the first pasted action, and then click the Action Properties
button on the Actions Editor toolbar.
2 Select the text in the Specify the text to display box, replace it by typing
This is your second hint, and then click OK.
3 Select the second pasted action, replace its text with Sorry, no more
hints are available for this question, and then click OK.
Now that you have created a conditional expression that tests the value
of the g_HintCounter variable, and a Display Popup Text action that runs
if the conditional expression is true, you need to insert an action that
increments the value of g_HintCounter. You can use the Set variable
action to change the value of a variable.
1 In the Actions Editor, select the last line of the action sequence
(End if).
2 From the Insert menu, point to Action, point to General, and then
choose Set Variable.
The Properties for Action dialog box appears.
The first three times you click Hint, a different hint should display If you
see “This is your first hint,” followed by “This is your second hint,” and
finally, “Sorry, no more hints are available for this question,” your action
sequence is working. You can now return to Author level to complete the
next example or exit the book.
If your results do not match the description above, your action sequence is
not working. Return to Author level and review the steps in this example.
At Author level, open page four (named Contents) of the Actions Editor
Walkthrough book. You will see a list of page titles. Although no check
boxes are visible, each of the titles in this list is a separate check
box object.
Select the object labeled About variables and click the Properties button
on the toolbar. On the Graphics tab, note that there are two graphics
assigned to the button: one for its normal state and one for its checked
state. You will create an action sequence for this object that determines
whether the page About variables has been visited and, if it has, changes
the state of the button to checked.
Chapter 16 Creating action sequences: Practical examples 376
Figure 3
Full action sequence for Example 3
1 On the Contents page, select the check box object labeled About
variables.
Inserting actions
The first task in this action sequence is to determine whether or not
a user has visited the page named About variables. You can insert a
condition to create a conditional expression that tests whether a page
has been visited.
➤ To insert a condition:
1 From the Insert menu, point to Condition, and then choose If.
1 Select the first condition in the action sequence (If visited of Page
“About variables”).
2 From the Insert menu, point to Action, point to Object, and then
choose Set Property.
The Properties for Action dialog box appears.
3 Do the following:
A In the Select the object for which to set the property list, select self.
D In the Select logical value list, select true, and then click OK.
4 Select the Else condition.
5 Following the steps above, create an action that sets the checked
property of self to false.
6 Click OK.
7 From the File menu, choose Update Actions & Close.
Tip If you want to use the list items to send users to pages, you
can follow the steps in Example 1 to create an action sequence that
sends users to specific pages in response to the On click event.
Chapter 16 Creating action sequences: Practical examples 379
At Author level, open the final page of the Actions Editor Walkthrough
book titled “Tax Calculator.” You will see two interactive objects on the
page: A text field for entering a price and a list box containing three city
names—Seattle, Atlanta, and New York.
Chapter 16 Creating action sequences: Practical examples 381
Figure 4
The full action sequence and shared action sequence for Example 4
Chapter 16 Creating action sequences: Practical examples 382
➤ To define a parameter:
1 Click the Define Variables and Parameters button on the Actions
Editor toolbar.
The Parameters and Variables dialog box appears.
2 On the Parameters tab, click New.
3 In the Parameter dialog box, enter Price as the name, and then click OK.
4 Repeat the steps above to define a second parameter and name
it Rate.
It is sometimes easier to divide a long equation into two parts. You can
use a variable to store the result of one calculation. Then, you can use
that variable in a second calculation.
➤ To define a variable:
1 On the Local Variables tab, click New.
2 In the Name box, select NewVariable, and in its place, type Product.
3 In the Initial value box, type 0 (zero).
4 Click OK.
Inserting actions
You can easily complete the calculation by dividing it into two steps.
First you will multiply the parameters Rate and Tax, round the result to
the nearest integer, and store the resulting value in the local variable
named Product.
Chapter 16 Creating action sequences: Practical examples 384
Then you will use a variable named returnValue to store the final value
that results from the operations that are carried out in the shared action
sequence.
1 From the Insert menu, point to Action, point to General, and then
choose Set Variable.
3 Click the Build expression button to open the Build Expression dialog
box, and then do the following:
A In the Select the type of item to insert list, select Operators and
functions; in the Select a category list, select All functions; in the
Select an operator or function list, select round; click Insert into
Expression.
B In the expression box, insert the cursor between the
parentheses after round.
C In the Select the type of item to insert list, select Variables and
parameters; in the Select a variable or parameter list, select Price;
click Insert into Expression.
D In the Select the type of item to insert list, select Operators and
functions; in the Select a category list, select Math operators and
functions; in the Select an operator or function list, select the
multiplier symbol (*); click Insert into Expression.
E In the Select the type of item to insert list, select Variables and
parameters; in the Select the variable or parameter list, select Rate;
click Insert into Expression.
4 Click OK to close the Build Expression dialog box, and then click OK to
close the Properties dialog box.
Chapter 16 Creating action sequences: Practical examples 385
To return the value calculated in the shared action sequence, you use the
Set Return Value action. You can change the form of the result to display
as a dollar amount limited to two decimals, by setting the variable
returnValue to the value of Product divided by 100.
1 From the Insert menu, point to Action, point to General, and then
choose Set Return Value.
The Properties for Action dialog box appears.
2 Click the Build expression button to open the Build Expression dialog
box, and then do the following:
A In the Select the type of item to insert list, select Variables and
Parameters; in the Select a variable or parameter list, select Product;
click Insert into Expression.
B In the Select the type of item to insert list, select Operators and
functions; in the Select a category list, select Math operators and
functions; in the Select an operator or function list, select the
division symbol (/); click Insert into Expression.
C In the expression box, insert your cursor after the division symbol
and type 100.
3 Click OK to close the Build Expression dialog box, and then click OK to
close the Properties dialog box.
Chapter 16 Creating action sequences: Practical examples 386
3 Click Close.
Defining variables
The shared action sequence you created returns a value. You need to
define a local variable to store that value while the action sequence runs.
➤ To insert a condition:
1 From the Insert menu, point to Condition, and then choose If.
The Properties for Condition dialog box appears.
Figure 5
Properties for “Execute Shared Actions” Action
5 While the action you pasted is selected, click the Properties button on
the Actions Editor toolbar.
6 In the Properties for Action dialog box, select the parameter value next
to Rate, and type 6.
7 Repeat the steps above to insert the same action under the third
condition in the action sequence (Else), select the value next to Rate,
and then type 8.25.
➤ To display an alert:
4 In the Specify the text to display box, click the Build expression button.
5 In the Build Expression dialog box, build the following expression: “The
sales tax due on the amount you entered = $” &Tax
A Type “The sales tax due on the amount you entered = $”
6 Click OK to close the Build Expression dialog box, and then click OK to
close the Properties dialog box.
7 In the Actions Editor, from the File menu, choose Update Actions
& Close.
Chapter 16 Creating action sequences: Practical examples 393
◆ When you click Atlanta, a dialog box should appear that reads,
“The sales tax due on the amount you entered = $34.8.”
◆ When you click New York, a dialog box should appear that reads,
“The sales tax due on the amount you entered = $47.85.”
If your results do not match those listed above, return to Author level and
review the instructions. If they do match, you have successfully completed
the final example.
Chapter 16 Creating action sequences: Practical examples 394
◆ Selecting the wrong event in the Event list By default, when you
open the Actions Editor, it opens to the most common event in its list
of supported events (usually, On click). To create an action sequence
for any other event, you must select that event in the Event list.
◆ Providing insufficient information Certain dialog boxes, including
those for Display Confirmation and Display Query, have two tabs on
which you need to select options. Your action sequence will not run
properly if you do not enter all necessary information.
PART V
In this part of the ToolBook Instructor User Guide, you will learn about using
the resource system to manage graphical elements that you add to a book.
Also included in this part is a description of powerful features that you can
use to import and export text, graphics, and other data.
I N THIS PART
Chapter 17 Using resources
Chapter 18 Importing and exporting data
Chapter 17
Using resources
I N THIS CHAPTER
About resources 397
Creating and modifying resources 399
Adding resources to a book 401
Working with resources 404
Getting information about a resource 409
Replacing resources 410
Exporting resources 411
Removing resources from a book 412
Chapter 17 Using resources 397
About resources
A resource is a file that you can use multiple times within your ToolBook
Instructor application. When you add a resource to a book, Instructor
places a copy of it in the Resource Manager, which is a common library
of resources in the book. The resource is then available to all objects in
the book that can use that type of resource; however, the resource does
not appear in the book until you assign it to an object as a property.
You can use resources to:
◆ apply a graphic to a button
◆ substitute a custom cursor for a ToolBook system cursor.
◆ change the default drag image or no-drop cursor that appears when
an object is dragged or dropped.
◆ add an icon that appears when your application is minimized.
◆ add a menu bar that appears in multiple windows of your application.
◆ identify a shared script that is used by multiple objects in your
application.
◆ substitute a custom Windows icon when you save your application as
an EXE file.
ToolBook Instructor stores only one copy of the resource in the book, no
matter how many objects refer to it. As a result, you can apply the re-
source to as many objects as you want without adding to the file size
of your application. An object uses a resource by referring to the stored
copy by name or ID number.
For example, if your book has multiple backgrounds with the same
navigation buttons on every page, you would use a bitmap resource for
the graphic image on the navigation buttons. Because only one copy of
Chapter 17 Using resources 398
the bitmap is stored, your book’s file size is much smaller than it would
be if you duplicated the bitmap for each button.
* For details about creating custom menus, see Chapter 2 in the online book, Advanced
Features for Native ToolBook Applications.
† For details about creating viewers, see Chapter 1 in the online book, Advanced Features for
Native ToolBook Applications.
Tip If you plan to save your book as an EXE file, you can customize
its Windows icon. Before you save your book as an EXE file, right-
click on the title bar, choose Choose icon, and then, in the Choose
Icon dialog box, import your custom icon or create a new icon.
When you save your book as an EXE file, the title bar icon appears
as the book’s Windows icon.
Chapter 17 Using resources 399
* These files may contain more than one image. Instructor uses the first image it
encounters in the file.
† Instructor can extract color palette information from Windows Metafile Format (WMF) and
device-independent bitmap (DIB) files when you specify them in the Resource Manager
dialog box or import them using OpenScript.
Chapter 17 Using resources 400
2 In the Available resources list, choose the type of resource you want to
create or modify.
You can also duplicate resources that you have made available to a book.
For example, if you have an existing cursor resource that you want to use
in a slightly modified form, you can duplicate the existing resource, edit
the copy, and give it a unique name.
➤ To duplicate a resource:
4 Click Duplicate.
Instructor duplicates the resource.
5 Optional. Select the new resource, and then click Edit to modify it.
6 Click Close to close the Resource Manager dialog box.
If you’ve planned in advance all the artwork, system elements, and other
resources that you want to include, you can use the Resource Manager to
add them to the book all at once. If you’re designing as you go, or if you
discover that you need additional resources, you can add individual
resources one at a time.
The Import Resource dialog box appears. Select the resource you
want to import, and then click OK.
Instructor assigns an ID number to the resource that you can also use
to refer to it.
Using OpenScript
You can write and execute OpenScript code using the script editor or
Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript
online book.
◆ To copy a resource from another Instructor book, use the copy resource
command:
Note You can also assign a rollover graphic to a button that will
display when the mouse pointer pauses over the button. On the
Graphics tab in the Properties for Button dialog box, select the
option labeled Use checked graphic as rollover graphic.
1 Select the button to which you want to add the graphic, and then click
the Properties button on the Instructor toolbar.
2 In the Properties for Button dialog box, click the Graphics tab.
3 Under Button graphics, choose a button state (Normal, Invert, Disabled,
or Checked), and then click Choose Graphic.
The Choose Graphic dialog box appears.
4 Select the type of resource you want (bitmap, cursor, or icon) in the
Available resources list.
The resources listed in the Choose Graphic dialog box include all
the resources of the selected type that have been imported into the
Chapter 17 Using resources 405
current book. Any new resources you import are added to the book’s
resource list.
Using OpenScript
◆ To apply a graphic to a button, set the normalGraphic, invertGraphic,
disabledGraphic, or checkedGraphic property of a button to a bitmap,
cursor, or icon resource:
Using OpenScript
◆ To change the cursor that appears when an object is dragged, set the
object’s dragImage property to a bitmap, cursor, or icon resource:
Using OpenScript
◆ To change the icon that appears when a viewer is minimized, set the
icon property to an icon resource:
Changing a book’s
system cursor with OpenScript
Instructor comes with a number of system cursors that you can use.
Alternatively, you can import a cursor as a resource and then set the
OpenScript sysCursor property to that resource. For example:
You can make the cursor change whenever it passes over something
that you want the user to click. For example, use this script to make the
cursor change to a pointing hand every time it passes over a button:
2 In the Available resources list, select the type of resource about which
you want to view information.
Replacing resources
You can replace the resources in a book with other resources. For ex-
ample, if you apply a bitmap resource to a button and then replace the
resource with a new bitmap, the new bitmap appears in place of the old
resource everywhere that it is used.
4 Navigate to and select the resource file you want to use, and then
click OK.
5 Optional. Close the Resource Manager dialog box.
The new resource replaces the old resource throughout the book.
Using OpenScript
Exporting resources
You can export icon and cursor resources that you have created or
modified to use in other books or Windows programs.
2 In the Available resources list, select the type of resource you want
to export.
4 Click Export.
The Export Resource dialog box appears.
5 Enter a name for the resource, navigate to and select a file to which
to export it, and then click OK.
Using OpenScript
◆ Use the export command to export a resource:
Bitmap Select the button, and then click the Properties button
on the toolbar. On the Graphics tab, choose the button
state, and then click Clear Graphic.
* For details, see the online book, Advanced Features for Native ToolBook Applications.
After you have removed all references to a resource, you can remove the
resource from a book.
Chapter 17 Using resources 414
2 In the Available resources list, select the type of resource you want
to remove.
3 In the graphical list, select the resource you want to remove.
4 Click Remove, and then close the Resource Manager dialog box.
Using OpenScript
The resource no longer appears in the Resource Manager dialog box for
that book.
You can import and export text and graphics in ToolBook Instruc-
tor. In addition, you can import books and pages from other
Instructor and ToolBook Assistant applications into your current
Instructor application. Importing and exporting affords flexibility
and saves time, because you can leverage your development
efforts by reusing material. Further, you can incorporate material
from a number of sources, adding variety and extending function-
ality. This chapter discusses how to import and export data and
describes how to customize the import process to fit the needs of
your application.
I N THIS CHAPTER
About importing and exporting 416
Importing and exporting text 417
Importing and exporting graphics 429
Importing books and pages 431
Customizing the import process 435
Chapter 18 Importing and exporting data 416
When you import to a text field, you move data from one source document
into one text field. When you import to a record field, you move data from
one source file into multiple record fields. Exporting from text fields or
record fields moves data into one text file.
You can import a text file into record fields as a fixed-field file or a
delimited-field file. In fixed-field files, the field size is predetermined and
constant. In delimited-field files, the size can vary and is delimited by
special characters that you define. You must insert the delimiter in the
source file (the file from which you are importing the text) at each place
where you want a new record field to begin.
1 Select the text field from which you want to export text.
2 From the Tools menu, point to Export, and then choose Field Text.
◆ In the File name box, type a name for the text file.
◆ In the List files of type list, choose whether the file will be saved in
ASCII format (with a .txt file extension) or in RTF (with an .rtf file
extension).
Chapter 18 Importing and exporting data 419
4 Click OK.
Instructor exports the text in a text file to the specified directory.
Instructor automatically creates a new record field for each data field and
a new page for each data record in the imported file. You cannot import
data into a record field on the background of an existing page. Rather,
when you import data into a new or existing book, Instructor creates a
new page with a blank background and inserts new record fields as
needed. All tabs and control characters are imported into Instructor along
with the data.
The first new record field is always placed at the top of the background
on layer 1, and each successive record field is placed below it. Instructor
imports data from the first data field into the new record field on layer 1
of the first page and imports data from successive data fields into record
fields on subsequent layers. Imported text is formatted according to the
current settings in the Properties for Record Field dialog box. For more
information about working with text and record fields, see Chapter 8,
“Working with text.”
Figure 1
Table saved in fixed-field format
When you import a fixed-field file, you indicate how many data fields are
in a data record by specifying the length of each field. Instructor uses the
information about data field sizes as a template, so you must determine
the precise length of each data field before you import the file.
3 In the Character dialog box, select the font and point size for the
imported text.
Chapter 18 Importing and exporting data 421
4 Click OK.
Using OpenScript
You can write and execute OpenScript code using the script editor or
Command window. For more information about using the OpenScript
programming language, refer to the Programming in OpenScript online
book.
◆ To import a fixed-field text file, use the import command with the fixed
keyword and a list of field lengths:
Figure 2
Mailing list in delimited-field format
Instructor creates a record field for each data field in the source file’s first
data record (the first line of the file). If any data record contains more data
fields than the first data record, Instructor discards the extra data. If any
data record contains fewer data fields than the first data record, Instructor
leaves the remaining record fields blank on that page.
Instructor inserts the data into record fields of a fixed size, regardless of
the length of the data fields. You can display data longer than the field by
resizing the field on the background.
You can import a delimiter character as data by enclosing it in quotation
marks (“ ”). For example, you might have a comma separating city and
state names in the source file. If you want to keep that comma even
though you’re using a comma as the delimiter between fields, you can
import it as text by typing a quotation mark before and after the field
containing the comma. The text in the source file should read “Bellevue,
WA” instead of “Bellevue”, “WA”.
Chapter 18 Importing and exporting data 423
All field delimiters and record delimiters are ignored in quoted regions of
text in imported files. To preserve quotation marks within a quoted region
in the source file, enclose them within a second set of quotation marks.
For example, the field in the source file must contain “this is a ““quoted””
region” to import this is a “quoted” region into Instructor.
3 Select the font and point size for the imported text.
4 Click OK.
8 Choose Text—Delimited fields from the File format options, and then
type a delimiter character in the Delimiter box.
10 Navigate to and select the text file you want to import, and then
click OK.
Instructor imports the file, creating a new record field for each data
field. Whenever Instructor finds a delimiter in the source file, it removes
this character and places the data from the data field into a record
field. Whenever Instructor finds a record separator (CRLF) in the source
file, it creates a new page.
Using OpenScript
◆ To import a delimited-field text file, use the import command with the
delimited keyword:
Layer order
of record fields
on page
Figure 3
Data exported from a page
Note Windows uses the ANSI character set for displaying characters. If
you open an exported file with another application, you may need to
retype some special characters. For details about special characters,
see “Inserting special characters” in Chapter 8, “Working with text.”
specify the number of characters in each field. If a field is larger than the
specified size, text is truncated on the right side.
Figure 4
Exporting data to a fixed-field file
For example, type 3,5,8,12 if you want the data records to have four
data fields with 3, 5, 8, and 12 characters, respectively. You can type
as many field lengths as needed to define the data fields.
7 Click OK to return to the Export dialog box, and then click OK again.
Instructor exports the contents of the record fields to the file name you
specified. The data in each record field becomes a data field in the text
file. As Instructor exports the last record field on each page, it starts
a new data record in the text file.
Note Instructor adds spaces to data fields if the field length you
specify is greater than the number of characters in the original
record field. Use positive numbers to export data aligned on the left,
with fill space inserted on the right. Use negative numbers to export
data aligned on the right, with fill spaces inserted on the left. If
a field is larger than the specified size, text is truncated on the
right side.
Using OpenScript
◆ To export text from record fields to a fixed-field text file, use the export
command with the fixed keyword, specifying the length of the fields:
Figure 5
Exporting data to a delimited-field file
5 Choose Text—Delimited fields from the File format options, and then
type a delimiter character in the Delimiter box.
Instructor exports the contents of the record fields to the file name you
specified. The data in each record field becomes a data field in the text
file, enclosed in quotation marks.
Using OpenScript
◆ To export text from record fields to a delimited-field text file, use the
export command with the delimited keyword and a character to use as
the delimiter:
For details about using the export command, refer to its entry in the
OpenScript reference in online Help.
➤ To import a graphic:
Note When you import a graphic, the newly created graphic object
will either be a paint object or a picture object, depending on the file
format of the original graphic. For more information, see Chapter 9,
“Using graphics.”
You can export a graphic from Instructor by selecting the graphic and
choosing the Export command from the Tools menu. When you export
a graphic, Instructor saves a copy of the image in the format you specify.
➤ To export a graphic:
◆ In the List files of type list, select a file format in which the graphic
will be saved.
4 Click OK.
Chapter 18 Importing and exporting data 431
Importing books
When you import a book, Instructor inserts all of its pages and back-
grounds after the current page of the current book, assigning each one a
new ID number. If the imported pages and backgrounds had names in the
source book, these stay the same.
Instructor moves the pages that originally followed the current page to
the end of the book and assigns them new page numbers, but their ID
numbers and names remain.
Chapter 18 Importing and exporting data 432
For example, if you navigate to page 1 of a book that has two pages on a
single background and then import a book that also has two pages on a
single background, the page numbers, page ID numbers, and background
ID numbers will be updated as shown in Figure 6.
Page number 2
Page ID 2
Page number 2
Background ID 1
Page ID 1
Background ID 0 Page number 1
Page ID 0
Page number 1
Background ID 0
Page ID 0
Background ID 0
You can import a book into Instructor puts the pages and the background
another book. from the imported book after the currrent page.
Figure 6
Importing a book
➤ To import a book:
1 From a new book, or from the page in an existing book after which you
want to insert the imported book, choose Pages from the Insert menu.
2 In the Import dialog box, select ToolBook files (*.?bk) in the Import type
list.
3 Navigate to and select the book file you want to import in the File name
box, and then click OK.
Chapter 18 Importing and exporting data 433
Instructor inserts all pages and backgrounds from the selected book
into the current book.
Using OpenScript
◆ To import a book, use the import command and specify a file name
with the .tbk extension:
--Navigates to page 3
go to page 3
--Imports book after current page
import book "c:\mybooks\template.tbk"
Importing pages
You can import a page or range of pages from another book into a new
or existing book. You can import the page with its background, or you
can import the page onto the current background.
If you import a page or range of pages into an existing book, Instructor
inserts the pages after the current page of the current book. Instructor
changes the page numbers of the pages in the current book but does not
change page ID numbers or background ID numbers. For details, see the
preceding section, “Importing books.”
If you import pages that contain record field text but don’t import the
corresponding backgrounds, Instructor follows these rules in sequence to
determine where to place the record field text:
1 Matching record field names Instructor puts the imported text into
a record field with a name that matches that of the original record
field. For example, if you import a page containing text from a record
field called Student Name, Instructor attempts to find a record field with
the same name on the current background and place the text there.
If no record fields match by name, Instructor proceeds to match by
ID number.
Chapter 18 Importing and exporting data 434
If the destination background contains more record fields than the source
background, Instructor maps the record field’s text as described above,
leaving the extra record fields on the destination background empty. If
the source background contains more record fields than the destination,
Instructor maps the text as described above and discards the text of the
extra record fields.
1 From a new book, or from the page in an existing book after which you
want to insert the imported pages, choose Pages from the Insert menu.
2 In the Import dialog box, select ToolBook files (*.?bk) in the Import
type list.
3 Click Format to display the Book Format dialog box.
4 Choose Pages to indicate that you are importing a page range, and
then enter the starting and ending pages to import in the From and To
boxes, respectively. (To import a single page, enter its number as the
starting and ending page.)
5 If you want to import the background along with the pages, select
Include background.
6 Click OK to return to the Import dialog box.
7 Navigate to and select the book file you want to import, and then
Chapter 18 Importing and exporting data 435
click OK.
Instructor inserts the pages from the selected book into the current
book. If you selected Include background, Instructor also imports the
backgrounds of the pages you indicated.
Using OpenScript
◆ To import pages from a ToolBook book, use the import command,
specify a file name with the .tbk extension, and then indicate the page
range to import:
Creating simulations
This part of the ToolBook Instructor User Guide presents tools that enable
you to construct software simulations. You will learn about using the Sim
AutoBuilder to capture activity in a software application and generate a
simulation file. Additionally, you will find out how to use the Simulation
Editor to build a custom simulation from scratch or modify existing
ToolBook simulations.
I N THIS PART
Chapter 19 Building software simulations
Chapter 19
I N THIS CHAPTER
About software simulations 492
Planning a software simulation 493
Choosing a simulation mode 495
Creating a simulation with the Sim AutoBuilder 497
Developing a simulation manually 500
Working in the Simulation Editor 505
Chapter 19 Building software simulations 439
Considering the learning objective early in the planning process will help
you decide how much interaction and responsive feedback text the
simulation will include. The learning objective will determine if a simula-
tion will be presented as a test to assess the learner’s performance.
If you are using the Sim AutoBuilder to record a simulation, the number
of responsive objects will be limited to the selections made during the
capture phase. For more information about the Sim AutoBuilder, see
“Creating a simulation with the Sim AutoBuilder” later in this chapter.
Chapter 19 Building software simulations 442
Planning a simulation before building it can reduce the overall time spent
on development. By deciding on the type of simulation that suits the
needs of your learners early in the development cycle, you can focus your
development efforts and avoid misdirected work.
◆ Practice mode allows a learner to try out each step for a limited or
unlimited number of attempts.
◆ Assessment mode allows one answer attempt for each step and
calculates a score for the user input.
◆ Demonstration mode shows how to complete the task.
Practice mode
When a learner completes a step in a practice simulation correctly, the
next step in the simulation displays automatically. For an incorrect
answer attempt, feedback text may display and the learner can make
another attempt to complete the step until the limit for the number of
answer attempts is reached. If the simulation includes a Continue button,
this button allows the learner to go on to the next step when the maxi-
mum number of incorrect answer attempts is reached.
Assessment mode
In assessment mode the learner is only allowed one attempt to
complete each step in the simulation. When the learner completes the step
correctly, the simulation will automatically move on to the next step. If the
learner chooses the wrong interaction for the step, feedback for that step
may display and the learner may click the Continue button to go on to the
next step. Alternatively, the simulation may include a timed delay for
navigation to the next step.
In assessment mode the simulation is always scored.
Demonstration mode
A demonstration shows the learner how to complete a software procedure
or task. There is no input from the learner during a demonstration. You can
use one or both of the following methods to provide navigation during a
demonstration simulation:
◆ Set a specified number of seconds for each step in the demonstration to
display.
◆ Use a Continue button or a key press to let the learner choose when to
advance to the next step in the demonstration.
Creating a simulation
with the Sim AutoBuilder
The Sim AutoBuilder feature lets you record mouse clicks, keyboard
entries, and other interaction with a software application. Every software
simulation created with the Sim AutoBuilder is a reproduction of the
original software application, with buttons and menus and other interactive
objects that act like the real objects in the original software program.
Figure 1
The Sim AutoBuilder
Chapter 19 Building software simulations 445
You prepare to use the Sim AutoBuilder by opening the software applica-
tion that you want to record. Resize this application window to the size
that you want to show in the simulation, and get the screen ready for
recording. It is best to close other applications before you start recording.
Open the Sim AutoBuilder to begin recording, and press the Print Screen
key (or another key you have specified) to capture the appearance of the
screen for each step that will occur during the simulation. In general, you
should press the Print Screen key after you send a command or instruction
to the software application. While you are recording, press the Print Screen
key after:
Each step in a simulation should include only one action that requires the
recorded software application to perform a specified task. A step can be
either a single action, such as clicking a button, or multiple actions. If
multiple actions are recorded as part of a step, these actions should be
related to each other, such as typing text in a field and pressing the Enter
key to signal the completion of entering text. As an example of a single
step in a simulation, the user could choose several options in a dialog box
and end the step by clicking the OK button. Simply changing the text in a
field or the selected state of a check box does not require that you end the
step while recording; data changes can be grouped into one step.
Chapter 19 Building software simulations 446
Making selections with the mouse is just one type of activity that will be
recorded by the Sim AutoBuilder. A distinction will be made between a
left button click, right button click and double-click. Selecting items from
menus, list boxes and combo boxes will also be recorded. Pressing
specific keys on the keyboard will be captured, including the Tab key,
Shift key, or any function key. Some of the function keys, such as F8, are
commonly in use by Web browsers and pressing a function key when
playing a simulation through a browser will cause the browser to respond
in the default fashion.
1 Open the software application that you want to simulate. Prepare the
application by setting it up to be ready for the start of recording.
5 Change any of the default settings for the recording options, if desired,
and then click OK.
6 Start recording by pressing the Print Screen key (or another selected
key).
7 In the software application you are recording, take the first action that
you want to show in the simulation and then press the Print Screen key
(or a key you selected) to indicate the end of the step.
9 Press CTRL + Print Screen to stop recording (or another selected key).
Chapter 19 Building software simulations 447
10 Open ToolBook Instructor. In the book that will display your recorded
simulation, navigate to the page where you want to add the recording.
From the Insert menu, choose Simulation from Recording.
11 Select the name of the file containing the recording.
ToolBook processes your recording and adds the simulation to your book.
New pages will be added to the book if necessary.
A button from
the Catalog...
...is assigned a
graphic from a
cropped screen
image...
Figure 2
Placing a button on top of a graphic
Figure 3
Options for displaying instructions and feedback text
Chapter 19 Building software simulations 450
When you are creating a simulation manually there are several ways to
capture images of the screen:
◆ Use a screen capture application such as SnagIt.®
◆ Use a graphics program that includes a screen capture feature, such as
PhotoImpact.®
◆ Use the capture feature provided in Windows to copy an image to the
Clipboard: press ALT + Print Screen to copy an image of the active
window, and then paste the image into a graphics program to save it.
Captured screen images are often saved in a compressed file format to
reduce the total file size of a simulation. If you plan to deliver a simulation
through a Web browser the screen images should be saved in file format
that is compatible with a browser, such as GIF or JPEG files. To display
graphics, drag the Web Graphic placeholder from the Placeholder Objects
category of the Catalog to a simulation page.
Cropping an image can be a useful way to modify a captured image. A
simulation may show only a portion of the captured screen graphic to
reduce the overall dimensions of the screen graphic. An image editing
program allows you to select an area of a captured screen image and
crop it to remove the remainder of the image.
All of the steps in a simulation are displayed in the top panel of the
Simulation Editor. When an item in the steps panel is selected, the
lower panel in the Simulation Editor shows the properties for the
selected item. The lower panel is called the property grid.
Figure 4
The Simulation Editor shows steps and properties
Chapter 19 Building software simulations 453
The Simulation Editor opens immediately after you add a new simulation
to a page. You can close and reopen the Simulation Editor.
Toolbar
Simulation name
Simulation steps
Hide button
Property grid
Chapter 19 Building software simulations 455
Figure 5
The Simulation Editor
1 In the Simulation Editor, select the line that displays the name of the
simulation.
Developing steps
The steps that make up a simulation build a procedure for completing the
task defined in the simulation. A step contains some type of action or
change that can be a distinct point in the learning process. For example,
a step could include instructions that direct the learner to click a specific
button on the page, a trigger event that specifies the name of the button
that should be clicked, and feedback text that displays if the learner clicks
the wrong button.
— Click the New Step button on the toolbar of the Simulation Editor.
— From the Insert menu choose New Step.
Figure 6
Entering custom instructions for a step in a simulation
Each step has a trigger event that ends the step. You can include multiple
trigger events in a step to handle all types of user interaction. Trigger
events are described in the next section.
A step may end in one of these ways:
◆ double-click a button
Chapter 19 Building software simulations 458
During a simulation, when a learner activates the correct trigger event for
a step then the next step in the simulation appears by default. If the user
activates an incorrect trigger event, feedback text may display and the
user is allowed to make another attempt to choose the correct trigger in
practice mode (as long as the maximum number of tries to complete the
step has not been reached).
Chapter 19 Building software simulations 459
Displaying feedback
Feedback is an automated response that may display after a learner
interacts with a simulation. Text such as “Try again” can appear in a pop-
up window or text field if a learner makes a mistake when interacting
with a step in a simulation. You can enter the feedback text that you
want to display after an incorrect answer attempt or show the default text
generated by ToolBook. Other feedback options include playing a sound
or showing an animation. Feedback can be turned on or off for any step
in a simulation.
Scoring a simulation
A score for the learner’s response to each step in a simulation will be
calculated when the simulation is running in assessment mode or scored
practice mode. The score for a step is evenly split among the evaluated
objects and the trigger event for the step. For example, a step with three
evaluation objects and one correct trigger event will produce a score that
assigns 25% of the total score to each of the three evaluation objects and
25% of the total score to the choice of the correct trigger event.
learner clicks one of the buttons, an action method starts the simulation
in the mode indicated by the button caption. Likewise, you can define
behavior that will execute as soon as a simulation is finished or reset by
clicking the Actions tab in the properties dialog box for the simulation.
Individual steps in a simulation have three built-in events: start step,
attempt step and complete step. If you want to display custom feedback
for a correct user response, define an action method for the complete
step event which checks to see if the score parameter equals "Correct."
Another possibility is to add behavior that would occur in the real
application after a step is finished.
For information about programming in the Actions Editor, see Chapter 15,
“Using the Actions Editor” and Chapter 16, “Creating action sequences:
Practical examples.”
In this part of the ToolBook Instructor User Guide, you will learn about the
powerful distribution options available with ToolBook Instructor. These
chapters discuss how to prepare your application for release and how to the
choose the method for distributing your application.
I N THIS PART
Chapter 20 Distributing applications on the Internet
Chapter 21 Preparing native ToolBook applications for release
Chapter 20
Distributing applications
on the Internet
I N THIS CHAPTER
About Internet distribution options 466
Choosing an Internet distribution option 469
Tips for optimizing a book designed for DHTML export 472
Publishing your book as Web pages 473
Preparing a native ToolBook book for the Web 475
Using ToolBook courses with a
learning management system 477
Chapter 20 Distributing applications on the Internet 466
When you create a native ToolBook application that your users view in a
Web browser with the Neuron browser plug-in, you can use the complete
set of features available in Instructor. Native ToolBook applications
can contain interactive custom features, including those created using
OpenScript. Your users download and install the Neuron browser plug-in,
and your applications run in a Web browser exactly as they run on a local
computer.
Chapter 20 Distributing applications on the Internet 467
Choosing an Internet
distribution option
The distribution method you choose should reflect the requirements of
both the developer and the user. As the developer, you will want to
consider the following factors:
◆ Interactivity Instructor includes the option to automatically export
your book to DHTML, an advanced Internet technology that allows
authors to set actions for buttons, responses to questions, trigger
prompts, use conditions and loops, and more.
Tip You can change the distribution method for a book at any time.
To select a different method, from the Object menu select Properties
for Book and then click the Deployment tab.
Chapter 20 Distributing applications on the Internet 468
Understanding DHTML
HTML is a markup language that allows you to format documents for the
Web. An HTML document combines your content with HTML markup
codes, called tags, that specify how your content will be formatted. When
you view an HTML document in a browser, you do not see the tags; you
see only the formatting that the tags represent.
Menu bars and viewers These features will not function in an exported
application.
OpenScript Objects whose functionality has been extended
using OpenScript will not function as scripted
after export. Use the Actions Editor to program
behavior that will export to DHTML.
Understanding Neuron
Neuron is a browser plug-in and ActiveX browser control that enables
a Web browser to play a ToolBook book (a TBK file). Using Neuron, you
can take advantage of the full feature set available in native ToolBook
TBK files, including code written in OpenScript, and distribute an appli-
cation over the Internet. Neuron is available for Microsoft Internet Ex-
plorer, Firefox and Netscape browsers running on the Windows platform.
Neuron can also help you to maintain security while running an application
over the Internet. Because ToolBook applications are executable files that
can fully interact with your computer, you should exercise some caution
when accessing files from an unfamiliar source. To allow you to control
whether a ToolBook application can interact with your computer, Neuron
has two modes of access: secure and nonsecure. Use nonsecure mode
when accessing ToolBook applications you are confident were created by
reputable developers; use secure mode when accessing unfamiliar
applications. When running in secure mode, Neuron will not allow links
to system files and will not execute commands such as Save, Delete, or
other operations that may affect your computer system.
Impulse for Neuron is a utility that allows you to optimize your ToolBook
applications for distribution on the Internet. Impulse cuts the data in your
book into pieces that can be reassembled by Neuron. This technique
allows a book to be downloaded piece by piece on demand, providing
increased speed performance over the Internet. This process is similar to
the streaming technology used for transmitting audio and video files over
the Internet.
ToolBook Neuron and Impulse are available on your Instructor program
Chapter 20 Distributing applications on the Internet 472
disc. Neuron can be downloaded free from the ToolBook Web site at
www.toolbook.com.
to DHTML and evaluate the result in a Web browser. Try to test your
exported application using the same type of Internet connection as the
intended audience.
Note Your book will go through the export process much faster if
you use the Web Graphic Placeholder object to display GIF or JPEG
graphic files on the pages of your book.
You can use the file transfer feature in the Web Specialist to copy your
files to a Web server. If you choose not to copy your files to a Web server
from the Web Specialist, you can do this at a later time by opening the
Web Specialist, clicking the Expert button, and selecting the option
labeled Transfer your application to a server.
Chapter 20 Distributing applications on the Internet 474
Figure 1
The ToolBook Web Specialist
You can use the Web Specialist to export your application to a series of
Web pages that you can then choose to place on a Web server.
After you have exported your book to the Web, you can view it in a Web
browser. When you export your book to DHTML, you choose a project
Chapter 20 Distributing applications on the Internet 475
Note It is important that you use the file transfer feature in the
Web Specialist to copy a native ToolBook application to a Web
server. The FTP feature in the Web Specialist uses the list file to
locate all the media files used in your application and copy them to
the Web server while maintaining any relative paths.
If you choose in the Web Specialist to use Impulse for Neuron to optimize
the performance of your book over the Internet, Instructor creates the
Impulse directory, in which it places the optimized file segments. These
file segments have the same name as your project file, but each segment
has a different extension. The first file segment has a .tbk file extension,
and each subsequent segment has an incremented numerical extension
(.001, .002, and so forth).
To run an application in a Web browser using the Neuron plug-in, you
must create an HTML page that contains a link to your native TBK file.
(To run an application that has been optimized using Impulse, create an
HTML page with a link to the file segment with the .tbk extension.) You
can create an HTML page using any HTML editor.
After you finish building your course in ToolBook, prepare your course for
Chapter 20 Distributing applications on the Internet 479
distribution by choosing Publish to Web from the File menu. This opens
the Web Specialist, where you will be prompted with the following ques-
tion: “Will you be using a learning management system to administer this
course?” In response to this question, select the appropriate LMS option.
For more information about using TotalLMS, consult the online documen-
tation in Learner mode and Administrator mode when using this soft-
ware.
Chapter 21
You can make your application available in the native ToolBook file
format to users via an intranet, a local area network, or a
CD-ROM. This chapter describes how to use the AutoPackager to
prepare a native application for distribution. Checking and testing
your application is discussed, as well as uninstalling an application.
I N THIS CHAPTER
Organizing and checking your application 481
Preparing your application
based on a distribution method 487
Using the AutoPackager 492
Using Instructor on a network 496
Installing and testing your application 497
Uninstalling an application 498
Chapter 21 Preparing native ToolBook applications for release 481
Note If you plan to deliver your application locally (that is, if users
will install your application on their computers), make sure that the
directory structure you create appears the way you want it to appear
on the users’ systems.
Chapter 21 Preparing native ToolBook applications for release 482
All of the books that make up your application should reside in one
central book directory, with one or more subdirectories for the media
(sound, graphics, video, and animation) files that accompany those
books.
\French
IntroFrench.tbk (the ToolBook book)
\French media
EiffelTower.avi (a video file)
Now let’s say your application is more complex. You have one main book
about Romance languages and several related books about French,
Spanish, Italian, and so on. You could organize the files using several
book subdirectories under a central directory, as shown in this example:
\Romance
Romance.tbk
\Romance and shared media
\French
IntroFrench.tbk
AdvFrench.tbk
\French media
EiffelTower.avi
\Spanish
IntroSpan.tbk
AdvSpan.tbk
\Spanish media
PradaMuseum.avi
etc.
Chapter 21 Preparing native ToolBook applications for release 483
Checking spelling
You can use the Instructor spelling checker to ensure that your applica-
tion is free from spelling errors. You can also set the spelling checker to
use a custom dictionary that you create or a foreign-language dictionary
that you purchase.
◆ Click the Options tab, and then select options to define the conditions
of the spell check.
The Start button becomes the View button. When the spelling checker
finds an unknown word or other error (such as a duplicate word), it
highlights the word and displays the text in the Old box.
4 Use the buttons on the Spell tab to ignore or change the unknown
word, to add the word to a user dictionary, or to skip to the next object
or page. To view a list of alternative words, click Suggest. To have the
list of alternatives appear automatically, select Automatic.
5 Continue checking words until the spell check is complete, and then
click Close to exit the Spelling dialog box.
Chapter 21 Preparing native ToolBook applications for release 484
2 In the Available resources list, select the type of resource you want to
remove.
3 In the graphical list of resources, select the resource you want to
remove.
4 Click Remove to remove the resource.
5 Repeat steps 2, 3, and 4 until you have removed all unused resources
from your book.
6 Click Close.
5 Repeat steps 2,3, and 4 until you have removed all unused extensions.
6 Click OK. (If you are prompted to add a selected extension to the
Added Extensions list, click NO to avoid adding any additional
extensions to your book.)
We recommend that you save your file under a new name periodically
while you are developing your application. One easy way to do this is to
save a backup copy of your book under a slightly different file name. For
example, if you are creating a book called Sample.tbk, create a directory
called Backup; periodically choose Save As from the File menu and then
save your book as BackupSample.tbk in the Backup directory. Immediately
after saving BackupSample.tbk, choose Save As from the File menu and
this time save your book as Sample.tbk in the original book directory. This
simple task can greatly reduce your file size and has the added benefit of
creating a backup copy of your book.
Regardless of whether you’ve been saving your book under a new file
name periodically, you’ll want to do this before you prepare your applica-
tion for release. Be certain that after you save your book under the new
file name, you save it once again using the original file name.
If you don’t see the option to reset your book when you save, the option
to display this dialog box may be turned off in the Properties for Book
dialog box, or your book may not contain any objects that require reset-
ting.
Chapter 21 Preparing native ToolBook applications for release 487
The remainder of this section describes how to prepare your files for the
distribution method you’ve chosen. A summary of distribution methods
and preparation steps is provided in the table on the following page.
Chapter 21 Preparing native ToolBook applications for release 488
Via a local area network If users will install the application on their own
as a native ToolBook computers, use the ToolBook AutoPackager to
application create a setup program. Ensure that users are
running the Windows operating system.*
Via CD-ROM Use the ToolBook AutoPackager to create
a setup program. Ensure that users are running
the Windows operating system.*
Via the Internet or intranet Use the ToolBook Web Specialist to prepare
as a native ToolBook your application. Ensure that users have (or can
application displayed in a download) Neuron and are running the Windows
Web browser using Neuron operating system.*
Via the Internet or intranet Use the ToolBook Web Specialist to prepare your
application as a series of Web pages
Optimizing a book for CD-ROM takes more time than a normal save
(up to five times longer). In addition, if you make changes to the book
after optimization, you must optimize the book again. Therefore, make
optimizing for CD-ROM one of the last steps in preparing your application
for the AutoPackager.
You can also use the AutoPackager to update media paths if, during the
development process, you moved your application files to a new location
on your hard drive or to another computer.
The package created when you run the AutoPackager consists of all the
files belonging to the application (such as book files, media files, extension
files, and run-time files) as well as files that are required to install the
application (archive files, setup program files, and related data files).
When you package an application, the AutoPackager:
◆ gathers the media and application files needed to run your application
and checks the path information for the media in your application.
◆ prepares the files necessary to install your application using the options
you specified and creates the Setup and Package directories.
◆ give you the option to include ToolBook run-time files with your
application.
◆ allow you to specify which of your application’s files are copied to
the user’s computer.
◆ allow you to disable the custom installation option and install only
those files that you specify.
◆ give you the option to create Windows shortcuts for your
application.
Gathering files
The AutoPackager gathers the media files associated with your application
and updates the path information referenced in the media links of your
book or books. You can choose whether the package includes the current
(open) book or all of the files in the current book’s directory and its
subdirectories. For example, if you package an application that consists
of several books and these books are located within the central book
directory structure, each book is searched for references to media files.
When the AutoPackager encounters a media file located outside of the
central book directory structure, it can copy or move the file to the book’s
directory or a subdirectory of that book’s directory. For more information
about organizing book files, see “Creating a central book directory
structure,” earlier in this chapter.
Packaging files
Using the AutoPackager, you can specify the default installation options
that determine whether media, ToolBook, and cache files will be copied
to the user’s computer or whether they will remain on the CD-ROM.
The Setup directory contains all the files required to install your
application on another computer. In the Setup directory, you will find:
Copying files
When you create a package for distribution via CD-ROM, the
AutoPackager copies the archive and setup files to the directory of your
choice and creates any subdirectories within that directory. You can then
test the setup program from this directory structure before you generate
a CD-ROM.
3 In the Run dialog box, type d:\Setup.exe. The drive letter may differ; use
the appropriate letter for your CD-ROM drive.
Uninstalling an application
The package you create for distribution via CD-ROM includes the
InstallShield Uninstall program, which removes the application and its
files from the system.
When your users install your application, the Setup program adds entries
to the Windows Registry, which then allows files to be automatically
removed using the Windows Add/Remove Programs utility. This utility is
located in the Windows Control Panel. Your application will be listed by
the application name you assigned it in the AutoPackager.
Glossary
angled line A single line with three or more points, such as a zigzag. The
Catalog contains angled lines that you can drag and drop onto a page.
animation A file that you can incorporate as a clip in Instructor. You can
also animate objects in a book; however, you cannot save an animation
created in Instructor as an animation file or create a clip from it.
ANSI See American National Standards Institute.
application In Instructor, one or more books designed for a particular
purpose, such as online learning or information management.
argument A constant, variable, or expression passed to a function or
handler. In the following example, 33 is an argument:
x = sin(33)
See also constant, function, handler.
array A variable configured to work like a list or table of individual elements.
For example, the following specifies the value of one element in an array:
x[3] = x[1] & text of field “names”
See also variable.
ASCII See American Standard Code for Information Interchange.
audio CD Sound stored as tracks on a compact disc and played from
the compact disc. Audio CD is stored in digital format (as a series of binary
values), converted to analog sound within the CD-ROM drive, and then
played back.
Audio Video Interleaved (AVI) A format for storing digital video in a
file that alternates blocks of visual and sound information. AVI files are
particularly suited for storing on CD-ROM because their interleaved format
allows them to be efficiently retrieved by CD-ROM drives.
Glossary 502
Author level One of two working levels in Instructor. Author level provides
tools and commands for creating and modifying objects, including pages,
books, and backgrounds. Applications are built at Author level and run at
Reader level.
Automation A technology that allows you to access and manipulate the
objects, properties, and methods of other Windows applications from an
Instructor application.
AVI See Audio Video Interleaved.
Aviation Industry Computer-Based Training committee (AICC) An
industry standards group that publishes guidelines for interaction between
course management systems and computer-based training.
backdrop A bitmap image placed onto one or all of a book’s backgrounds.
Each backdrop becomes a property of its background.
background A design shared by pages in a book. Every book has at least one
background. Objects on a background appear on every page sharing that
background. Several pages can share the same background, and a book can
contain several backgrounds.
bandwidth The amount of data that can be sent via the Internet over a period
of time with the equipment being used. Bandwidth can refer to the connections
on the Internet, as well as the connection between a modem and an Internet
service provider.
baselines Lines that show the vertical spacing of text in a field or record field.
See also field, record field.
bitmap Also known as a paint object. A graphic created in a painting program
and stored as a map of the pixels that make up the image. Windows bitmaps
generally have .bmp or .dib file extensions. Bitmaps can be pasted or imported
into Instructor or assigned as book resources. See also resources. Compare
draw object, picture object.
Glossary 503
browser A software program that accesses Web pages on the Internet. The
browser reads the Web document and translates it into the final product
onscreen. The page appears as the author intended, combining text, graphics,
and jumps to other Web pages.
built-in message A message built into the Instructor system that Instructor
sends in response to user activity (for example, buttonClick). Compare user-
defined message.
button An object type that includes pushbuttons, command buttons, check
boxes, radio buttons, and label buttons. Buttons are often used to trigger
events or set properties.
call A reference in a script to another handler. See also handler, script.
called handler The handler that executes as the result of sending a
message, invoking a user-defined function in an expression, or using the
set or get command. See also handler, user-defined function.
calling handler Any handler that makes a call, causing the execution of
another handler. In OpenScript, send and forward statements call other
handlers. See also handler.
caption The text that appears in the title bar of a window, on a button, or
in the title bar of a book in place of the file name.
caret location The location of the insertion point within a text field or
record field, measured by the number of lines down from the top and number
of characters in from the left. The caret location is often used to define the
ends of lines in a text field. A line is designated by a carriage return/
linefeed, not by wordwrap.
carriage return/linefeed (CRLF) An OpenScript constant that represents
ASCII values 13 and 10, the characters carriage return and linefeed. CRLF
moves text to the next line in a text field or record field.
cascading menu A subsidiary menu that appears to the side of a submenu
and presents additional choices.
Glossary 505
client-side image map An image map for which the map information is
specified in the HTML file that contains the image. Clicks are processed by
the Web browser without interaction with a server.
clip A reference to a segment of any media source or file, including sound
files, audio CD, digital video files, animation, or videotape. Only the reference
is stored in Instructor. Instructor supports file-based clips, including sound
files, digital video files, and animation files.
clip library A file (extension .cpf) that contains a collection of clips
(references to media files) that can be used in one or more applications
and that can refer to different types of media. See also clip, media file.
clip text A printing option to cut off text at a field’s margin or at the
boundary of a column or row when printing a report.
Clipboard A temporary storage location where Windows places the item
most recently cut or copied. The Clipboard can be used to move text and
graphics between Instructor books and other Windows applications.
Coach A quick reference tool that provides context-sensitive information
about pages and objects. You can open the Coach from the Instructor Help
menu.
color A combination of hue, lightness, and saturation (HLS) or red, green,
and blue values (RGB). Objects created in Instructor can have a stroke color
and a fill color, which are chosen from a color palette or the Color dialog
box. See also hue, lightness, and saturation; red, green, and blue values.
color palette A predefined set of colors stored in a palette file (with the
file extension .pal). Instructor uses a 256-color palette. Visual media—
animations, videos, or bitmaps—have their own color palettes.
color tray An Instructor system object used to assign stroke and fill colors
to objects.
column report A report printed in columns; each column contains the
contents of one record field. See also record field. Compare group report.
Glossary 507
condition A special type of action that, when inserted into an action se-
quence, creates a junction at which Instructor follows one of two or more
distinct paths as it executes the action sequence. See also action, action
sequence, loop.
constant A value that cannot change, including literal numbers and strings.
For example, in the expression x + 2, 2 is a constant. See also literal value,
string. Compare variable and container.
constrain The action of limiting the proportions, angles, or movement of an
object when you create or move it on a page or background.
container Anything that can be set to a value using OpenScript. Variables and
properties are containers. Constants (such as the string constant “blue”) and
expressions (such as 1 + 2) are not containers because their values cannot be
set. See also constant, properties, variable.
control character A nonprinting character, such as a tab or a carriage
return/linefeed, that affects the appearance of text. See also carriage return/
linefeed, tab.
control structure A block of statements in a script that is run under particular
circumstances, such as in a loop or as a condition. Control structures are
defined by sets of OpenScript keywords such as if/then/else/end, do/until,
and condition/when/end. See also script, statement.
controller card A board installed in a computer that provides a hardware
link between the central processing unit and devices such as disks, monitors, or
speakers.
CRLF See carriage return/line feed.
crop To mask or hide part of a paint object. When you drag the handle of a
paint object to make it smaller, the paint object does not resize; instead the
area is cropped. When you resize a picture object or draw object, the entire
object is resized and no part of it is cropped. See also draw object, paint
object, picture object.
Glossary 509
cursor The image assigned to the pointer (select tool, insertion point,
I-beam, crosshair), depending on where the pointer is positioned and
whether a tool is selected. See also pointer.
cursor resource A cursor image that can be imported and shared as a
resource in one or more Instructor applications. See also cursor, resources.
custom colors In 256-color systems, a list of 64 colors that are available
beyond the standard 16 or 32 colors.
data field An individual entry in a data record in an imported or exported
fixed-field file or delimited-field file. Often a delimiter character, such as a
tab or comma, separates data fields from each other in data records. See
also delimited-field file, delimiter, fixed-field file.
data typing Assigning a format to a variable in a script that determines
what type of data the variable will accept (integers, floating-point numbers,
character strings, logical values, and so on). See also variable.
Debugger The window that displays script errors at Author level. The
Debugger can be used to step through a script one statement at a time to
isolate and correct errors. See also script, statement.
default A setting that Instructor supplies (for example, the character default
is System, bold, 10 point). Instructor has a default setting for any changeable
setting. All defaults are system properties. See also system properties.
delimited-field file A text file divided into data fields of any length that
are separated by a delimiter character such as a comma or a tab. All the
data fields in one line make up a data record. Compare fixed-field file.
delimiter A character such as a comma or tab that separates one data field
from another in a delimited-field file. See also
delimited-field file.
destination object In a drag-and-drop operation, the object that accepts
a drop from an object that is dragged (the source object). See also drag
and drop.
Glossary 510
fill The color or pattern applied to the inside of any enclosed object. You
cannot apply a fill color to paint objects or picture objects. See also paint
object, picture object, stroke.
filter A utility that allows Instructor to import and convert files from other
applications.
fixed-field file A text file in which each data field consists of a predefined
number of characters. Compare delimited-field file.
focus The object awaiting the next keyboard action. Pressing the TAB key
moves the focus. Only objects that can respond to keystrokes can receive
the focus. The insertion point in a field or a dotted rectangle in
a button shows a user the current focus.
focus window The viewer that currently has the focus. The focus window is
the viewer that accepts mouse and keyboard input (such as selecting check
boxes or filling in text fields). See also focus, viewer.
font In Windows, a font is the complete collection of styles and sizes for
a single typeface (such as Times New Roman) as part of a set installed for
a system’s display adapter, graphics card, and printer.
footer Text that appears at the bottom of every printed page.
frame window The portion of a window that contains the border, caption
bar, system menu, scroll bars, and Minimize and Maximize buttons. The
frame window surrounds the client area. See also client area.
FTP See File Transfer Protocol.
function An operation that uses a predefined formula and returns a value.
For example, the function round always returns the supplied value, which
may be a literal value or expression, rounded to the nearest integer.
Glossary 515
function keys The keys on a computer keyboard labeled F1, F2, F3, and so
on. Function keys can be used independently or together with the CTRL,
ALT, or SHIFT key as shortcuts for choosing menu commands and perform-
ing other tasks.
general system properties Properties of Instructor that affect every book
opened during the current Instructor instance. For example, Instructor uses
the value of the property sysDateFormat to format all dates.
global memory The area of memory available to all Windows
applications.
global variable In an action sequence, a variable whose value can be
accessed and used in any action sequence. See also variable, system variable.
Compare local variable.
graphic A paint object or picture object placed on an Instructor page.
See also paint object, picture object.
grid A set of nonprinting dots used at Author level to precisely align objects
on a page.
group A collection of objects that is defined to move and be resized as a
single object. Like any other Instructor object, a group has an ID number
and has properties that can be set.
group report A report printed in groups, where each group contains the
contents of the record fields from one page. For example, a group report can
print mailing labels from an address book. See also record field. Compare
column report.
gutter On a printed report, the space between adjacent columns in a
column report, groups in a group report, or Instructor pages (if you are
printing more than one page per sheet of paper). See also column report,
group report.
handle (1) A small square that appears at each corner and edge of an
object when it is selected. Handles are visible only at Author level. You can
drag the handles to resize an object. (2) A unique reference number assigned
Glossary 516
line spacing The space between individual lines of text in a field. Line
spacing can be set to single, double, or one-and-a-half lines. A field’s line
spacing is visible only when its baselines are displayed. See also baselines,
text field.
line style The visual appearance of a line (solid, dashed, dotted), determined
by choosing a style in the Properties dialog box.
list A group of one or more elements separated by commas. Instructor uses
lists for many data structures (such as the coordinates of a cursor or a
bounding box) and has special OpenScript commands to manipulate them
(pop, push, and so on).
list box A type of field used to display a list of choices; list boxes can be
defined as single-select or multi-select. Unlike combo boxes, a list box can
display more than one option at a time. Compare combo box.
literal value A string of characters or a number that is assigned to a
container or used to compare information. If a literal value contains spaces,
it must be enclosed in quotation marks. In the following example, New York
is the literal value:
text of field ID 1 = "New York"
menu bar The area at the top of a window that lists available menus.
Menu Bar Editor The Instructor editor used to create and edit menu bars.
menu bar resource A menu that can be shared as a resource in one or
more Instructor applications. See also resources.
menu item A single choice on a menu. If a menu item is not available, it
appears dimmed.
message (1) A communication Instructor sends to an object to indicate
that an event has occurred. (2) A warning or other information displayed
by Windows or Instructor that alerts a user to a problem and possible
corrections.
metafile Sometimes called a vector graphic. A file that defines an image as
a series of instructions instead of as a collection of pixels (as in a bitmap or
paint object). A metafile is exported from a Windows drawing program and,
when imported into Instructor, becomes a picture object. See also picture
object.
MIDI (Musical Instrument Digital Interface) A series of commands sent to
a synthesizer or sound card that controls pitch, length, volume, and so on.
MIDI is not recorded sound; rather, it is sound that is created digitally.
modal A way of displaying a window so the user cannot perform any other
action outside the window before closing it. For example, most dialog boxes
are modal; until you close the dialog box, you cannot return to the program
that displayed it. Compare nonmodal.
MP3 A file extension for the MPEG audio level 3 file format. MP3 files are
small audio files that can be transferred across the Internet easily. The
Universal Media Player in the Media Players category of the Catalog can play
MP3 files.
multimedia Information in different formats—text, graphics, sound, video,
and animation—that you can use in computer-based applications. See also
animation, digital video, media file, MP3, MIDI, wave audio.
Glossary 522
object hierarchy The order in which messages are passed from object to
object. For example, a message sent to a graphic object that the graphic
object’s script does not handle is passed to the page, then to the background,
then to the book, then to any system book, then to Instructor. See also
message.
object linking and embedding (OLE) A Windows technology that enables
you to create an object in one application and then incorporate it into
another application. An object that is used this way is called an OLE object.
See also client application, OLE container object, server application.
object-oriented programming A programming method in which programs
are constructed out of self-contained collections of data and routines,
referred to as objects.
offscreen image An image that Instructor first draws in memory and then
displays on the screen. Compare draw direct.
OLE container object An object that contains a reference to a linked
object or a copy of an embedded object. See also client application, object
linking and embedding, server application.
OpenScript The ToolBook object-oriented programming language, used
primarily in ToolBook Instructor.
operand A value on which an operator performs an action. For example, in
the expression a < b, the operands are a and b, and the operator is <. See
also expression, operator.
operator In an expression, a symbol or word that causes Instructor to
perform an action on operands, resulting in another value. For example, in
the expression a < b, the operands are a and b, and the operator is <. See
also operand.
orientation A setting that determines whether pages in a book are
presented in portrait mode (taller than they are wide) or landscape mode
(wider than they are tall).
Glossary 524
Palette Optimizer A utility you can use to adjust the colors used in im-
ported graphics so that they achieve a close match to the colors that are
available in the Instructor color palette. See also palette.
palette resource A color palette that you import for use in a book. When
you import a color palette, all imported graphics in the book use colors from
that palette. See also color palette.
parameter In OpenScript programming, the part of a statement that indi-
cates which object or data a command is to act on, the data a function uses
in the operation it performs, or the data passed with a message from one
handler to another. Also, a value defined for a shared action sequence or
ActiveX method that supplies information used in the execution of that
particular shared action sequence or ActiveX method. See also function,
handler, statement, shared action sequence.
parent object Any group, page, background, book, or system book that
contains and is directly above another object in the object hierarchy. See
also object hierarchy.
parent window A window that owns another window. Compare child
window, pop-up window.
path The course that an object follows as it moves during an animation.
You create a path in the Animation Editor by clicking to create vertices that
define the path. By setting the number of steps per second, the total duration
of the animation, and the animation rate, you can control how quickly and
smoothly the object moves along a path. The path is stored as a list of
coordinates for each step of the animation.
pattern A repeating arrangement of pixels used to fill a background or
draw object.
pattern palette A palette available at Author level from which you can
assign a pattern to a background or any enclosed object. Patterns use the
stroke and fill colors specified in the color tray. See also fill, stroke.
Glossary 526
Print Preview window The window that previews what a page will look
like when it is printed.
printer system properties Instructor properties that affect how reports or
pages are printed, such as the property printBorders.
properties Attributes of an object that define its appearance and behavior,
such as the object’s name, color, and whether the object can be dragged.
Properties dialog box A window in which you can view and edit an
object’s properties.
pushbutton A button style composed of a three-dimensional rectangle and
a button caption that appears to move when clicked. Often used to trigger
an action, such as navigating from one page to another.
query message A message sent to an object to determine its state or
the value of a particular property. For example, during a drag-and-drop
operation Instructor sends an allowDrop query message to each object
under the cursor to determine whether the object will accept a drop. See
also message.
question object A Catalog object with preprogrammed functionality that
allows you to construct different types of questions. Question objects can
manage the user’s response and score, and can also deliver feedback.
radio button A button style composed of a circle and a button caption.
The circle toggles a dot on and off when a user clicks the active area of the
button. Often used for a group of alternative items from which only one can
be selected.
Reader level One of the two working levels in Instructor. At Reader level,
a user can move between pages and books, click hotwords and buttons,
make selections from combo boxes, and type text in editable fields. Applica-
tions are used and tested at Reader level. Compare Author level.
Glossary 528
record A group of related data fields in a database file. For example, the
name, address, and phone number fields for one listing in an address book
are a record.
record field A text field positioned on the background of a page that can
contain different text on each page. See also background, text field.
red, green, and blue values (RGB) A means of specifying a color according
to the amount of red, green, and blue in the color. Compare hue, lightness,
and saturation (HLS).
reshape handles Handles that appear on a selected draw object when you
choose Reshape from the Draw menu that you can use to reshape an object.
Curves, angled lines, arcs, pies, and regular and irregular polygons can be
reshaped.
resources Interface elements (including graphics, cursors, fonts, icons,
menu bars, palettes, and shared scripts) that can be imported and shared in
one or more Instructor applications.
Rich Text Format (RTF) A text format that includes information about
character and paragraph formatting for use in transferring formatted text
between applications. Instructor preserves most character formatting and
some paragraph formatting of text imported from any application that
support RTF.
right-click menu The menu that appears when you right-click an object.
rollover graphic The graphic that displays when the mouse pointer pauses
over a button. In Instructor, you can assign a rollover graphic to a button in
the Properties for Button dialog box by selecting the option labeled Use
checked graphic as rollover graphic.
RTF See Rich Text Format.
ruler The horizontal or vertical scale used to measure and position objects
on the page. A hairline on each ruler shows the current location of the
pointer. See also grid.
Glossary 529
run-time A version of Instructor that allows a user to run, but not modify,
a book. A run-time version of Instructor is provided on the Instructor
program disc.
sampling rate A measure of how frequently an event is tested, or sampled,
to convert it from analog to digital format.
scope The specific handlers in which a variable’s value is available. For
example, the scope of a local variable is the current handler only. See also
handler, variable.
script A series of statements written in OpenScript that define Instructor’s
behavior. Scripts are object properties and are divided into parts called
handlers. Handlers define responses to specific events. When an event
occurs, such as when a user clicks an object, Instructor runs the corre-
sponding handler in the object’s script. See also handler, statement.
script editor The window in which you can create and edit an
object’s script.
scroll bars A bar along the right side and/or bottom of some windows and
fields used to view all the contents of a window with more information than
can be shown on screen at one time.
segment One leg of an animation path along which an object moves. When
you draw an animation path, you click to create a new vertex. Instructor
then draws a segment from the end of the existing path to the new vertex.
By default, segments are straight lines, but they can be converted to curves.
select To identify the target for the next action. Selected text is highlighted.
Selected objects display handles. When a page is selected, the page selection
indicator is highlighted in the status bar.
selection The text, object, or page that is selected. An object selected at
Author level becomes the target of commands you choose from the Instructor
menus. Move or resize the selection using its handles. When text is selected,
it can be edited or formatted.
Glossary 530
selection rectangle A dotted box that appears when you drag the pointer
across a page. When the mouse button is released, Instructor selects all
objects completely enclosed by the selection rectangle.
server A computer connected to a network or the Internet (or both) that
contains documents available via the network or the Internet.
server application An application that creates objects that can be linked
or embedded in a client application. Instructor is a client application that can
receive OLE information, such as graphics or text, from server applications.
See also client application, object linking and embedding, OLE container
object.
session One or more instances of any Windows application. See also
instance.
shared action sequence An action sequence that runs only when executed
as part of another action sequence. You can create a shared action sequence
that performs an operation and returns a value to the action sequence that
calls it. You can define parameters the shared action sequence uses to
complete any operation it performs. See also action sequence, parameter.
shared script OpenScript code that can be shared among Instructor
objects. Once defined, the shared script is stored as a resource in the book
and can be applied to an object as needed.
silent dragging An option for drag-and-drop behavior that specifies that
the source object can be dropped anywhere, even if the destination object
does not normally allow a drop. Silent dragging is used to create drag-and-
drop behavior for applications (such as tool palettes or clip art books) that
might be used in conjunction with applications not configured to receive
drop objects.
solid color A color that appears on a color display device when all pixels
are the same color. See also pixel.
Glossary 531
static object An OLE object that was embedded or linked but whose link
was severed. A static object has no link to its server application. See also
object linking and embedding, server application.
status bar The bar along the bottom of the Instructor window that shows
mouse position, name of the object under the cursor, information about the
chosen menu command, and the page selection indicator.
string Any combination of contiguous characters.
stroke The line element of an object. For fields and buttons, stroke color is
applied to text and borders. For draw objects, stroke color is applied to
borders and the stroke elements of any pattern used. For paint objects and
picture objects, stroke color is applied to the border. Compare fill.
style (1) An object’s visual attributes, such as its border type, line style, or
pattern. (2) The bold, italic, underline, and strikeout text attributes that can
be set using the Character dialog box.
submenu A menu item that displays a cascading menu when clicked.
Submenus are indicated by small arrows to the right of menu items.
syntax The rules for writing script statements in OpenScript or for creating
expressions in the Build Expression dialog box of the Actions Editor.
system book A book whose book script is shared by other books. System
books are useful for defining general scripts for repeated use by other
books. For example, you can put all of your user-defined functions and user
properties into a system book so that they are available for any applications
you create. See also user property, user-defined function.
system palette In a 256-color system, the list of colors currently used by
the video display device to display graphics. The 256 colors are drawn from
the 16 million colors available to Windows.
system properties Property that define default behavior for the entire
Instructor system.
Glossary 533
system variable A variable that maintains its value for the duration of an
Instructor instance or session. Any handler that declares the system variable
can access and change its value during a session. See also handler, local
variable, global variable.
tab (1) A character in text that Instructor uses to align text in fields. Tabs
are set using the Paragraph dialog box. To type a tab character in a field,
press CTRL+TAB. See also field. (2) The TAB key. Pressing TAB moves the
focus between buttons, editable fields, and combo boxes. See also tab order.
tab order The order in which Instructor moves the focus between buttons
and editable fields when a user presses the TAB key. The tab order can be
modified by changing the layer order of objects. See also focus, layer, tab.
target A system property that specifies which object received the current
message. You cannot set this property. See also system properties.
target book The book into which pages are imported from another book.
target window The viewer in which Instructor executes commands and
searches for objects. The commands can affect any page, background, or
object displayed in the viewer, or the viewer itself. See also viewer.
template A prebuilt book that you customize by adding content.
text field An Instructor object that holds text. A text field has properties
that determine its appearance and behavior.
textline One data element out of a text string separated by carriage return/
linefeeds (CRLF). The textline does not include the CRLF, which is used only
as a delimiter. See also carriage return/linefeed, delimiter.
tile A property of a window that contains a caption or the file name.
title bar The bar at the top of a window that contains a caption or the file
name.
ToolBook Web Specialist A wizard that prepares your ToolBook applica-
tion for Internet distribution. The Web Specialist can automatically export
Glossary 534
your application to DHTML. You can open the Web Specialist by selecting
Publish to Web from the File menu. See also application, DHTML.
tool palette The tools that appear at Author level for creating and working
with objects.
toolbar The bar containing buttons that are shortcuts for frequently used
menu commands. Displayed by default at the top of the Instructor main
window at Author level.
trace To go through the execution of a script in the Debugger one statement
or keyword at a time to locate an error. See also Debugger, script.
transition A special effect, such as a fade-out, that occurs as a user
navigates from one page to the next.
transparent A property that determines whether an object is displayed so
that objects on layers behind the object can be seen through the object. See
also layer.
ungroup To separate grouped objects into individual objects. Ungrouping
discards all the group’s properties and its script but does not affect individual
object’s scripts and properties. See also group.
Uniform Resource Locator (URL) An address used to locate Web pages
on Web servers. Much like your area code and telephone number identify
your region and then your location, the URL of a Web page identifies a
computer and then a specific document.
unique identifier A method of identifying an object in any book. Includes
the object type name (such as button, page, field, and so on), object ID
number, and the unique name of the page or background on which the
object is located.
URL See Uniform Resource Locator.
user property A property that a developer creates for an object beyond
Glossary 535
those which are built into the Instructor object, and for which the developer
can get and set values as with any other property. All objects in Instructor
can have user properties. For a list of user properties defined for an object,
get the value of the object’s userProperties property.
user-defined function A function in OpenScript that is defined by a
handler written by the developer, in contrast to a function that is built into
OpenScript. See also function, handler.
user-defined message Any message that is not one of the built-in
messages that Instructor sends in response to an event. The developer must
provide a corresponding handler for all user-defined messages. Instructor’s
default response to user-defined messages that are not handled is to display
the Execution Suspended message. See also
Execution Suspended message, User event. Compare built-in message.
User event A generic event that you can send using the Send User Event
action in the Actions Editor. When you send a User event, you can send data
(a literal value, variable, or expression) in a single parameter. See also
event.
value A piece of data such as text, a number, or a logical value.
For example, in the following statements, Joe, 3456, and true are all values:
text of field "name" = "Joe" --Text value
svQuantity = 3456 --Numerical value
visible of selection = true --Logical value
variables window The window that displays the current values for local
variables and system variables when you work in the Debugger. See also
Debugger, local variable, system variable.
vector graphics See draw-type graphic.
vertex, vertices The points defining the beginning and end of a segment in
a path animation. When you draw a path animation, you click to position a
vertex, and Instructor draws a segment between the vertex at the end of the
path and the new vertex.
video overlay See overlay video.
viewer A window that you can create in Instructor that displays pages from
any book. Viewers are composed of a frame window, a client area, and a
client window. Viewers can be used to create dialog boxes, tool palettes,
status bars, pop-up windows, and application startup screens. See also
client area, client window, frame window, pop-up window.
visual media clip Clips created from animation, video, photo CDs, or still
images. See also clip.
wave audio Sound recorded in a digital format and stored as a file with the
file extension .wav.
Web document An HTML file on a Web server. A Web document becomes
a Web page when it is viewed through a browser. See also Web page.
Web page A document that can be viewed and interacted with over the
Internet. Web pages can contain text, graphics, and links to other Web
pages. Web pages make up the content of the World Wide Web. See also
home page, Web document, World Wide Web.
Web Specialist A wizard that helps you to prepare your Instructor
application in a format that can be distributed on the Internet.
wildcard A question mark (?) used to represent a single character,
or an asterisk (*) used to indicate multiple characters in a file name or
search text.
Glossary 537