authorware beginner's guide

60
Authorware Beginner’s Guide for Building Experiments © Daniël Lakens 2005

Upload: andresfelipebustamante

Post on 17-Jan-2016

74 views

Category:

Documents


7 download

DESCRIPTION

Authorware

TRANSCRIPT

Page 1: Authorware Beginner's Guide

Authorware Beginner’s Guide

for

Building Experiments

© Daniël Lakens 2005

Page 2: Authorware Beginner's Guide

Index Index ................................................................................................................. 1 Introduction ........................................................................................................ 2 1. So, when do I get to program something?............................................................ 3 Where you will learn the basics of Authorware and the main interface 2. So now what? ................................................................................................ 10 Where you will change the standard settings of your experiment 3. Boooooooooring. ............................................................................................ 12 Where you will use radiobuttons and the decision icon 4. Hey, this is really a lot of work! ........................................................................ 17 Where the functions of the Text Entry are explained 5. Maybe I prefer paper and pencil tasks. .............................................................. 20 Where you will make a standard instruction display and use the wait icon 6. So am I pretty good now, or what? ................................................................... 25 Where you build your first questionaire 7. Authorware programming is a piece of cake! ...................................................... 30 Where the functions and variables are introduced 8. Riiiiiiight. Do I look like a nerd to you?............................................................... 33 Where all different time-related programming is shown 9. Everything I made looks so… plain. ................................................................... 36 Where looks do matter and the conditional response put into practice 10. How about that questionnaire I made?............................................................. 40 Where you are instructed in the functionality of loops 11. Ok, now give me something difficult. ............................................................... 42 Where we wander around in the wonderful world of lists 12. Is that the best you can do? ........................................................................... 47 Where the navigation through the experiment is broadend 13. So long, and thanks for all the fish! ................................................................. 52 Where the safe storage of your data is ensured 14. How about packaging?................................................................................... 56 Where the ins and outs of distributing an experiment are discussed 15. So now can I go? .......................................................................................... 58 Where some advice is given for further information about programming

1

Page 3: Authorware Beginner's Guide

Introduction Welcome to this short introduction to using Authorware. Using a computer to administer experiments has several advantages over paper and pencil tasks. First, all data is directly stored on the computer, which saves a lot of time manually typing in the data, and it’s very simple to import the data in statistical software like SPSS. Second, Authorware provides a lot of ways to interact with the participant. The program can guide the participant through the experiment, react to the participant’s choices, and provide feedback. Third, it can make experiments more enjoyable for participants. Since the first version in 1987, Authorware has developed into a program that is easy to use and which can integrate text, sound, animations and digital movies to create interactive programs. Authorware is therefore a powerful tool for social psychological research. It’s important to note that Authorware is not a very accurate tool to measure reaction times. If you are interested in experiments where reaction time is the main dependent variable, consider using E-Prime software. For all other experiments, Authorware will be your best bet. I recommend using the latest release of Macromedia Authorware. All examples in this guide are based on Authorware 7.02 but will work with older versions of the program as well. This guide is written for Authorware on the PC. This will not make it useless if you have a Mac, but it can make it slightly more unpractical. I will use a lot of examples to teach the basics of programming in Authorware. Every example will teach you something new. They build on each other, so it is advisable to start with the first exercise and work your way through to the last one, even if you do have some basic skills in Authorware programming. Tips are given in all exercises which could be of use to you even if you know the basics. This beginner’s guide is not a reference manual; it is a workbook. There is no index in the back. You follow all examples step by step, read the explanations and learn the basics of making experiments in Authorware. However, this guide has turned out to provide a rather complete overview of different possibilities of Authorware and providing clear examples of how to put these to a practical use. There will be situations where you will need Authorware to do something we have not discussed here; in most cases, it will be possible to program Authorware the way you want, but the commands needed are too specific for a beginners guide. In the last chapter, we will give you some advice on where to look for help in those situations. I am not a computer expert myself. But that’s not necessary to learn how to use Authorware, and it’s not necessary to teach someone else the basics of the program. Depending on your skill level, making all examples in this guide will take you about 20 hours, making this guide extremely condensed. Still, I wouldn’t advertise this guide with the slogan “Learn Authorware in 20 hours!” The only real way to learn programming experiments is by doing so yourself, and it will take a lot longer than 20 hours. Still, a good start will get you a long way, and in my own personal view, this Authorware guide for beginners will be the best introduction to programming experiments in Authorware you can get. Finally, I’d like to thank my colleagues Chris Reinders-Folmer for his excellent help and comments, and Wilco van Dijk for giving me the time to work on this guide. If you have comments, suggestions, questions or want to report some errors that I surely will have made, feel free to mail to [email protected]. Daniël Lakens March 2005

2

Page 4: Authorware Beginner's Guide

1. So, when do I get to program something? Well, almost. We’ll explore the Authorware interface by building our first interaction. Open Authorware, and start a new file.

This is what you will see. The vertical line with the white hand next to it is the ‘flowline’. For now, it’s empty. To the left of the screen, you’ll see the Icons bar. In it are all icons Authorware has, 14 of them. The names of all Icons are shown in tooltips; just let the mouse cursor rest above an icon and you’ll see the name appear. The top-left icon is called the ‘Display Icon’. This is the one we want to have on the flowline. You can put icons on the flowline using the Click-and-Drag technique. Click on the Display Icon and hold down the left mouse button: the cursor arrow now changes to a display icon. Still holding down the left mouse button, drag the icon over to the flowline and release the mouse button. The Display Icon will appear on the top of the flowline. Now, select the name next to the display icon by clicking on it. Type in a new name instead of the ‘untitled’: in this case, name it ‘Intro’.

TIP: Always name icons. This will help you enormously when building bigger Authorware pieces. The Display Icon is generally used to visually present information, such as text or pictures, to the participant. The Display Icon we just put on the flowline is grey, and not black like in the Icons bar (at the left of the screen). Why is this? If an icon is grey, this means that it is empty, and therefore will not do anything yet. If participants encounter an empty Display Icon, they’ll just see an empty white screen. That’s not what we want, so let’s put something for the participants to see in our icon. Double-click the display icon we have put on the flowline to open the presentation window. This presentation window is what your participants will see when they go through the experiment. For now, it looks pretty empty, so let’s figure out how to put something in the presentation screen. When double-clicking the display icon, Authorware automatically opens the Tools bar. On the toolbar (see picture on the next page) are icons for the options you have in the

3

Page 5: Authorware Beginner's Guide

presentation window. The ones you’ll use the most are the text and the arrow icons. Authorware provides you with a great scope of layout options, but the downside of this is you can’t just go and type in text in a Display Icon like you would in Word. You have to select Text in the Tools bar first, and you must deselect Text by clicking the Arrow symbol if you want to perform other operations after you typed in something (for instance, if you want to drag the text you just typed in to another location on the screen). Displaying text in the presentation window is pretty straight forward. Click on the ‘Text Icon’. The cursor changes from the arrow-cursor to the bar-cursor you probably know from Microsoft Word. Click with this cursor somewhere in the lower half of the presentation window. A blinking cursor appears under a horizontal bar; this is a text field automatically created by Authorware. Now type in: ‘Welcome to this experiment.’ After you’ve done this, you realise that you wanted to have this text a lot higher, actually in the upper part of the presentation window. Click on the ‘arrow’ icon in the Tools box. Click-and-Drag the text to the upper part of the presentation window. Well done! But wait! Now you realize that the welcome you typed in is a bit curt. To edit the text, click on the ‘Text’ icon in the Tools bar, click on the text we just typed into the display icon, and correct the sentence. Change the text to: ‘Dear participant, welcome to this experiment.’ Oh dear, look what you did now. The text no longer fits on one line but now consists out of two lines! Now how do we fix this? Quickly click on the ‘arrow’ icon again, and look: six white squares appear on the outer edges of the text field.

These squares are at the borders of the text field. To make the text field bigger, click-and-drag the white squares on the right side of the text field further to the right so the sentence fits on one line. If we run the experiment like this, the experiment will simply freeze on this screen. Alternatively, if we have more than one icon, Authorware will display all without pause. This will make it impossible for our participants to read what’s actually on the screen. For this, we first have to close the display icon. You can close the display icon by clicking the ‘close’ button in the top right of the presentation screen. Alternatively, use the following shortcut:

TIP: Press Ctrl+1 (press the ‘1’ key while pressing the ‘Control’ key): the presentation screen disappears. Press Ctrl+1 again. The presentation screen re-appears. Shortcuts like these will save you a lot of time while programming. Now we wanted to give the participant a moment to read this introduction before we

proceed with the experiment. For this, we can use a Wait Icon ( ). The Wait icon freezes the experiment for a certain number of seconds. In the Icons bar, you really can’t miss the Wait icon. If you haven’t figured it out already: it’s the one that has ‘wait’ written in it. Click-and-drag one onto the flowline, name it ‘Wait’, and then double-click it. A pop-up menu appears, in which we can edit the Wait icon’s properties. Two options are selected as a default: ‘KeyPress’, which makes the program wait until the participant has pressed any key, and Show button, which makes the program wait until the participant has pressed a button. Neither is required at this stage, so deselect both options. We do want a Time Limit, however. Type the number ‘8’ in the corresponding field. Now, when the participant reaches the Intro screen, the experiment will pause for eight seconds, thereby giving the participant more than enough time to read our welcome message.

4

Page 6: Authorware Beginner's Guide

Now, we are going to need a bit more than just an introduction screen. But before we can present more information or questions to the participant, we must first erase our welcome screen, otherwise this screen will remain in the background during the whole experiment. This will not only look sloppy, overlapping text will make further text illegible as well. We must make Authorware erase our welcome screen after the participant has seen it.

Thankfully, we have just the icon for the job: the Erase Icon ( ). The Erase icon can erase any information you specify from the Display screen. This is a very useful feature: in some cases, you want to remove everything you have displayed so far, in other cases you want to remove one specific item from the display screen while preserving others. The Erase icon therefore is a crucial part of Authorware programming. Where then do we find this important icon? It’s the third from the top in the left row in the Icons bar, the one with the little box in it. Click-and-drag it to the flowline, rename it to ‘EraseIntro’ and open it by double-clicking. A menu appears, to the right of which you see two options: ‘Icons to erase’ and ‘Icons to preserve’. We want to erase a specific icon this time: the introduction screen. You will see this screen in the background as you open the erase icon (if not, close the erase icon menu, re-open the Intro display icon, close this again, and re-open the Erase icon). Now just click on the text in the background. The text will now disappear, and the Intro display icon will appear in the list of objects to be erased. When we run the experiment, Authorware will now first display the introduction, then wait for eight seconds, and then erase the introduction screen. Now let’s try something that will allow the participant to actually interact with the program. We are going to ask our participants to fill in their name. This will introduce us to another type of icon: the ‘Interaction Icon’. Drop another Display icon on the flowline, and name this ‘Question’. Open it, and type ‘What is your first name?’ somewhere. Now we need to make sure the participant can actually type in his or her first name somewhere. We therefore want to interact with the participant, and for this we need the Interaction icon from the Icons bar. The Interaction Icon is the top-right icon, a right arrow with a question mark in it. Click-and-Drag it to the flowline, just below the display icon. Name it ‘EnterName’. The interaction icon tells the flowline: ‘before we can proceed, we need an answer from the participant to a question, and the answer we need should be given here to the right of the arrow.’ Normally the flowline runs only from top to bottom, but it has to pause when it encounters an interaction icon and wait until it receives input. In this case, we want the participant to fill in his or her name. We need to specify how we want Authorware to ask this to the right of the interaction icon. By click-and-dragging a ‘map’ icon (from the Icons bar) to the right of the Interaction Icon, we

5

Page 7: Authorware Beginner's Guide

can select how we want the participant to respond. If done correctly, you should see the same on your screen as in the picture to the right. The pop-up ‘Response Type’ menu allows you to specify what kind of interaction you want. Authorware gives you all possibilities the program has, from which you can choose the type that best fits your needs. In this case we will choose ‘Text Entry’, as we want the participants to type in their first name. Select the Text Entry option by clicking on the corresponding radio button (the empty white circle to the left of each interaction type in the menu) , and then click on ‘OK’. A new field appears, again named ‘untitled’. For now, let this be. Notice that the … symbol above the map icon and right of the interaction icon reveals that the interaction is a Text Entry. So, where do we click now? We have 3 options: the interaction icon, the text entry icon, or the map. It can sometimes be confusing where to adjust certain aspects of your interaction. There is a simple rule, however: all visual aspects you want to change, like location on the screen and the looks of the interaction, are on the flowline (so in the Interaction icon) and all properties of the interaction the program needs to know are to the right of the interaction (so this time in the text entry icon). So let’s change the visuals first. Double-click the interaction icon. The interaction icon itself works like a Display Icon. By double-clicking it, we are back at the presentation window again, and here we can change its visual aspects. You see a marker ( ) and a dotted text entry field. You can click and drag the entry field to anywhere in the presentation window. You cannot see your text display now, so it’s hard to tell if the text entry is anywhere in the right place compared to the text you typed in, but this is a point we will come back to later. For now, just guess a little where it will be ok. We can change all kinds of visual aspects of the Text Entry by double-clicking on the text entry field. A new menu called ‘Properties: Interaction Text Field’ pops up, which features options to change the font and layout of the Text Entry. For now, leave this be and click ‘OK’, and close the presentation screen (with Ctrl+1). We are not so much interested in how the Text Entry looks, but more in the inner workings of the Text Entry. For instance, what kind of responses the Text Entry will accept. Double-click on the text entry interaction itself (the small arrow and dotted line to the right of the interaction icon). There is a Text Entry tab and a Response tab. In the top left field, Type in * (the star located above the 8 on your keyboard). This is called a ‘wildcard’. A wildcard will allow a text entry to accept any kind of text input. You could also type in a specific name, such as ‘James’, but then the text entry would only accept people named James: a selection procedure which will unfortunately get you rather small samples. Sometimes, when you want people to only type in a specific text entry, it is useful to put something else in this field then *, but for now use the wildcard. Then click on the Response tab.

For now, we are only interested in the field next to ‘Branch’: this field tells Authorware where the flowline should go to after the participant has interacted with Authorware: the options are ‘try again’ (useful if they responded in the wrong way to the interaction), ‘continue’ (useful in more complex interactions) and ‘Exit Interaction’ (meaning you want

6

Page 8: Authorware Beginner's Guide

to continue with the flowline after the input). Choose exit interaction. Notice the flowline changed to resemble the picture here on the right. The flowline makes a small detour to collect a response from the participant, and then continues. So are we done now? Well, we are far enough to take a look at what we made. Press the ‘Run’ ( ) button in the taskbar. You’ll see the introduction screen, which will disappear after eight seconds. Next, a screen will appear in which you are asked for your name, and somewhere under it you will see a text entry blinking. If your text entry is not nicely aligned with the question on the screen, then this is the time to fix it.

TIP: In the presentation screen you can click-and-drag text and images to a better location on the screen. If you accidentally double-clicked somewhere, just run the Authorware piece again. Type in your name in the text entry and press Enter.

TIP: Participants have to press ‘enter’ to exit a text entry interaction. Because this is not self-evident, be sure to tell them to ‘press Enter’ in your experiments. Always guide your participants through the interaction best you can. So, what did Authorware do with the name you just typed in? Exactly what you told Authorware to do with your name: nothing. If we want to store the name the participant filled in, we need to tell Authorware to do so. So let’s go back to the flowline and double-click on the map icon underneath the Text Entry interaction. Another screen opens, with a new flowline, and in the top right of the screen you see a label ‘Level 2’. A map works the same as a folder on your computer: it helps to keep things organized. As you might have noticed, we are halfway through the flowline already, and have only asked someone’s name. Authorware saves you from scrolling down a flowline of 200 meters by working in folders (in folders in folders in folders in folders) which each contain a flowline on the next level. When the flowline encounters a Map icon, it will proceed on the next level (in this case, Level 2). Once the flowline has passed all icons in the map, it will return to its previous level (in this case, Level 1). However, if the Map icon includes map icons itself, the flowline might go to lower levels (Level 3, 4 etc.) first. Maps may save you from scrolling but sometimes you’ll click yourself to death; watch out for tips that save you from some clicking.

TIP: If you don’t want to put your icons in maps inside maps, you can also increase how much of the flowline you can see on the screen by increasing the Flowline window. Alternatively, you can right-click inside the white window and select ‘Scroll Bars’. If there are more icons on the flowline to fit the window, a scroll bar will appear, allowing you to scroll to icons on the bottom of the flowline. However, using maps will often save you the most time when you are browsing through your experiment. On this Level 2 flowline we’ll click-and-drag the most important icon of all: the calculation icon ( ). Name the calculation icon ‘NameSave’ and open it by double-clicking. In this screen, that looks like Notepad, you have to type in some Authorware programming.

7

Page 9: Authorware Beginner's Guide

Sidestep on programming: Programming works with functions and variables. For example: if month = 12 then NameMonth := “December”. The if – then structure is a well known function in programming, month is a variable that Authorware computes by itself, or a system variable, NameMonth is a variable we can make ourselves, and December is a string variable, for instance in this case a word. This may look kind of confusing in the beginning, but you will learn this pretty soon. This expression reads as follows: if (a variable the system keeps track of itself called the) month = (equals) 12, then (a variable we made and want to use called the) NameMonth := (becomes) (the word) December. Most important to remember now is that the := symbol should be read as ‘becomes’. You may wonder what the deal is with all the colours, but text written inside a calculation icon automatically gets different colours depending on what the meaning is in Authorware. String variables are displayed in purple, variables you made are green, system variables black and bold, and logical operators red. You don’t have to colour them yourself.

TIP: If you want to give a variable a number value, you can just type in the

equation. E.g., WhichMonth := 12. But if you want to give a variable a word as its value, you must put this word between quotation marks. E.g., NameMonth := “December”. Authorware considers words that are outside of quotation marks as variables, not as values. So what do we enter to save the name? First of all, we have to make a variable. A variable means just this: something that can vary from time to time or person to person. In this case it is the name that varies from participant to participant. We want this variable to hold, or become, the name a participant typed in the text entry. To program this, type in the next short sentence in the calculation icon (Authorware will take care of the colours): NameSave := EntryText The variable we create here, NameSave, becomes the Text people just typed in in the Text Entry interaction. But Authorware will not automatically know that NameSave is a variable we want Authorware to store. Therefore, when closing the calculation icon, and clicking ‘Yes’ to save the changes to the calculation icon, the screen on the right appears. Authorware saves the new variable called NameSave in the program. You have the option to give a short description of the variable. For short experiments you will remember what every variable means, but if you have over 100 variables in your experiment with similar names you might want to use this option to make things easier for yourself and for others who might use or modify your experiment later on. Type in ‘name of participant’ in the description field en press ‘OK’.

TIP: Give all variables that you want to save to analyze eventually a name that ends with ‘Save’. That way you won’t forget any in the end. Now we managed to Authorware remember a name the participant typed in, we also want to be able to use it to address the participant in the remainder of the experiment. We want the word the participant typed in to be displayed on the screen. In order to display a name, we first need to erase everything in the Display field. We can do this by

8

Page 10: Authorware Beginner's Guide

using the other erase option of the Erase Icon: not to erase a specific icon, but to preserve a specific icon. Drop another Erase icon at the bottom of the flowline, and rename it to ‘Erase All’. Double click the erase icon on the flowline to open it. Again, you can choose whether to specify the items you want to erase or the items you want to preserve.

TIP: An easy way to erase everything is to preserve nothing. Check the radiobutton next to ‘icons to preserve’. By leaving the field next to it empty, the Erase Icon will do exactly what you have told it: it will preserve nothing. Now close the erase icon. Click-and-Drag a new display icon to the flowline under the erase icon and name it DisplayName. Double-click it to open. Here we want to write ‘Hello’ followed by the name of the participant. To use the current value of a variable in the presentation window, you have to write the name of the variable in between { } brackets. In this case, click on the Text icon in the Tools box and write somewhere on the screen: Hello {NameSave}! At first, this variable will have the value 0 (which is the standard initial value for variables). If you run it and type in a name, Authorware will store that variable. At this point, the variable NameSave will have the name the participant filled in as its value, for instance “Daniel”. A variable can have every value, a word or a number. Run the Authorware piece. After typing in your name the screen will display ‘Hello’ followed by your name. Congratulations, you’ve just programmed your first piece in Authorware! Now throw away the Authorware piece you just made. Close Authorware, and don’t even dream about saving it. That’s right, delete it, and erase it from the hard drive, gone. What you just made was the worst Authorware piece you’ll ever make and you’ll never want to see it again in your life once you’ve finished this course. Trust me on this one.

9

Page 11: Authorware Beginner's Guide

2. So now what? First of all, I would take a short break and walk around, and just think of how many people you know that wouldn’t be able to do what you just did. Then I would take a moment to realise that even though what you just learned were some basic lessons in Authorware, you are still nowhere near to running your first experiment. There are some more icons left in the Icons box we didn’t look at (but we’ve covered the most important ones), another couple of important interactions we didn’t explore, and dozens of useful functions and variables we still have no idea of when to use. But more importantly, we haven’t even properly started building a piece yet. Let’s start with that first. Open a new file. Now let’s not get ahead of ourselves by throwing icons on the flowline, let’s get a little bit more organized. In the menu bar, go to Modify>File>Properties. Turn of the Title Bar and Menu Bar options. This will remove the title (the blue bar in the top of the screen) and menu bar (the grey bar directly below the blue bar) when your experiment runs, and in doing so removes the option for your participants to close the experiment. Then think about what screen resolution the computers have your experiment will run on, because we can change this in the ‘Size’ drop-down menu.

TIP: If you are running experiments in a lab where you can set the screen

resolutions, I advice to set the size to 1024 x 768 (SVGA, Mac 17”). This gives you a lot of room in the presentation window and nowadays it’s the standard setting of most computers which saves you the time of having to change the screen resolutions of the lab computers. If you don’t know the resolution and can’t influence it, set the Size to Full Screen. This sounds rather treacherous, because Authorware does not scale the presentation: if the resolution is higher (screen contains more pixels) your experiment moves to the top left corner of the screen; if resolution is lower, parts of the right and bottom of screen may be cut of. The only way to be sure in these cases is use a low resolution (800 x 600) and to accept the empty border around your experiment.

Sidestep on Screen resolutions

Close the file properties window by pressing Ctrl+Shift+D. Did you like the way the letters looked on the screen in the last experiment? I didn’t, and I think making the experiment look slightly better makes it a much more enjoyable experience for participants. If you agree, take a minute to change the default style of the text. Go to Text>Define Styles. There you can change the font in whatever you like, (I mostly use Verdana size 13, Bold. You can use whatever you like, but with higher screen resolutions I advice to use a bold font, as your text will look a bit thin otherwise). One word of caution. The font isn’t a part of the program. This means the computers your experiment will be running on need to have the font installed! Keep this in mind. Choose common fonts, like Times New Roman, Arial, etc, which all computers have. This is not just an excuse on my part to dissuade you from using horrible childish, jiggly fonts: typeset problems can ruin your experiment. There’s still plenty of scope for horrible colours and styles, so don’t despair just yet! Click modify and ok; the default font will now be changed. Authorware sometimes has trouble handling text styles, especially when copy-pasting between programs like Word and Authorware. It is good practice to use defined styles to make building an experiment easier for yourself.

10

Page 12: Authorware Beginner's Guide

Sidestep on Fonts Authorware isn’t a text editor. There are fewer options, lay-out styles and symbols for your text in Authorware. If you copy-past text from your text editor (most likely Word) Authorware will display a RTF import screen:

No footers, headers, columns or other lay-out will be imported, so just click ‘ok’. Furthermore, Authorware does not know certain symbols, like , ∏ or ⅛. The easiest way to show these symbols on the screen is called ‘font mapping’. Press print screen, open Paint, press Ctrl+v, and save the symbol as a small picture. Then import the picture in Authorware and use it as a letter if you really need the symbol.

Finally, before you do anything, save your experiment because you will often use this as a basis to build new experiments from, saving you the trouble of changing these settings every time you start a new experiment. Later on, if you insert your own buttons for example, you can also do this in this basic file, saving a lot of time in the future.

TIP: If you plan on making a lot of experiments, Save a file with all your favourite settings and text styles and save it as ‘NewExperiment’. Use this as a framework to build new Authorware pieces to save time defining your settings. But remember to save it under a different name if you start building a new experiment, otherwise you’ll overwrite your layout file. Be sure to save your experiments regularly. Like all computer programs, Authorware can and will sometimes crash. Make a habit of saving your experiment after every difficult or time-consuming task you finished, and every time before you run your experiment.

11

Page 13: Authorware Beginner's Guide

3. Boooooooooring. My apologies, you are so right. Let’s make another Authorware piece. Imagine you are a social psychologist who is single and is not just looking for data while performing experiments, but looking for a date as well! You have to ask the sex of the participant anyway for analyzing, so why not drop in a question asking for someone’s phone number? But how do we end up with a list of male-only (or female-only) telephone numbers? Well, here we go. This piece will consist of 2 steps: first of all we have to ask the sex of the participant, then we need to ask for a telephone number but only if a certain condition is met (being male or female). First, place a display icon on the flowline and name it ‘Question’. Double-click the display icon to open it. Now go to the taskbar, go to View and select ‘Grid’. This shows a grid on the presentation screen (only visible while programming) to help us put text and objects on the right place. Aiming for the 4th cross from above and the 6th from the right, type in: What is your sex?. Ctrl+1 close the presentation screen and drop an interaction icon under the display icon and name it ‘Sex’. Place a map icon next to it (accept the default ‘button’ response type).

TIP: If you make a mistake, like pasting something on the wrong place, accidentally moving an object or deleting something you didn’t want to delete, you can undo this by pressing Ctrl+Z. Double-click on the button interaction icon (and notice how it resembles a button). We want to make 2 radiobuttons (round checkboxes) where participants can tell us what their sex is. First, for some more visuals, click the button next to ‘cursor’ and choose

the hand cursor ( ) on the bottom of the list. Now, when participants hover above the button, the cursor will change into a hand. This will show them they can interact with the button by pressing it, and these small things will guide participants through interactions. Change the title of the button in ‘Male’. This will also be the label that will be displayed next to button when running the experiment, keep this in mind!

TIP: If you want to change or hide the label in a button, click ‘Edit…’ and in the drop-down menu ‘Label’ change ‘Show Label’ into ‘None’. Go to the response tab, and set the branch to ‘exit interaction’. There are several ways to ask a participants sex, with normal checkboxes, normal buttons and other interaction types, but this will be a better learning experience, so we will go for the radiobuttons. Click on the ‘buttons’ button on the left of the properties screen. A new window opens, scroll all the way down and choose the button on the end of the list (the native platform radio button), then click ‘OK’. If you’re into aestheticism you can even change the font of the label here, but since we are only interested in scoring some phone numbers we won’t bother. This button is done! Now because we want one almost exactly like it underneath it on the screen but then named ‘Female’, select the ‘Male’ button and copy it (Ctrl+C). To do this, we need to place a copy of our button next to the one we just finished. To do this, first the white hand (which indicates your location on the flowline) has to be pointing to the right spot. Click somewhere to the right of the ‘Male’ button and the hand will be on the right spot, as you can see in the picture here to the right. Then press Ctrl+V and the second button

12

Page 14: Authorware Beginner's Guide

appears. Copy-pasting parts of your experiment saves a lot of time.

TIP: The only thing we want to change in this button (for now) is the title. You don’t have to open the button for this, but can directly change the title by changing the labels to the right of the flowline.

Change the second title to ‘Female’, and open the Control Panel by clicking on the icon in the task bar. The Control Panel allows you to stop the experiment and pause it while the program is running. Why this is practical will become clear when you Run the program. Do so now. As you will notice, the screen is (depending on your settings and the screen resolution) completely filled by the presentation window. That’s good, because you want you participants to see it that way (moreover, participants will no longer be able to tamper with icons on the desktop this way). It’s bad as well, because now you lose access to the underlying menu and taskbar. At least we have the Control Panel to help us a little.

TIP: If your computer allows it, it’s is very practical to increase your screen resolution to one step better then that you are programming the experiment in. This way you will see all menu and taskbars when test running the program. Ok, so the radiobuttons are not exactly where we want them. To replace interactions in the presentation window, you first have to pause the program with the button on the Control Panel. Now you can drag the buttons across the presentation window. Put them somewhere under the text.

TIP: If you really lost the button underneath the menu bar, press Ctrl+Shift+M to hide or display the menu bars. When the visual aspects are ok, let’s take care of saving the variable. Put a calculation icon inside the map under the Male radiobutton, name is ‘SexSave’ and open it. In it, we want to give the variable SexSave a value of 1 if the male button is clicked (we will give the variable a 2 if the female button is clicked). To do this, type in: SexSave := 1 Close the icon (click yes and ok to save the variable as in the previous example) and then copy-paste the calculation icon in the female map too. Open it, change the SexSave value from 1 to 2 and we’re done! Put an erase icon underneath the interaction (again with preserve nothing) and name it ‘Erase All’. Now for our telephone number... There is another important icon when making an interactive program we haven’t used

yet. It is called the Decision Icon ( ), and it makes a decision on which branch of the flowline the program will display on the presentation screen. Yes, the flowline can be divided into several flowlines, and decision icons can decide which road to take. Of course, programs run by a computer can not really choose, but let’s prevent getting carried away with philosophical discussions and just drop one of these Decision Icons on the flowline, and go with the flow. But which flow? Rename the decision icon ‘MaleFemale’. Double-click it to open. A very important function of decision icons is their ability to repeat, or loop, a piece of program. Though we won’t use that here, it never hurts to know where to find this function. We are more interested in the function Branch. There are (as always in life) several options. Sequentially means that the first time the flowline encounters the icon the first path is taken, the second time the second path, etc. This is useful when you combine this with the repeat function. We are interested in the ‘to calculated path’ option, where Authorware uses a variable to

13

Page 15: Authorware Beginner's Guide

calculate which path to follow. Did you notice the text field underneath the ‘to calculated path’ option became active (turned white)? This is because we need to fill in the variable Authorware will use to calculate which path to take, in this case ‘SexSave’. Just type it in there.

So, what did we just do? We told Authorware to choose a path based on the variable SexSave, so if SexSave = 1, then take path 1, and if it is 2, then take path 2. But where are these paths? Well, we first have to make them. We do this by Click-and-Dragging 2 map icons to the right of the decision icon, similar to how interaction icons work. First drop one and rename it ‘Male’ then drop another one and rename it ‘Female’. Look at the picture here to the right to see the flowline. The map nearest to the decision icon (notice thecalculated, instead of the S for sequential) is path 1, the further path is path 2. That’s why we had to put the two paths in this order: they correspond with the values of SexSave, where 1 is male and 2 is female. Actually, without you knowing this, this is the reason we didn’t give the SexSave the value 0 for male and 1 for female: so we could use them in this calculation icon without have to use extra variables and programming. Note that if a To calculated path variable has a value of zero, Authorware will simply bypass the Decision path altogether. Authorware therefore will not take any path but will just continue on the flowline. (Sometimes, variables aren’t this easy to use in decision icons. Then you need to put a calculation icon on the flowline and program your way around the problem.)

C inside the icon, for

So what do we do with these two paths? Well, we put our telephone question in one of them of course! If you have a preference for a male date, ask a phone number in path 1, if you prefer a female date, put the question in the second path. Put in a display icon with the text ‘Would you please type in the 10 digits of your phone number?’, put an interaction icon underneath it, a map next to that (choose the text entry option) and a calculation icon in the map. Open that and put the following in it to save the telephone number: TelephoneNumberSave := NumEntry. NumEntry is almost the same as TextEntry (both could be used here) but NumEntry can only store numbers, and it is useful to use NumEntry when your are only interested in numbers. Keep in mind that it is NumEntry, and EntryText (so not TextEntry). Before you run this, there is 1 more thing we need to adjust. If someone types in a zero (0), the text entry will ignore it unless we turn of that option. Double-click the interaction icon (with the question mark in it). The presentation window will open. Double click the text field. You will see the properties interaction text field (remember we were here in the previous example but didn’t change anything?) and turn of the option ‘Ignore Null Entries’ as you can see on the picture here to the right. Furthermore, on the Layout tab, fill in ‘10’ as the character limit (since most phone numbers contain 10 digits). This is actually a very advanced thing to be looking at right now, but it is a good example of how you should always browse around all the options when making an interaction just to be sure you didn’t miss anything. Until you really know the program, don’t be afraid to double click on everything to see if the program has some setting you want to know of. Now we really are done! Run the experiment and chose the male radiobutton, and run it again and chose the female button and notice the difference. By the way, you might even be able to use this programming for other things than asking phone numbers, like giving

14

Page 16: Authorware Beginner's Guide

a different text in different conditions, asking different questions, giving different kinds of feedback depending on the score of a participant, and lots of other interactive things! Actually we can improve the radiobuttons. The small problem with these is that the participants cannot correct their mistake if they clicked too fast and missed the right button. Ok, I might be too concerned, but if we make it the right way this time, we’ll be able to use it over and over again. Drop a third button next to the 2 radiobuttons. Name the button ‘Continue’. Standard, Authorware will also make it a radiobutton without asking first because it thinks that’s what we want. However, that’s not what we want, so double click the last button icon (NOT the map icon) and click on the ‘buttons…’ option. Now change the radiobutton to a normal grey rectangular button. We want por female button, and then press continue. To do this, go to the properties, response tab of both radio buttons, and change the branch to try again.

articipants to check the male

TIP: You can change the ‘Branch’ setting by holding down the

nly the continue button will allow the participants to exit this interaction. But they

TIP: By checking the Hide When In

ow this leaves us with 1 small problem. Run the program, and try to click on the male

hecked@”Female” := False

e state of the radiobutton named Female false, or

hecked@”Male” := False

ctly working piece of Authorware that asks the sex of

Ctrl key and clicking just between the button icon and the attached map (see the line in the picture to the right). See how the flowline changes. Oshould only be allowed to exit the question after answering it, so in the continue button response tab, in the text field next to active if: type: SexSave > 0. Only if they answered the question and the variable value is either 1 or 2 will the button be active, or will participants be able to click on it.

active checkbox, the button will only appear when your participants are able to press it. This will provide participants with a visual cue of what to do to continue. Nbutton and on the female button. As you will see, it is possible to select both radiobuttons. We would prefer that if one button is pressed, the other button is unchecked automatically, and vice versa. This isn’t to difficult, if you know the right function to type in. In the calculation icon in the male button, underneath the SexSave := 1, type: C his programming will make thT

unchecked. This is one of the reasons we name icons: so we can control them with special functions we program in calculation icons. However, if you close the calculation icon, Authorware will give you a warning that more then 1 icon are named Female, in this case, the Map icon and the button icon. If you use programming like this, make sure that you use unique icon names, so change the name of the male and female map icon to ‘MaleMap’ and ‘FemaleMap’. The programming will now be accepted. In the female radio button, type: C hat’s all. Now you have a perfeT

participants. So, now we are done, you are wondering if you have to delete this too. The answer is no. The reason is the question where you ask the sex of participants is a very

15

Page 17: Authorware Beginner's Guide

common question, so you can use that in your experiment. But the rest of the program isn’t really much use, so you can delete that part.

Save the file by clicking the Save button in the menu bar, or go to File>Save As… Name the File MaleOrFemale or anything else you think is convenient, and you’re done! By creating small Authorware pieces you will use often (for example the standard file to start building experiments we made above) you can easily copy-past them into a new experiment you are making. The more experiments you make, the more you will see you will be mainly adapting existing experiments.

16

Page 18: Authorware Beginner's Guide

4. Hey, this is really a lot of work! Right now it is. But as you get the hang of the program, it will take you about 3 minutes to build the previous exercise. Really. And anyway, now you have it, it will only take 5 seconds to copy paste it in your new experiment. So let’s build another common question, this time asking the participant’s age. First, start by opening your ‘NewExperiment’ file and Save As… AgeQuestion, then drop a display Icon on the flowline and rename it ‘AgeQuestion’. Open it, and type: ‘Enter your age and press Enter’.

TIP: Always use clear instructions in your experiment. You cannot expect participants to know they have to press Enter unless you tell them to. That’s why you have to write: press enter (maybe even show the symbol which is on the enter key on some keyboards; some participants may not know what the enter key is, or even what the ‘ANY’ key is if you tell them to press any key to continue. They exist, trust me, I’ve met some of them myself). Close it by pressing Ctrl+1 and underneath it on the flowline, drop an interaction icon and name it ‘Age’. Next to it on the right, drop a map icon and choose the text entry. Double click the text entry (not the map) to access the Properties window. Now we want to make sure that participants can type in their age, but only their age. A standard text entry works like this: a participant types something on the keyboard, and then presses the Return key on the keyboard and exits the interaction. When we would use the standard text entry, participants could type in #d and press return, and we wouldn’t have their age. Now this may sound like I have a problem with trusting my participants to do as they are told, but that’s not the point. We are using Authorware because we can control the experiment: so why not use the control we have? We can tell Authorware which entries are the ones we are looking for, and to exit the interaction only if a correct entry has been given by a participant. We have to type in all possible answers in the title field (where right now the word ‘Untitled’ is written). For instance, if we would type in 35 in that text field, Authorware would only exit the interaction if a participant would type 35 and press return. Because we want participants to be able to type in different answers, we have to separate these answers with the “|” symbol, which means ‘or’. For example, if we expect all of our participants to be somewhere between the ages of fifteen and 80, we would type: 15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80 Yes, you can type in that many symbols in the text field. And yes, that looks like a lot of work but I just did it and so can you. This literally means: fifteen or sixteen or seventeen, etc. Set the branch in the response field to Exit Interaction. Inside the map icon, put a calculation icon, name it ‘SaveAge’ and in it type: AgeSave := NumEntry Close it and save the new variable named AgeSave. If the participant enters an age between 15 and 80 the age is saved and the participant will exit the interaction. What we have programmed will now look something like the flowline above.

17

Page 19: Authorware Beginner's Guide

Now we have forced participants to write only certain specific answers, it would be nice if we could let all participants that typed in a wrong answer know they are trying to enter something that does not belong to the possibilities. If you won’t tell them they are doing something wrong, how will they ever know? For this we need to build in a catch all net where all other entries are judged. We made something like this in the first exercise. Drag and drop another map icon to the right of the existing text entry map. Set the branch to ‘Try Again’ and replace the ‘Untitled’ with the wildcard *. This meant any text entry, remember? Open the map icon attached to it. If anyone fills in one of the options not allowed and presses return, the flowline will flow through this icon and let them try again. But the participant can’t tell this is happening because nothing on the screen is changing. The program just doesn’t continue. But if we drop a display icon on the flowline in the map, open it and type the sentence: ‘Your entry is not one of the possible answers, please try again.’ that would make things much clearer. The participant will see this text appear after he pressed return and can correct his mistake. Put the display icon in the new map as explained. Run the experiment and type in ‘1’ and then press return. You will see the sentence appear on

the screen. You can drag it to a better place if necessary. You can even change its colour: double click the sentence, and when highlighted (you can see this by the 6 white squares appearing around the text) select a red colour from the

colours in the Tools bar so it will stand out more. What would happen if the catch all text entry and the text entry with limited answers would change places? You can try it out. You will notice that whatever answer you type in, you will always see the sentence that you typed in the wrong answer. This is because the flowline first encounters the catch all text entry icon (the flowline goes from top to bottom and left to right in interaction icons) and that icon tells Authorware to let the participant try again. The second text entry icon is ignored. This shows it is important to keep track of where the flowline will go first to prevent mistakes.

TIP: Always keep in mind the flowline encounters icons and performs the commands from top to bottom and left to right. Maybe you’ve noticed something else. When we place two buttons to the right of the interaction icon, we saw 2 buttons on the screen. Now we placed 2 text entries to the right of an interaction icon, but we only see one text entry. Why is that? The answer simply is: because. That’s how Authorware works. If you want to create several text entries on 1 page, it will get a lot more complicated fast. We will deal with this problem later on.

For now, let’s just change some small things before saving this file. Double click the interaction icon itself (with the question mark in it). You’ll see a black

dotted square like this: This is the text entry, with the standard marker (the black triangle) to indicate where people have to enter the text. To make it look a little better (or that’s what I think, but you can choose how you want it to look yourself) let’s remove the triangle and instead draw a black square around it. In the tools bar, select the rectangle draw function. Set the mode to transparent (otherwise the text entry will be covered by the rectangle). And draw a box around the dotted line. There are different modes for objects in the display screen (see picture). Opaque creates a white rectangle behind all objects, covering anything behind it in the display screen. Transparent shows only the objects, but erases all

18

Page 20: Authorware Beginner's Guide

white pixels (note that sometimes pictures you copy past from somewhere else will still have a white fuzzy border around them in transparent mode because the pixels are actually not white but slightly grey). These to are the most common, and most of the time the only practical, options. Notice in the screen on the right how the Action Key(s) field has ‘Return’ in it. This means that if participants press return, they will exit the text entry interaction. Whereas that is a practical thing if you want them to fill in just one number, it will be very unpractical if you want participant to write down a short story where they want to make paragraphs in the text by pressing return. In that case, this staunpractical. If you want to enable participant to press the Enter key on the keyboard, assign another key to the Action Key(s) field that they will not use, for example type in Break, so that they will exit the text entry interaction when pressing the Pause/Break key on the keyboard. Note that keeping the field empty will not work,Return! Don’t forget to provide them with a button to exit the interaction and to put the text entry interaction to continue.

ndard setting of Authorware will be very

since Authorware will reset the field to

the rectangle you just made is still red, change the colour back to black. Now with the Ifarrow cursor, double click the dotted text entry field to uncheck the option to display the Entry Marker in the interaction tab. That’s it!

19

Page 21: Authorware Beginner's Guide

5. Maybe I prefer paper and pencil tasks. What we’ve just done may seem like a lot of work for a simple question, but remember, we are building parts we will be able to use for every experiment we are ever going to do. Now it might be some work, put the next time we need it we will have it ready to use. So let’s build something else we will use often; Text Displays. Instructions will be a big part of your experiment and you want your participants to read them carefully. It helps if the layout of the text makes it easier for participants to read all the information. Open your NewExperiment File so you will have all your favourite settings ready (and to make sure the text display we are going to make will look good on the screen eventually). Start with dragging a display icon to the flowline and rename it ‘Text’. Double click to open it. Now this will all be a matter of personal taste, so feel free to make the page look the way you think is best. It’s still advised to leave a white border around your text of about 4 cm and to place your text somewhat centred on the screen. Type in: ’Welcome, and thank you for participating in this experiment. Please read all instructions carefully. Turn of your mobile phone. If you have any questions, please ask the experimenter. The experiment will take about 10 minutes. Click the ‘continue’ button to continue.’ Change the layout however you like using the arrow cursor. More text layout option (like centring the text, justifying it, or blending it slightly more in the background with the anti-alias option) or found in the Text menu in the menu bar. Test Run the experiment to see how it looks.

TIP: If you want to offer a lot of text on the screen, you can also use scrolling text. To choose scrolling text, select the text and in the menu bar choose Text>Scrolling. You can change the height and width of the scroll field. Even though this function can be useful, I would advice you to present the text on different display screen in text fragments that are easier to read.

TIP: Keep the text in Text Displays restricted to 4 or 5 lines per page. This will make reading a lot of information easier for participants. Let’s try something new here. Up until now, we’ve always worked with (display) icons that get deleted immediately after the participant has seen them. But in some cases, we want to keep an icon for longer, perhaps even for the entire experiment. In this example we’ll find out how this works. Authorware is a program that works in layers, and we can use this to our advantage. The first display icon on the flowline will be the lowest level until it is deleted, and if we place more display icons on the flowline after this first icon, their content will be displayed over that of the first icon when we run the experiment. In some cases, this is the last thing we want (remember the example about overlapping text being unreadable?), but layering can be a useful tool as well. As long as we don’t delete the first icon, it will remain in the background, so this is a perfect way to make a background for our experiment. Black text over a white background really is far too boring for the participant, and even the slightest enhancement will be much appreciated by your participants.

20

Page 22: Authorware Beginner's Guide

The easiest way to change the appearance of your experiment is to change the overall background colour. In the task bar, go to Modify>File>Properties and click on the square next to BackGround (see picture). If you ever decide to change it, change it for a light colour to keep your text visible. For the moment, keep the background white: we’re going to use the Tools bar to make a nice background ourselves. Let’s give it a try: drop another display icon on the flowline, above the ‘Text’ icon we just made, and name it ‘Background’. Don’t put it underneath the icon: your background will be on a higher level than the text if you place them in this order, and as a result your participants won’t see the text. Now open your new display icon, this is a good chance to use some of the other icons in the Tools bar. We already discussed the Text and the Arrow options, and we learned how to change the colour of text. But the Tools bar features far more options, and will allow you to draw squares, circles, figures and lines as well. Now I just want you to go ahead and build a nice background using these options. You can change the colours of your figures as well to make a more appealing composition. Try not to make your background too busy, or it will distract too much from the text we will present on top of it. This is also a good time to learn another important trick: you can bring parts of your background forward or send them backward by first selecting the figure you want to change in the display screen. The white squares on the outer edges will indicate you have selected the figure.

TIP: To change the way objects overlap on the presentation screen, in the Task Bar, go to Modify>Bring to Front or Modify>Send to Back. The figure you selected will now be moved to the top or bottom layer of your background.

Sidestep on working with several objects in 1 display icon Sometimes, you will put several text fields together with some pictures in a display icon. If you want to do this and keep things organized, here is some advice:

• You can select all the objects on the screen with Ctrl+A.

• You can select the next object if you have an object selected by pressing the Tab button.

• You can select several objects within the display icon (for example to move

them together) by holding down the Shift button while clicking on all the items you want to select. Alternatively, you can select all objects with Ctrl+A and de-select the ones you don’t need by holding down the Shift button.

• You can group several objects together, so they can not be moved separately

but will all be moved together. Select all the objects you want to group together, and press Ctrl+G while in the display icon.

Once you’re happy with your background, press Ctrl. + A to select everything, and then Ctrl. + G to group everything into a single figure. Your background is complete! Now for the text. Open the next Display Icon, ‘Text’. Now it’s possible that you need to change the colour of your text to make it stand out from your background, especially if you’ve made a background using dark colours. It’s also a good idea to change the Mode of the text at the bottom of the Tools bar. Select all your text and set the mode to Transparent. This way, the text won’t have an ugly white background which will blot out your background. Now we’re done!

21

Page 23: Authorware Beginner's Guide

Now there are several ways to show the next screen. We want participants to have enough time to read the text, so it’s best to let them tell the program when to show the next piece of text. So drop an interaction icon on the flowline (and rename it Continue) and a map icon next to it. Now, through what kind of interaction do we want participants to tell the program to continue? The most common options are:

• Button: let them press a button displayed on the screen with either the mouse or the keyboard.

• Keypress: Press a specific or any key on the keyboard.

Again, this is just what you prefer. I recommend using the button interaction for 2 reasons: first, it let’s participants decide if they want to use the keyboard or the mouse, instead of forcing them to use the keyboard (at least, if you’ve programmed the button to accept a certain key as a response as well), and second, a button with ‘continue’ is pretty self-explanatory, whereas a keypress interaction always need an explanation on the screen (like ‘press the space bar to continue’). So let’s choose the button and rename it ‘Continue’. Remember, as with the radio button, names you give a button will also be displayed in the presentation window; with radio buttons as a label next to the button, with normal button as a label on top of the button.

Sidestep on Naming Objects. As you might have noticed, I always make names as clear as possible, don’t use spaces in between words and use a capital letter for every separate word. This is only my own system and you can use whatever you want as icon and variable names. Just keep the same style, use names that you understand if you read them again after 2 months (so not ‘nttql1’ for the number of times through question loop 1, or ‘q1’ for the first demographic question, but rather LoopTimes1 and CountryBirth. If you choose to use my recommendation of adding ‘Save’ to the end of variables you want to save and analyze, this would become LoopTimes1 (because this will probably be a variable only used to make the program work, and one you will not save to your dataset) and CountryBirthSave (because you will want to analyze this answer later). Note that custom and system variable names are not case sensitive, so IconTitle is the same as iContITle.

Double-click the button icon to adjust the properties. First, for the visual aspects: we will change to cursor to the hand again, so participants will see the cursor change when it’s over the button. Then, instead of making the key only clickable with the mouse, assign a key on the keyboard to it. Type in ‘Return’ in the text field. (Although you can also write ‘Enter’, Return is the word used in the programming language in calculation icons for the return key, so it’s best to learn from the start to write Return.) In the Response tab, set the Brach to Exit Interaction (because we want them to exit the interaction and go on to the next display screen). Ctrl+1 close the presentation window. Now comes the good part of working in layers. We want to erase the text before we present another screen. Place an erase icon on the flowline. We could just Preserve nothing, like we’ve done before. But we want to preserve the background, so that won’t do. Now there are two options: we can add Text to our Icons to erase list, or add Background to our Icons to preserve list. The latter is especially useful if you wish to erase a lot of things at the same time, the former is useful if you only wish to erase a

22

Page 24: Authorware Beginner's Guide

single thing and preserve a number of others. You choose, and name the Erase Icon EraseText or PreserveBackground, depending on your decision. Remember that the figure you see in the background is the one you opened last (the text). If you wish to Preserve the background, you must first open this display icon again, close it, and then go to the Erase icon. Now you can add the background to your list of Items to preserve.

TIP: If you want to add an item to your Erase/Preserve icons list, open and close the Display icon it’s in first. Authorware will only show the item you opened last in the Display screen when you edit an Erase icon. You might think this is a good time to place the continue button on a better location on the screen, but if you click it now it will be added to the items the erase icon has to erase, so only click on the text. As in the picture to the left, you will see the Text display icon in the screen with items to erase. So don’t we need to erase the button then? No, and the reason is that one of the options on the response tab of the button properties is set to ‘Erase: After Next Entry’, the next entry being the clicking on the button, so the button will disappear automatically when clicking on it, unless you change the settings of course. Close the erase icon and presentation window (and quickly look at the ‘Erase’ option on the button properties screen I was just talking about). Then open the control panel.

TIP: You can open the control panel by pressing Ctrl+2. And yes, Ctrl+3 and Ctrl+4 are also shortcuts, but they are pretty useless. Only Ctrl+1 to open and close the presentation window and Ctrl+2 to open and close the control panel have real practical value. Run the program you just made. Before hitting the continue button, pause the program with the control panel and click-and-drag the continue button (remember you could only move the buttons while pausing and move the text even while running?) to the right bottom of the screen, somewhere where it looks good and isn’t to much in the way. Run the program again (or continue the program, by clicking instead of ). The text will disappear whether you press ‘Return’ on the keyboard or click on the button, but the background will remain. Close the presentation window. Now something I like to do is to build in a short pause between the different text displays. This way, it is very clear the text changed for participants and well, I just think it looks good. This is another chance for us to use the Wait Icon, and to do something more interesting with it than we have before. Drop one on the end of the flowline and open it. First, click away all the options: No, we don’t want to wait for a key press. No, we don’t want to show the button with continue on it. But hey, didn’t we just make a button titled continue that worked on a key press? And here is a ready made one! Yes, that is true, and right now, they do the same thing (except for showing the nice visual hand cursor above the button). But the button we made has one important advantage: we can make it look much better then it looks now. We can (and will) change every aspect and place calculation icons inside the map whereas this continue button is standard and can not be changed. And the button we made was much more educational, don’t you think? Now, back to our wait icon. What time limit do we want before the flowline goes on with the flow? Usually 1 second works fine. So we could type a 1 in the ‘Time Limit:’ window and close it and it would

23

Page 25: Authorware Beginner's Guide

work. But instead we’ll do something a bit more creative and write down the word ‘IconTitle’ in the field, as you can see on the right. IconTitle is a system variable, and if you use it, Authorware will set the value of the variable to the name (or number) that is in the icon’s title. So now close the Wait Icon and

rename it to ‘1’ as you can see in the small flowline picture to the left. So why did we do that? Well, copy-past this icon and place it in between the text and interaction button. Rename it to ‘5’ (see the flowline to the right). By renaming it, you told the wait icon to wait 5 icons instead of 1. Now it will take 5 seconds before the continue button will appear, so participants have to read the text for at least 5 seconds before the can continue. It saves us from clicking a couple of times and learns us how we can use system variables to our own advantage. Of course this is a simple example and the advantage is rather small, but it is still a lesson learned and will get us more acquainted with system variables, something we will deal with later on. Now, select the entire flowline with the mouse. Press Ctrl+G.

TIP: Ctrl+G will Group all the separate icons together in a map, helping you to keep the flowline organized. Ctrl+Shift+G will ungroup a map icon. Name the map ‘Welcome’. Now copy the ‘Welcome’ map, and paste a copy underneath the original welcome map (Remember to first click at the right spot on the flowline so the white hand will appear at the right place) and rename it ‘Intro’. Open the map and open the display icon. Select the Text cursor in the Tools bar. Select the text, delete it and type in (or paste) the new text.

TIP: By re-using and copy-pasting the same text display, the text will always appear on the same spot on the screen and make your experiment look good. Now run the experiment. Be sure to save this file, you can copy-past from this forever. Well done!

24

Page 26: Authorware Beginner's Guide

6. So am I pretty good now, or what? Well, you are seriously getting the hang of some basics here. All the text parts of your experiments will run smoothly I think, although you might want to spice up the visuals now and then. But that can wait for the moment, a more important point is that we haven’t really made a questionnaire yet, yet you probably will want to use one in your research. So let’s make one right now. It is going to be a pretty difficult and long lesson, so be prepared. Open your self made NewExperiment file and drop an interaction icon on the flowline. What, no display icon? Well, you could, but we can also display text in the interaction icon and that is what we are going to do now. Double-click it and with the Text cursor type: ‘how do you feel right now?’ on the upper half of the screen. We want participants to answer this question on a 7 point Likert scale, so let’s build one. Let’s first build the visual part (in the icon on the flowline, remember?). We want to have the numbers one

to seven placed in black squares where the participants can click on. Although we can import pictures in Authorware (we will do that later) you can also draw simple figures yourself. In the Tools bar click on the lines part and select a slightly fatter line. Then select the Rectangle icon in the Tools box (see picture on the right). With this, you can draw a rectangle on the screen.

Click and drag on the display screen to draw. The shape we are looking for is something like this:

TIP: To draw a perfect square with ngle option, hold down the Shift button while drawing.

the recta

Now we need 7 of these, so switch to the arrow cursor and click on the square you just made. Press Ctrl+C and Ctrl+V, copy-paste, and now we have 2. But they are not really nicely aligned, are they? So, select one of the squares, and drag it so it overlaps the original one, so you know they are on the same horizontal height.

TIP: If you are having trouble positioning the squares on top of each other, use the arrows on your keyboard to move objects 1 pixel at a time.

TIP: If things don’t move around fast enough with the arrow keys, hold down the Shift button while pressing the arrow keys. Now they are on the same height, now move one to the right so they look like this: Now select both of them. You can either do that by dragging a selection field around them with your mouse or by holding down the Ctrl key and click on both, but in the last case there is a small chance one will move. When they are both selected, copy past. Now we have 4. Put the 2 new ones on the same height.

25

Page 27: Authorware Beginner's Guide

Select all, copy paste, put the new ones on the same height (and don’t forget to delete one because we only need 7) until your square sequence looks like this:

In order to make this a 7-point scale, well, we obviously need to add the numbers 1 to 7 in the corresponding squares. Remember to set your Mode to Transparent in the Tools bar, otherwise higher layers may obscure lower ones. In the case of our numbers, in the Opaque mode these will have a white background that may partially obscure your square. Set the Mode to Transparent to remove the white background for text. We now have the visual part of a 7 point scale, but at this moment it doesn’t work like a 7 point scale. We want a click by the participant in one of the squares to register as a specific response: the number on top of the square. But how can we make Authorware register a click at a specific location? We will do this by using a new interaction type, the hot spot. Close the Presentation screen. Now drop a map next to the interaction icon and chose the Hot Spot option (and notice how the symbol now resembles a small square). Double-click the hot spot icon to change its properties. On the response tab, set the branch to ‘Continue’. This way, the participant will not exit our interaction and continue with the flowline after clicking on the 1 to 7 squares, which enables them to change their

answer. However, we will have to build in another way to exit this interaction instead. We will use a normal ‘Continue’ button for this. If you want to enable participants to answer your questionnaire also by using the keyboard, go to the hot spot tab and you can type 1 into the field ‘Key(s)’ (see picture on the left). However, some people like to

force participants to use the mouse because it slightly slows them down and therefore makes them think a little longer about the questions. You decide. Name the hotspot ‘1’ and close the properties screen. Now we've just made our first hotspot. Once we've put it at the right spot, Authorware will be able to register a click by the participant on one button. But we must make it clear for the participant as well that they've clicked the button, and that the Authorware has registered their response. To do this, open the map icon underneath the hotspot icon and open it. Put a display icon on the flowline, followed by a calculation icon. Now, what will happen is the participant click on the hotspot associated with this icon? Authorware will follow the flowline to the corresponding map, go to level 2 and follow the flowline inside the map, and therefore to the icons we put into the map. Now we want to show participants a cross inside the square they've clicked, and we want to save the participant's response as a variable whose value corresponds to the number they've clicked. So we need the flowline to encounter a display icon (and show it) and then a calculation icon (and perform all programming in it). Drop these two icons onto the flowline inside the map. We don't want Authorware to continue to the next question after a response: maybe the participant will want to change his or her answer (this is why we've set the Hotspot branch to continue). First things first: let's make a cross through the square a participant just clicked on, so the participant knows what the selected choice is. In the display icon we will draw a cross with the diagonal line function in the Tools box.

TIP: To draw a straight line or a diagonal line, press Shift while drawing. Make a cross; don’t worry to much how it looks, but the closer it resembles the one on the right, the better. Close the screen; name the display icon ‘Cross’. Now we can show

26

Page 28: Authorware Beginner's Guide

to the participants that they've actually clicked a square correctly. However, we must also save this response if we ever want to get to analyze some data. So on to the calculation icon - rename this to ‘1’. Remember the IconTitle trick we pulled with the wait icon? We will do the same thing here. Open the calculation icon. Here we simply type: Answer := IconTitle ‘Answer’ is a new variable where we will save the answer to the question. If the participant clicks on the hotspot 1, Authorware will now display the cross and save the answer as the IconTitle, in this case 1 (Naturally, you can also just type in Answer := 1 if you prefer). Close the Calculation icon (and accept the newly created variable ‘Answer’). This map is done, now we would like to have 6 more. Copy the map, place the white indicator hand to the right of the map, and press Ctrl+V six times to paste six more hotspots next to it. What you see on the screen will resemble this:

Authorware can only show 5 folders next to an interaction icon; when there are more, it shows this scroll screen. In the scroll screen to the right, scroll back to the top of the list and select the top icon (which is the icon most to the left, closest to the interaction icon). It is the hotspot associated with the square with the 1 in it, so the name 1 is OK. Press the Tab key on your keyboard. Now the second icon is selected. We want this hotspot to register a response in the second square, so change its name to 2. Continue to do the same with the rest of the hotspots, until you've changed the name of the last one to 7. Now back to the second hotspot. We now have seven different hotspots for the participant to click, but as they're all copies of the first a click on any hotspot will yield a cross in the same location. Moreover, for any response the Answer variable will be 1. So open the map underneath the second hotspot (the first one was ok). Change the IconTitle of the calculation icon from 1 to 2. This saves you from opening the calculation icon (six times), closing it (six times) and clicking yes to the question if you want to save the changes (six times). Now change the icon titles of the icons under the rest of the hotspots (3 to 7) to match their respective numbers. If you also enabled participants to use the keyboard, you will also have to open the hotspot properties and change the entry in the Key(s) field to the corresponding key participants have to press to the right number! Now are we done? No: Authorware doesn't automatically know where we want our hotspots. Therefore, we must now find the hotspots and put them over the 7 squares we made. Here is how: Ctrl+2 open the Control Panel. Run the program and pause it.

TIP: You can also Pause the running program by pressing Ctrl+P. You will see something like this:

27

Page 29: Authorware Beginner's Guide

Now the hotspots will be visible: the dotted squares with the number in their top left corner. In the picture above, I selected the hotspot associated with answer 7 (its name is indicated inside of the hotspot). Click-and-Drag the area and change it so it fits tightly over the square with the 7 inside (as you see in the picture on the right). Do the same thing for all other squares.

TIP: Drag hot-spots around by clicking exactly on the grey dotted line. There's one last task to do (I told you this was going to be a long example, didn’t I?): we have to put the crosses on the right place. Run the experiment. If you did everything right, you can now click each of the scale options. If you do this, the cross you made appears somewhere on the screen. Even while the experiment is running, you can place it on the right spot, by clicking-and-dragging the cross to the right place. Click on every square and drag the cross over the square. See the example to the right. After you’ve done this for every square, Run the experiment again and click on all the squares. Your crosses now appear in the right place. Pretty neat huh? This would be a good moment to save your experiment. Go to File>Save As… and save your experiment as Questionnaire. But hey, wait a minute, oh no, we forgot to give all the hotspot the hand cursor when the mouse floats over it! Especially with hotspots you want participants to be able to see which parts of the screen they can click. Do we have to open each icon and change it? No, thankfully not.

TIP: You can change the properties of multiple icons at once. Close the presentation window and select the 5 hotspot icons you can see. The in the menu bar, go to Edit>Change Properties. Select All Attached Icons because you want to change all, so also the 2 you couldn’t see and didn’t select. Then select the property you want to change.

28

Page 30: Authorware Beginner's Guide

In this case, select Cursor, and from the scroll menu that appears choose the hand cursor. Then click apply top left, click ok and we’re done. Now the only problem we have is participants can click whatever they want, but they won’t exit our interaction. This was because we wanted participants to be able to change their choice. We still have to make a button to exit the interaction. Scroll to the 7th icon in the interaction, and drag and drop another map to the right of it. Notice that you don’t get a choice this time of what kind of interaction you want. Authorware figures that after 7 hotspots, you will want an eighth. But we don’t. Double-click the hot-spot icon to access the properties. First, name this icon Continue. Then look at the dropdown menu to the right of the title: it is called Type. Drop down the menu and you see all the options you have for interactions. Select the Button choice. Set the branch to Exit Interaction - we want participants to exit this interaction (to continue to the next question) if they press this button. Two fields above that is the Active If text field. With this, you can program when this button is active - when participants can click on this button to exit the interaction. It would be nice if participants could exit the interaction only AFTER they gave an answer instead of before. You want them to choose, and then exit. One option to program this is telling Authorware this button is active if the Answer variable is bigger then 0. This would be programmed as Answer > 0. Although this would do in this case, a better way is to use another system variable called Tries. Tries is a variable which value is the number of times the user responded in this specific interaction; this makes it the better choice, because you can use it again and again throughout your experiment and it will reset itself to 0 automatically in every new interaction. So if they click on an answer, the value changes from 0 to 1. If they change their answer, the value is 2, etc. Therefore, we will write the following in the Active If text field: Tries > 0 It's far better to use Tries instead of Answer > 0. For this last expression to work you would have to reset your answer variable after every question, otherwise the Answer variable would still have the value it got in the previous round, thus making the Continue button active immediately. In this worst case scenario, it's very easy for participants to make mistakes (to press continue twice, for instance) or to cheat (by only pressing Continue and not answering any questions). If you want participants to use the keyboard, go to the button Tab, and type Return in the Key(s) text field. Run the experiment, pause it with the Control Panel and move the ‘Continue’ Button to somewhere under the 4, in the middle of the 7 point scale. Change the shape if necessary (remember we want to make participating in experiments easy for our participants, so the bigger the button, the easier it is for them to click on it!) by running the experiment, pausing it and clicking on the button. You will see white squares around the button similar to when we changed the text borders in the first chapter. Click and Drag on the white squares to give the button any size you prefer. That is it. You made your very own questionnaire. Save it again. We will use this piece in a later example as well.

29

Page 31: Authorware Beginner's Guide

7. Authorware programming is a piece of cake! Right now, you are like a chess player who knows how all pieces move, knows 3 moves from an opening and has one or two tricks up his sleeve to surprise his opponent. This gives you enough knowledge to play a fun game. But that doesn’t make you Kasparov. To become a better programmer, it is time to learn some more theory. Here to the right, we see 2 windows, one above the other, named ‘variables’ and ‘functions’. When you use variables and expressions in calculation icons (and sometimes in other icons as well) you have an enormous amount of possibilities with Authorware. You can open

these 2 windows by clicking on the variable

window icon and the function window icon in the taskbar.

TIP: You can also open and close the variable and function windows by pressing Ctrl+Shift+V and Ctrl+Shift+F. Let’s first take a closer look at the variable window. The category is set to all, so in the scroll window we see all the system variables. We don’t see the variables we made ourselves. Open your Questionnaire Authorware file. Change the category from All to ‘questionnaire.a7p’. Here you will see one variable you made yourself, named ‘answer’. Select it. You can now see which icons refer to this variable, which are, not so surprising, the 7 maps where the answers the participant gives are stored. You also see a text field named Initial Value: usually this is not that important, but if you want a variable to have another value then 0 from the beginning of the experiment, you can change it here. You can also see the current value (and change it if necessary, for example while testing your experiment). If you run your experiment, and click on an answer and come back here, you will see the answer you clicked on. This is a good way to check if all variables are stored the way you want. This is also the place where you can add a new variable, or delete a variable name that you no longer use. Now switch back to the All category. Another great thing about this window is the description field. From the All category, scroll down until you see the system variable Tries. Remember we used that last exercise? Click on it to read the description of what this variable does. You will also see you have used it in the icon named ‘continue’. If you scroll up again, you will also see the system variables NumEntry, IconTitle and EntryText we have already used. Yes, there are a lot of variables in the list, but don’t worry: I never used more then half of them myself. They are here if you might need to do something you can only do with a system variable, so if you think you’ve run into a problem that is impossible in Authorware, you might find a way to do it here.

30

Page 32: Authorware Beginner's Guide

Sidestep on different types of variables. There are four different types of variables which are interpreted differently by Authorware. The difference lies in the different data they store.

• Numerical variables store numbers, plain and simple. They allow mathematical operations like adding, subtracting, etc. If you are really interested, a numerical variable can store values ranging from -1,7*10308 to 1,7*10308. Interesting, isn’t it?

• String variables contain letters, words or complete sentences. They are always

enclosed within “quotation marks” within Authorware, but the quotation marks are not displayed on the screen. The maximum number of character a string variable can contain is 32000 characters. That would be the first 14 pages of this guide, meaning it is often enough, but still useful to know.

• Logical variables store a True or False variable (or a 1 or 0 value,

respectively). This represents a condition that is met, or not. We used a logical variable when we told Authorware to set the value for Checked@“Male” := False. They are not very common, but can be useful, for example in the Active If field in interactions.

• List variables store a set of values. They have a wider range of possibilities

then a string variable. They allow retrieving information at specific places in the list, deleting information, adding information, etc. There are special functions to work with lists which will be dealt with in a later chapter.

TIP: Note that it is impossible for a numerical variable to equal a logical or

string variable. The numerical variable for sex can have the value 1, but it is not possible to write Sex = Checked@“Male” to indicate that the sex of a participant equals the radiobutton that is checked; Authorware will interpret this as Sex = True or False. Sex will not have a numerical value, so can not be used in a decision icon in the field ‘to calculated path’ or be stored for analysis. In the same way the numerical value 1 can not equal the string value “1”. Also, never use the := symbol =when you should use the symbol.

Now let’s switch to the functions window. This works pretty much in the same way. And it is also true that there are so much functions that I have never used, that you wonder how you ever going know the useful ones from the not so useful ones. Where do you start? Well, here, for one. Most practical functions will be used in one of the examples in this guide. Second, you can browse the list and read descriptions of the functions so you get the idea of what is possible. I wouldn’t do that right now, but maybe if you encounter a problem and are looking is Authorware has some kind of way around it. Third, there is the Authorware help file, where a lot of information can be found if you need it. For now, go to the category function, and select language. Here you see the most important functions, called ‘Logical operators’.

TIP: The logical operators do not appear in the All category of the function screen. You have to select the language category to view them. Here is a short explanation of what the operators mean:

31

Page 33: Authorware Beginner's Guide

• := operator, as we have encountered already in expression like: Answer := 1. The

value of the variable answer becomes 1. • if-then structure. If a condition is met, then something else will be done. • The following symbols are relational operators, comparing 2 variables. = equal

to, <> not equal to, < less than, <= less than or equal to, >= greater than or equal to, > greater than. Remember, only 2 variables are compared, so expressions like: 5 > 2 & < 8 will not result in Authorware telling you this expression is true.

• To use arithmetic operators, use + to add, - to subtract, * to multiply and / to divide.

• Logical operators, & means ‘and’ as in dazed & confused, | means ‘or’ as in dead | alive, and ~ means ‘not’.

Now, scroll to the Math category. Here you will find several mathematical functions you can use to average your expression, round a value or calculate the cosine. Another important function here is the Random function, which enables you to generate a random number. Now scroll to the File category: here you’ll find the most important command to store your data on the computers hard drive, namely WriteExtFile and AppendExtFile. The Graphics category is mainly relevant if you want to let Authorware draw something by itself, which may not be a common usage, but at least you know it is possible. Another important category is List. Lists are a powerful way to use variables in Authorware you will not have heard the last about before finishing this guide. With functions it is even more useful to read the description. Often function have to be typed in a very specific way, whereas variables are usually only a word.

TIP: Instead of typing in data, you can also press the ‘paste’ button at the bottom of the function (and variable) window when you’ve opened a calculation icon. For instance, to use the Random function, you also need to type in some parameters that Authorware needs to know before creating a random value. In this case, you will need to type in the minimum value, the maximum value, and the units in between the maximum and minimum. Thankfully, Authorware will help you while typing in a function. To see this, open a calculation icon, and type in Random(. If you wait a second after typing in the first bracket you will see the picture on the right. The values Authorware needs to randomly generate numbers have to be typed in between brackets () and separated with ‘;’. (In older versions, this was the comma symbol. Sometimes in help files, you will see a comma when actually you have to type in a ‘;’. Be aware of this.) In the calculation icon, Authorware helps you by showing you that you have to type in the minimum value followed by ; followed by the maximum value followed by ; followed by the unit end closed by a bracket. To finish this expression, type in ‘random(1; 6; 1)’. Authorware will create a value between 1 and 6 in units of 1; this will be like rolling a dice.

32

Page 34: Authorware Beginner's Guide

8. Riiiiiiight. Do I look like a nerd to you? Well, this may not look like it is very interesting, but using the functions and system variables in Authorware is actually the most creative part of building your experiment. If you want to build a game participants have to play, or if you have a special kind of manipulation you want to you that requires interactivity, programming in some expression will usually help you to make what you want. But maybe this will become clearer if we build a new experiment. You may think this guide is teaching you how to use Authorware in no-time. Though it’s fast, it’s not actually no-time. Open the variable screen (by clicking in the toolbar or pressing Ctrl+Shift+V) and scroll to the variable TotalHours. This is the amount of hours you have been working on this specific Authorware file. Don’t ask me why Authorware has this system variable, but it does. It has a lot more system variables concerning time. Let’s use a couple to make some time-related Authorware pieces. Put a display icon on the flowline, name it ‘Time’ and open it. Somewhere on the screen, type the following: {Hour}:{Minute}:{Sec} Immediately when you click somewhere else on the screen, you will see the words change into numbers. Remember that if you want to display a variable on the display screen, you had to write it in between { } brackets? That’s what we did here: we took 3 system variables, the first containing the current hours, the second containing the current minutes, and the third containing the current seconds, and made a digital clock. Look at the clock again: it seems to be a little late. As you see, the variables are not updated on the screen.

TIP: To have Authorware continuously update variables on the display screen, go Modify>Icon>Properties or press Ctrl+I to open the icon properties screen and check the option ‘Update Displayed Variables’. This is important to remember because you will use this often. It is useful when constantly displaying a score of participants which changes every trial for example. Now if you Run the file (please note, the variable will not change if you double-click the display icon, but only in Run mode) you will see a running clock. Now we have another small thing I’d like to change. In our running clock, the seconds from 0 till 9 are displayed as 9 instead of 09, for example. To change this, select the text in the display screen with the Text cursor and in the menu bar go to Text>Number Format. Here we get lots of options to customize the numbers that are displayed on the display screen in every way we want. In this case, we want to display 2 zeros before the decimal (so the seconds will be 00 or 04), so as in the picture to the right, we will check Leading Zeros and put 2 in the text field. Since seconds are always whole number, there is never anything behind the decimal, so those options are irrelevant.

33

Page 35: Authorware Beginner's Guide

This is only one way in which you can display the passing of the seconds on screen. Another very simple way to display a time participants have to wait is the wait icon. Beneath the display icon in the flowline, put a wait icon, name it ‘Wait10’ and open it. Set

the time limit to 10 seconds by typing 10 in the text field and only check the box before ‘Show Countdown.’ Run the Authorware piece again and you will see a small black clock in the left bottom corner counting down the 10 seconds.

Now let’s try to combine the 2: we want to have numbers on the screen, but then counting down from 10 to 0. This may sounds pretty simple, but it will require some difficult programming to make. There is no counting down system variable, so we will have to program a variable that does this ourselves. First, open a display icon; rename it ‘TimeLeft’ and type somewhere in the centre of the display icon: The test will begin in {TimeLeft} seconds. Close the presentation window with Ctrl+1 and click ‘OK’ to save the new variable ‘TimeLeft’. Now we need to tell Authorware what this variable will be and when it will change. To do this, drop a calculation icon on the flowline beneath the display icon and rename it ‘SetTime’. Open it and type: CountDown := SystemSeconds + 10 From the bold typeface of SystemSeconds you can conclude it is another system variable. SystemSeconds contains the number of seconds since the computer was started. It is a simple second counter, but it is extremely useful because it is easier to do calculate with then with the ‘sec’ system variable which only has values from 0 to 59 and then starts over. What we do in this calculation icon is save the value of the current time in a new variable. To see the value of the system variable SystemSeconds, open the variable screen and look at the current value. For example, on the right, the value was 5052,31. You can see the value has 2 decimals behind it; this will cause a problem later on and we will get back to this. For now, we have set our own variable, CountDown, to the current SystemSeconds + 10. This means the difference between CountDown and the SystemSeconds is 10 seconds right now, and the difference will become 1 less every second. Now we want Authorware to calculate and update the variable {TimeLeft} for every new second. How can we let Authorware continuously monitor a variable? The answer is the loop, which is nothing more then a circle in the flowline Authorware will follow until you tell it to stop. If you put a calculation icon inside a loop, Authorware will perform the calculation for as long as you tell it to loop. To do this, drop a decision icon beneath the SetTime calculation icon and name it LoopTime. Then drop another calculation icon to the right of the decision icon and rename it CalcTime. To get the flowline you see in the picture on the bottom of this page, open the decision icon by double-clicking it. Select Repeat Until True from the drop down menu. We want it to repeat, but not forever. When should Authorware stop looping? A simple answer is, until the variable TimeLeft = 0. But the problem is, this variable is 0 right now! We

didn’t change the initial value when creating this variable or later on in the variable window, so TimeLeft has the standard initial value of 0. We could change the initial value now, but we can also tell Authorware to loop until the variable CountDown = SystemSeconds. You can just type this kind of programming in the text field and Authorware will understand it and continue looping until the 2 values of the variables have the same values. Now

34

Page 36: Authorware Beginner's Guide

Authorware will loop until the variable CountDown (which was 10 seconds higher then the current SystemSeconds) will be equal to the SystemSeconds, so until 10 seconds have elapsed. As you can see, all problems can be solved in different (and creative)

Another common option in loops is the repeat fixed number of tim

ways.

TIP: es, by typing any number (or a variable) in the text field underneath the drop-down

ke a minute to think of the precise nction yourself. Here comes the answer (or one of the possible answers). Type the

mat settings, you might see numbers behind the decimal as well. To change is to only see the seconds, select the TimeLeft variable in the presentation window with

Number Format screen. Disable the checkbox with mal.’

perfect.

e to one hundredth of a econd. That is asking more of Authorware then it can. Sometimes it will work, but

onds variable to a whole number, and (SystemSeconds) when it has a whole

n = SystemSeconds, but to loop until qual to sign will be your safety net so

v The use of the SystemSecohas a lot of practical usesamount of time had passedat the end to see how long

menu. All we need to do now is write something inside the calculation icon in the loop that will allow Authorware to calculate the current TimeLeft. Tafufollowing function in the icon: TimeLeft := CountDown – SystemSeconds Now Run the Authorware piece. You will see the time count down. Depending on your number forththe Text cursor, and go to the Text>

e option ‘Show Numbers After Decith Now, while running the piece, several things can happen. Either the program stops when there are 0 seconds left. The other option is that the program will keep on counting to -1, -2, etc. Now that’s weird, right? Just run the program a couple of times and you’ll see what I mean. What’s wrong? In the introduction I wrote that if you are doing reaction time experimentsuse E-prime software. Authorware is ok when it concerns timing, but notRemember we told Authorware to stop looping until CountDown = SystemSeconds? And that SystemSeconds was a variable with 2 decimals? That means we are asking Authorware to loop until the value of the variable CountDown (for example, 10243,82) equals the SystemSeconds variable. Equals, as in being the sam

, you should

ssometimes it won’t and Authorware will miss the hundredth of a second the 2 variables are equal to each other and continue looping forever, for example when your computer is using a lot of it’s internal memory for another task, like scanning for viruses. So this time the problem, as always in life, wasn’t your fault. How do we fix it? There are 2 options. Either we can use the SystemSeconds variable without the 2 decimals by rounding the value to a whole number. To do this, we should change the SystemSeconds in every calculation icon and text field in the loopcommand will Round the value of the SystemSecAuthorware will surely notice CountDown = Roundsecond to do so. The other option is not to loop until CountDowCountdown <= SystemSeconds. The smaller or e

er.

nds variable and how to calculate passing time in Authorware . For example, you can let a button appear after a certain , or you set the Time at the beginning of an experiment and participants took to finish the experiment.

to Round(SystemSeconds). The Round

Authorware won’t loop fore

35

Page 37: Authorware Beginner's Guide

9. Everything I made looks so… plain. As we’ve seen, making a nice background can really lift your experiment. Black text on a

that Authorware actually is a program which is used more for making resentations then doing experiments. It can make presentations look better then

even unwanted in an experiment. Still, it is crucial that we onsider these possibilities for two reasons. First, your participants will enjoy your

more motivated), but second and more ain visual or aural stimuli.

rt button:

white background is far from appealing for the participant, and come to think of it, the standard grey buttons aren’t the most attractive things in the world either. Know, however,pPowerpoint and add interactive elements like sounds as well. Most of the time, this is of no interest to a researcher. It is even the other way around: to much distracting visuals arecexperiment more (and therefore may be

portantly, your experiment may require certim We have already seen how you can make your own backgrounds in Authorware using the Tools box. However, perhaps you prefer to use existing pictures for your background. Drop a display icon on the flowline and name it Background. Double-click it to open. You

can import a picture by clicking the impo . Search your computer for a

sition.

ordinates. ctually, you can even type in a variable name, making the location of an image

s automaticow counterintuitivly, to change the location of

w of the display on by either Ctrl+I or right-clicking the display

We have several Display options available. We can choose the basic ‘no change’, set a path for the image in the display icon to move over (which we won’t discuss but is fun to

picture and import it into Authorware. In this way, you can also import pictures to present to your participants as stimuli. Place the picture you want in your background (for example, your company logo) in the right top of the page. If you double click it you can adjust certain options, like the mode (just try them all to see which you like best) and, on the lay-out tab, the po

TIP: If you want your background always to be visible (and not disappear under pictures you have in the presentation window later on in the flowline) change the layer of the display (default layer is 0) in the properties window to 1 (or higher). The presentation screen consists of pixels. Every pixel has a X- and Y-coordinate. The top left pixel has coordinates 1, 1. Moving to the right increases the X-coordinate, moving down increases the y coordinate.

TIP: To place pictures on a specific location you can type in the coAvariable! The image had to be placed in it’s own seperate Display Icon. The easiest way to do this, is put the white hand cursor on the right place on the flowline, and click the import button in the taskbar. Import any picture (For instance, go to C:\WINDOWS and select Blauw 16) and notice it i ally named for you. Nthe picture and it’s properties, we don’t double-click on the picture in the presentation window, but go to the properties windoicicon.

TIP: By right-clicking an icon you can easily access most common options for that icon.

36

Page 38: Authorware Beginner's Guide

try out once) or the ‘on screen’ option to simply show the picture somewhere on the ’ and, in the initial C ain system variable,

toring the values of the last X- and Y coordinate where the left mouse button was

owline, and click and drag

conditional interaction

In Authorware, the system variable MouseDown

condition icon, performing the commands given (in

et the automatic drop down menu to ‘On False to True’, which means that when the

o import a picture of your company logo and use it as a background. We’ve

isplay icon and choose ‘calculation’.

program, all objects you put in this e picture now while and try to drag it

here). Under normal circumstances you could move everything in

ymbol attached to the display icon. This is the attached calculation icon.

screen (or sometimes off the screen). For instance, select ‘on screenfield, type ‘ClickX’ and in the initial Y field type ‘ClickY’. These are agspressed down for the last time. Since these coordinates are input from a participant, they are only stored during an interaction. So let’s build a small interaction for the effect. In this interaction, we will use a new Response Type. Drop an interaction icon on the flthe display icon to the right of it. The Response Type window will open, and we will select ‘Conditional’. Acomes into play when a certain condition is met. Most often, this will be when a certain amount of time has passed and you want your participants to be notified they have to hurry up, for example. Right now, we will use it to update the location of the image when the participant clicks somewhere in the presentation window. The response we are waiting

r in this case is a left mouse click.fokeeps track of when the mouse button is down (clicked) and when not. In the Condition field on the conditional tab of the properties window, type ‘MouseDown’. This means that

in this interaction, whenever the mouse is down, Authorware will follow the flowline attached to this

this case, showing the picture on the location on the screen where the participant clicked for the last time).

SMouseDown variable switches from False to True the condition is met. Now Run your Authorware piece, and click somewhere on the screen. ou can alsY

discussed backgrounds before, but there’s one important trick to backgrounds we haven’t covered so far. When you have imported your background, name the icon ‘Background’. Close the presentation window and right-click the d You see that a calculation icon opens. Inside, type: Movable := False By typing in this expression, when running the background can not be moved. Try to move thrunning the piece (click once on the picture, omew

sthe presentation window around, but this way you can prevent items in the Display Icon from accidentally being moved while working on the piece. Close the window and you will ee a small = ss

You can attach calculation icon to all icons. Ok, not to calculation icons, but that would be pretty useless, now wouldn’t it?

37

Page 39: Authorware Beginner's Guide

Now let’s get back to images and how you can re-use them in your experiment without having to import them more than once. First, let’s place a wait icon underneath your background (this time, don’t change anything inside) and place an erase icon beneath the wait icon. Double click it to open. Click on the picture to let the background icon be erased by the erase icon, and close the icon. Now underneath it, a wait icon (again, don’t hange anything, this is just an example we’ll throw away when done with it) and

nd”)

do? Not surprisingly, it tells Authorware to n ID. Authorware identifies all icons with

’. You can find this number in the properties n (Right-click on any icon, Properties). Thankfully, you will never

eed this number, because we refer to icons by the names we give them ourselves. This ry icon a name (later on, when you start making your

when you actually don’t have to name the icons and m, but since I’m teaching you how to do it the right way,

ID’s and not the names to tell erase icons which icon to navigate: thus copy pasting these icons from other files

ause the ID numbers will be different in each file, even if

using this commandcompared to copybackground and DisplayIcon also wtherefore summon your image at any time and as often as you want,

Now for some sound. Though most experiments I know don’t use sound,

cbeneath that place a calculation i DisplayIcon(IconID@“Backgrou Now what would that functiondisplay an icon with a specific icoan unique number, the ‘IconIDwindow of every ico

con. In the calculation icon, type:

nis one of the reasons we give eveown experiments, you will learnwhen you will have to name theI make you name every icon). Note that Authorware uses theseerase, or navigate icons where towill always lead to problems becthe names you have given are the same.

Run this piece. You see your background with the continue button from the wait icon. If you click it, the erase icon erases the background and you see the next continue button. If you click that, the display icon reappears.

s the same icon. When you are working with pictures, to display a display icon can same a lot of disk space

ing the same icon several times. In this case, the the DisplayIcon request are relatively close, but orks for icons that are many maps apart. You can

Authorware display

without having to import it more than once, decreasing overall file size and enabling you to create the interactive appearances of pictures.

here is a small example of how to incorporate sounds in Authorware. Drop a sound icon (the one with the musical note in it) on the flowline, beneath the wait icon, but above the erase icon. Name it ‘ClickSound’. Double-click it to open. Click on the import button to import a sound. On a PC running windows, go to C:\Windows\Media and choose the start.wav

p down menu next to concurrency, Close the sound icon properties. Right-click the sound icon and his case that means pre-hear). If your speakers are on, you hear a

ort clicking sound. Now copy-past the same sound icon directly behind the second wait

spiration, check

file. On the timing tab, in the drochoose concurrent. hoose preview (in tc

shicon. Now run the piece. Ok, I admit, this isn’t going to win any beauty contnevertheless it is the basis of making Authorware look better. For some inout the show me examples located in C:\Program Files\Macromedia\Authorware 7.0\ShowMe. For example open the Altimeter, and then don’t even look as much at the altimeter, but the construction and visuals of the show me example itself, the moving title bar, the text in the scroll windows with different colours, etc.

ests, but

38

Page 40: Authorware Beginner's Guide

While you are looking at this ShowMe example, pause the presentation (Ctrl+2 open the

thermore, you can utton (Though I would not recommend it: we use the hand icon for

ich could be useful if you want to show the button hen it is not active). Making a black rectangle with the word continue on it in

control panel, click the pause button) and double click on the menu button on the bottom. This is a button, not a hot spot. In the Button: Properties window, way to the left is the button labelled ‘buttons…’. If you open it, you will see 3 custom made buttons. You can make your own buttons for your own experiments, or download them from the internet. You need 2 different ones, one for the normal state, and one for the down-state (when it is pressed) to visually represent pressing the button. Furmake a mouse over bthis instead) and a disabled button (whw white, willreally not take so much time and improve the way your experiment looks…

39

Page 41: Authorware Beginner's Guide

10. How about that questionnaire I made? Oh yes, I almost forgot! You know what the problem was with the questionnaire? It

ill make a mistake somewhere. When you use the same thing a lot of times, it sometimes pays to build a loop, which will rerun the same part of your experiment for a fixed number of times. This way, you can re-run your questionnaire (say, thirty times) and use a variable to change the question being asked in the Presentation screen every time the interaction makes a new loop. Let’s try this, and learn some more useful Authorware commands while doing so. We need to do 3 things: first loop our questionnaire, then create a variable that changes the question for every new loop, and finally create a variable that stores the answer every time we loop without overwriting the previous answer.

First, select all the icons that make your questionnaire, and press Ctrl+G to group them in a map. Drop a decision icon underneath it, name it ‘QuestionLoop’. Set the loop to repeat: fixed number of times and in the text field type 10 times. In this example we’ll only ask 10 questions, so we’ll loop 10 times.

Now we don’t want participants to answer the same question 10 times, so we have to make sure the question changes each time we loop. Open the map with your questionnaire in it. Open the interaction icon and replace the text of the question with the variable {question}. Close this window (and accept the new variable named question). Now we need to tell Authorware which question we want the variable {question} to display every time we loop. Authorware needs to know this before it encounters the interaction icon. To do this, put a calculation icon above the questionnaire interaction icon, so that every time that the questionnaire loops, it will first go through this calculation icon before displaying the question. Name it SetQuestions and open the calculation icon. We want to program Authorware in a way that each time it loops the question should change to the next in our list. We will do this with the if – then function. There are 2 options. First is to type in: NumberOfLoops := NumberOfLoops + 1. This is a very common and often useful way to keep track of how many times we went through a loop. We could follow this by If NumberOfLoops = 1 then question := “Whatever you want to ask.” However, we don’t have to create a variable that keeps track of how many times we repeated this loop, because our friendly and practical Authorware has a system variable called RepCount that does the same thing: it counts how many times the participant has repeated the loop. Note that RepCount is an interaction specific variable, comparable to the Tries variable. This means it is reset every time you exit an interaction, and creating a custom variable like NumberofLoops is useful is you come back to the same loop, but exit it in between. However, this time in the calculation icon, we can type: If RepCount = 1 then Question := “Question number 1.”

asked one question, but what if we have a 30 item questionnaire? We are researchers, right, and with the computer automatically saving and scoring all answers, we can ask our participants whatever we want! Of course we could copy paste the same interaction and change the display items of all 30, and then save all 30 questions as a different variable, which all have to name and change in 30 calculation icons. Then we could add those 30 answers to our data save calculation icon. But that’s a lot of work, it’s not very parsimonious, and the more variables you use, the bigger the chance you w

40

Page 42: Authorware Beginner's Guide

epcount and e “Question

umber 1” into a real question, but for now, close the calculation icon and run the piece.

e we will eventually save to analyze.

ery time we loop, ec

already was, but with a Tathe current value of Answequestion). Now watch outvalue of this variable. If yvariable, but in the text fi 99’

ee picture). Click ‘OK’. Run the experiment and look at

sses by a \t symbol (In the final text file in which we save our data, the ’s will be displayed as tabs). How did the 999 value get at the start of our answer

real answer. There are other separators you can use instead of a Tab if you want, for

The copy-past this sentence 9 more times, and make the numbers for both RQuestions run from 1 to 10. Of course, eventually, you will want to change thnYou will see the 10 questions appear before the screen turns white, if you followed the instructions. Now the only problem is that Authorware has only stored the answer to the last question in the variable “Answer”, a variable that therefore is overwritten every time the participant answers a question. Answer therefore saves only the last response, rather than the answers to all ten questions. To address this problem, we will create a new variable which will contain a string of values - the 10 answers the participant gave to our questions. This variabl Open the map of the Continue button. Since every time the participant has answer the question he will have to click on the continue button, they will always go through the flowline in this map, which makes it a great place to put a calculation icon to store their answers. Place a calculation icon on the flowline and name it SaveAnswers. Open it and inside type: AnswerStringSave := AnswerStringSave^Tab^Answer Here we create a new variable named AnswerStringSave. EvAnswerStringSave will b ome (:=) the variable it

b attached to it, followed by r (the answer to the current : we will change the initial ou close this icon, save the eld ‘Initial Value’ type ‘9

(sthe current value of AnswerStringSave in the variable window (Ctrl+Shift+V open the window, in category, select ‘questionnaire.a7p’). You will see a value something like this: "999\t5\t2\t4\t3\t7\t6\t1\t3\t5\t2" What does this mean? This is a variable string, containing several separate values glued after each other as in the Golden Goose fairytale by Grimm, separated by a Tab which Authorware expre\tstring? Remember the expression we used to save our answers in an answer string: AnswerStringSave := AnswerStringSave^Tab^Answer. The first time a question is saved, AnswerStringSave will therefore change to its current value (at that moment 999) followed by a tab, and by the value of Answer (in this example 5). After this we see the nine other answer values. This is why we set the initial value to 999: so we know it is notaexample return, or you can type “ ” to simply insert a space. That’s it! We made a good questionnaire, so save this because you will use it often! It is possible to expend it with more questions by letting it loop more often and adding questions. The RepCount function in Authorware is very useful, as is saving answers in a string like we did here.

41

Page 43: Authorware Beginner's Guide

11. Ok, now give me something difficult. Are you sure? Yes? Well, ok, if this wasn’t difficult enough, let’s start with lists. Note that using lists can be quite complicated, and beginners often do not need to use them. If you on’t completely understand the concept of lists after reading this chapter, you can let it

d to add delete entries t specific places in the list. This makes a list a very convenient and versatile tool for

that the computer will show 5 different letters on the screen. Then the omputer will show a + symbol, followed by either one of the 5 letters already seen, or

rite the procedure out in a the next letter is either b, c, d

and maybe even if there were program a real random game.

able the official way: open bottom. Name the new variable

list, always type [] in the initial value field.

ou type [] in the initial value field, Authorware will know this variable is a list variable. Never forget this.

Now, on with the programming. Beneath the calculation icon on the flowline, drop a display icon and name it “Stimulus”. Open it, and in the centre, type the variable name

dbe and return here if you do need to use lists. A list in Authorware means almost the same as a string variable, only it has a little more options. Remember how a string variable saved multiple answers in one variable? Well, a list variable has a different value for every entry in the list, and these values can even be variables themselves. Lists can be used to organize the values, anahandling a lot of variable values. It is very similar to one row in Excel; the row is the variable, and every column is a different place within the list variable. The best way to get a hang of lists is to use one. We are going to build a game. The game will be cany other letter. We could make the letter selection completely random, but thtwice or more and we wanted five different letters. We could wlist of mutually exclusive expressions: if a is selected, then etcetera. This would save time if there were only 5 trials10 trials. But if there are 20 or more, it is quicker to justTo make this game, we have to work with lists. How do you make a list variable? Let’s for once make a varithe variable window and click on the new… button on the Alphabet.

TIP: To make a new

en letters might be selected

If y

It’s a mistake often made. Now we need to fill this list. The easiest way to do this is set values directly into the list in the following manner: drop a calculation icon on the flowline, name it SetList and type in: Alphabet[1] := "a". This means the first place (or row, to continue the resemblance to Excel) gets the value ‘a’. Copy paste this 25 times, and change the numbers so they run op to 26, and change the letters so they run up to z. Now we made a list with “a” on the first spot, “b” on the second, all the way down to z. In Excel this would look like this: Alphabet = By creating a List variable, we can ask Authorware to display the letter at any (Alphabet[x]) location. Moreover, we can let Authorware modify this list: we can tell it to delete values in any column, to replace them, to delete columns, etc.

42

Page 44: Authorware Beginner's Guide

{DisplayStimulus}. This is where the 5 letters will be displayed. Close the display icon,

TIP: If you want a displayed variable to be invisible, set the initial value to “”.

g letters of the alphabet. How can we do is?

Then we have to raw a random letter from the letters left. So we need to know how many letters are left.

hen we need to draw a random letter from the remaining letters. We will generate a

is another system variable

teAtIndex(Alphabet; RandomNumber) to delete this letter (deleting the row Excel example; so now the

a new list, which will consist of all the letters we have drawn. Thiswhile being able to generate newnamed ‘Letters’, and don’t forg

rget, did you?

he Letters list. Note that when we do not specify a specific location the list to store the value, the value will automatically be stored at the end of the list.

the 6 display stimulus not to be a letter, but a +. We can program this

finally change the isplayStimulus variable value to a +. There are other way to show a + symbol after

and save the variable. Here we will change the initial value, to “”.

Now we need to tell Authorware which letters should be randomly displayed. We want Authorware to show 5 different letters, followed by a +, and then either one of the 5 letters already displayed, or one of the remaininth Drop a decision icon on the flowline. Name it ‘LetterLoop’ and drop a map next to it. Set the loop to repeat fixed number of times, and fill in 6. Name the map next to it ‘GetLetter’. Open the map, and drop a calculation icon in it. Name it ‘WhichLetter’. Open it. To make sure we don’t get the same letter twice, we have to make letters that have already been selected unavailable, so that a single letter cannot be generated more than once (There are other options, as always in Authorware, to do this).dIn the calculation icon, type: LettersLeft := 27 – RepCount. The first time the number will be 26 (of course) and after every loop it will be one less, because one letter will have been asked. Trandom number, and retrieve the letter on that place in our alphabet list. Type: RandomNumber := Random(1; LettersLeft; 1). We create a RandomNumber variable, ranging from 1 to the number of letters left, with increments of one. To make the displaystimulus variable this random letter, type: DisplayStimulus := ValueAtIndex(Alphabet; RandomNumber). This means that the variable isplayStimulus will become the value (ValueAtIndexD

especially for lists, see the List category in the function window) at the place of the Alphabet string indicated by the random number (or inside that row in the Excel analogy). So now we have our letter, we want to delete is so it will not be drawn again. ype: DeleT

in the re are only 25 rows left).

new. We need a Now go to the variable window nd click

way, we can display the letters we’ve already drawn random letters from the list. The new variable will be

et to type [] in the initial value text field. You didn’t fo Now back in the calculation icon, save the letter we just draw in the new ‘Letters’ list. Using the expression Letters[1] := DisplayStimulus isn’t practical in a loop, because the second time we loop we want to store the letter we asked in the second location in the list. Instead, we will use another system function that does the same thing. Type: AddLinear(Letters ; DisplayStimulus) to add the letter (the current value of DisplayStimulus) to tin inally, we wantF th

by typing If RepCount = 6 then DisplayStimulus := “+”. Be sure to type this at the bottom! Authorware will perform the commands in the calculation icon from top to bottom; now the 6th loop, it will first draw a random letter, but Dwe have shown 5 letters (for example by using a new display icon) but this works just as well.

43

Page 45: Authorware Beginner's Guide

Everything together, the programming inside the calculation icon will look like this:

Close the calculation icon, and save all new variables. Underneath this calculation icon, place a wait icon. Set the wait time to 1, and uncheck everything. Now the letters will stay on the screen 1 second before the display stimulus changes.

5; 1). Note that we re-use e variable RandomNumber here, but that’s no problem. We want to draw one of the 5

hen we have to assign the letter on the place of the RandomNumber (ranging from 1 to

m still 1, but the maximum is to be the ettersLeft. So replace the 5 in the first line with LettersLeft. Then we want to draw

Using the functions ValueAtIndex, DeleteAtIndex and AddLinear allows us to manipulate a lot of different values. With AddLinear we created a new list, from which we now in 50% of the cases want to draw a random letter to show. In the other 50% we want to draw a new letter from the remaining letters in the Alphabet list. Beneath the loop, drop a decision icon. Set it to branch randomly to any path. With this option, Authorware will randomly choose any path. Usually you will want more control over where participants go, but this time, the option comes in handy. Another option is branch to unused path, to randomly send the flowline through several attached maps until all maps are taken, but we won’t use that now. Drop a map next to it and name it OneOfFive. Drop a calculation icon in the map. Here we will choose a random letter from the 5 already shown. Type in: RandomNumber := Random(1;thletters.

TIP: To keep the total number of variables down, you can recycle variable names you used before. T5, so for example if the value of the RandomNumber is 3, this would mean the 3rd column in the Excel row) to the variable DisplayStimulus. Type: DisplayStimulus := ValueAtIndex(Letters; RandomNumber). The letter on the position of the random number will become the DisplayStimulus variable. Underneath it, type: SameDifferent := 1. This is a new variable that will be 1 if the flowline passed through this icon, meaning that the 6th letter shown was the same as one of the 5 before. Close the window.

TIP: When saving the variable SameDifferent, in the description you might want to add that 1 means same, 2 means different letters. Copy this map and past another next to it to save some time. Name it OtherLetter. Open it. There are some small differences. Here, we want to draw a random letter with the minimuL

44

Page 46: Authorware Beginner's Guide

a random letter not from the Letters list, but from the Alphabet list, so change etters into Alphabet. Finally, here the SameDifferent variable has to get the value 2,

because the letter the participant sees is a different one from the six before. That’s it. Close the calculation icon and run your piece to see if everything works. Now we want the participants to give their answer. Was the letter one of the five seen before or not? This means we will have to drop an interaction icon on the flowline. Double-click it, and with the text icon type: Did you see the last letter before? Type y if the answer is yes, and n if the answer is no. Set it in the centre of the screen.

TIP: You can change the alignment of the text by selecting it and pressing Ctrl+[ to left align, Ctrl+] to right align, or Ctrl+\ to centre it. Drop a map icon next to the interaction icon, select key-press and name it Yes. A key-press interaction simply means the participant has to press a specific key to continue, instead of clicking on a button. In the keypress tab you can specify the key Authorwareas to react to.

e they right response. or yes to be the right response, the value of SameDifferent had to be 1. So in the

the description field 1 means correct, 2

n, if it is right, we will display ‘Right’. If they see the one or e other depends on the value of AnswerCheck: if it is 1 they will see ‘Right’, if it’s 2

TIP: To create a ‘press any key to continue’ interaction, put

member that we used a lot piece, there will be letters

the alphabet list, letters are already added to the letters list, etcetera. To

L

h In the text field, type: "y". Set the Branch option to Exit Interaction in the Response Tab. In the map, place a calculation icon. We want to check if they madFcalculation icon we type: If SameDifferent = 1 then AnswerCheck := 1. Copy past this sentence, and change it into If SameDifferent = 2 then AnswerCheck := 2. AnswerCheck is a new variable that stores if the participants gave the right answer. Close the icon, save the variable, and maybe add inmeans wrong answer. Copy this whole map next to it, and change the key in the keypress tab into “n”. If they have not seen the letter before and press “n” the answer is correct this time (so it is the other way around as in the other calculation icon), so we will write If SameDifferent = 2 then AnswerCheck := 1. and If SameDifferent = 1 then AnswerCheck := 2. It can be hard to keep track of when responses are right and wrong, so pay attention while programming! Drop an erase icon underneath this all and erase everything (or save nothing). Now we want to give them feedback how they did. If their answer was wrong, we will show ‘Wrong’ in a display icoththey will see ‘Wrong’. Drop a Decision icon on the flowline, set it to branch to calculated path, and in the text field type: AnswerCheck. Drop a map next to it and name it ‘Right’. In it, drop an interaction icon and attach a map. Again choose a keypress interaction. Double-click the interaction icon, and with the text cursor type: Right! Press any key to continue. Now go to the keypress interaction. Set it to branch: exit interaction. Leave the text field on the keypress tab empty, but type ‘?’ in the title field.

a ‘?’ question mark inside the title field of a key press interaction. This is comparable to the * wildcard in the title field of a text entry. Copy-past this map and rename it Wrong. Change the textWrong! and that’s it. Now the idea was to loop the same task 20 or 30 times. But reof variables and changed their values. If we loop the same removed from

in the interaction icon to

45

Page 47: Authorware Beginner's Guide

prevent this from causing mistakes, we can set all variables back to their original state. This way you know for sure that if it worked the first time, it will work the second time this part loops. At the bottom, place a calculation icon. In it, type:

for every initialize() ng which

ritten, so this is a ood place to make a new variable string with all the answers as we did before, so type:

lculation icons you want to make a note so if you read the programming weeks later or if someone else reads it, an explanation is given about what is done in

keep organized. There are a lot of other options with lists; you can sort them, add

Initialize(Alphabet; Letters; LettersLeft; DisplayStimulus) Initialize is a function that resets all variables to their initial values. It is also very practical if you loop your entire experiment (so you don’t have to restart itarticipant) because with the command (without specifyip

variables to reset) you can reset all variables to their initial values and start with a clean experiment. Also, if you loop, the variable AnswerCheck will be overwgAnswerCheckAllSave := AnswerCheckAllSave^Tab^AnswerCheck. Then again erase everything with an erase icon to start with a clean presentation screen next loop. Sometimes in Ca3the calculation icon.

TIP: To make comments inside a calculation icon, start by typing to -- hyphens before writing. For example, you might want to remind yourself that initializing means resetting all the variables to the initial value. The calculation ic

Now select all icons, press Ctrl+G to group them, and loop them any fixed number of times. Now this was pretty advanced programming, but it is useful to know if you have something complicated to program with variables with a lot of different values you want

on would look like this:

tovalues or add lists together, making them a powerful way to handle data in Authorware.

46

Page 48: Authorware Beginner's Guide

12. Is that the best you can do? Yes. Considering this was meant to be a beginner’s guide, definitely. Actually, this may

thing difficult we have to attend to. emember that when we put 2 text entries next to an interaction icon, only 1 text entry

ne screen? That’s ion on its own

irst, drag the Framework icon (

have been a bit too much, but we still have someRappeared on the screen, whereas we could have several hot-spots on o

cause Authorware thinks a text entry is a difficult enough interactbecompared to buttons or hotspots. But what if we really want several text entries on one display screen? How do we manage that? There really isn’t that much in Authorware that is really impossible. You only have to know how. In this example, let’s build the first screen of your experiment. That’s where you will want to type in the participant number and the condition the participant is in. You could do this on 2 different screens, avoiding the problem, but here I will show you how to have 1 screen where you can type in several text entries. For this, we need a new icon. After this example, we will have used all the icons in the Icons Bar except the knowledge object, DVD and digital movie icons which we will not

discuss in this guide. F ) to the flowline. The framework

ndard navigation panel. This is without a

orresponding page numbers on them.

getting by just dragging a framework icon on the flowline, isn’t it? Why this is the standard option beats me, because most of this we don’t want. What we get is a complete navigation structure, where participants have buttons for everything: to exit the framework, to go to the first or last, previous or next page, and even a ‘find’ button to search for words within the text on the pages in your framework! First, double-click the display icon named ‘grey navigation icon’. As you can see this is the background of the buttons. We don’t need or want this, so delete the display icon. Now we only have 1 interaction, where we can press 8 different buttons. Usually, you won’t need all of them. Let’s strip this navigation icon down to the basics; delete every icon except the exit framework, previous page and next page buttons. Notice that the navigate buttons are not set to Exit the interaction, or to Continue, or to Try Again. Instead, they are set to Return. You can only do this with Perpetual buttons: buttons that are not erased after displayed on the screen, but that remain visible and

is a convenient way to group related pages and let participants navigate through the pages with the standard navigation panel, similar to reading a book. Run the piece to see the stadoubt the most hideous standard button set ever. Luckily it is easy to use normal buttons or import your own buttons in the framework.

In our experiment, participants normally cannot browse back to re-read previous pages. However, if you want to enable this, you could use a framework icon for this. Drop several display icons next to it (see the picture on the left). Open the first display icon, and

somewhere on the screen type ‘Page 1’. Open the other display icons and write the c Now double-click the navigation icon itself. You will see the same as the picture here on the right. That’s a lot of stuff we are

47

Page 49: Authorware Beginner's Guide

they can be clicked, even if the participant is in another interaction. The Return option presses the button, they will

could be practical if ou want to show a button on screen which is constantly available to participant, for

We want to fix 2 problems; first of all, we ant participants to be able to exit a framework only when they are on the last page, so

play icon. Inside, type ageNumber := Authorware will set the variable PageNumber to 1 when displaying

u

ork button to be properties window,

means that if a participant is in another interaction andReturn to the location of the button and continue from there. This yexample a ‘Help’ button. Here however, it is just the standard setting. This is because if the navigate buttons are not set to perpetual, the flowline will not continue, and the navigate buttons will be shown, but not the subsequent maps you want to navigate through. Run the Authorware piece. As you can see, we can browse through the page, and exit the framework. However, we are still not content.wthat they will at least have seen (and hopefully have read) all previous pages. Second, now participants go back to page 1 if they click on the ‘next page’ button when they are on page 4. We will solve both problems in the same way, namely by creating the variable PageNumber to keep track of the page we are on. Right-click on the first display icon and select ‘calculation…’ to open a calculation icon attached to the disP 1. this display icon. Attach calculation icons to the other pages as well the change the variable PageNumber to the corresponding page numbers. We can now tell Authorware which buttons should be active on which page thro gh the Active If: field on the Response Tab of each navigate button by for example typing: PageNumber <> 1 if we want the button to be active if the page number isn’t one (which world the previous page button), of PageNumber = 4 for the Exit Framewactive only on page 4. While you are on in the Exit Framework button and click the ‘Buttons…’ button. Change the

be appropriate for

to something participas an exit button, for example a norm

ants will recognize al button with ‘Exit’ on it.

adisplayed over the different pathe standard ‘Gray Navigation

ard function of a framework, we will now use it to navigate

stead of browsing through different pages, we want participants (or the experimenter)

TIP: Instead of always dropping a map icon next to an interaction icon, and

meworks, put all display icons you want to keep ges on the flowline inside the framework, where

Panel’ is located.

TIP: When working with fr

After showing you the standbetween 2 text entries interactions which we want to show on the same screen. Save this framework as Framework if you think you will use it in the future, and open a new Authorware piece by clicking File>New>File.

Sidestep on navigating through y

straightjacket. Actually, there are quite some options to move around more freely. One is the navigate button on the flowline.

the GoTo function within calculation icons. If you type: ) Authorware will jump to the icon somewhere in your d continue from there. Note that you must give the icon a

function to work. You can also use this combined with the score < 200 then GoTo(IconID@”Test”).

our piece. Now you have seen the flowline isn’t a

Another useful way is to useGoTo(IconID@"Question1"piece named ‘Question1’ anunique name for the GoToif – then structure, e.g. If

Into browse through several text entries attached to the framework. First, drop a map icon to the right of the framework icon and name it ParticipantNumber. In this we will build a text entry interaction. Open the map, drop an interaction icon on the flowline and name it ParticipantEntry, then drop a calculation icon next to it.

placing a calculation icon in the map, directly attaching a calculation icon to the interaction icon will save you some clicks.

48

Page 50: Authorware Beginner's Guide

Choose text entry and click ‘OK’. Double click the text entry icon. For the title, type in a wildcard ‘*’ in the title field so that you can type in any number you want to and still exit the interaction. Set the branch to Exit Interaction. Double click the calculation icon. This is where we will save the text entry as the participant number. A common name for the participant number is PPNR, but personally I use: ParticipantNumberSave := NumEntry Close the icon. Then for the fore last icon we will discuss: the navigate ( ) icon. It

e it change the word

articipantNumberSave in ConditionSave, and name the interaction icon ConditionEntry.

ou are also copying variable ames. Be sure to change the variable names immediately after copying.

You don’t have to change the ‘next’ navigate icon, because in the last icon to the right of the framework icon, this means navigating to the first icon again, enabling you to change the text entries to correct them if necessary. Now we need a display screen to clarify what we are typing in where. Where would be the best place to put this? It depends on what you want: if you need a different display

ppear. To achieve this, put the

example above.

won’t surprise anyone these icons are mostly used inside Frameworks as an addition or replacement of the standard navigation panel. Drag-and-Drop it from the Icon bar to the end of the flowline. It will say the navigate icon is unlinked. That means right now the navigate icon is not set to navigate to anywhere. Where do we want this icon to navigate? This icon will navigate to the condition text entry, which we will create to the right of this map icon. To navigate to the next map attached to the framework, double click the navigate icon, and in the properties window in the Destination window select the ‘Nearby’ option. There are actually a lot of correct ways to set up the navigate icon correctly: When we have made the second map with the condition text entry, we could choose ‘Anywhere’ and select the Condition map, or we could select calculate and

type in the icon’s name. For now, in the ‘Nearby’ menu choose ‘Next’. If you do this, the navigate icon on the flowline will look like the picture on the left.

Since this is a good working text entry, copy past this map next to this one for the Condition text entry (be sure to place the whit index hand on the right of the participant map while pasting). Name the map Condition and inPEspecially don’t forget to change the calculation icon.

TIP: Copy-Paste carefully, especially when yn

screen with each text entry, put different display icons in the 2 maps. We are more interested in 1 display screen where the different text entries will adisplay icon within the framework icon and name it ExperimenterScreen. Open it and type: Enter the participant number and condition. To be able to know which text entry you are in, make the screen look something like the

49

Page 51: Authorware Beginner's Guide

Run the experiment. Chances are, the text entry will not be on the right spot. Open the Control panel (Ctrl+2) and pause the presentation to move the text entry to the right place on the presentation screen. Press enter, pause it again, and relocate the second

xt entry. Then, in the framework icon, preserve the interaction icon but delete all the

t create an exit button, next to the rag a navigate icon to the right of the interaction gain Authorware tells you the button is unlinked.

ouble-Click the button to go to the properties window. The

lf. d is

he

eletters dis tion ‘Erase text on exit’ in the properties, Text Interaction Options screen, or set the

n. First, in the properties screen, heck the option ‘Update Displayed Variables’. Now open the display icon and type

them the right location later.

of the text, pause the piece and double-lick the text.

ve.

s on the display screen are selected. Click again on the his actually is a lot of work if you want to be precise,

is. Changing the mode of the text entry and text on the akes it easier to let the numbers overlap exactly. Too e to keep the entry text displayed on the screen.

ice that after entering the condition number, the cursor ber entry again, but the number has disappeared. I educational purposes here, but there is a way to solve entry for a text entry interaction, so that we only have ry. Go to the ParticipantEntry interaction. We want to

tebuttons and the navigation panel, yelling: U-G-L-Y, you ain’t got no alibi, you’re ugly! You’re ugly! We put our own navigate icons (without buttons) in the 2 maps. Now we can fill in the participant number and the condition. Again. And again. But there’s not yet a way to exit the interaction. We musinteraction icon inside the framework. Dicon and choose a ‘button’ interaction. ADtitle of this button is ‘unlinked’, change it to the more appropriate ‘continue’. Furthermore, assign a keyboard key exit the framework, for example the letter ‘c’ by typing it inthe Key(s) field. Now double-click the navigate icon itseFrom the Destination pull-down menu choose ‘Nearby’ anthen check the radiobutton for Exit Framework/Return. Thtells Authorware to continue with the flowline below tframework icon. Enlarge the continue button. The bigger a button is, the easier it is for yourself and your participants to click it. Run the piece again. Pause it to place the continue button in a better location (although it

ally matter that much). Type in some numbers. First of all, you will notice the appear from the screen after entering them. Even if you disable the op

to

doesn’t r

Properties: Response Erase pull-down menu to ‘Don’t Erase’, the text will disappear because these options are valid only until you encounter a new interaction, and here we are jumping between 2 text entry interactions. If you want to see your text entry on the screen to be able to check if you typed in the right participant number, go to the ExperimenterScreen display icon in the framework icoc{ParticipantNumberSave} and {ConditionSave}, presuming these are the names you used to store the variables. Don’t worry to much about their location, we will moveto Run the piece again. You will notice the numbers do not appear exactly on the same spot where you typed them. To change the positionc

TIP: When moving one of seselect the part you want to mo After double-clicking, all the partcorrect word to move only that. Tbut there is no other way to do thdisplay screen to ‘transparent’ mbad there’s no option in Authorwar Run the piece again. You will notwill jump to the participant numadmit, we are only fine-tuning for this problem. We can pre-set the to press return to confirm the ent

veral items in the display screen, be sure to only

50

Page 52: Authorware Beginner's Guide

tell this interaction to display the text entry of the experimenter when we enter the interaction for the second time. We can tell interaction icons specific things with calculation icons. We could just put a calculation icon above the interaction icon. But Authorware has also the option to attach a calculation icon to an interaction icon. Go to the interaction icon and right-click, and from the menu choose ‘Calculation…’. A calculation window will open. In the window, type: If ParticipantNumberSave <> 0 then PresetEntry := ParticipantNumberSave

ulation does the same thing as a e in handy to attach it to

it them, and click on the Screen, because you will

eginning of every experiment you will run. You can even add more umber in this first screen by copying the maps to the right of the framework and

ow if we fill in the participant number and the condition and press enter, we can change

ext entry interaction map. This way you don’t have to force articipants to press the Enter key before continuing. Keep this in mind. You can use the

ables throughout the interaction. In this example, open the exit amework button, and in the Active If screen type: EntryText@”ConditionEntry <> “”.

This means that if the Participant number is no longer 0, so after it has been entered by the experimenter, the saved value should be used as a preset entry. A preset entry can also be very convenient if you want participants to write a story and later ask them if they want to add something to tstory. Close the calculation window. You will see a small calcicon attached to the upper left corner of the interaction icon. Itcalculation icon just before the interaction icon, but it can comthe interaction icon itself. Run the piece again. You can fill in the numbers and easily edcontinue button to exit or press ‘c’. Save this as Experimenterput this at the b

he

nchanging all the names. That’s another useful part of your experiment! Nthe participant number. However, if we do so, but forget to press the Enter button, Authorware will not guide the program through the calculation icon inside the text entry interaction map, and so the value will not be updated. If the participant number was 12, and we change it to 13 without pressing the Enter key, it remains 12. This is even a bigger problem if you want participants to type in a value and press enter before clicking the continue button, because if they don’t press enter, the text entry will not be stored. Thankfully, there is another way to save a text entry. Underneath the interaction, drop a calculation icon on the flowline. Name it SaveIcon and open it. Inside it, type ParticipantNumberSave := EntryText@“ParticipantEntry” and underneath it type: ConditionSave := EntryText@“ConditionEntry”. This is a much more elegant way to save text entries, and I recommend you use this instead of the calculation icon inside the tpadditional @”SomeName” behind more variables, for example in Repcount@“PreviousLoop” to refer to a specific variable. Authorware keeps track of all these system varifrThis means that the continue button is active only if there isn’t nothing (or if there is something) in the TextEntry field. Oh, yeah, I almost forgot. In this example I would discuss all the relevant icons except knowledge objects and DVD and digital movie icons. That means that we have to

incorporate the Motion icon into this example. Well, here we go. The motion icon enables you to introduce movable objects to your Authorware piece. Though this might be just what you want for your experiment to visualize something in a game people have to play, chances are you will never use this function.

51

Page 53: Authorware Beginner's Guide

Drag a Motion icon beneath the ExperimenterScreen Display icon but above the interaction icon and name it MoveText. As with the erase icon, you have to specify which icon has to be moved. As long as you haven’t done this, the program will stop when you run it, and the properties window of the icon will be displayed.

use this to, when Authorware stops, click on the contents of the display screen to e the

to:

TIP: The program will automatically stop when it encounters an empty display

or calculation icon or an unlinked motion or erase icon. Whenever the program terminates unexpectedly, check if there’s an empty icon on the flowline. We willtell Authorware to move the obj cts we click on. Run the piece. The contents ofdisplay icon will be displayed, and the properties window, asking you

Click on the text, and the properties window will change into:

We won’t drag the text anywhere (making the motion icon move it there while running). Also the setting ‘Wait until done’ is ok, and the time of the movement, 1 second, is fine. Close this icon. Right-Click on the display icon and open the properties window of the xperimenterScreen. We will change the starting position of the text, resulting in the

creen. You will see a stunning visual effect next

Emotion icon moving the text to the location we put the text to begin with. In the pull-down menu named positioning, change ‘No Change’ into ‘On Screen’. Now we can fill in the X and Y coordinates of the text. Set X and Y both to -50, making the text appear from the left top of the stime when you run the experiment. However, sometimes this option of moving object can be useful, so now you know. You’ve used all the icons, learned some important information, got acquainted with some functions and system variables and worked with some different interactions. Since this is supposed to be a beginner’s guide, we are almost done.

52

Page 54: Authorware Beginner's Guide

13. So long, and thanks for all the fish! Hey, wait a minute! Are you sure? Aren’t you forgetting something? Now you know how to build an experiment in Authorware, don’t you want to know how you can save all the data so you can analyze it? If you are really sure you got all the info on programming you need to make your own experiment, just read through this chapter and you are

ally done, ok?

text-file nding with .txt) which you can open with the Notebook or in Word, or which you can

functions with which text data can be stored, WriteExtFile and AppendExtFile. The rst makes a new text file and saves e data in it, the second command adds the new

articipants to one file, you

re When you are done building you experiment, you’ll have a lot of answers to questions you will want to store. Authorware can store the answers to questions in a (eread in a statistical program (SPSS has a read in text data command). At the end of the flowline of your experiment, put a calculation icon. Open it. There are 2

thfidata to an existing text file. When saving data from several pshould use the AppendExtFile command.

Here you see an example of a calculation icon that stit. The first line makes a new variable, named Data. It is a stcontains all subsequent variables in one big string example would be ‘1

ores data. Let’s take a closer look at ring variable, which means it

of values, with tabs inbetween. An 3 5 9 2 43 1 3 2’. Some researchers prefer to put the names of

very variable before its value(s) in the save file, so they can quickly tell which is which.

does not process text very well d might not display your names in your dataset. In this example all the variables that ed to be saved have names ending with ‘Save’. So, how do you make sure you don’t

forget a variable? Well, best thing is to check and double-check if you have the answers to all the questions you asked written down. Another good way to check is to open the variable window by pressing Ctrl+Shift+V. In the category menu, select the name at the bottom of the menu, which will be the name you gave to your experiment. Select this, and in the scroll down menu beneath it you will see all the variables (except system variables) you used in creating the experiment. If you write all these names in the calculation icon, you’ll have all the data you want. But most of the time you only need a selection of these, for instance only the ones which have ‘Save’ as the last word in the variable name.

TIP: If you want to save a lot of variables, all the names may not fit on the first line. To cut the long string of words in several pieces and place them on several lines, add a continuation ¬ symbol at the end of a line as you can see in the programming below by holding down the ‘Alt’ button while pressing ‘Enter’.

eTo do this, you should change the expression to: Data:=”ParticipantNumberSave”^ ParticipantNumberSave^Tab^”ConditionSave”^ConditionSave^Tab^”AgeSave” ^Agesave^Tab^”Answer1Save”^Answer1Save^Return. Now the names of your variables will be saved to your text save file as well. Beware, SPSSanne

53

Page 55: Authorware Beginner's Guide

Now you want your s

here one variable ends and thetring to have spaces in between the different variables, so you know

other begins. There are several options, and they all

es, only here the ord is a space. All these values together form a string.

At the end of t le Data, you see Return. Return is a system variable as well, which makes the output file start a new line in the text file: a good way to keep your output organized. The AppendExtFile will add each new data string to the same file, at the end of the previous string. By putting a return at the end of your string, the next string of data will start on the next line in the data text file.

TIP: Ending your data string with a Return variable will results in a well-organized data file.

e made all our data into a string variable called Data because the AppendExtFile can

g to the Windows directory, which has a different name if the operating

xperiment. And when I say always, I mean always. There is so much that can

wwork. Most important is to hold on to one consistent way of working. In the example, the spaces in between the variables are a Tab. Tab is a system variable as well. If you would rather have a space as a separator between variables, instead of the Tab you can type in “ ”. This way, you are actually inserting a word in between the variablw

TIP: To create a string variable, you have to put a concatenation operator ^ between every variable to join character strings, and you can put a Tab or space between them for clarity for yourself.

he string variab

Wonly write 1 string variable to the computers hard-drive. On the next line is the AppendExtFile function, followed by ( ) brackets to define the 2 parameters. The first is the location and name of the file we are saving, and followed by a ; symbol is the string variable we want to save.

TIP: Use a new variable name for every new experiment (but not sessions within an experiment) you run, even if you only add the date so you don’t accidentally overwrite old data. The location of where to save the data is also a variable name for Authorware, that’s why it’s put in between “ ”. A normal name would be “C:\\My Documents\\Experiments\\Data23-02-2005.txt”. The data would be stored on the C drive in the Experiments folder inside the My Documents Folder, and named ‘Data23-02-2005.txt’. The string name we want to save is, of course, the Data string we defined before. An alternative to using a fixed path such as the one above is to omit the path and save the file as only the last part – in this case, “Data23-02-2005.txt”. In this case, Authorware will save your data file to the same location where your Authorware file is situated. This is especially convenient if you run the experiment on a computer that features a directory structure different to the structure on your own computer (an example is savinsystem is Windows NT). If you’ve used this method of saving, you’re able to find your data if you know where you’ve put your Authorware file. Note that you need to have permission to create and change files on the hard drive to store text data.

TIP: Always check if the data is stored correctly before running an e

54

Page 56: Authorware Beginner's Guide

go wrong, and you don’t want to forget variables. Best is to Test run, and import the data in SPSS to see if you have everything to analyze the data. Sometimes, people want to store the data in variable filenames, most of the times the want files to start with the participant number. The location of where to store the data is, as I said before, a variable name for Authorware. Because it is a word and not a number,

ve to put it in between quotation marks (“ ”) so Authorware will know i is a word

nd in that folder would appear a

his option can be useful.

, Authorware changes the System

ntil true, with in the text field IOStatus = 0 & RepCount > 0. epCount is another system variable, counting

f warning, ough: if you plan to save your data to a

t you haand not a function or variable. You can put a variable in the name of the file location if you want. The name will then consist of a fixed name part that is the same for all data files, then a variable part, which is unique for every data file (usually the participant number, and an extension (such as the .txt part). To connect variables, you had to add a ^ in between them. So having a variable name according to the participant number would be written as: “C:\\FileLocation\\”^ParticipantNumberSave^”Data.txt”. Saving data in this way would result in a text file being save on the C-disk, in the folder specified

the File Location part (for example My Documents) aintext file for every participant, named 1Data.txt, 2Data.txt, etcetera. Note that appending the new data to the old file is useless if you save the data of every participant in a new text file, and you would have to import a lot of different cases in SPSS, but sometimes,

r example when saving qualitative data, tfo

TIP: Instead of typing in the path (e.g., WriteExtFile(C:\\My Documents\\Experiment)) you can use the system variable FileLocation, which will be the same location on the hard-drive as where the Authorware program is running from. Use for example ’WriteExtFile(FileLocation^”Data”; Data)’. Did I say you always had to check if the data is written to the drive the way you want? Well, you have to. One more advice: When Authorware writes data to a diskVariable IOStatus. If everything goes right, the value is 0, is something goes wrong, the value is 1. Things almost always go right, but it never hurts to be safe, so we want Authorware to loop the data save calculation icon until IOStatus = 0. First, put the calculation icon in a loop (see previous example and picture) and then set it on repeat uRhow many times the participant repeated (went through) the loop, which has to be 1 time at least, so > then 0. One word othserver, always save on the harddisk of the computer first. If you use the IOstatus method described above and save to the server first, a server problem will cause you to lose your data (as Authorware will infinitely attempt to reach the (malfunctioning) server. The opposite of the WriteExtFile is the ReadExtFile option. In a similar way you write a text file, you can also use ReadExtFile to get data from a text file. This is a useful command if you want to exchange data between 2 computers, for example when you want two participants to work together in real-time. For example, we could first create a variable containing the data in the text file we are reading, and then retrieve the first value from that data. The programming would look like this: RetrievedData := ReadExtFile(“C:\\My Documents\\Experiments\\Data.txt”) ValueWeNeed := GetLine(RetrievedData; 1) From the data we retrieve the first line (lines are separated by returns) and save it as ValueWeNeed.

55

Page 57: Authorware Beginner's Guide

14. How about packaging? Packaging your piece is an essential part of distributing your Authorware piece. You do not want participants to be able to pause the piece while running, or let them click-and-drag objects in the presentation window somewhere else and change the layout. When a piece is packaged, it will not be possible for the participant to change anything in the piece or to pause it by double-clicking. They will have to follow the flowline. This is one of the few places where there is a difference between working on a Macintosh or a PC. I will only describe the packaging of files on a PC; if you work on a Mac, consult the Authorware help file.

TIP: After the piece is packaged, there is only 1 way to quit the program and that’s by pressing Ctrl+Q. First we have to set the publish settings. Go to File>Publish>Publish Settings. Most of the time you will not need the Web versions of your experiment, so uncheck the Publish For

eb Player and Page options, otherwise Authorware will make and save 3W working

s. (the Authorware runtime file) to an

are is installed on it or not. Note that you usually can not send .exe files through email, because virus scanners treat them as a potential virus. The only reason to

versions on your computer. You can change the location of where to save the published file; I recommend you do this, because the standard location is not really practical. For example save the experiment to your desktop.

want to include Runtime for WindowThe only choice you will have to make is if you

ntime changes your file from the .a7r formatRuexecutable file (.exe) allowing the piece to be run on any computer, regardless of whether Authorw

56

Page 58: Authorware Beginner's Guide

not include it is if the computer where you will run the piece already has Authorware m to use as little disk space as possible. owadays, I would recommend to always

clude Runtime just to be sure.

rware needs epend on what you have included in your experiment. Most common extras are needed

TIP: All these files need to be added in the same folder as the packaged

installed on it, and if you really need the prograSince disk space isn’t that much of a problem nin Is it this simple? Yes and no. When packaging your file Authorware generates certain .DLL files and a folder names XTRAS containing several files with a .X32 extension. What do these do? Well, the most general description is these are external files Authorware needs to play the packaged piece you’ve programmed. Which files Authodto display pictures (.bmp, .jpg, .gif), audio files (.wav) or movie files. Authorware also adds the js32.dll file which is needed to run the experiment.

Authorware experiment. One of the most common mistakes is forgetting to include these external files. If Authorware can not find these external files, it will display an error message (see picture) saying it can not find the Extra’s folder. An important tip is that the files Authorware makes when packaging are specific to the experiment, therefore it can be that your experiment will not work if you copy these files from another experiment. Again, always test if your experiment works the way you want it to on the computer you want your experiments to run from. Another thing not to forget is to install the right font on the computer your piece will be running on if you use a special font. Most of the time it is better to save yourself thetrouble and choose one of the more common fonts installed on computers like Arial,Courier, Verdana or Times New Roman.

The icons of the runtime file and the unpackaged file are different. To the right you will see the unpackaged icon, to the left you see the packaged .exe file. After you have packaged a file, you can no longer open it in Authorware to make small changes. The packaged program will run, displaying the flowline, from start to finish. You can not change anything in a packaged file, so always save a

version of the unpackaged file. If you packaged your experiment, it will run till the end of the flowline, and then stop. The final screen will be shown until you press Ctrl+Q on the keyboard. Alternatively, you can tell Authorware to quit the program. To do this, put a calculation icon on the end of the flowline. Inside, type: Quit()

57

Page 59: Authorware Beginner's Guide

15. So now can I go? Yes. But be sure to put on some warm clothes, will you? Oh, it’s so hard to see you

pages in doing so. Still, I ope and think you have learned enough to make the experiment you want to make. If

ve colleagues or fellow students who have already run in the same problem you ran into. Ask them for help.

ll through the index, search for a specific item are help file actually is a very good guide to e beginner’s level, so just check it out if you

in a nice way but don’t know how. Click t is not aimed at making an experiment, it will ferent manner then we did here, which may be

nd follow a step by step guide. However, it don’t need.

es to set up almost every ossible interaction. Click search and type in ‘step’ to see all step-by-step explanations.

d. Ask someone if he or she has something you an use. However always try to understand what you stole, and use your own variable

pMacromedia

leave, there are so many things I never taught you, how will I know for sure you will be alright on your own? You clearly are in a hurry, aren’t you? On the other hand, you probably learned all you needed to know by now. What didn’t you learn here? Well, to be honest, lots of things. The Authorware program is much more elaborate than what we discussed here and there are enough books explaining every different possibility and need more then 600hnot, what then? First of all, you will probably hato If they don’t know, or if you don’t wantAuthorware help files. You can either scroor read through the tutorial. The AuthorwAuthorware on its own if you are past thhave a problem or want to do something Help>Tutorial to take a look at it. Though ishow you the basics of Authorware in a difuseful if you want to practice a little more acontains a lot of information you probably The help function also offers a lot of step-by-step procedur

to bother them (again) you can check the

p To prevent you from running into problems, steal programs from other people. I am very serious. Often there is no need to spend hours to make something yourself if you can copy past it from someone else in a seconc

revent problems. Maybe you can download something you need site (

names to from the www.macromedia.com/support/Authorware). Or take a lo

e examples in the Macromedia folder (usuFiles\Macromedia\Authorware 7.0\ShowMe). These Show Me exam time the top notch of what you can program in Authorware, so oftento understand, but you might be able to figure out how they work

them for you own experiment.

ok at the Show M ally in C:\Program ples are most of the they will be to hard and adept

ve done here. You will run into small rrors of things not working the way you want them to.

can be found in the Control Panel (open

with Ctrl+2) and clicking on the

When you are trying to make your experiment, you will hardly ever create a flawless experiment. A lot of time will be going in debugging your piece, especially if it gets a little more complicated then what we’e A help with debugging

show trace button. If you run the program now, you will see a screen resembling the picture on the right. It tells you where you are on the flowline: the number is the level (so how many maps deep you are), the second 3 letters are the kind of icon you passed through (so a CLC calculation icon, DEC decision icon, into a MAP, another CLC calculation icon and an INTeraction icon). You can also stop the program and take it

58

Page 60: Authorware Beginner's Guide

a step at a time by pressing . Tmade and by checking if all fields are

his will help you to locate where the error is being filled in correctly and taking a closer look at the

rogramming or the variables you use you might be able to figure out what things go

at causes problems. To see the value ppear in the trace window, do the following. The Trace field does not only show the

in between (), so to show the string variable he word) ‘Sex=’ with the variable SexSave. Ctrl+2 open the

ilar) hen you click the two radiobuttons. The Trace comment is --

pwrong. It can also help to let someone else (maybe with more programming experience) take a look at the problem. Most often, it will be the value of a variable thanames of icons you pass through, but you can also show values specified by the Trace system function. For example, open the MaleOrFemale file we made in chapter 3. Open the calculation icon in the Male map, and under the other expressions type Trace("Sex="^SexSave). This is telling Authorware to show, in the Trace window, what you have written(tcontrol panel and the Trace window, and Run the experiment. You will see the screen on the right (or something simwSex=1, telling you the value of SexSave is 1 since you entered the MAP titled Man. The bigger your experiment will become, the longer it will take to go through the whole piece to check if something looks good or works after some adjustments. However, you can tell Authorware where to start running and where to stop.

TIP: By placing the white flag in the flowline on the position where you want Authorware to start from, and

e black flth ag on the position where you want

e aware that when running the piece from a specific place on

e current value of variables. This enables you to check if e variables have the values you expect them to have at a c

u cannot see something n to fast to see, did you he flowline, did you set

e, test it every now and

y need to be. Reading orking your way around

Authorware to stop you can run a small part of the piece. Bthe flowline, the program may not have the necessary values of variables to run correctly. For example in the flowline to the right, Authorware will not have had input for the decision icon. Unless the initial value of the variable that controls which path will be taken is higher then 0, the value will probable be 0 and thus Authorware will fly right by the 4 calculation icon to the right of the decision icon. You can always, however, temporarily change the initial value of a variable. You can pause your piece at any time, and by opening the variable window take a look at thth ertain time. Try tosystematically follow the flowline and analyze the problem. If yoin a display icon, is it being erased somewhere, is it being showtell Authorware correctly how to display it, is it being skipped by tup your decision icons in the right way? When building your piecthen to see if everything works the way you expect. And most important: don’t make things more difficult then thethrough the entire Authorware help file is a lot more work then wa problem. Good luck programming your experiments.

59