|01 Expression Editor You are allowed to create multiple expressions for Module, Subroutine, and Variable icons by using the up and down arrows which appear in the Expression Editor when you have entered through one of these icons. For example, if you want to initialize the values of five different variables such as, Name, Age, Height, Weight, and Telephone, you do not have to use five separate Variables icon. You can specify: Name="John," Age=30, Height=60, Weight=150, and Telephone=5551212, in the Variables icon through the Expression Editor. Variables are defined using expressions in the expression field near the top of the Expression Editor. The Expression Editor is divided into five separate regions: Functions, Variables, Logical Operators, Arithmetic Operators, and the Expression Field. The Functions window lists standard arithmetic and string functions supported in AmigaVision. The Variables Window list all the local and global variables that are available for use. The Logical Operators are used exclusively in conditional expressions. The Arithmetic Operators are used in assignment expressions and as a general purpose numerical pad. The Expression Field is for entering or editing an expression. You may either type in an expression or build it by selecting the desired items from the gadgets, variables, and functions in the Expression Editor. For example, you might create a variable called SCORE by typing, in the expression field, SCORE=100 or by typing SCORE and clicking on the = gadget and then on the gadgets representing the numbers 1, 0, and 0. Just as in a Calculator when you click on gadgets, they are entered into the expression field at the location of the cursor. When you have completed assigning a value to a variable, click on the |12Enter|12 gadget or press the Enter key on the keyboard. Now as a variable by the name SCORE does not exist a new variable is created and and displayed in the Variables Window. A one character code I, which stands for integer variable, is also displayed with the new variable SCORE. The other codes are B for boolean, S for string, and F for floating point. These codes help remind you the variable types so that you will mix incompatible types in an expression such as assigning strings to integer variables and so on. The Arithmetic operators in the Editor follow the standard symbols in most programming languages. Use + for addition, - for subtraction, * for multiplication, / for division, and () to control the order of operations. The symbol % stands for modulus. For example,the expression a = 16 % 3 will assign a value of 1 for a, which is the remainder when you divide 16 by 3. The only use of the symbol = is for assignment of values or expressions. The Enter gadget is for simulating the keyboard Enter key. The Logical operators are used for specifying conditional expressions. Use AND for conjunctions, OR for disjunction, NOT for negation, < for less than, > for greater than, <= for less than or equal to, >= for greater than or equal to, <> for not equal to, and == for testing the equivalence of two values. In AmigaVision all string comparisons using the == symbol is insensitive to the case of the characters in the string. In other words, all strings can contain mixed upper or lower cases. If you need to convert all the characters in a string to upper or lower cases there are special string functions available for this purpose. The ?= is for matching patterns in a string. For example you have a string variable called ANSWER which contains the string that was entered by a user in response to the question say, "Who Discovered America?" If you want to see if the word (substring) "Columbus" appears in the ANSWER. Then you will use the conditional test expression: ANSWER ?= "?Columbus?" This test will return a TRUE value if ANSWER contained the word Columbus at any location, even in a long sentence. The pattern string you specify can contain two wildcard characters: the ? character to indicate any phrase including spaces and the character * for any single character. These wildcard characters are very useful in specifying spelling and grammar tolerance levels. In the above example for instance if you also want to forgive poor spelling of the word "Columbus" then your pattern matching expression will be something like: ANSWER ?= "?Col*us?" Thus even an answer such as "Colxus" will be considered as a good answer for the question "Who Discovered America?" Use the |12SPACE|12 gadget to insert a space for enhancing the readability of an expression; use the |12,|12 (comma) gadget for separating the parameters in a function. The available functions are described later in this section. The Expression Field has five gadgets associated with it. The up and down arrows are for access to the list of expression. These two arrows are disabled if you access the Expression Editor through a condition icon such as If-Then. For every conditional expression only one entry is permitted. The |12Backspace|12 gadget is useful for deleting the character to the left of the cursor inside the Expression Field. The |12Delete|12 gadget is for deleting the character right under the cursor and the |12Clear|12 gadget is for clearing the entire field. When you complete the definitions of variables or expressions, click on the |12Ok|12 gadget at the bottom left corner of the Expression Editor. If the expression you entered has invalid syntax, an error message is shown in a message window. If the expression is of valid syntax, the Expression Editor saves your expressions. All future entry into the Expression Editor through the icon will display the previously defined and currently valid variables for editing. To exit the Expression Editor without saving, click on the Cancel gadget. This exits the Expression Editor without saving your current definitions. |12Functions|12 You may also use AmigaVision's library of functions to create expressions. An example expression using a function is |12response()|12== "box 1" where "box 1" is a response string assigned to a hit box created in the Object Editor. The response function returns the current value of the response string from a hit box or the keyboard. Functions can appear anywhere in an expression. The following are examples of valid expressions using functions: 1. newvalue = max(a, min(b, c)) Here the minimum of b and c is found first and then the maximum of that value and a is found next and then the result is assigned to the variable newvalue. 2. response() <> strcat(variable1, "john") OR "upjohn" Here the string stored in variable1 is concatenated with the string "john" and then the response is tested to see if it is not equal to either this resulting string or the string "upjohn." If the response string does not match either of these the condition is evaluated as TRUE. AmigaVision functions are shown in the Functions window of the Expression Editor. To view the complete list, click on the up or down arrows at the right side of the window. In each function string variables are represented by "s," "s1" and "s2," and numeric variables are represented by "n," "n1," and "n2." |12Mathematical Functions|12 acos(n1) arc cosine of angle of n degrees asin(n1) arc sine of angle of n degrees atan(n1) arc tangent of angle of n degrees cos(n1) cosine of angle of n degrees exp(n1) the exponent of n inc(v) increments variable n by 1 integer(n1) integer value of numeric n or string "n" float(n1) floating point value of numeric n or string "n" log(n1) natural logarithm of the number n log10(n1) logarithm to the base 10 of the number n max(n1,n2) finds the maximum of two numeric values n1 and n2 min(n1,n2) finds the minimum of two numeric values n1 and n2 pow(n1,n2) finds the n2th power of n1 sin(n1) sine of angle of n degrees sqrt(n1) finds the square root of the number n tan(n1) tangent of angle of n degrees String Functions findstr(s1,s2,n) find s1 in s2 starting at n strcat(s1,s2) concatenates s2 to the end of s1 string(n1) convert to string the numeric n strlen(s) get the length of string s substr(s1,n1,n2) the substring of string beginning in position n1 of length n2 tolower(s1) converts all the characters of the string s into lower case alphabets toupper(s1) converts all the characters of the string s into uppercase alphabets Special Functions boolean(v) true or false of boolean variable v clock() the current time returned as a string (e.g. 23:03:15) date()the current date returned as a string (e.g. WedOct 18 1989) random(n1,n2) returns integer in the range where x is lowest and y is highest response() last response string entered from the keyboard or returned from a hitbox screenx() x coordinate of screen cursor location in current screen resolution screeny() y coordinate of screen cursor location in current screen resolution status() returns FALSE if a system request such as file access has failed timer(n1) number (1 to 9) of timer, returns count in seconds to two decimal places video() returns current frame number of the videodisc You can click on a function and it will be inserted in the Expression Field at the location of the cursor. After insertion, if the function does not require any parameters, for example response(), the cursor will be placed to the right of the close-parenthesis. If it needs one parameter then the cursor will be on top of the close-parenthesis, indicating that the function needs a parameter. If it needs two parameters, for example max(n1,n2), then there must be a comma between the two parentheses. Thus max(n1,n2) will appear in the Expression Field as max() and you must type "10,7" to compare 10 and 7. Similarly there must be two commas between the parentheses for three parameters and so on. You can click on a variable to insert it inside an expression in the Expression Field. Quite often you will use variables as parameters for the functions. As mentioned earlier you have to be careful not to use incompatible variable types. For instance, the function max(n1,n2) expects two numeric variables. Thus you cannot use string variables as parameters for max(n1,n2). Read this section and become familiar with the functions to avoid this problem. |02 Videodisc Controller A choice of video commands is shown near the top left of the window. Click on a command gadget to use the command. Notice there are two arrows to the left of the command name. These are used to specify forward or reverse. For instance, if you click on the left arrows on the side of the Fast gadget, the video will play fast reverse. Still pauses the video. Play shows the video at normal speed in forward or reverse. Step advances one frame at a time. To move forward or reverse at very fast pace, point to Scan and press the left mouse button. Hold the mouse button down while scanning and release the button to stop. Slow shows video in slow motion. Fast shows video in fast motion. Click on the Audio 1 and Audio 2 gadgets to change the status of the audio channels. A check mark indicates that the audio is in the On state. The Audio switches function only in the forward play motion of the videodisc. The Video and Index gadgets are used in a similar fashion, to turn the video and index on or off. The Video on or off option is available only in certain players. As there are no standards currently among the manufacturers, some players do not have this feature. For those players without this feature, the Video status gadget has no effect on the display of video. A check mark indicates the On state. Index refers to the video frame numbers shown typically in the top area of the videodisc display. You may also store two separate frame numbers temporarily in memory. To do so, click on either the M1 or M2 gadget. This will enter the number of the current frame into that memory area. You may use the frame numbers stored in this memory area in specifying the frame numbers for the Play and Search operations. In the upper right section of the controller, Frame displays the current frame whenever the video is stopped or paused. Play will show the segment of video between the two specified frames and then stop. Search will advance the video to the frame specified. Clicking on the Start or Stop gadgets in the Play area or Frame in the Search area brings up the Specify Value requester. Enter Frame opens the Specify Value requester. Current Frame enters the current frame. If you choose one of the memory choices, the frame number saved under it will be entered. Save and Preview options are only available if you entered the Videodisc Controller from the Video icon requester and are disabled when you access the controller from the pull down menu. To save the current settings and remain in the controller, click on Save. This saves the state of the switches: Video On/Off, Index On/Off, Audio 1 On/Off, Audio 2 On/Off and the last executed command. To view the video as it will be seen in the course, click on Preview. When you are finished using the controller, click on OK to save and exit. Choose Cancel to exit without changes. While using the Videodisc Controller, you may wish to adjust its size. This will allow you to see more of the video display area. To make the controller smaller, click the right mouse button anywhere inside the controller. When you do this, only the commands at the top left side of the controller will be visible. When it is small, click the right button in the controller again to return to normal size. To make the controller disappear, click the right mouse button anywhere outside the controller. Click it again to make the controller reappear. |03 Database Editor The Database Editor is used for creating and manipulating databases for use with projects. The Database Editor allows you to create a database in a standard data base format; add, update, and delete data records; and delete database files. Use the Database Editor to define the record structure using data fields. This requires careful planning as AmigaVision does not let you alter the record structure of a database once you have created it. For instance, you may want to create a database containing the name, address, and phone number of the end user. Then each of the items -- the last name, middle initial, first name, house number, street name, city, country, zip code, and phone number -- becomes your data field. If you anticipate adding a new field for age or sex later you must plan ahead or create a new database later. The database is stored in dBaseIII compatible file format with a .dBF file extension. This allows you to use other commercially available database software such as Superbase, which supports dBaseIII compatible files, to read AmigaVision data files for extensive analysis or modification. In AmigaVision you can also read dBaseIII compatible files created by other database software. Be sure to denote one or more of the data fields as keys for selecting a specific record. In the above example you may want to get to any record if you knew, the last name and zip code. Then these two fields in your record become the keys for searching. AmigaVision allows you to change the keys even if you have specified them once. The keys are used to create what is known as an index file. On your disk associated with each .dBF file there is an .ndx file which stores the index of records based on the keys you have specified. When you change the keys the old index file will be erased and replaced by the new one. When you read dBaseIII files created by other software products such as Superbase, the keys specified in those products will not be transferable to AmigaVision. You must use AmigaVision's Database Editor and specify keys for creating the index (.ndx) files. |12Field Types and Sizes|12 The AmigaVision Database Editor supports the following field types, which are shown along with their maximum allowable sizes: String 255 characters Numeric 19 digits including the decimal point Boolean default width of one character Date default width of 10 characters String fields are used to store alphanumeric information like names, addresses, etc. Numeric fields may contain integer or floating point numbers. If you select numeric, you may also specify the number of decimal places. The size of numeric fields includes the decimal and the number of places to the right of it. Boolean fields can only be T or Y (for TRUE or YES) or F or N (for FALSE or NO) and are assigned a default width of one character. These fields are like flags that you can set which allow you to search for records in which the condition is TRUE or FALSE. Date fields have the format MM/DD/YYYY, which is a string 10 characters long. eg. 12/10/1990. The database files that you create using the Database Editor may contain up to 128 fields. There is also alimit of 4000 characters per record. n Using the Database Editor In the Database Filename field, you specify the name of your file. You may either type the filename into the field or click on the Directory gadget to select a file from the File requester (Chapter 3 in the User Manual). After you have specified a filename press the Enter key. If the file that you specify does not exist, you will be able to specify record struture and choose the Create option, which creates a new database file. Note that once created, the record structure cannot be edited within AmigaVision. However, you can read the database file into other commericially available database software for editing the record structure. |04 Editing Data In the Database Editor you may edit (i.e., add, modify, or delete) records in the database. To do so, type the name of the file in the Database Filename field, and click on the Edit Data gadget. The Edit Database Window opens. Every time you enter the Edit Window from the Database Editor the first record of the database is displayed. You can use the Prev and the Next gadgets to browse through and edit the data fields of each record and then click on Update. If you want to browse sequentially then choose By Record # using the multistate gadget at the top right corner of the Edit Window. You can also browse your database records by typing in one or more key values and then selecting the By Key option. Delete is for deleting the currently selected record, i.e. whose fields are being displayed in the Edit Window. If you have too many fields in your database to be displayed in the Edit Window, AmigaVision creates additional pages. If there are more than one page of fields in a single record, the current page number is indicated in the lower right. If there is more than one page you may move between pages by using the Prev Page and Next Page gadgets at the bottom of the window. When you are finished editing, click on the Exit gadget to exit the Edit Window and return back to the Database Window. You can now create a new database or edit the keys and/or the data of an old database. Or you click on the Exit gadget to exit the Database Editor. You use the Database Editor from the pull down menu only for database creation and data editing. You may access the databases you create and perform database operations from within your applications by using the database icons. The database operations include: Select, Read/Write, and Delete. You may also create your own data entry forms as an alternative to the one provided in the Database Editor for data input by using the Data Form and Form Exit icons. For additional information, see the Database section of Chapter 2 in the User Manual. |05 Edit Keys Keys are used to index a file based on the most important information. Your database can have more than one key, but the order of the keys affects how the information is displayed. Click on the field you wish to make a key from the FIELDS list and click |12Insert|12. To remove a key, click on it in the KEYS list and click |12Delete|12. To change the order of a key, select it, click |12Move|12 and click on the other key you wish to swap places with. To remove all keys click |12Clear|12. |06 Object Editor You can use the Object Editor to create display objects for use in a course or presentation. The display objects are: rectangle, line, circle, ellipse, polygon, text, and brushes. Brushes are created using an external paint program such as |11DPaint III|11. You can also create data entry fields and text windows in the Object Editor. With the editor, you can create these shapes and turn them into user input areas that add interactivity to any application. These input areas are called hit boxes. In AmigaVision, you can overlay these display objects and hit boxes on the screen which may have a background picture or video. |07 Rectangle In the requester, you define the attributes of the object. Click in the Colors gadget at the bottom right section to specify the color of the object. You are presented with another requester called Select Color to specify colors for the border outline and the interior color of the object as it is displayed. The top multistate gadget on the left hand side of the Select Color requester is for selecting one of four items: the Normal Border color, the Normal Fill color, the Feedback Border color, and the Feedback Fill color. Select each of these four items and then first specify whether you want a Visible color or a Transparent appearance by clicking on the second multistate gadget. If you chose the Visible option you can select one of the colors displayed on the right side of the requester by clicking on it. The selected color will be highlighted by a rectangular box around it. If you chose the Transparent option then you may not specify any color. After you have specified the colors for all the four states for Normal and Select colors then you can click on the Ok gadget to return to the object requester. Now if you want to turn the visual feedback effect on set the on/off gadget at the bottom right corner called Selected to on state by clicking on it. The colors of the normal and feedback states are displayed at the bottom right corner of the object requester. You may also select audio feedback using digitized sound for the object. There is an on/off Sound gadget at the top left corner of the object requester. Click on it to set it to the on state. If you do not specify any sound filename the default audio feedback is a short beep sound. If you want to specify a digitized sound file then type it in the filename field below or use the Directory gadget to select a file. You can select whether the sound will be played back on the Left or Right speakers or as Stereo by clicking on the multistate gadget provided for it. Click on the Toggle gadget to turn the toggling feature on or off. When it is on, and when a user clicks on the object the normal image is changed to be displayed in the feedback colors. The feedback image will remain until the user clicks on the object again, at which time it is restored to its normal state. If you set Toggle to off state the feedback image the object appears only for the duration of a click. Toggles are useful to represent two state switches such as on or off. Right next to the Toggle gadget is a gadget called Var. This is for linking a variable to the object you have created. When you click on the Var gadget a list of previously defined variables in your application will appear. Select a variable to create the link. The variable you select must be of the boolean type, i.e. it returns either a TRUE or a FALSE value. If the Toggle gadget is set to on state then the TRUE value of the boolean variable will be associated with the normal state of the object and the FALSE with the feedback object. Thus if you create an analogue of an electric on/off switch to turn a specific sound on and off then you can use the boolean variable to check the state of the switch. If the Toggle is set to off state the boolean variable will have a False value as long as a user points to the object and hold the left mouse button pressed. When they release the button the variable will return to TRUE state. This feature can be used to simulate a gadget that works like a typical remote control unit for operating televisions and video casette recorders. Once you create an object you can turn it into a hit box by typing a string in the Response field. This response string gets linked to the object and turns it into a hit box. If you do not specify a response string, the display object will be treated as a visual object with no other function. The hit box, on the other hand, is very useful in finding out which hit box out of several on the screen was clicked on by a user. Note that when you enter the Object Editor through the Graphics icon (an Audio Visual icon), you cannot specify hit boxes. The Graphics icon is used to specify merely objects and not hit boxes. |08 Polygon In the requester, you define the attributes of the object. Click in the Colors gadget at the bottom right section to specify the color of the object. You are presented with another requester called Select Color to specify colors for the border outline and the interior color of the object as it is displayed. The top multistate gadget on the left hand side of the Select Color requester is for selecting one of four items: the Normal Border color, the Normal Fill color, the Feedback Border color, and the Feedback Fill color. Select each of these four items and then first specify whether you want a Visible color or a Transparent appearance by clicking on the second multistate gadget. If you chose the Visible option you can select one of the colors displayed on the right side of the requester by clicking on it. The selected color will be highlighted by a rectangular box around it. If you chose the Transparent option then you may not specify any color. After you have specified the colors for all the four states for Normal and Select colors then you can click on the Ok gadget to return to the object requester. Now if you want to turn the visual feedback effect on set the on/off gadget at the bottom right corner called Selected to on state by clicking on it. The colors of the normal and feedback states are displayed at the bottom right corner of the object requester. You may also select audio feedback using digitized sound for the object. There is an on/off Sound gadget at the top left corner of the object requester. Click on it to set it to the on state. If you do not specify any sound filename the default audio feedback is a short beep sound. If you want to specify a digitized sound file then type it in the filename field below or use the Directory gadget to select a file. You can select whether the sound will be played back on the Left or Right speakers or as Stereo by clicking on the multistate gadget provided for it. Click on the Toggle gadget to turn the toggling feature on or off. When it is on, and when a user clicks on the object the normal image is changed to be displayed in the feedback colors. The feedback image will remain until the user clicks on the object again, at which time it is restored to its normal state. If you set Toggle to off state the feedback image the object appears only for the duration of a click. Toggles are useful to represent two state switches such as on or off. Right next to the Toggle gadget is a gadget called Var. This is for linking a variable to the object you have created. When you click on the Var gadget a list of previously defined variables in your application will appear. Select a variable to create the link. The variable you select must be of the boolean type, i.e. it returns either a TRUE or a FALSE value. If the Toggle gadget is set to on state then the TRUE value of the boolean variable will be associated with the normal state of the object and the FALSE with the feedback object. Thus if you create an analogue of an electric on/off switch to turn a specific sound on and off then you can use the boolean variable to check the state of the switch. If the Toggle is set to off state the boolean variable will have a False value as long as a user points to the object and hold the left mouse button pressed. When they release the button the variable will return to TRUE state. This feature can be used to simulate a gadget that works like a typical remote control unit for operating televisions and video casette recorders. Once you create an object you can turn it into a hit box by typing a string in the Response field. This response string gets linked to the object and turns it into a hit box. If you do not specify a response string, the display object will be treated as a visual object with no other function. The hit box, on the other hand, is very useful in finding out which hit box out of several on the screen was clicked on by a user. Note that when you enter the Object Editor through the Graphics icon (an Audio Visual icon), you cannot specify hit boxes. The Graphics icon is used to specify merely objects and not hit boxes. |09 Line In the requester, you define the attributes of the object. Click in the Colors gadget at the bottom right section to specify the color of the object. You are presented with another requester called Select Color to specify colors for the border outline and the interior color of the object as it is displayed. The top multistate gadget on the left hand side of the Select Color requester is for selecting one of four items: the Normal Border color, the Normal Fill color, the Feedback Border color, and the Feedback Fill color. Select each of these four items and then first specify whether you want a Visible color or a Transparent appearance by clicking on the second multistate gadget. If you chose the Visible option you can select one of the colors displayed on the right side of the requester by clicking on it. The selected color will be highlighted by a rectangular box around it. If you chose the Transparent option then you may not specify any color. After you have specified the colors for all the four states for Normal and Select colors then you can click on the Ok gadget to return to the object requester. Now if you want to turn the visual feedback effect on set the on/off gadget at the bottom right corner called Selected to on state by clicking on it. The colors of the normal and feedback states are displayed at the bottom right corner of the object requester. You may also select audio feedback using digitized sound for the object. There is an on/off Sound gadget at the top left corner of the object requester. Click on it to set it to the on state. If you do not specify any sound filename the default audio feedback is a short beep sound. If you want to specify a digitized sound file then type it in the filename field below or use the Directory gadget to select a file. You can select whether the sound will be played back on the Left or Right speakers or as Stereo by clicking on the multistate gadget provided for it. Click on the Toggle gadget to turn the toggling feature on or off. When it is on, and when a user clicks on the object the normal image is changed to be displayed in the feedback colors. The feedback image will remain until the user clicks on the object again, at which time it is restored to its normal state. If you set Toggle to off state the feedback image the object appears only for the duration of a click. Toggles are useful to represent two state switches such as on or off. Right next to the Toggle gadget is a gadget called Var. This is for linking a variable to the object you have created. When you click on the Var gadget a list of previously defined variables in your application will appear. Select a variable to create the link. The variable you select must be of the boolean type, i.e. it returns either a TRUE or a FALSE value. If the Toggle gadget is set to on state then the TRUE value of the boolean variable will be associated with the normal state of the object and the FALSE with the feedback object. Thus if you create an analogue of an electric on/off switch to turn a specific sound on and off then you can use the boolean variable to check the state of the switch. If the Toggle is set to off state the boolean variable will have a False value as long as a user points to the object and hold the left mouse button pressed. When they release the button the variable will return to TRUE state. This feature can be used to simulate a gadget that works like a typical remote control unit for operating televisions and video casette recorders. Once you create an object you can turn it into a hit box by typing a string in the Response field. This response string gets linked to the object and turns it into a hit box. If you do not specify a response string, the display object will be treated as a visual object with no other function. The hit box, on the other hand, is very useful in finding out which hit box out of several on the screen was clicked on by a user. Note that when you enter the Object Editor through the Graphics icon (an Audio Visual icon), you cannot specify hit boxes. The Graphics icon is used to specify merely objects and not hit boxes. |10 Circle In the requester, you define the attributes of the object. Click in the Colors gadget at the bottom right section to specify the color of the object. You are presented with another requester called Select Color to specify colors for the border outline and the interior color of the object as it is displayed. The top multistate gadget on the left hand side of the Select Color requester is for selecting one of four items: the Normal Border color, the Normal Fill color, the Feedback Border color, and the Feedback Fill color. Select each of these four items and then first specify whether you want a Visible color or a Transparent appearance by clicking on the second multistate gadget. If you chose the Visible option you can select one of the colors displayed on the right side of the requester by clicking on it. The selected color will be highlighted by a rectangular box around it. If you chose the Transparent option then you may not specify any color. After you have specified the colors for all the four states for Normal and Select colors then you can click on the Ok gadget to return to the object requester. Now if you want to turn the visual feedback effect on set the on/off gadget at the bottom right corner called Selected to on state by clicking on it. The colors of the normal and feedback states are displayed at the bottom right corner of the object requester. You may also select audio feedback using digitized sound for the object. There is an on/off Sound gadget at the top left corner of the object requester. Click on it to set it to the on state. If you do not specify any sound filename the default audio feedback is a short beep sound. If you want to specify a digitized sound file then type it in the filename field below or use the Directory gadget to select a file. You can select whether the sound will be played back on the Left or Right speakers or as Stereo by clicking on the multistate gadget provided for it. Click on the Toggle gadget to turn the toggling feature on or off. When it is on, and when a user clicks on the object the normal image is changed to be displayed in the feedback colors. The feedback image will remain until the user clicks on the object again, at which time it is restored to its normal state. If you set Toggle to off state the feedback image the object appears only for the duration of a click. Toggles are useful to represent two state switches such as on or off. Right next to the Toggle gadget is a gadget called Var. This is for linking a variable to the object you have created. When you click on the Var gadget a list of previously defined variables in your application will appear. Select a variable to create the link. The variable you select must be of the boolean type, i.e. it returns either a TRUE or a FALSE value. If the Toggle gadget is set to on state then the TRUE value of the boolean variable will be associated with the normal state of the object and the FALSE with the feedback object. Thus if you create an analogue of an electric on/off switch to turn a specific sound on and off then you can use the boolean variable to check the state of the switch. If the Toggle is set to off state the boolean variable will have a False value as long as a user points to the object and hold the left mouse button pressed. When they release the button the variable will return to TRUE state. This feature can be used to simulate a gadget that works like a typical remote control unit for operating televisions and video casette recorders. Once you create an object you can turn it into a hit box by typing a string in the Response field. This response string gets linked to the object and turns it into a hit box. If you do not specify a response string, the display object will be treated as a visual object with no other function. The hit box, on the other hand, is very useful in finding out which hit box out of several on the screen was clicked on by a user. Note that when you enter the Object Editor through the Graphics icon (an Audio Visual icon), you cannot specify hit boxes. The Graphics icon is used to specify merely objects and not hit boxes. |11 Ellipse In the requester, you define the attributes of the object. Click in the Colors gadget at the bottom right section to specify the color of the object. You are presented with another requester called Select Color to specify colors for the border outline and the interior color of the object as it is displayed. The top multistate gadget on the left hand side of the Select Color requester is for selecting one of four items: the Normal Border color, the Normal Fill color, the Feedback Border color, and the Feedback Fill color. Select each of these four items and then first specify whether you want a Visible color or a Transparent appearance by clicking on the second multistate gadget. If you chose the Visible option you can select one of the colors displayed on the right side of the requester by clicking on it. The selected color will be highlighted by a rectangular box around it. If you chose the Transparent option then you may not specify any color. After you have specified the colors for all the four states for Normal and Select colors then you can click on the Ok gadget to return to the object requester. Now if you want to turn the visual feedback effect on set the on/off gadget at the bottom right corner called Selected to on state by clicking on it. The colors of the normal and feedback states are displayed at the bottom right corner of the object requester. You may also select audio feedback using digitized sound for the object. There is an on/off Sound gadget at the top left corner of the object requester. Click on it to set it to the on state. If you do not specify any sound filename the default audio feedback is a short beep sound. If you want to specify a digitized sound file then type it in the filename field below or use the Directory gadget to select a file. You can select whether the sound will be played back on the Left or Right speakers or as Stereo by clicking on the multistate gadget provided for it. Click on the Toggle gadget to turn the toggling feature on or off. When it is on, and when a user clicks on the object the normal image is changed to be displayed in the feedback colors. The feedback image will remain until the user clicks on the object again, at which time it is restored to its normal state. If you set Toggle to off state the feedback image the object appears only for the duration of a click. Toggles are useful to represent two state switches such as on or off. Right next to the Toggle gadget is a gadget called Var. This is for linking a variable to the object you have created. When you click on the Var gadget a list of previously defined variables in your application will appear. Select a variable to create the link. The variable you select must be of the boolean type, i.e. it returns either a TRUE or a FALSE value. If the Toggle gadget is set to on state then the TRUE value of the boolean variable will be associated with the normal state of the object and the FALSE with the feedback object. Thus if you create an analogue of an electric on/off switch to turn a specific sound on and off then you can use the boolean variable to check the state of the switch. If the Toggle is set to off state the boolean variable will have a False value as long as a user points to the object and hold the left mouse button pressed. When they release the button the variable will return to TRUE state. This feature can be used to simulate a gadget that works like a typical remote control unit for operating televisions and video casette recorders. Once you create an object you can turn it into a hit box by typing a string in the Response field. This response string gets linked to the object and turns it into a hit box. If you do not specify a response string, the display object will be treated as a visual object with no other function. The hit box, on the other hand, is very useful in finding out which hit box out of several on the screen was clicked on by a user. Note that when you enter the Object Editor through the Graphics icon (an Audio Visual icon), you cannot specify hit boxes. The Graphics icon is used to specify merely objects and not hit boxes. |12 Text/Variable These objects are similar to the geometric objects except that they are made of text strings. You can create text strings that fit on a single line (this depends on the resolution and the font size, with a possible maximum of 255 characters). Text may be placed either inside other objects or by itself. If the string is longer than a single line on the screen, the text does not wrap around to the next line. Normal, Feedback, Toggle, Colors, Sound Feedback, and Response for the Text requester work the same way as for the other object requesters. Just as any other object the text object can also be defined as a hit box by specifying a Response string. You can create composite objects by creating a geometric shape to denote say, a hit box, and a text string to give it a name such as, "Help." In such cases you have to define the same response strings for both of these objects in order for them to function as a single composite object. In the Text Info requester, there is one additional feature called Variable. This feature lets you print on the screen the value of any variable in your application. Click on the Var gadget at the top left to select a variable from a list whose value you want to display. You can type the string to be displayed at the text string field at the top left part of the requester after clicking on it. The variable value will be appended to the end of the text string when displayed under presentation of the application. Click on the multistate gadget to choose whether you want the text string and/or the variable value printed Center, Right, or Left justified within the text object rectangle. Click on the Font gadget to open the Available Fonts requester. Click on the name of the font you wish to use and select the font size. You may also select Italic, Boldface, or Underline by clicking on these gadgets. The window at the bottom right of the Font requester displays the appearance of the text in the font, size, and features you have selected. Click on Ok to save these specifications and exit the Available Fonts requester. Once you are satisfied with specifications of attributes of the text object you can exit the Text Object requester by clicking on the Ok gadget. The text will be placed at the location of the text object rectangle. You can resize the rectangle to suit the length of the text string. If you have specified a variable to be displayed the name of the variable will be displayed at the end of the string. During presentation of the application the then current value of the variable will be displayed along with the text string object. |13 Brush This allows you to place on the screen an image which has been previously saved in an IFF format (e.g., under |11DPaint III|11 you can choose the brush option for saving). A brush can be defined either as an object just as text and geometric shapes. The brush option gives you the power to create customized pictorial hit boxes that are both attractive and descriptive. To choose the brush you want to display to the end user, click in the field below where it says Normal and either type a brush filename or use the Directory gadget to select a brush filename. Click on the Place gadget and you will exit the Brush requester. You will see that the brush image will appear inside of the rectangle you had specified for the brush flush with the top left hand corner. Now if the rectangle you had defined was smaller than the size of the brush you can click on the brush and move it around and place it on the rectangle. While placing the brush you can use the rectangle as a frame through which you show only a part of the brush image. For instance, if you have a brush image of a human body and you wish to use only the head as a brush object then you use the Place object to show just the head through the brush rectangle. The part of the picture outside of the rectangle will not be seen. You can use Size option from the pull down menu and resize the brush rectangle to include a larger area of the picture as a brush object. If the brush rectangle is larger than the size of the image then using the Place gadget you can locate the brush. Once it is placed, you will be returned again to the Brush requester. If you wish to display a brush as feedback (the same as the Normal or a different brush), follow the same procedures as choosing the Normal brush. The gadgets corresponding to the Feedback brush are provided under Select. By using both the Normal and Feedback brushes you can create special effects. There are two on/off gadgets called Cookie Cut and Hit Mask. Normally brush objects are displayed with their background rectangles. If you choose Cookie Cut by setting it to on state the brush will be displayed without a rectangle in the background. Normally when you define a brush object as a hit box using response strings the entire background rectangle is treated as a valid region for the hit box. Frequently the shape of the brush within the rectangle may be of an arbitrary shape. In such cases you might want to restrict the hit sensitive region to lie within the boundary of the brush. If you set Hit Mask to on state, your intended user must click directly within the boundary of the brush to activate the hit box. When Hit Mask is set to off, which is the default case, the user may click anywhere within the rectangular background area to activate the hit box. For instance, if you have a picture of a camera and you want the user to click on the lens then you might use this feature to sense the exact location of the click. If you click on the the Color gadget of the brush requester you will be presented a color selection requester. For the normal and the feedback brushes you have the option of displaying the brush as: Transparent, Multi Colored, or a Stencil. The Transparent will create a see-through brush object. The Multi Colored option will display the brush in its original form in the palette of the background screen. The Stencil effect is created when you choose a solid color for the brush. This is useful to create an effect in which you hide the brush until a stencil is clicked on and reveal the brush in full colors as a feedback. The rest of the Brush requester is similar to other object requesters discussed earlier. The Response string, Toggle, and Sound feedback are identical in operation to the other cases. |14 Input Field You can use Input Field objects to get users to enter name, security number, password, etc. and assign these data to variables in your application. The field is for both entering and displaying the current value of the variable. Note that input fields can only be created if you entered the Object Editor through the Data Form icon or if you select the Object Editor from the pull down menu. If you create input fields after entering from the pull down menu, they are not saved to any specific location in the project, but may be saved as a separate file for re-use. Click on the Var gadget on the right hand side of the requester to access the variable list for selecting the variable to be linked to the field. You use the multistate gadget to select the specific field type: String, Numeric, Boolean, or Date. The type should correspond to the type of the variable you have specified. To define the precise length of the field as number of characters click on the Size gadget. You will be provided a numeric pad to enter the number. If the field is numeric, You can further specify the number of decimal places by clicking on the Dec gadget. For string fields, click on the multi state gadget to choose the Uppercase, Lowercase, or Mixed case. The input will be transformed into the specified case. If you specify upper case and the user types lower case, the characters will become upper case when he presses the Enter key. If you wish to have the field insensitive to cases, then use the Mixed mode. Click on the multistate gadget below the case gadget to select the justification of the input data: Center, Left, or Right. Click on Color gadget to select the color for the field border. The Exit Condition field allows you to specify a conditional expression to check the validity of the data entered into the field. Click on the Expression Editor to access the Expression Editor. The condition for the input field exit that you specify may be an expression that validates the data for accuracy, syntax, or consistency. When the user entering data in a field presses the Enter key on the keyboard it is assumed that the data entry has been completed. At this point a check is made to see if the specified conditional expression is satisfied, i.e. returns TRUE. If not the cursor stays in the field, and an error message can be displayed. When no condition is specified, the field will be exitted after the user presses the Enter key on the keyboard. You can specify your own error message right below the conditional expression. Type the message in the Error field. |15 Text Window This allows you to create a rectangular display area on your screen for showing text from an ASCII text file. You can also add functions through hit boxes to control the display of text such as page up, page down, line up, line down, and exit so that a user can browse a text file. Note that the Text Window option is only available when you enter the Object Editor through the Text File icon or from the pull down menu. If you create text windows after entering from the pull down menu, they are not saved to any specific location in the project, but may be saved for re-use. Click in the Color gadget to choose the colors of the window Border, the window Background, the Normal Text, and the Highlighted Text. There are several commands you may imbed within your text files to control font styles and formatting. Text commands are signalled by using the | (vertical bar) character followed by a number code. For instance: This is some ||12bold text||12, and ||11italic||11 text appears in the text window as: This is some |12bold|12 and |11italic|11 text Notice that the command to initiate bold text, ||12, is placed directly before the section to be made bold. The commands for font styles (highlight, italics, bold, and underline), act as switches, and stay on until turned off with the same command. They can also be nested, so Here is some ||12||11bold AND italic||11||12 text appears in the text window as: Here is some |12|11bold AND italic|12|11 text |12Font Style Commands|12 ||10 Highlight (use text color specified as highlight color) ||11 Italics ||12 Bold ||13 Underline Most likely, you will be using a regular word-processor to compose text files, then saving them in ASCII format. In a word processor, carriage returns (CR's) are typed only to break paragraphs, since word-processors have word-wrap. The default formatting method used in AmigaVision text file boxes is to word-wrap sentences to fit within the horizontal size of your box, and to break paragraphs when a CR is detected. If you have switched to another formatting method, using ||0 before a section of text will switch back to this default method. Most text editors, however, do not use word wrap, since they are used primarily for programming. Because of this, the size of your text editing window may differ from the size of your text output window in AmigaVision. To avoid unsightly gaps in the text, putting ||1 before a section of text will cause AmigaVision to ignore any CR's it detects unless there are two in a row (which you would use in the text editor to denote a paragraph break). Finally, there may be occasions when you do not want AmigaVision to word-wrap your text to fit in the box. Putting |2 before a section of text will allow only as many characters as will fit in one box-width to be displayed, until a carriage return is detected. Text formatting commands ||0 Normal word-wrap inside text box size, one CR per paragraph break ||1 Normal word-wrap inside text box size, two CR's per paragraph break ||2 No word-wrap inside text box To choose the font you want, click on Font gadget. This opens the Fonts requester. Select the font, size, and style from this requester. You can specify only one text window on a single screen. You can add user control features by defining hit boxes of any shape or a brush. For the hit boxes you must use the following response strings in the hit box requesters: use "page down" for user to move to the next page of the text file; "page up" for the previous page; "line down" for the next line (like a line scroll); "line up" for the previous line; and "quit" for closing and exitting the text window. The text window is very useful in displaying large text files and allowing the user to browse. See the Text File icon section, which is a part of the Audio Visual icons, for a description of an example of the text window. |16 Screen Palette Allows you to modify the screen colors. The palette requester is presented showing all the colors in the current screen background. Each color is made up of a combination of Red, Green, and Blue values. Each of these three colors have a range of 16 possible values from 0 to 15. A slider gadget on the left side of the Modify Palette requester is provided for adjusting the Red, Green, and Blue values. First you select a color from the palette of colors by clicking on it. The slider gadget will show the three color values for that color. You can drag the three slider gadgets to modify that color. |17 Screen Definition Allows you to specify the background picture and/or the screen resolution. When you choose the Definition option, the Screen Definition requester is presented. Here you may specify a picture file that goes on as a background to help give visual cues for the design of display objects (background "template"). The Screen Definition also allows you to set the resolution you want without having to load a background picture. The table below shows all the resolutions that are available as options. As you can see, for each screen resolution (Low Res, Hi Resolution, Extra Halfbrite, and Hold and Modify) there are possible sub-options; i.e., interlaced and/or overscan. It is assumed that you are familiar with the screen options available for your Amiga personal computer. The checked items in the table indicate the selection of that item. For instance, if you select low resolution screen with Interlace, and Overscan then the pixel resolution will be 352 in horizontal direction and 240 in the vertical direction. You also have a choice of between 2 and 32 colors for this resolution. In contrast, the Hold and Modify mode has a fixed set of 4096 colors regardless of whether you choose Interlace or Overscan. In general, it is advisable to keep the screen resolution consistent throughout an application to avoid disorienting the viewer.