June 8, 2003   Tip of the Week Mailing List
The Tip

Have you ever needed to delete nine or ten pages from a Framework, or maybe use Edit > Change Properties on responses seven through nineteen on an Interaction? The old routine of selecting five children, then scrolling, selecting 5 more, scrolling, and so on, can get old pretty quick.

I like to use a bot to quickly select contiguous children of the same parent. A bot is a piece of code in an Authorware piece that can affect the rest of the code in the piece. They do this by taking advantage of the Target functions, but they don't use a wizard interface as a Command or KO would. Note that bots only work during authoring.

I like to temporarily place a selection type bot right after the icon it is to affect. I put the Start flag before the bot and the Stop flag after the bot, then run the piece from the flag.

I often use code similar to this:

repeat with x := GetNumber(1, IconTitle) to GetNumber(2, IconTitle)

ChildIcon := ChildNumToID(IconPrev(IconID), x)
SelectIcon(ChildIcon, TRUE)
end repeat

As you can see, the bot is set up to read its own title, looking for numbers. It starts from the child whose number matches the first number in the bot calculation title, looping until it has selected the child with a number that matches the second number in the bot's icon title. For instance, if you titled your bot "Select icons 2 to 15," the selection would start with the second page on a Framework placed just before the bot, and all of the pages between two and fifteen would be selected.

Did you know?

You can quickly find out how many pages are attached to a Framework by looking at the Framework's Icon Properties. Unfortunately, the Icon Properties dialogue for Interaction icons and Decision icons does not include the number of children these types of icons have. However, you can display the PathCount and ChoiceCount variables to discover this information quickly.

Authorware 7 Announced!

Macromedia announced Monday that Authorware 7 will be released soon. No, don't ask me when it will be available. I don't know!

Fly free on Northwest!

If you fly frequently, you could get a free round-trip ticket on Northwest Airlines after just three trips. Just register for the promotion and make three qualifying round-trip flights between now and October 7.