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
There are 0 reviews
1034 - Why wont HotTextClicked trigger?
by - Joseph Ganci
Anybody had this?
I have some HotText. It is a simple menu. Click on (say) "Page 1" and you go to ... Page 1 of course :-)
So I decide to edit that text. Now it says "Start Here".
I have a perpetual conditional that triggers on HotTextClicked<>0. Works fine every time... right up until I edit that text. The Hot Text still does as it should ... it navigates me to Page 1, but HotTextClicked doesn't trigger any more.
I can't reproduce it in 5.2
OK, I've narrowed it down a little more.
Provided there is a number in the text, it works.
I have tried alternative tests, eg
I can append a digit to the word I want to use, and hide it by making it white ... that works.
Now I think I'm just missing something REAL obvious.
The situation is that your original name is "Page 1". Notice it has a number in it. You change it to "Start Here", which does not have a number in it. When you check to see if HotTextClicked <> 0, keep in mind that "Start Here", or any other string which does not have a number in it, equates to a 0. If a string does have a number in it, Authorware will take the first number of the string and use that in any situation where a number is called for. That may be the situation here as well.
You need to include a number in the string if you're going to compare it to 0. To avoid this you must compare it to "". Obvious? Only if you already know it! Obviously, then, this is not obvious. That's pretty obvious. The fact is, this stems from Authorware playing fast and loose with data types. Many programming languages would never allow HotTextClicked <> 0 because you're comparing a string with a number. Authorware says, no problem, I'll just extract the first number from the string and compare that. Oops, no number? Go to the back of the line.This is good for novices, because they don't have to learn all about data typing, but in a way it's also bad for them because it forces us to think through the process and see the hidden traps, like this one you've encountered.
Add your review