Authorware Development Tips



Top Ten Tips and Tricks


Understand and use the System Functions and Variables.
  Once you have a good understanding of the system functions and variables within Authorware, you can do almost anything with your applications. Macromedia has made it easy by including descriptions and example code for each type, which can be pasted directly into your calculations. Functions and variables can help you to easily determine and set user and course information, time and date, icon properties and user performance data.

View and dissect the Authorware Show Me files.
  Macromedia includes numerous Show Me files with Authorware. Those samples demonstrate valuable design and development techniques that can be applied to your projects. The code can be copied and pasted into your piece and modified as you see fit. There are other samples that developers have created and posted over the years. This site links to many of them.

Purchase the Buddy API Xtra.
  I use Buddy API in almost every application that I develop. Created by Gary Smith, Buddy API includes many useful functions not included in Authorware. I first found this xtra a few years ago when I was trying to replicate some Windows functions (minimizing the presentation window, creating dialog boxes, etc.). Buddy API extends Authorware in a huge way. The most valuable function is the ReadINI function and the WriteINI function, and here's why...

Use INI files instead of flat text files for external data.
 

Many developers use text files to store external data. With text files, it's difficult to and update text strings and make content dynamic. There's also a 32K limit on importing text, so files often have to be segmented. INI files present a better alternative.

Unlike text files, INI files allow you to store data in Sections and Keys. You are able to reference specific pieces of data, almost like you can with a database. Here's a sample sections of an INI file:

sample.ini

[Setup]
background=default.jpg
CourseTitle=Windows Basics
ModuleCount=2
SplashText=Welcome to Windows Basics!

[Screen1001]
background=lesson1.jpg
ScreenHeader=Starting Up Windows
graphic1=windows_icon.jpg
graphic2=cpu_user.jpg
Text1=This lesson will teach you how to start up Windows.
Text2=Click on the NEXT button to begin

[Screen1002]
background=lesson1.jpg
ScreenHeader=Starting Up Windows
graphic1=pc_front.jpg
graphic2=cpu_lab.jpg
Text1=Press the ON button on your PC.
Text2=Click on the NEXT button to begin

Building your screen is as easy as retrieving the specific chunk of text using the ReadINI function:

background := baReadINI("Screen"^currentscreen, "background", "", filelocation^"sample.ini")

Unlike flat text files, you don't have to parse the data; you can just assign the specified text to a variable.

The WriteINI function allows you to create or update an INI file. This function is used to handle simple bookmarking, store user preferences and scores, and modify content on the fly:

baWriteINI(UserID, "Score"^currentscreen, "Score"^currentscreen, filelocation^"scores.ini")

There is a sample posted on this site of a dynamic quiz that builds the content using an INI file and writes the scores to a different INI file.

NOTE: INI files can be used with web-packaged projects. You must include the file in your map file and download to the client system. You can then reference the file using RecordsLocation.


Use Property Lists instead of sequential variables.
  If you use custom variables, you might be tempted to use sequential variables to hold course or user data (ex. Answer1, Answer2, Answer3, etc.). This has the potential of growing out of hand; what if you wanted to track all responses on a 50-question quiz? By creating a property list and adding list items, you reduce memory requirements, improve performance, and make coding alot easier.

Apply Text Styles to screen text.
  As you add text elements to your projects, using styles will save you time and effort as the project grows. If you decide to change the look or size of your text, styles allow you to apply those changes globally.

Add comments to your projects and document your work.
  Functionality from one project can often be used in others, and over time it's easy to forget how complicated interactive components function. Also, if you are working on a project team, what seems logical to one developer might not be local to others. Comments should be used to document your logic, explain custom variables and provide a change record. Also, that late-night idea might not seem so brilliant in the morning (or a year from now), so add comments often and explain why and how it works. It's also a good idea to keep a master document of all projects with version history, description, audience and major features.

Create libraries and models to store useful chunks of code.
 

Authorware libraries are used to store a collection of individual icons and calculations. If you have graphics or sounds that are duplicated in a piece, the size of the project will not increase as additional linked copies are used. Libraries also benefit project teams, since team members are able to access and use a centralized set of graphics, sound and calculations.

While libraries are able to store individual icons, models can store entire flowlines and logic.


Use templates and external links.
  As much as you can, try to build your pieces so that logic and graphics can be reused. Templates, when used with external text and graphics, allow you to develop complicated pieces while eliminating repetitive code. If you are building an assessment, create a template for each question type instead of creating a screen for each question. External links to graphics and text allow you to customize the look and feel of a training piece at runtime and provide added benefits like multilingual text delivery, dynamic content and faster development time.

Network with other Authorware developers.
  There are lots of networking opportunities available on the Internet and around the country. One source of Authorware expertise is the Authorware Support Forum. With over 2,000 topics at any given time, you're sure to find answers to questions that you might have. You can also meet many knowledge folks at conferences or through the many Macromedia User Groups. Click here to access some of my favorite sites.

©1999-2003 Brian D. Williams Interactive Software & Design. All rights reserved.

Authorware File Downloads:

1.

Drawing Program
This example shows how to use advanced scripting to creating a drawing program.
(drawing.zip)
2.
Quiz Template
This example shows how to use INI functions to create a dynamic quiz with random questions and answers. (309K)
(quiztemplate.zip)
3.

Setting Up a Database
This example shows how to integrate an Access database with an Authorware project. The AW7 Version includes additional SQL statements and info on DSN-less connection strings. (338K)
(database.zip)

(database_v7.zip)

4.

Drag and Drop
This example shows how to set up an advanced drag-and-drop interaction with the faster return of pieces.
(104K)
(bdi_draganddrop.zip)

5.
Drag and Match
This example shows how to set up a drag-and-match interaction. User draw lines to match a label with a section of a picture.
( 100K)
(bdi_connectthedots.zip)
 
NOTE: All samples are for Authorware version 6.5.

Tutorials for Beginners
These Flash-based tutorials demonstrate documented Authorware features that new users might not know about.

1.

Importing Multiple Files
Do you know about the plus sign in the corner of the import dialog box? This feature allows you to import multiple graphics at once.
(importdialog.htm)

2.
Debugging with the Trace Function and Window.
The trace function can help you to debug your projects.
(tracewindow.htm)
3.
Attaching Calculations to Icons
Attached calculations to icons help to organize your scripts and comments.
(attachcalc.htm)
 

Authorware Extensions:

1.

Password Font
Hate having to use KOs or scripting for masked passwords? This font is all dots! (14K)


(bdipassword.ttf
)

2.
Drawing Cursors
These cursors can be added to Authorware when using drawing functions. (2K)
(bdicursors.zip)
3.
Hand Cursors
These cursors can be added to Authorware when using dragging or movable objects. (1K)
(handcursors.zip)
 

Links to Authorware Websites and Resources

BDi Software™ was established in 1999 to create educational products that do more than entertain. The majority of software classified as "edutainment" has very little educational value. Parents and teachers have expressed a need for software that teaches fundamental skills and reinforces the concepts learned at school and at home.

BDiSoftware.net™ was established in 2003 as the web hosting services division of BDi Software. This site offers inexpensive web and e-mail solutions for small businesses, schools and individuals.