September 27, 2002   Tip of the Week Mailing List
The Tip

Direct Icon references are a great thing in Authorware. If you refer to an icon with a direct reference IconID@"My Display Icon", then Authorware will automagically make sure that you have no other icons with that name. It will also track any changes to that Icon's title, so that you don't have to go into any calculations and change IconID@"My Display Icon" to IconID@"Running Horse Graphic". The "Connections" window will show references to your icon, so that you can make sure you're not deleting anything important.

But there are several problems with direct icon references. First, you have to remember the exact title of the icon and type it in correctly. You can't put icons with direct references in a library, and direct references in a Model become @"Deleted Icon" unless the icon you're referring to is also included in the model. In addition, if you delete the icon, you can get @"Deleted Icon" references all through your file.

So, what can you do to get the best of both worlds? I "borrow" an idea that I first heard about from Joe Ganci, which is to place an icon at the beginning of the flow line which stores the IconID's of key icons I'll be using throughout the piece--by referring to them with a direct icon reference. The code might look like this:
Framework := @"Main Framework"
Subroutines := @"My Kool Subroutines"
Sound := @"Variably linked sound icon"

I don't like having a large number of variables that all have the same purpose (storing key IconID's), so I use a property list to store my icon references:
Icons[#Framework] := @"Main Framework"
Icons[#Subroutines] := @"My Kool Subroutines"
Icons[#Sound] := @"Variably linked sound icon"

Joe suggests copying the references and pasting them back into the same calc, then commenting out the second copy. That way, if the reference does get broken, you at least know what the original icon was called. In AW 5.2 or higher, this is easier than ever, because you can just highlight the whole block of code and click the "comment" button.

As an aside, IconID@"My Icon" and @"My Icon" both evaluate to the same thing...the numeric IconID of "My Icon." IconID("My Icon") is similar, and will evaluate to that icon's ID, provided you have no other icons in your piece called "My Icon."

 

Did you know?

I've often been frustrated by the fact that I could not shift click or control click a series of files to import more than one file into a Display icon. The other day I was trying to resize the file import dialogue, when I noticed that the resize handle was not there. Instead, there was a plus sign (+).

Curious, I clicked it. You could have knocked me over with a feather when a whole new section of the dialogue opened to the right. Of course, this section enables you to add more than one file at a time to a Display. I've been using Authorware since 1996, and I am still learning more simple little things that make the day go easier.


 
Bob's da Man!
Many of you know that one of my unrealized ambitions is to become an ordained Minister of the Church of the SubGenius. One of the tenets of the church is the near deity of "Bob," who espouses the philosophy of "slack."

Bob Tartar at Macromedia has worked a near miracle in getting Authorware more of the respect it deserves on the Macromedia web site. In addition, he's posted a promotional code on his Blog that will allow you to get a discount off of your order of Authorware 6.5 (or any other Macromedia product). But hurry, as this will only be valid for the first 100 people!


Peeps

If you're on the Aware mailing list or read the macromedia.authorware newsgroup, you're probably a little curious about some of the names that go with the faces.

The MediaShoppe and DazzleTech have put up a great site, Authorware Pros, where you can post your face or just look and see who is who.


Blog

Here in Texas, we get a lot of exposure to Tejano music. If you haven't heard it, it's kind of like German oom-pah music with a thumping bass that is remarkably similar to the throbbing of a migraine headache.

My neighbors kindly serenaded me tonight with a large dose of this music while I was trying to write "The Tip" portion of this newsletter. By the time the sounds made it through my walls, it was mostly bass guitar with touches of accordion. It inspired me to deep contemplation of the many petaled lotus that is "killing rage."

I'm all right now. Really. And in case you're concerned for my neighbors, so are they.



  http://www.Authorware-Amy.com