Columbia College Chicago
Programming for Interactive Multimedia I

Review for Test 4

Here are the concepts and terms you need to know, and examples the types of questions that I may use to test what you know. Be ready to comment, debug and write scripts!

THE STUFF YOU NEED TO KNOW

I. Lists

II. Parent/Child Lingo

POSSIBLE QUESTIONS

I. Writing Code (just lines or code, not entire scripts)

Create a list that contains the following items: "banana", "apple", "strawberry", "kiwi"
--answer myFruits = ["banana", "apple", "strawberry", "kiwi"]
Save the value of the third item in the list in a variable called thisFruit
--answer thisFruit = myFruits[3]
Create an empty linear list
--answer myList = [ ]
Save the value of the thisName property of a child object named child1 in a variable
--answer currentName = child1.thisName

II. Debugging code

on mouseEnter me
thisFruit = myFruits.getOne(3)
end mouseEnteranswer--line 2 should read thisFruit = myFruits.getAt(3) or thisFruit = myFruits[3]

property thisName, thisAge
on new me, myName, myAge
me.thisName = myName
me.thisAge = myAge
end
answer --you need to add the line "return me" before you end the handler

III. Identification/fill in the blanks (I'll give you a list of words to choose from)

In the "on getPropertyDescriptionList" handler, you create a _______________ list.
--answer "propery" list

In the Lingo code "myFruits[3]", "3" represents the ____________ of the element.
--answer "index"

The properties of a custom object in Lingo is defined in a ____________ script.
--answer "parent"

Parent objects can define ___________________ and/or ____________________.
--answer "properties", "handlers"

EXTRA CREDIT

What is the scope of the properties in getPropertyDescriptionList? What is the scope of the properties defined in parent/child Lingo?

If I want to create a slider for values between 1 and 20 in my getPropertyDescriptionList, how do I script the #range property? If I want to give the user a choice of three items in a dropdown box, how do I script the #range property?

References:

Chapters 16, 19 and Lingo Lexicon in Director 8 Demystified, class handout on list syntax

Programming for Interactive Mulitmedia I Home