March 7, 2003   Tip of the Week Mailing List
The Tip

Authorware's List variable type makes it easy to use the relationship between icons in your piece to do your programming for you. For instance, a common task might be to mark each page complete in a course, marking each section complete when all the pages have been finished.

If you use a multidimensional list for this, it becomes very easy to let Authorware do the thinking for you. Anything that saves me from thinking is definitely a plus in my book!

Imagine for a minute that you have a course that has an overall controlling Framework icon setting background and navigation. Let's call it "All Sections." Attached to the "All Sections" Framework are maps with each section. So the first page on this Framework would be Section 1, the second Section 2, and so forth. Within each Section map is a Framework, and each page on that Framework is a page of content.

I got hung up when I first tried to work with multidimensional Lists by trying to think of the whole thing at once. I now find it easier to think of it one piece at a time. Let's call our tracking List "Completed." Overall, Completed is a multidimensional list with an element for each section. Each of those elements is itself a list with 1's and 0's representing each page, depending on if the pages have been finished or not.

So, in my head, I really only think about the individual Section single-dimensional lists, which just happen to be all stored in the Completed list. Completion[1] is the linear list that contains the completion data for Section 1, Completion[2] contains the data for Section 2, and so on. Then it is easier to think of Completion[1][1] as containing the data for Section 1, Page 1.

I like to use a Conditional Response (the exact condition varies based on the version of Authorware you're using) that triggers once you reach the bottom of each Map that is attached to a section Framework. This Conditional can be used for things like initializing variables, automatically advancing to the next page, and tracking sections complete.

Within this response, you can use something like this to use the course structure itself to track completion:

Section := CurrentPageNum@"All Sections"
Page := CurrentPageNum@SectionFrameworkID
Completion[Section][Page] := 1

If Sum(Completion[Section]) = PageCount@SectionFrameworkID then

Checked@"Section 1 Menu Button" := True
end if
 
Did you know?

Every icon in an Authorware piece has a Checked variable. So another way to track completion is to actually "Check" each page as it is viewed. This has the disadvantage that you cannot use the Sum() function to quickly figure out how many pages have been viewed. It is also more difficult to save "Checked" data externally than to write out a list. However, it is another option that is appropriate in some situations.

Find and Fix Command

Today, I finally downloaded ClickCraft's Find and Fix Command. This Command allows you to specify your search criteria with just a click. If your criteria are more complex, the Command allows enough scripting to really pack a wallop!

The Command can let you do simple find and fix operations without knowing much at all about scripting. However, if you want to do something more complex, you'll still need to master the vagaries of CallTarget scripting.

One caveat is that the Help files state that when you register the command you'll get your code immediately. Figure on at least several hours' worth of "immediately." Try to do something else during this time, because the constant "trial version" messages are truly annoying!

All in all, though, it's a great command. Good work, Ron Lubensky!


Tip of the Week on Hiatus

I'm going to be traveling to Germany for EuroTAAC next Friday and will still be there the one after, so no Tip of the Week for the next two weeks.

  http://www.Authorware-Amy.com