June 7, 2002   Tip of the Week Mailing List
The Tip

A question I see a lot is "I have a Text Entry set up, but if the user exits the frame without pressing the Action Key, I can't tell what was entered. How can I get this information?" One way is to detect that the user is leaving the frame with a conditional or with code attached to the next and previous buttons.

Another way to do it is to use an Edit Windows Control. Windows controls were new in 5.2, and are improved for Authorware 6. They allow you to use the same type of objects you would see on a web-based form or the dialogue boxes in Authorware itself. You will often see Windows Controls abbreviated to WinCtrls in Authorware documentation. This is because the external functions used to create them are contained in WinCtrls.u32, located on your Authorware 5.2 or 6 CD.

One advantage of using WinCtrls is that you can set each control to reflect and set the value of an Authorware variable. In other words, setting the variable will instantly change the text in the control, and typing into the control will change the variable.

Probably the easiest way to set up a WinCtrl is to use the Windows Control Knowledge Object. Just drag one to the flow line to get started.

If you are only planning to have one control on screen at a time, just use the default wcID as the ID for your control. If you are planning to have more than one, you'll need multiple variables or a list variable to store the ID's of several controls. Select "Edit" for the type. Draw a box in the window for your WinCtrl, using the boxes for Left, Top, Width, and Height to adjust the size and location.

If you want something to happen every time the value of the control changes, leave the wcChageEvent in place. If you have multiple WinCtrls, you can choose to have one variable so that you only need a single Conditional to respond to the changes in all controls or you can use a variable for each control. Keep in mind that the variable you are about to "bind" to the control will reflect its value at all times, so you may not need to use this feature at all.

To "bind" the control to its associated variable, drag a "Windows Control - Set Property" KO onto the Flow line and move "Variable Aware" from the "Available properties" side to the "Selected Properties" side. Change its value to True. Next, move "Variable Name" from the "Available properties" side to the "Selected Properties" side. Type the name of the variable you want to reflect the control's value. Make sure the variable exists in your Authorware piece.

Now, whenever a user types into the control, the value of that variable will reflect whatever they typed, whether they hit "Enter" or not. For information on using WinCtrls without Knowledge Objects, see "Using Windows Controls Knowledge Objects and WinCtrls.u32 > Using Authorware Windows controls variables > Coding a control" in your Auhtorware 6 Help Files.  
Did you know?

I once downloaded the HotSpotButtons example file from Authorware.com. It showed how to use lists and PointInRect() to "fake" buttons, using a single hot spot instead of many buttons. I was stumped by this example. Not by the lists or the PointInRect(), but by the fact that I could not figure out where the "Continue" button was coming from. I could see no button responses or wait Icons. I poked around and poked around in the file, and finally I double-clicked the last thing I could think of—the diamond-shaped decision path properties. Lo and behold! each path was set to pause before branching. The mysterious "Continue" buttons was the "implied" Wait Icon you get when you select that setting.  

Next Chat June 13
Open Chat

The next chat will be anything goes. If you have an Authorware question or comment that you didn't get a chance to discuss in one of the previous chats, bring it. A lot of knowledgeable people are "regulars" at the chats, so you should get your money's worth.

The chat will be at 6:30 Central Daylight Time on Thursday, June 13. This is 12:30 current UK time, 11:30 GMT, 7:30 US Eastern Time, 5:30 Mountain, 4:30 Pacific. Dress is casual.

To get to the chat room, go to my website. Click the CHAT button at the top of the page, just under the logo.

Authorware-Amy.com featured in TAAC Newsletter

A couple of months ago, Mark Henry of Rampant Lion Interactive interviewed me for the TAAC 7 Newsletter. If you have never been to The Alternative Authorware Conference, it is a real eye opener.

The greats in the industry, as well as the people who aren't well known because they are less vocal, will be there, showing off their favorite tips and tricks. I find TAAC and events like TAAC to be very humbling


TAW II Getting Closer

Today is the last day that you have the chance to get your TAW II ticket paid for in a special drawing for a free admission. If you are going, Sign up now!


Enquiring minds want to know

Is this the world's first feline brain transplant?

No, Tux is just admiring the results of Jake's regimen of diet and excercise. Don't you think she is svelte?

When asked if she would consider such a move, Jake said, "Talk about your counter-productive medical procedures. No."


  http://www.Authorware-Amy.com