Game Design: Level Design Week 3 PDF - St. Dominic College of Asia

Document Details

CompatibleObsidian2996

Uploaded by CompatibleObsidian2996

St. Dominic College of Asia

Prof. Emil Los Baños

Tags

game design ActionScript 3.0 level design events

Summary

This document is a lecture on Game Design, specifically focusing on level design. It covers ActionScript 3.0 events, functions, and event listeners, including spaceship movement. An associated practical activity is provided. The material originates from St. Dominic College of Asia.

Full Transcript

St. Dominic College of Asia School of Communication, Multimedia, and Computer Studies Game Design: Level Design Week 3 Basic Game Creation Part 2 Spaceship Movement via Cursor Advanced ActionScript 3.0 Functions and EventListeners P...

St. Dominic College of Asia School of Communication, Multimedia, and Computer Studies Game Design: Level Design Week 3 Basic Game Creation Part 2 Spaceship Movement via Cursor Advanced ActionScript 3.0 Functions and EventListeners Prof. Emil Los Baños Objectives Understand and define functions in ActionScript 3.0 Utilize EventListeners in ActionScript 3.0 Create and enable functions of basic objects in the Space Ship Game to be created. ActionScript 3.0 Events In ActionScript 3.0, event listeners respond to various types of events like MouseEvent (mouseDown, mouseUp). Keyboard Events (KeyboardEvent) KeyboardEvent.KEY_DOWN – Fired when a key is pressed. KeyboardEvent.KEY_UP – Fired when a key is released. Event Events (Event) Event.ACTIVATE – When an application or display object is activated. Event.DEACTIVATE – When an application loses focus. Event.COMPLETE – When an operation (like loading data) is finished. Event.CHANGE – When a value changes, like in an input field. ActionScript 3.0 Events ActionScript 3.0 Events In ActionScript 3.0, the :void keyword after declaring an event handler function specifies the return type of the function. Purpose of :void in Event Handler Functions When defining an event listener function, it does not return any value—it simply executes a block of code in response to the event. In ActionScript 3.0, functions must declare a return type, and if a function does not return anything, it must be explicitly set to void. ActionScript 3.0 Events What Happens If You Omit :void? If you don’t specify a return type, the compiler may assume it implicitly, but in strict mode, it will generate a warning. ActionScript 3.0 Events Learn to detect bugs by checking the location on the Compiler Error. Prelim Activity 1 Access it here. https://drive.google.com/file/d/1WJwlcu0PyGp4D6vE4teheMDk FkOk1eEm/view?usp=sharing Rename file to Surname_PrelimActivity1.fla. Save to your folder. Folder name is SURNAME. Incase of same surname, please add first name – SURNAME, First Name

Use Quizgecko on...
Browser
Browser