COMP : Practical 8 ActionScript II: The If statement and Variables
|
|
- Marshall Crawford
- 5 years ago
- Views:
Transcription
1 COMP : 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 whose behaviour takes into account user input, and current circumstances. Variables allow a symbol to remember what has happened, and modify its behaviour accordingly. They also provide more capability in performing calculations. Our first movie is an extension to the first example in Practical 6, in which a clip moves across the screen. In this example we want it to notice when it reaches the right hand side of the stage, and stop moving or jump back to the left. 1. The first step is to make a movie with a shape that moves slowly to the right, using actionscript instructions in the shape itself. This is what you did in the first exercise in Practical 6. Try to do it again without referring to the instructions. Test your movie. If you let it run long enough, the shape will keep on going and disappear right off the screen. Figure 8.1: Yes! I cheated to make this image by using a motion tween. Clip scripts should be read from the point of view of the clip. Imagine you are the clip. The following script can be read as When an enter frame event happens to me: I will move right five pixels. If we want the shape to stop moving when it is close to the right hand side we need the script to check its position before changing it. The script must become When an enter frame event happens to me: I will check to make sure I haven t reached the right hand side; if I haven t, then I ll move right 5 pixels.. The if statement allows us to make such decisions. We can write: if (_x < 450) { The word if is followed by a comparison in this case comparing _x with 450 (being a bit less than the width of my stage). We read the statement: If _x is less than 450 move to the right by five pixels, otherwise do nothing. The do nothing part is just right for not moving. Notice that the event handler keeps running every frame, it s just that it does nothing once we reach the 450 point. 2. Try using the if statement as above. Take care with typing. All the punctuation is necessary. Check that your clip moves and then stops. 3. Find out what this next version does. (This is question 1 on the review sheet.) if (_x > 450) { _x = 0;
2 Syntax of the if statement The if statement takes the following form: if ( condition ) { meaning: If the condition is true do the statements, otherwise, don t where condition is some test usually a comparison, like _x < 450 but may also be a true/false property, as in if (_visible) { The comparison operations are: > is greater than >= is greater than or equal to < is less than <= is less than or equal to == is equal to (yes that really is two equals signs, side by side)!= is not equal to (exclamation mark and equals sign) It is also possible to combine comparisons using and, or and not. For example, this can be used to check to see if a value is in a range. _x > 20 and _x < 100 Other forms of the if statement are also provided if ( condition ) { else { means: If the condition is true do the first statements, otherwise, do the second. And for use in more complicated situations where several conditions must be checked if ( condition ) { else if ( condition ) { else { meaning: If the condition is true do the first statements; otherwise check the second condition and if it is true do the second lot of statements, otherwise (neither condition true) do the last lot of statements. The final form can be extended with as many else if clauses as you like. 4. As noted above, the if statement also supports an else option. We don t always want to do nothing when a condition is not true. Try the following variation. (Question 2 on review sheet). if (_x < 450) { else { _x = 0;
3 More examples of If and Else Just as it is possible to have several instructions, one after the other, altering properties. _y = _y + 2; it is possible to put one if statement after another. They each work independently. If _x is greater than 450 then _x will be set to zero. Regardless of whether that happens or not the next if statement checks the value in _y _y = _y + 5; if (_x > 450) { _x = 0; if (_y > 200) { _y = 0; We ll be building on the script we just wrote in the last section to make the shape change its dimensions depending on where it is on the screen. If the shape is on the right side of the screen it will turn into a tall narrow shape and when it is on the left side it will return to its original shape. 5. Starting with the following script, add ActionScript statements as instructed in the following steps. The full syntax will be given at the end. Don t look at that unless you need to. Figure 8.2 Starting point 6. Check to see if the shape s horizontal location is equal to or greater than 200. If it is, change the shape s width to 50% of its current size (ie: scale it down). And also change the shape s height to 200% of its current size. Test your program. Your shape should move from left to right, and somewhere near the middle of the stage its dimensions should change. However when the shape returns to the left side of the screen it doesn t change back,... this looks like a need to add some more ActionScript. 7. There are quite a number of ways of writing this. One way is to use the else again. Modify your program so that it reads: if the shape s x location is more than 200 then change the dimensions, else change the dimensions back to the original. 8. Try the program. Make sure that it works. If you are having problems, compare your instructions with those on the next page. 9. Save your movie as prac8a.
4 Figure 8.3 Finished code Comments Scripts can rapidly become large and hard to read and understand. One idea that helps is to add comments just extra text in English to explain what the ActionScript lines do. Comments are anything after two slash characters // on a line. Flash completely ignores comments, so they make no difference to what a script does they just help you and others to read and understand the script. The example above, with some comments added looks like this: Figure 8.4. ActionScript with comments.
5 Variables / Properties We have already used variables built in to the Flash system, only we called them properties. Each movie clip has several properties, eg: _x and _y. However, we are not limited to the built-in properties. We can add our own. If, for example, we were working on a game in Flash we might make a movie clip to use as the character in the game. It would make sense to add extra properties to that clip to store the number of points the character had earned, or in a fighting game, its current health or damage level. Essentially, variables and properties are the same thing, but in Flash we tend to call the built in ones properties and the ones we add variables. The first step is to declare/create your variable letting the Flash system know that the variable is required, and optionally to tell it something about the kinds of values you want to store in the variable. Declaring a variable is quite simple. First you decide on a name for your variable. The rules for variable names are the same as for instance names (as used in Practical 7 to refer to movie clips from the timeline.) Check the box at the end (later) for more comments on variable names. 10. The first exercise it to declare a variable. It won t server any useful purpose, we are just doing it to see how it is done. Start a new Flash movie, click on the first frame; open the actions window and type in the following var nmyvar = 3; This is a var statement its role is to create a variable. Our variable is called nmyvar 11. That s is we have declared a variable, and given it the value 3.. but how do we know if it worked? We can use trace to display the variable s value in the output window. Add the code var nmyvar = 3; trace(nmyvar); 12. Now run the movie and look in the output window. It should be as shown in Figure 8.5 Figure 8.5 Output window 13. Try changing the value, run the movie again and look for a change in the output. The variable we just introduced belonged to the timeline. The next example involves a variable associated with a movie clip. 14. Start a new movie. Draw a small square and convert it into a movie clip called Square. Add the following instructions to your square. onclipevent(load) { var myvar = 3; trace(myvar); myvar = myvar + 1; What happens? Explain. (This is review question 3.)
6 Variables being used with if statements In Practical 7 we experimented with mouse event handling. It was possible to make things happen on mouse movement. However, we usually want actions to occur only when the mouse button is held down. In this section we will use a variable to remember that a mouse down event has occurred. 15. As in the last step, create a new Flash movie, and place a square in the middle of the stage, convert it into a movieclip symbol called Square, and add instructions. onclipevent(load) { var blnmousedown = false; onclipevent(mousedown) { blnmousedown = true; trace(blnmousedown); The variable blnmousedown is created when the movie starts, but has the value false. When we see a mouse down event, we set it to true. In this way the variable records for us, whether or not a mouse down event has (ever) been seen. Note: I have used bln at the start of the name of the variable as it holds a true or false value. True/false values are referred to as Boolean values, in recognition of the work of George Boole, a logician of the late 19 th century. You may find names of this complexity annoying to type. If you do choose something simpler. 16. Run the movie and look in the output window. Nothing there? Click on the screen somewhere and look again. 17. Add the following instructions _rotation = _rotation + 4; You should see your square slowly rotating. The next step is to get control of the rotation using the mouse to stop and start it. 18. Change your enterframe handler to only do the rotation step if mouse down has happened. if (blnmousedown) { _rotation = _rotation + 4; Try the program. You should be able to turn on rotation by clicking on the screen. 19. That s good rotation now starts when we click the mouse. The next step is to make it stop when we release the mouse button. Do this by putting in an event handler for the mouse up event and Do it. 20. Save your program as prac8b. 21. The program now turns rotation on just while the mouse button is held down. An alternative control strategy might be to have one mouse click start rotation, which would continue until another mouse click stopped it. Make a version of your program which works in this manner and save it as prac8c. 22. Challenge: Make a version of the rotating square in which the square is rotating slowly when the program starts. This time clicking and holding the mouse down should gradually speed up the rotation. The longer the button is held down, the faster should be the rotation.
7 COMP : Practical 8 ActionScript II: The If statement and Variables Review Page. Question 1: What happens in step 3? Explain. Question 2: What happens in step 4? Explain. Question 3: What happens in step 14? Explain. Question 4: Show prac8a (Moving and changing size), prac8b (rotation control), prac8c (different rotation control) VERIFICATION Show the demonstrator your finished versions of the exercises in this practical. You may also be asked to demonstrate how you performed a specific task from this practical. Name: ID: (demo sign & date)
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 informationCOMP : 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 information3Using 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 informationUsing 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 informationText Input and Conditionals
Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()
More informationIT 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 informationCOMP : Practical 1 Getting to know Flash
What is Flash? COMP126-2006: Practical 1 Getting to know Flash Macromedia Flash is system that allows creation, communication and play of animated and interactive computer graphics. Its main application
More informationAdobe 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 information1. 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 informationAO3. 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 informationand 150 in the height text box, and then click OK. Flash automatically inserts the px (for pixel) after the number.
4. In the Document Properties dialog box, enter 700 in the width text box and 150 in the height text box, and then click OK. Flash automatically inserts the px (for pixel) after the number. The Document
More informationAnimations that make decisions
Chapter 17 Animations that make decisions 17.1 String decisions Worked Exercise 17.1.1 Develop an animation of a simple traffic light. It should initially show a green disk; after 5 seconds, it should
More informationObjectives: 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 informationNotes 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 informationResponding 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 informationIntroduction to Flash - Creating a Motion Tween
Introduction to Flash - Creating a Motion Tween This tutorial will show you how to create basic motion with Flash, referred to as a motion tween. Download the files to see working examples or start by
More informationWhy 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 informationAnimations involving numbers
136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive
More informationTo add actions to a button:
To add actions to a button: 1. Place your button on the stage and select it. 2. Choose Window Development Panels Actions. 2 Flash opens the Actions window, pictured below. Please note that to apply an
More informationFLASH 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 informationanimation, and what interface elements the Flash editor contains to help you create and control your animation.
e r ch02.fm Page 43 Wednesday, November 15, 2000 8:52 AM c h a p t 2 Animating the Page IN THIS CHAPTER Timelines and Frames Movement Tweening Shape Tweening Fading Recap Advanced Projects You have totally
More informationDynamic 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 informationIntro. Scheme Basics. scm> 5 5. scm>
Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if
More informationThe 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 informationCSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch
CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed
More informationLoading from external sources
Loading from external sources You have learnt some quite complicated things with Flash and it is true that most flash applications and websites don t contain half the actionscriping we have looked at,
More informationCOMP : Practical 11 Video
COMP126-2006: Practical 11 Video Flash is designed specifically to transmit animated and interactive documents compactly and quickly over the Internet. For this reason we tend to think of Flash animations
More informationWant to know how it works? Read the extensive documentation and complete ActionScript 2 object reference.
About 3D ImageFlow Gallery Dazzle your viewers with 3D photo navigation. Create an amazing gallery with cool perspective effects in seconds and give your photos stunning 3d and camera effects. The component
More informationExcel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller
Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing
More informationThe way I feel about music is that there is no right and wrong. Only true and false. Fiona Apple. true false false
5 Conditionals Conditionals 59 That language is an instrument of human reason, and not merely a medium for the expression of thought, is a truth generally admitted. George Boole The way I feel about music
More informationHonors 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 informationReview 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 informationCreating 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 informationTouring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T
Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring_the_Mac_Session-4_Feb-22-2011 1 To store your document for later retrieval, you must save an electronic file in your computer.
More informationProgramming Lab 1 (JS Hwk 3) Due Thursday, April 28
Programming Lab 1 (JS Hwk 3) Due Thursday, April 28 Lab You may work with partners for these problems. Make sure you put BOTH names on the problems. Create a folder named JSLab3, and place all of the web
More information[ 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 informationLearning to use the drawing tools
Create a blank slide This module was developed for Office 2000 and 2001, but although there are cosmetic changes in the appearance of some of the tools, the basic functionality is the same in Powerpoint
More informationUsing Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links
Using Dreamweaver CC 4 Creating a Template Now that the main page of our website is complete, we need to create the rest of the pages. Each of them will have a layout that follows the plan shown below.
More informationXP: Backup Your Important Files for Safety
XP: Backup Your Important Files for Safety X 380 / 1 Protect Your Personal Files Against Accidental Loss with XP s Backup Wizard Your computer contains a great many important files, but when it comes to
More informationUV Mapping to avoid texture flaws and enable proper shading
UV Mapping to avoid texture flaws and enable proper shading Foreword: Throughout this tutorial I am going to be using Maya s built in UV Mapping utility, which I am going to base my projections on individual
More informationMeet the Cast. The Cosmic Defenders: Gobo, Fabu, and Pele The Cosmic Defenders are transdimensional
Meet the Cast Mitch A computer science student who loves to make cool programs, he s passionate about movies and art, too! Mitch is an all-around good guy. The Cosmic Defenders: Gobo, Fabu, and Pele The
More informationRENDERING 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 informationAnimating the Page IN THIS CHAPTER. Timelines and Frames
e r ch02.fm Page 41 Friday, September 17, 1999 10:45 AM c h a p t 2 Animating the Page IN THIS CHAPTER Timelines and Frames Movement Tweening Shape Tweening Fading Recap Advanced Projects You have totally
More informationHOUR 4 Understanding Events
HOUR 4 Understanding Events It s fairly easy to produce an attractive interface for an application using Visual Basic.NET s integrated design tools. You can create beautiful forms that have buttons to
More informationMy First iphone App (for Xcode version 6.4)
My First iphone App (for Xcode version 6.4) 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button
More informationVisual 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 informationTaskbar: Working with Several Windows at Once
Taskbar: Working with Several Windows at Once Your Best Friend at the Bottom of the Screen How to Make the Most of Your Taskbar The taskbar is the wide bar that stretches across the bottom of your screen,
More informationControlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.
Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible
More informationWhat can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work.
MIDTERM REVIEW: THURSDAY I KNOW WHAT I WANT TO REVIEW. BUT ALSO I WOULD LIKE YOU TO TELL ME WHAT YOU MOST NEED TO GO OVER FOR MIDTERM. BY EMAIL AFTER TODAY S CLASS. What can we do with Processing? Let
More informationGeneral Directions for Creating a Program with Flash
General Directions for Creating a Program with Flash These directions are meant to serve as a starting point for a project in Flash. With them, you will create four screens or sections: 1) Title screen;
More informationIn this lesson, you ll learn how to:
LESSON 5: ADVANCED DRAWING TECHNIQUES OBJECTIVES In this lesson, you ll learn how to: apply gradient fills modify graphics by smoothing, straightening, and optimizing understand the difference between
More informationUsing Microsoft Word. Tables
Using Microsoft Word are a useful way of arranging information on a page. In their simplest form, tables can be used to place information in lists. More complex tables can be used to arrange graphics on
More informationTips & Tricks for Microsoft Word
T 330 / 1 Discover Useful Hidden Features to Speed-up Your Work in Word For what should be a straightforward wordprocessing program, Microsoft Word has a staggering number of features. Many of these you
More informationShorthand for values: variables
Chapter 2 Shorthand for values: variables 2.1 Defining a variable You ve typed a lot of expressions into the computer involving pictures, but every time you need a different picture, you ve needed to find
More informationFlash Domain 4: Building Rich Media Elements Using Flash CS5
Flash Domain 4: Building Rich Media Elements Using Flash CS5 Adobe Creative Suite 5 ACA Certification Preparation: Featuring Dreamweaver, Flash, and Photoshop 1 Objectives Make rich media content development
More informationHO-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 informationUsing Microsoft Word. Text Editing
Using Microsoft Word A word processor is all about working with large amounts of text, so learning the basics of text editing is essential to being able to make the most of the program. The first thing
More informationAdobe illustrator Introduction
Adobe illustrator Introduction This document was prepared by Luke Easterbrook 2013 1 Summary This document is an introduction to using adobe illustrator for scientific illustration. The document is a filleable
More informationLecture 05 I/O statements Printf, Scanf Simple statements, Compound statements
Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple
More informationInstructions for Crossword Assignment CS130
Instructions for Crossword Assignment CS130 Purposes: Implement a keyboard interface. 1. The program you will build is meant to assist a person in preparing a crossword puzzle for publication. You have
More informationDesign Programming DECO2011
Design Programming DECO2011 Rob Saunders web: http://www.arch.usyd.edu.au/~rob e-mail: rob@arch.usyd.edu.au office: Room 274, Wilkinson Building Data, Variables and Flow Control What is a Variable? Computers
More informationHow to draw and create shapes
Adobe Flash Professional Guide How to draw and create shapes You can add artwork to your Adobe Flash Professional documents in two ways: You can import images or draw original artwork in Flash by using
More informationArt 486: Introduction to Interactive Media.
Art 486: Introduction to Interactive Media mcdo@umbc.edu Schedule Chapter 3! Comments and stuff 3: Puzzles Attributes of Good Puzzle Design Intuitive controls Readily-Identifiable patterns Allows skill
More informationIT82: Multimedia Macromedia Director Practical 1
IT82: Multimedia Macromedia Director Practical 1 Over the course of these labs, you will be introduced Macromedia s Director multimedia authoring tool. This is the de facto standard for time-based multimedia
More informationFlash 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 informationExercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object
CS1046 Lab 5 Timing: This lab should take you approximately 2 hours. Objectives: By the end of this lab you should be able to: Recognize a Boolean variable and identify the two values it can take Calculate
More informationSpectroscopic Analysis: Peak Detector
Electronics and Instrumentation Laboratory Sacramento State Physics Department Spectroscopic Analysis: Peak Detector Purpose: The purpose of this experiment is a common sort of experiment in spectroscopy.
More informationChapter 2: ActionScript Programming Introduction
Chapter 2: ActionScript Programming Introduction Knowing how to draw pretty pictures and make tweens is lots of fun, but it is not programming. Programming allows one to have control over so much more.
More informationWhat will you learn: A better understanding of 3 D space How to use keyframes Designing and planning an animation How to render animations
Intro to Blender Introductory Animation Shane Trautsch Crestwood High School Welcome Back! Blender can also be used for animation. In this tutorial, you will learn how to create simple animations using
More information1.7 Limit of a Function
1.7 Limit of a Function We will discuss the following in this section: 1. Limit Notation 2. Finding a it numerically 3. Right and Left Hand Limits 4. Infinite Limits Consider the following graph Notation:
More informationMC Tween: it saves the world.
MC Tween: it saves the world. Introduction MC Tween works by adding new methods and functions to existing Actionscript classes - namely, the MovieClip, Sound and TextField classes. Since you won t have
More informationWelcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.
Welcome Back! Now that we ve covered the basics on how to use templates and how to customise them, it s time to learn some more advanced techniques that will help you create outstanding ebay listings!
More informationTangents. In this tutorial we are going to take a look at how tangents can affect an animation.
Tangents In this tutorial we are going to take a look at how tangents can affect an animation. One of the 12 Principles of Animation is called Slow In and Slow Out. This refers to the spacing of the in
More informationSPRITES Making Things Move Around The Screen
Unless you re playing something like Zork (GREATEST game in the world BTW!), you will likely need to move images around the screen. In this lesson we re going to work with simple 2D images, normally called
More informationWhat Are CSS and DHTML?
6/14/01 10:31 AM Page 1 1 What Are CSS and DHTML? c h a p t e r ch01.qxd IN THIS CHAPTER What Is CSS? What Is DHTML? DHTML vs. Flash Browser Hell What You Need to Know Already Welcome to the world of CSS
More informationAN INTRODUCTION TO SCRATCH (2) PROGRAMMING
AN INTRODUCTION TO SCRATCH (2) PROGRAMMING Document Version 2 (04/10/2014) INTRODUCTION SCRATCH is a visual programming environment and language. It was launched by the MIT Media Lab in 2007 in an effort
More informationSample Hands-On-Training Chapter Review Copy Only Contact Information Notice of Rights Notice of Liability Trademarks
Sample Hands-On-Training Chapter Review Copy Only Copyright 2000-2003 by lynda.com, Inc. All Rights Reserved. Reproduction and Distribution Strictly Prohibited. This electronically distributed Hands-On-Training
More informationMaking ecards Can Be Fun!
Making ecards Can Be Fun! A Macromedia Flash Tutorial By Mike Travis For ETEC 664 University of Hawaii Graduate Program in Educational Technology April 4, 2005 The Goal The goal of this project is to create
More informationData organization. So what kind of data did we collect?
Data organization Suppose we go out and collect some data. What do we do with it? First we need to figure out what kind of data we have. To illustrate, let s do a simple experiment and collect the height
More informationNotes 13: Are we there yet? Are we there yet? Are we there yet?
Notes 13: Are we there yet? Are we there yet? Are we there yet? Any of you ever go on a long family car trip. These were really great in the summer before air-conditioning. Did you enjoy of harassing your
More informationThe 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 informationProgramming Exercise
Programming Exercise Nibbles Objective: To gain experience working with 2 dimensional arrays. The Problem Nibbles is a snake. Nibbles moves around a field, looking for food. Unfortunately, Nibbles is not
More informationPython for Informatics
Python for Informatics Exploring Information Version 0.0.6 Charles Severance Chapter 3 Conditional execution 3.1 Boolean expressions A boolean expression is an expression that is either true or false.
More informationPointers and scanf() Steven R. Bagley
Pointers and scanf() Steven R. Bagley Recap Programs are a series of statements Defined in functions Can call functions to alter program flow if statement can determine whether code gets run Loops can
More informationAdobe 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 informationThe name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.
Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that
More information(Python) Chapter 3: Repetition
(Python) Chapter 3: Repetition 3.1 while loop Motivation Using our current set of tools, repeating a simple statement many times is tedious. The only item we can currently repeat easily is printing the
More informationlundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1
lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 www.blender.nl this document is online at http://www.blender.nl/showitem.php?id=4 Building a Castle 2000 07 19 Bart Veldhuizen id4 Introduction
More informationGet JAVA. I will just tell you what I did (on January 10, 2017). I went to:
Get JAVA To compile programs you need the JDK (Java Development Kit). To RUN programs you need the JRE (Java Runtime Environment). This download will get BOTH of them, so that you will be able to both
More informationAssignment III: Graphing Calculator
Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator for iphone and ipad. By doing
More informationValuable points from Lesson 6 Adobe Flash CS5 Professional Classroom in a Book
Valuable points from Lesson 6 Adobe Flash CS5 Professional Classroom in a Book You are expected to understand and know how to use/do each of these tasks in Flash CS5, unless otherwise noted below. If you
More informationCS1114 Section 8: The Fourier Transform March 13th, 2013
CS1114 Section 8: The Fourier Transform March 13th, 2013 http://xkcd.com/26 Today you will learn about an extremely useful tool in image processing called the Fourier transform, and along the way get more
More informationNote. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.
Robotics and Electronics Unit 2. Arduino Objectives. Students will understand the basic characteristics of an Arduino Uno microcontroller. understand the basic structure of an Arduino program. know how
More informationPart II: Creating Visio Drawings
128 Part II: Creating Visio Drawings Figure 5-3: Use any of five alignment styles where appropriate. Figure 5-4: Vertical alignment places your text at the top, bottom, or middle of a text block. You could
More informationPart 1. Summary of For Loops and While Loops
NAME EET 2259 Lab 5 Loops OBJECTIVES -Understand when to use a For Loop and when to use a While Loop. -Write LabVIEW programs using each kind of loop. -Write LabVIEW programs with one loop inside another.
More informationUsing Microsoft Excel
Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical
More informationWORLD 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 informationSpace 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 informationCS 134 Programming Exercise 9:
CS 134 Programming Exercise 9: Nibbles Objective: To gain experience working with 2 dimensional arrays. The Problem Nibbles is a snake. Nibbles moves around a field, looking for food. Unfortunately, Nibbles
More informationMaking use of other Applications
AppGameKit 2 Collision Using Arrays Making use of other Applications Although we need game software to help makes games for modern devices, we should not exclude the use of other applications to aid the
More information