Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Objective:
- Describe the concept of an event in computer programming
- List and briefly describe the NINE event types used in Alice
- Add an invisible object to mark a spot in an Alice world
- Create new Boolean and numeric properties for an object
- Create an event to move an object
- Create events to allow a user to control a moving object
- Create a billboard object and position it in an Alice world
- Create an event to make a billboard disappear
- User Interface and Event-Driven Programming
- Graphical User Interface (GUI) is a combination of computer software and hardware that allows user to operate a computer by manipulating icons and menus on a computer screen, mostly commonly with a mouse that controls a pointer.
- Before GUI were developed, most common interface was Command-driven user interface, in which user operated a computer using commands.
- The use of a GUI on a computer requires Event-Driven-Programming.
- Event occurs whenever an event listener detects an event trigger and responds by running a method called event handler.
- Event Listener -> Event Trigger -> Event Handler
- Event Listener - a combination of software and hardware that continuously checks the computer system for an event trigger.
- Event Trigger - can be any activity or condition selected by the programmer, such as clicking on a mouse or pressing a key on the keyboard, it could also be a change that occurs in a computer itself, ex. when a countdown clock hits 0
- Event Handler - a method that is activated when the event trigger occurs. Ex. pressing "Ctrl + P" on keyboard will display Print page
- Events are used in Alice to control objects while a world is playing. Some Alice worlds are:
- Narrative World, tells a story
- Interactive World, Using keyboard and mouse controls while the world is playing
- Mix of both, like a video game
- Examining Events in an Existing Alice World
- BDE event type: when an event is triggered, the event handler has a beginning, during, and end
- Nine event types in ALICE: (self explanatory)
- 1. When the world starts
- 2. When a key is typed
- 3. When mouse is clicked on something
- 4. When something is true
- 5. When a variable changes
- 6. Let mouse move ____
- 7. Let arrow keys move ____
- 8. Let mouse move Camera
- 9. Let arrow keys move Camera
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement