HO-13: Creating a Simple Racing Car Game in Flash

Size: px
Start display at page:

Download "HO-13: Creating a Simple Racing Car Game in Flash"

Transcription

1 HO-13: Creating a Simple Racing Car Game in Flash Objectives To learn how to create a simple interactive game and score counter in Flash. To extend your understanding of programming in ActionScript 3.0, including the using of.as files and packages. Setting up the Files The first thing you are going to do is create a background for your movie which looks like a racing track/circuit to which you will add a racing car: 1. First of all you need to download the starter file mpho13_start.zip into a new folder called mpho13. This file contains a number of pre-prepared graphic images that you will use to create the car game. 2. Open the flash file and modify the document so that it is 640 x 500 pixels in dimension and set to 24 fps. Chose a suitable background colour (grey or brown, as this will be the colour of the race track). 3. Save the document as RacingGame.fla in your sub-folder mpho Next create a new ActionScript file and save this as RacingGame.as, in the sub-folder mpho13. Note: So far you have simply added ActionScript code to an Actions layer on the timeline of the main movie. But as you will discover in this handson exercise, you can also create your ActionScript code in a separate.as file. This can then be used to control your Flash movie (.fla file). However, you must remember to save your.as and.fla files in the same folder. Setting up the Car Graphic 5. Open your RacingGame.fla and make sure you have a copy of the Car movieclip in your library as you will need this during the game. Note: this will be called dynamically from the code. 6. Drag a copy of the Ground movieclip from the library on to the stage. As this will form a static background for the game it doesn t have to be generated by your ActionScript code. Set its x and y to 0.0 and give it an instance name: land_mc under properties. Note: if you wanted to, you could create your own track by drawing a green square and erasing the road. Then make sure all the grass is grouped and converted in to a movieclip. You could also add a start/finish line, but not in land_mc as the track must be clear for the hit test. Getting the external code to link 7. Because the ActionScript is contained in an external.as file you will be using public functions and classes enclosed in a package tag. You can think of packages as the directories and subdirectories of class files, helping to organise them. Only one class can be used per package. A package is a special type of namespace (commonly used in.net) that is guaranteed to be known at compile time and organises your class files. Packages give structure, preven duplication of names and allow you to bundle class definitions together, facilitating code sharing. Public/internal/protected/ private are access modifiers. They control which external classes have access to them. 8. Open your.as file and insert the following code package { /*call all event and display libraries*/ import flash.events.*; import flash.display.*; HO-13: Creating a Simple Game in Flash Page 1 of 6

2 9. Similarly to.net and Ajax we have to call/ load the specific libraries we need. (* calls all under the events and display categories). Using "*" in an import statement is like using a wildcard when listing a directory, all the classes/files in that directory are included. 10. Next label the Document class in the properties panel RacingGame in the fla file. Note: that the program offers to add it to the swf if it doesn t match the.as public class or the.as hasn t yet been saved. The Document class must be public, match the file name and the class of the root. Adding car to the stage 11. You now need to call in the Car movieclip from the Library and set its starting position, which you will do within a function. 12. Move to your.as file and insert the following code: package { /*call all event and display libraries*/ import flash.events.*; import flash.display.*; // Create the littlecar MovieClip from Car // Add the littlecar to the stage and give it starter settings addchild(littlecar); littlecar.x = 550; littlecar.y = 370; littlecar.rotation = -90; Movement Cursor Keys 13. The car should now be on the stage but you can t control it. So you need to insert code that enables the user to control the car using the cursor keys. 14. To do this you need to insert the following code under the RacingGame public class: // Set vars for key codes. static const upkey = 38; static const downkey = 40; static const rightkey = 39; static const leftkey = 37; // Set vars to keep track of which keys are pressed. Boolean true or false, true if key pressed. private var keypressedright:boolean; private var keypressedleft:boolean; private var keypressedup:boolean; private var keypresseddown:boolean; // Create the littlecar MovieClip from a pre-made Car() MovieClip in flash HO-13: Creating a Simple Game in Flash Page 2 of 6

3 15. This code assigns the key numbers (ASCII key code values that are used to identify the keys in ActionScript) and sets the keypress variables as Boolean, so it can be only true or false, in this case up or down. 16. Next add the following functions to listen for the key movement: // This function sets the Boolean vars based on whether the relevant key has been pressed public function keydownlistener(e:keyboardevent):void { switch (e.keycode) { case leftkey : keypressedleft=true; case rightkey : keypressedright=true; case upkey : keypressedup=true; case downkey : keypresseddown=true; // This function sets the Boolean vars based on whether the relevant key has not been pressed public function keyuplistener(e:keyboardevent):void { switch (e.keycode) { case leftkey : keypressedleft=false; case rightkey : keypressedright=false; case upkey : keypressedup=false; case downkey : keypresseddown=false; 17. Event Listeners allow objects to become active and listen for specific instructions. This code uses a pair of listeners to look for key press and release. These are called with the public function RacingGame: // Set vars for key codes. static const upkey = 38; static const downkey = 40; static const rightkey = 39; static const leftkey = 37; HO-13: Creating a Simple Game in Flash Page 3 of 6

4 // Set vars to keep track of which keys are pressed. Boolean true or false, true if key pressed. private var keypressedright:boolean; private var keypressedleft:boolean; private var keypressedup:boolean; private var keypresseddown:boolean; // Create the littlecar MovieClip from a pre-made Car() MovieClip in flash // Set event listeners to track key presses for both up and down stage.addeventlistener(keyboardevent.key_down,keydownlistener); stage.addeventlistener(keyboardevent.key_up,keyuplistener); 18. Now these are defined you need to assign some action to these keys to alter the car s movement. You could just +1 to the x or y co ordinates to move the car but creating a speed variable would produce more realistic car movement. You will also rotate the car when the left and right keys are pressed. These in-game adjustments will be added to an event function. Movement Car Speed 19. The next step involves adding a looping function to handle the speed changes, detection of collisions and scoring within the game: // This is the main game/animation loop public function StageController(e:Event):void { // This rotates the car if key is pressed, only works if speed has a value if (keypressedleft) { littlecar.rotation -= speed; if (keypressedright) { littlecar.rotation += speed; // This increases the car's speed if the up key is pressed if (keypressedup) { speed += 1; // Decreases car's speed if down key is pressed, slow decrease for realism if (keypresseddown) { speed -= 1; else { speed *=.9; // Caps speed if (Math.abs(speed) > 20) { speed *=.6; HO-13: Creating a Simple Game in Flash Page 4 of 6

5 // This moves the car forward based on car's angle //Works out angle of car so moves with front first var scangle:number = littlecar.rotation * (Math.PI / 180); // car's angle in radians var ax:number = speed*math.cos(scangle); // Move the car on the X axis var ay:number = speed*math.sin(scangle); // Move the car on the y axis //Hit test with land,! means NOT if (!land_mc.hittestpoint(littlecar.x + ax, littlecar.y + ay, true)) { littlecar.x += ax; littlecar.y += ay; else { //if not touching land free to move speed *= -.3; 20. You then need to initiate this from within the RacingGame function: // Set the game/animation loop stage.addeventlistener(event.enter_frame, StageController); // Set event listeners to track key presses for both up and down stage.addeventlistener(keyboardevent.key_down,keydownlistener); stage.addeventlistener(keyboardevent.key_up,keyuplistener); 21. The car should now freely move within the track lines, but stop at the land edge. This is due to the hit test shown below, so when the land is not touching the car its x and y movement are unrestricted: //Hit test with land if (!land_mc.hittestpoint(littlecar.x + ax, littlecar.y + ay, true)) { littlecar.x += ax; littlecar.y += ay; else { //if not touching land free to move speed *= -.3; PowerUps 22. A hit test can also be used to decipher if the car has hit power up objects, which can be used to give a score or change its speed. 23. In your.fla file create a coin, 20 x 20 pixels in dimension, and convert it to a movieclip called PowerUp. 24. Also create a patch of oil or puddle, 45 x 45 pixels in dimension, and convert it to a movieclip called PowerDown. 25. Next set these as variables, that we can call in within the game, below the car movie variable definitions: 26. Within: HO-13: Creating a Simple Game in Flash Page 5 of 6

6 // Create the littlecar MovieClip from a pre-made Car() MovieClip in flash // Create the coin MovieClip from a pre-made PowerUp() MovieClip in flash var coin:movieclip = new PowerUp(); // Create the oil MovieClip from a pre-made PowerUp() MovieClip in flash var oil:movieclip = new PowerDown(); 27. Within: // Add the littlecar to the stage and give it starter settings addchild(littlecar); littlecar.x = 550; littlecar.y = 370; littlecar.rotation = -90; addchild(coin); coin.x = (Math.random()*560)+40; coin.y = (Math.random()*420)+40; addchild(oil); oil.x = (Math.random()*560)+40; oil.y = (Math.random()*420)+40; 28. Within: public function StageController(e:Event):void { if (coin.hittestobject(littlecar)) { coin.x = Math.random()*400+50; while (land_mc.hittestpoint(coin.x, coin.y, true)) { coin.x = (Math.random()*560)+40; coin.y = (Math.random()*420)+40; //Every PowerUp hit adds to speed speed += 4; if (oil.hittestobject(littlecar)) { oil.x = Math.random()*400+50; while (land_mc.hittestpoint(oil.x, oil.y, true)) { oil.x = (Math.random()*560)+40; oil.y = (Math.random()*420)+40; //Every Puddle hit deducts from speed speed -= 4; 29. You should now be able to interact with powerups/powerdowns whilst the car goes around the track. HO-13: Creating a Simple Game in Flash Page 6 of 6

Notes 3: Actionscript to control symbol locations

Notes 3: Actionscript to control symbol locations Notes 3: Actionscript to control symbol locations Okay, you now know enough actionscript to shoot yourself in the foot, especially if you don t use types. REMEMBER to always declare vars and specify data

More information

COMP : Practical 8 ActionScript II: The If statement and Variables

COMP : Practical 8 ActionScript II: The If statement and Variables COMP126-2006: Practical 8 ActionScript II: The If statement and Variables The goal of this practical is to introduce the ActionScript if statement and variables. If statements allow us to write scripts

More information

Flash CS4 - Lab 3 Introduction to Classes:

Flash CS4 - Lab 3 Introduction to Classes: Flash CS4 - Lab 3 Introduction to Classes: I. Setting (and resetting) the class path: You will want to be able to use and reuse the classes that you create. You will also want to be able to carry those

More information

HO-FL1: INTRODUCTION TO FLASH

HO-FL1: INTRODUCTION TO FLASH HO-FL1: INTRODUCTION TO FLASH Introduction Flash is software authoring package for creating scalable, interactive animations (or movies) for inclusion in web pages. It can be used to create animated graphics,

More information

IT 201: Information Design Techniques. Review Sheet. A few notes from Professor Wagner s IT 286: Foundations of Game Production Course

IT 201: Information Design Techniques. Review Sheet. A few notes from Professor Wagner s IT 286: Foundations of Game Production Course IT 201: Information Design Techniques Review Sheet Sources: Notes from Professor Sequeira s IT 201 course at NJIT A few notes from Professor Wagner s IT 286: Foundations of Game Production Course Foundation

More information

-Remember to always hit Command + S every time you make a change to your project going forward.

-Remember to always hit Command + S every time you make a change to your project going forward. -Open Animate -Under Create New - Select ActionScript 3.0 -Choose Classic as the Design type located in the upper right corner -Animate workspace shows a toolbar, timeline, stage, and window tabs -From

More information

1. Multimedia authoring is the process of creating a multimedia production:

1. Multimedia authoring is the process of creating a multimedia production: Chapter 8 1. Multimedia authoring is the process of creating a multimedia production: Creating/assembling/sequencing media elements Adding interactivity Testing (Alpha/Beta) Packaging Distributing to end

More information

Creating a Vertical Shooter Based on; accessed Tuesday 27 th July, 2010

Creating a Vertical Shooter Based on;   accessed Tuesday 27 th July, 2010 Creating a Vertical Shooter Based on; http://www.kirupa.com/developer/actionscript/vertical_shooter.htm accessed Tuesday 27 th July, 2010 So, we will create a game using our super hero Knight to kill dragons

More information

3Using and Writing. Functions. Understanding Functions 41. In this chapter, I ll explain what functions are and how to use them.

3Using and Writing. Functions. Understanding Functions 41. In this chapter, I ll explain what functions are and how to use them. 3Using and Writing Functions Understanding Functions 41 Using Methods 42 Writing Custom Functions 46 Understanding Modular Functions 49 Making a Function Modular 50 Making a Function Return a Value 59

More information

Objectives: To create a Flash motion tween using the timeline and keyframes, and using pivot points to define object movement.

Objectives: To create a Flash motion tween using the timeline and keyframes, and using pivot points to define object movement. DM20 Assignment 4c Flash motion tween with pivot point adjustments screen shots from CS3 with CS4 differences described Objectives: To create a Flash motion tween using the timeline and keyframes, and

More information

HO-12: Using Components in Flash

HO-12: Using Components in Flash HO-12: Using Components in Flash Objectives To learn about using Flash s inbuilt components and explore how these can be used to increased user interactivity. To extend your understanding of programming

More information

Space Shooter - Movie Clip and Movement

Space Shooter - Movie Clip and Movement Space Shooter - Movie Clip and Movement Type : TextSource File: space-shooter-movie-clip-and-movement.zip Result : See the result Index Series Next >>> In this tutorial series you will learn how to create

More information

ThumbnailList Component

ThumbnailList Component ThumbnailList Component ThumbnailList Component Technical Documentation Thumbnail List is a navigation component that enables you to load a set of image files, swf files or symbols from library, fed from

More information

COMP : Practical 6 Buttons and First Script Instructions

COMP : Practical 6 Buttons and First Script Instructions COMP126-2006: Practical 6 Buttons and First Script Instructions In Flash, we are able to create movies. However, the Flash idea of movie is not quite the usual one. A normal movie is (technically) a series

More information

FLASH ANIMATION TUTORIAL

FLASH ANIMATION TUTORIAL FLASH ANIMATION TUTORIAL This tutorial will show you how to make a simple flash animation using basic graphic elements and sounds. It will also work as the display page for your Bullet Movie soundtrack

More information

Introduction to the Turing Programming Language program commands run Exercise #1 not var put get put Programming Names File/Save As..

Introduction to the Turing Programming Language program commands run Exercise #1 not var put get put Programming Names File/Save As.. Introduction to the Turing Programming Language To this point in the course, we have used application programs. Application programs are created by professional programmers and used by users like us to

More information

Developing Apps for BlackBerry PlayBook using Adobe AIR Lab # 2 Learning to Use PlayBook Libraries and Deployment Tools

Developing Apps for BlackBerry PlayBook using Adobe AIR Lab # 2 Learning to Use PlayBook Libraries and Deployment Tools Developing Apps for BlackBerry PlayBook using Adobe AIR Lab # 2 Learning to Use PlayBook Libraries and Deployment Tools The objective of this lab is to guide you in using PlayBook specific libraries in

More information

FLASH 5 PART II USER MANUAL

FLASH 5 PART II USER MANUAL Multimedia Module FLASH 5 PART II USER MANUAL For information and permission to use these training modules, please contact: Limell Lawson - limell@u.arizona.edu - 520.621.6576 or Joe Brabant - jbrabant@u.arizona.edu

More information

Function Grapher Demystified Step 2

Function Grapher Demystified Step 2 Function Grapher Demystified Step 2 MathDL Flash Forum Learning Center Functions Grapher Demystified by Barbara Kaskosz and Doug Ensley In Step 2, we show how to draw the graphs of two predefined functions,

More information

INSRUCTION SHEET. Flash Lab #1

INSRUCTION SHEET. Flash Lab #1 Advanced Web Page Design STANDARD 5 The student will use commercial animation software (for example: Flash, Alice, Anim8, Ulead) to create graphics/web page. Student Learning Objectives: Objective 1: Draw,

More information

Introduction to Google SketchUp

Introduction to Google SketchUp Introduction to Google SketchUp When initially opening SketchUp, it will be useful to select the Google Earth Modelling Meters option from the initial menu. If this menu doesn t appear, the same option

More information

Animation is the illusion of motion created by the consecutive display of images of static elements. In film and video

Animation is the illusion of motion created by the consecutive display of images of static elements. In film and video Class: Name: Class Number: Date: Computer Animation Basis A. What is Animation? Animation is the illusion of motion created by the consecutive display of images of static elements. In film and video production,

More information

RENDERING TECHNIQUES

RENDERING TECHNIQUES RENDERING TECHNIQUES Colors in Flash In Flash, colors are specified as numbers. A color number can be anything from 0 to 16,777,215 for 24- bit color which is 256 * 256 * 256. Flash uses RGB color, meaning

More information

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 1 The Blender Interface and Basic Shapes

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 1 The Blender Interface and Basic Shapes Blender Notes Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 1 The Blender Interface and Basic Shapes Introduction Blender is a powerful modeling, animation and rendering

More information

Documentation for Flash Project

Documentation for Flash Project Documentation for Flash Project JOU 4341 and MMC 4946 / Fall 2005 You will build at least six Flash pages, or screens, to create an online story with photos, text and audio. The story will have a cover

More information

The safer, easier way to help you pass any IT exams. Exam : 9A Adobe Flash Lite 2.0 Mobile Developer Exam. Title : Version : DEMO 1 / 7

The safer, easier way to help you pass any IT exams. Exam : 9A Adobe Flash Lite 2.0 Mobile Developer Exam. Title : Version : DEMO 1 / 7 http://www.51- pass.com Exam : 9A0-064 Title : Adobe Flash Lite 2.0 Mobile Developer Exam Version : DEMO 1 / 7 1. After creating a custom button named "mybutton" on the Stage, a yellow outline around the

More information

Flash basics for mathematics applets

Flash basics for mathematics applets Flash basics for mathematics applets A Simple Function Grapher, Part 4 by Doug Ensley, Shippensburg University and Barbara Kaskosz, University of Rhode Island In Part 4, we will allow the user to enter

More information

Adobe Flash CS3 Reference Flash CS3 Application Window

Adobe Flash CS3 Reference Flash CS3 Application Window Adobe Flash CS3 Reference Flash CS3 Application Window When you load up Flash CS3 and choose to create a new Flash document, the application window should look something like the screenshot below. Layers

More information

Form Properties Window

Form Properties Window C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click

More information

2 Development of multimedia applications

2 Development of multimedia applications 2 Development of multimedia applications 2.1 Multimedia authoring tools - Example Macromedia Flash 2.2 Elementary concepts of ActionScript (continued) Scripting in General + History of ActionScript Objects

More information

2 Development of multimedia applications

2 Development of multimedia applications 2 Development of multimedia applications 2.1 Multimedia authoring tools - Example Macromedia Flash 2.2 Elementary concepts of ActionScript (continued) Scripting in General + History of ActionScript Objects

More information

Using Flash Animation Basics

Using Flash Animation Basics Using Flash Contents Using Flash... 1 Animation Basics... 1 Exercise 1. Creating a Symbol... 2 Exercise 2. Working with Layers... 4 Exercise 3. Using the Timeline... 6 Exercise 4. Previewing an animation...

More information

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy Introduction to Unreal Engine Blueprints for Beginners By Chaven R Yenketswamy Introduction My first two tutorials covered creating and painting 3D objects for inclusion in your Unreal Project. In this

More information

Flash to Phaser Guide

Flash to Phaser Guide Flash to Phaser Guide Version 1.0 May 28 th 2014 By Richard Davey (rich@photonstorm.com) What is it? Flash to Phaser is a JSFL script that will aid in the process of laying out scenes within the Flash

More information

Flash Tutorial. Working With Text, Tween, Layers, Frames & Key Frames

Flash Tutorial. Working With Text, Tween, Layers, Frames & Key Frames Flash Tutorial Working With Text, Tween, Layers, Frames & Key Frames Opening the Software Open Adobe Flash CS3 Create a new Document Action Script 3 In the Property Inspector select the size to change

More information

You will be writing code in the Python programming language, which you may have learnt in the Python module.

You will be writing code in the Python programming language, which you may have learnt in the Python module. Tightrope Introduction: In this project you will create a game in which you have to tilt your Sense HAT to guide a character along a path. If you fall off the path, you have to start again from the beginning!

More information

Dear Candidate, Thank you, Adobe Education

Dear Candidate, Thank you, Adobe Education Dear Candidate, In preparation for the Rich Media Communication certification exam, we ve put together a set of practice materials and example exam items for you to review. What you ll find in this packet

More information

4! Programming with Animations

4! Programming with Animations 4! Programming with Animations 4.1! Animated Graphics: Principles and History 4.2! Types of Animation 4.3! Programming Animations 4.4! Design of Animations 4.5! Game Physics Ludwig-Maximilians-Universität

More information

The following illustration shows the non-linear version of the ad, the ad floating above the white area where the publisher content would be.

The following illustration shows the non-linear version of the ad, the ad floating above the white area where the publisher content would be. The In-Stream LogoKit is an In-Stream linear and non-linear ad format that plays in VPAID-compliant video players. The ad displays icons in the bottom-right corner of the player which, when clicked, open

More information

if / if else statements

if / if else statements if / if else statements December 1 2 3 4 5 Go over if notes and samples 8 9 10 11 12 Conditionals Quiz Conditionals TEST 15 16 17 18 19 1 7:30 8:21 2 8:27 9:18 3 9:24 10:14 1 CLASS 7:30 8:18 1 FINAL 8:24

More information

The Timeline records the actions in each Frame. It also allows multiple independent images and actions through Layers.

The Timeline records the actions in each Frame. It also allows multiple independent images and actions through Layers. Using Flash to Create Animated Environments Objectives: Understand the capabilities of Flash Gain a general overview of features and tools Understand layers, text, graphics, animation and buttons Import

More information

Dynamic Animation with Fuse Kit Free!

Dynamic Animation with Fuse Kit Free! Dynamic Animation with Fuse Kit Free! At some point, most Flash developers get a project where you have to do motion animation in code instead of tweens in the timeline. Video games, simulations or custom

More information

Sphero Lightning Lab Cheat Sheet

Sphero Lightning Lab Cheat Sheet Actions Tool Description Variables Ranges Roll Combines heading, speed and time variables to make the robot roll. Duration Speed Heading (0 to 999999 seconds) (degrees 0-359) Set Speed Sets the speed of

More information

Collections, Maps and Generics

Collections, Maps and Generics Collections API Collections, Maps and Generics You've already used ArrayList for exercises from the previous semester, but ArrayList is just one part of much larger Collections API that Java provides.

More information

CISC 110 Week 3. Expressions, Statements, Programming Style, and Test Review

CISC 110 Week 3. Expressions, Statements, Programming Style, and Test Review CISC 110 Week 3 Expressions, Statements, Programming Style, and Test Review Today Review last week Expressions/Statements Programming Style Reading/writing IO Test review! Trace Statements Purpose is to

More information

Why use actionscript? Interactive, logic and advance functionality to your flash piece

Why use actionscript? Interactive, logic and advance functionality to your flash piece Why use actionscript? Interactive, logic and advance functionality to your flash piece Button Open a browser window Counting and math User input Code Snippets uses action script great place to start learning

More information

Flash. Session 4: Importing Assets. Shiny Yang special thanks to Alex Miller

Flash. Session 4: Importing Assets. Shiny Yang special thanks to Alex Miller Flash Session 4: Importing Assets Shiny Yang (mootothemax@gmail.com), special thanks to Alex Miller ActionScript Recap Last time... We made BlocDodger the game. Draw sprites on screen. (Add to display

More information

Procedures: Algorithms and Abstraction

Procedures: Algorithms and Abstraction Procedures: Algorithms and Abstraction 5 5.1 Objectives After completing this module, a student should be able to: Read and understand simple NetLogo models. Make changes to NetLogo procedures and predict

More information

Actions and Graphs in Blender - Week 8

Actions and Graphs in Blender - Week 8 Actions and Graphs in Blender - Week 8 Sculpt Tool Sculpting tools in Blender are very easy to use and they will help you create interesting effects and model characters when working with animation and

More information

Maya Lesson 6 Screwdriver Notes & Assessment

Maya Lesson 6 Screwdriver Notes & Assessment Maya Lesson 6 Screwdriver Notes & Assessment Save a new file as: Lesson 6 Screwdriver YourNameInitial Save in your Computer Animation folder. Screwdriver Handle Base Using CVs Create a polygon cylinder

More information

ScaleForm/Unity A Simpler Tutorial by Carl Looper. July 2014

ScaleForm/Unity A Simpler Tutorial by Carl Looper. July 2014 ScaleForm/Unity A Simpler Tutorial by Carl Looper July 2014 Introduction The demo that ships with ScaleForm is way too complicated. While it certainly shows off some of the cool things that ScaleForm can

More information

Quick Guide. Choose It Maker 2. Overview/Introduction. ChooseIt!Maker2 is a motivating program at first because of the visual and musical

Quick Guide. Choose It Maker 2. Overview/Introduction. ChooseIt!Maker2 is a motivating program at first because of the visual and musical Choose It Maker 2 Quick Guide Created 09/06 Updated SM Overview/Introduction This is a simple to use piece of software that can be tailored for use by children as an alternative to a pencil and paper worksheet,

More information

1. Complete these exercises to practice creating user functions in small sketches.

1. Complete these exercises to practice creating user functions in small sketches. Lab 6 Due: Fri, Nov 4, 9 AM Consult the Standard Lab Instructions on LEARN for explanations of Lab Days ( D1, D2, D3 ), the Processing Language and IDE, and Saving and Submitting. Rules: Do not use the

More information

Adobe Flash CS4 Part 3: Animation

Adobe Flash CS4 Part 3: Animation CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Adobe Flash CS4 Part 3: Animation Fall 2010, Version 1.0 Table of Contents Introduction...2 Downloading the Data Files...2 Understanding

More information

Education and Training CUFMEM14A. Exercise 2. Create, Manipulate and Incorporate 2D Graphics

Education and Training CUFMEM14A. Exercise 2. Create, Manipulate and Incorporate 2D Graphics Education and Training CUFMEM14A Exercise 2 Create, Manipulate and Incorporate 2D Graphics Menu Exercise 2 Exercise 2a: Scarecrow Exercise - Painting and Drawing Tools... 3 Exercise 2b: Scarecrow Exercise

More information

Introduction to ActionScript 3.0 programming Object Oriented Programming pt. 1 & 2

Introduction to ActionScript 3.0 programming Object Oriented Programming pt. 1 & 2 Introduction to ActionScript 3.0 programming Object Oriented Programming pt. 1 & 2 Thomas Lövgren Flash developer, designer & programmer thomas.lovgren@humlab.umu.se Umeå Institute of Design, 2011-09-20

More information

Teacher Cheat Sheet - Game Coding Challenges

Teacher Cheat Sheet - Game Coding Challenges Teacher Cheat Sheet - Game Coding Challenges Challenge #1 Movement: Make your sprite move across the screen. When it hits the walls, it must bounce off and keep moving. 1. The When Flag is clicked is your

More information

Creating the Tilt Game with Blender 2.49b

Creating the Tilt Game with Blender 2.49b Creating the Tilt Game with Blender 2.49b Create a tilting platform. Start a new blend. Delete the default cube right click to select then press X and choose Erase Selected Object. Switch to Top view (NUM

More information

Adobe Flash CS4 Part 4: Interactivity

Adobe Flash CS4 Part 4: Interactivity CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Adobe Flash CS4 Part 4: Interactivity Fall 2010, Version 1.0 Table of Contents Introduction... 2 Downloading the Data Files... 2

More information

Director 8 - The basics

Director 8 - The basics Director 8 - The basics This tutorial covers the building blocks of Director, ignoring animation and interactive programming. These elements will be covered in the following tutorials. The idea is that

More information

Game Starter Kit Cheat Sheet

Game Starter Kit Cheat Sheet Game Starter Kit Cheat Sheet In this cheat sheet, I am going to show you how you can create your own custom Flappy Bird Game in a matter of minutes, using FREE Software. The same style of game that was

More information

Macromedia Director Tutorial 4

Macromedia Director Tutorial 4 Macromedia Director Tutorial 4 Further Lingo Contents Introduction...1 Play and Play done...2 Controlling QuickTime Movies...3 Controlling Playback...3 Introducing the if, then, else script...6 PuppetSprites

More information

Responding to Events. In this chapter, you ll learn how to write code that executes in response. Understanding Event Types 65

Responding to Events. In this chapter, you ll learn how to write code that executes in response. Understanding Event Types 65 4 Responding to Events Understanding Event Types 65 Using a Listener to Catch an Event 66 Writing Event Handlers 68 Responding to Mouse Events 73 In this chapter, you ll learn how to write code that executes

More information

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created. + Inheritance + Inheritance Classes that we design in Java can be used to model some concept in our program. For example: Pokemon a = new Pokemon(); Pokemon b = new Pokemon() Sometimes we need to create

More information

Review Questions FL Chapter 3: Working With Symbols and Interactivity

Review Questions FL Chapter 3: Working With Symbols and Interactivity Review Questions FL Chapter 3: Working With Symbols and Interactivity TRUE/FALSE 1. One way to decrease file size is to create reusable graphics, buttons, and movie clips. 2. Flash allows you to create

More information

Visual C# Program: Simple Game 3

Visual C# Program: Simple Game 3 C h a p t e r 6C Visual C# Program: Simple Game 3 In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Opening Visual C# Editor Beginning a

More information

Function Grapher Demystified Step 1

Function Grapher Demystified Step 1 Function Grapher Demystified Step 1 MathDL Flash Forum Learning Center Functions Grapher Demystified by Barbara Kaskosz and Doug Ensley In our MathDL Flash Forum article "Flash Tools for Developers: Function

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

Computer Games Development Spring Practical 3 GameCore, Transforms & Collision Detection

Computer Games Development Spring Practical 3 GameCore, Transforms & Collision Detection In this practical we are going to look at the GameCore class in some detail and then move on to examine the use of transforms, collision detection and tile maps. Combined with the material concerning sounds

More information

Setting up A Basic Scene in Unity

Setting up A Basic Scene in Unity Setting up A Basic Scene in Unity So begins the first of this series of tutorials aimed at helping you gain the basic understanding of skills needed in Unity to develop a 3D game. As this is a programming

More information

ME 105 Homework 4 A Movie Stunt Simulation with Graphical User Interface

ME 105 Homework 4 A Movie Stunt Simulation with Graphical User Interface ME 105 Homework 4 A Movie Stunt Simulation with Graphical User Interface In the 1994 action-adventure film Speed, a Los Angeles bus with a bomb that was set to explode if the speed of the buss fell below

More information

Introduction to functions

Introduction to functions Luke Begin programming: Build your first mobile game Section name Introduction to functions This document supports the Introduction to functions video. This whole block of code (notice the curly brackets

More information

Pharos Designer 2. Copyright Pharos Architectural Controls (15/1/2015)

Pharos Designer 2. Copyright Pharos Architectural Controls (15/1/2015) Pharos Designer 2 Welcome Welcome to Pharos Designer 2. We are delighted to introduce you to an entirely new version of the Pharos Designer software that picks up where the venerable and much- loved version

More information

Flash. (And Actionscript) Shiny Yang special thanks to Alex Miller

Flash. (And Actionscript) Shiny Yang special thanks to Alex Miller Flash (And Actionscript) Shiny Yang (mootothemax@gmail.com), special thanks to Alex Miller What is flash? http://www.youtube.com/watch?v=gvdf5n-zi14 http://www.adamatomic.com/canabalt/ http://www.homestarrunner.com/main15.html

More information

WORLD FIRST. In our first ever Flash MX 2004 tutorial, we take a look at the new ease-of-use features that can turn anyone into a Flash guru.

WORLD FIRST. In our first ever Flash MX 2004 tutorial, we take a look at the new ease-of-use features that can turn anyone into a Flash guru. ART90.flash 14/10/03 3:27 pm Page 24 Tutorial WORLD FIRST In our first ever Flash MX 2004 tutorial, we take a look at the new ease-of-use features that can turn anyone into a Flash guru ILLUSTRATION BY

More information

Tutorial: Understanding the Lumberyard Interface

Tutorial: Understanding the Lumberyard Interface Tutorial: Understanding the Lumberyard Interface This tutorial walks you through a basic overview of the Interface. Along the way we will create our first level, generate terrain, navigate within the editor,

More information

Tutorial 3: Constructive Editing (2D-CAD)

Tutorial 3: Constructive Editing (2D-CAD) (2D-CAD) The editing done up to now is not much different from the normal drawing board techniques. This section deals with commands to copy items we have already drawn, to move them and to make multiple

More information

Creating a Game 4. October 13, Copyright 2013 by World Class CAD, LLC. All Rights Reserved.

Creating a Game 4. October 13, Copyright 2013 by World Class CAD, LLC. All Rights Reserved. Creating a Game 4 October 13, 2013 Copyright 2013 by World Class CAD, LLC. All Rights Reserved. Open the Flash Program Open the Adobe Flash Professional program and then we want to choose ActionScript

More information

//gravity of the game. //speed of the obstacle. //force with which it jumps. //an array to store all the obstacles

//gravity of the game. //speed of the obstacle. //force with which it jumps. //an array to store all the obstacles ActionScript 3 package{ import flash.display.movieclip; import flash.events.keyboardevent; import flash.ui.keyboard; import flash.events.event; //used for ENTER_FRAME event public class Main extends MovieClip{

More information

Introduction to ActionScript 3.0 programming MovieClips, properties & Display list

Introduction to ActionScript 3.0 programming MovieClips, properties & Display list Introduction to ActionScript 3.0 programming MovieClips, properties & Display list Thomas Lövgren Flash developer, designer & programmer thomas.lovgren@humlab.umu.se Umeå Institute of Design, 2011-09-20

More information

ActionScript package{ 2. import flash.display.movieclip; 3. import flash.events.keyboardevent; 4. import flash.ui.keyboard;

ActionScript package{ 2. import flash.display.movieclip; 3. import flash.events.keyboardevent; 4. import flash.ui.keyboard; ActionScript 3 1. package{ 2. import flash.display.movieclip; 3. import flash.events.keyboardevent; 4. import flash.ui.keyboard; 5. import flash.events.event; //used for ENTER_FRAME event 6. 7. public

More information

107 Building Your First Mobile App Using Flash. Phil Cowcill, Canadore College

107 Building Your First Mobile App Using Flash. Phil Cowcill, Canadore College 107 Building Your First Mobile App Using Flash Phil Cowcill, Canadore College Mobile Devices Sessions Presenter: Phil Cowcill Phil.cowcill@canadorec.on.ca @CanadianPacMan (Twitter) This handout is geared

More information

IOP Horizons in Physics. Department of Physics University of Limerick

IOP Horizons in Physics. Department of Physics University of Limerick IOP Horizons in Physics Department of Physics University of Limerick 1 Import Video Using the Video tab Import the video you want to analyse. Your video may not have the correct orientation. If so filters

More information

Creating a 3D Characters Movement

Creating a 3D Characters Movement Creating a 3D Characters Movement Getting Characters and Animations Introduction to Mixamo Before we can start to work with a 3D characters we have to get them first. A great place to get 3D characters

More information

C# Programming Exercises

C# Programming Exercises EASJ Notes C# Programming Exercises (used in conjunction with Object-Oriented Programming With C#) By Per Laursen 06-02-2017 Content ProFun.0... 3 ProFun.1... 4 ProFun.2... 5 ProFun.3... 6 OOPFun.1...

More information

Week 1 The Blender Interface and Basic Shapes

Week 1 The Blender Interface and Basic Shapes Week 1 The Blender Interface and Basic Shapes Blender Blender is an open-source 3d software that we will use for this class to create our 3d game. Blender is as powerful as 3d Studio Max and Maya and has

More information

! Sequence of statements that are actually executed in a program. ! Conditionals and loops: enable us to choreograph control flow.

! Sequence of statements that are actually executed in a program. ! Conditionals and loops: enable us to choreograph control flow. Control Flow 1.3 Conditionals and Loops Control flow.! Sequence of statements that are actually executed in a program.! Conditionals and loops: enable us to choreograph control flow. statement 1 boolean

More information

Flash basics for mathematics applets Tutorial 2. Reading input text boxes and writing to dynamic text boxes

Flash basics for mathematics applets Tutorial 2. Reading input text boxes and writing to dynamic text boxes Flash basics for mathematics applets Tutorial 2. Reading input text boxes and writing to dynamic text boxes by Doug Ensley, Shippensburg University and Barbara Kaskosz, University of Rhode Island In this

More information

What s New to Version 2.0

What s New to Version 2.0 SU Animate 2.0 Guide What s New to Version 2.0...1 Install...2 Cameras, Curves & Paths...3 Use a Camera path to create a simple walk thru effect...8 Animating Objects with Target Groups...9 Using four

More information

Instance Name Timeline. Properties Library. Frames, Key Frames, and Frame Rate Symbols movie clips. Events and Event Handlers (functions)

Instance Name Timeline. Properties Library. Frames, Key Frames, and Frame Rate Symbols movie clips. Events and Event Handlers (functions) Using Adobe Animate CC 2017 and ActionScript 3.0 to program Character Movement Created by: Stacey Fornstrom Thomas Jefferson High School - Denver, CO Student Project Examples: http://sfornstrom.tjcctweb.com/

More information

januari 2008, Steve Stomp

januari 2008, Steve Stomp januari 2008, Steve Stomp Inhoud 1. Introduction... 3 2. Preparing Sandy3D for Adobe Flex... 4 3. Basic Sandy Actionscript File... 5 4. Camera and Motion... 7 4.1. Keyboard Events... 8 4.2. Mouse Events...

More information

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, create a new project called Helicopter Game and press OK C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot

More information

ACTIONSCRIPT ESSENTIALS

ACTIONSCRIPT ESSENTIALS ACTIONSCRIPT ESSENTIALS INTRODUCTION TO ACTIONSCRIPT Why should I learn how to use Actionscript? Actionscript is the programming language used in Macromedia Flash to create interactivity and dynamic movies,

More information

AO3. 1. Load Flash. 2. Under Create New click on Flash document a blank screen should appear:

AO3. 1. Load Flash. 2. Under Create New click on Flash document a blank screen should appear: AO3 This is where you use Flash to create your own Pizzalicious advert. Follow the instructions below to create a basic advert however, you ll need to change this to fit your own design! 1. Load Flash

More information

Honors Computer Science Python Mr. Clausen Program 7A, 7B

Honors Computer Science Python Mr. Clausen Program 7A, 7B Honors Computer Science Python Mr. Clausen Program 7A, 7B PROGRAM 7A Turtle Graphics Animation (100 points) Here is the overview of the program. Use functions to draw a minimum of two background scenes.

More information

Fundamentals: Expressions and Assignment

Fundamentals: Expressions and Assignment Fundamentals: Expressions and Assignment A typical Python program is made up of one or more statements, which are executed, or run, by a Python console (also known as a shell) for their side effects e.g,

More information

COMP : Practical 9 ActionScript: Text and Input

COMP : Practical 9 ActionScript: Text and Input COMP126-2006: Practical 9 ActionScript: Text and Input This practical exercise includes two separate parts. The first is about text ; looking at the different kinds of text field that Flash supports: static,

More information

Chapter 19- Object Physics

Chapter 19- Object Physics Chapter 19- Object Physics Flowing water, fabric, things falling, and even a bouncing ball can be difficult to animate realistically using techniques we have already discussed. This is where Blender's

More information

The playhead, shown as a vertical red beam, passes each frame when a movie plays back, much like movie fi lm passing in front of a projector bulb.

The playhead, shown as a vertical red beam, passes each frame when a movie plays back, much like movie fi lm passing in front of a projector bulb. The project: AIRPLANE I will show you a completed version of this project.. Introducing keyframes and the Timeline One of the most important panels in the Flash workspace is the Timeline, which is where

More information

Tutorial 7: Adding Features and Editing Line and Polygon Layers

Tutorial 7: Adding Features and Editing Line and Polygon Layers Tutorial 7: Adding Features and Editing Line and Polygon Layers Tutorial Content 7.1. When should I use a line layer to represent data? 7.2. How do I add line features? 7.3. How to use the snapping tool?

More information