Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.


11005 - Using Calculation Ornaments to Minimize the Number of Icons (28 June 1999)

by - Joseph Ganci

I often use calculation ornaments  in those instances wherein you want to perform a subroutine and attach a Calculation ornament. This is not a substitute for the Navigate icon. I use it only when I want to call a subroutine from a script.

For instance, novices use Wait icons quite often just the way the manual states. If they want to have a 3 second wait, they put a 3 in the time field. They may have a situation where they have 5 display icons, with a wait in between each one.

Once they get more experienced, they realize they can put the variable IconTitle in the field rather than the number, and put the number of seconds to wait as the icon's title. That saves time when changes have to be made.

What I do when I have a situation like this is to only use one Wait icon in my whole file, placed under a perpetual conditional called Wait, which of course is a variable I create. The conditional feedback is two icons. The first is the wait icon, whose time field is set to the wait variable. This is followed by a calc that resets the wait variable to 0, which allows the subroutine to be called again.

Then, I get rid of the wait icons and instead attach a calculation ornament to each of the Displays. It contains the line:

wait := getnumber(1, icontitle)

Each Display icon's title is something like "wait 3 then show doggie" which allows the calc ornament to grab the number of seconds. As soon as wait changes value from 0 to 3 (or whatever number), it will force the perpetual conditional to activate, forcing a wait.

In this case, because it is a calculation ornament, when the perpetual conditional is exited, it proceeds to the Display icon to which the calc ornament is attached, not to the next icon on the flowline. That's actually what I was thinking earlier.

The result of this is that there are many fewer icons on my flowline. I'm not crazy about a ton of wait icons crowding my flowline.

I do similar things with other icons, such as movie and sound icons.

You have to be careful not to do this in rapid succession within the same script. It's also a good idea to encompass
the call with a SyncPoint, SyncWait, such as:

mysub := TRUE

Anyway, the Navigate icon is really the best approach unless you really need to do it from within a script.

There are 0 reviews
Add your review